Improve support for OpenBSD.
[pspp] / ChangeLog
1 2006-12-24  Bruno Haible  <bruno@clisp.org>
2
3         Improve support for OpenBSD.
4         * build-aux/config.rpath (libname_spec): Export.
5         (library_names_spec): New variable. Export.
6         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
7         library_names_spec from the config.rpath output. Locate shared library
8         through the name pattern in library_names_spec.
9
10 2007-01-01  Eric Blake  <ebb9@byu.net>
11
12         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
13
14 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
15
16         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
17         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
18         assume the C locale, and avoid an "eval" that could cause trouble.
19         Problem with SORT reported by Bob Proulx.
20
21         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
22         Define.  Trivial patch from Henning Nielsen Lund, originally
23         sent to bug-grep@gnu.org today.
24
25 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
26
27         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
28         struct stat.  Problem reported by Henning Nielsen Lund.
29         * lib/acl.c: Include acl.h first, to check interface.  Don't
30         bother to include sys/types.h and sys/stat.h again.
31
32 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
33
34         Import the following change from libc; problem reported by
35         Sven Verdoolaege.
36
37         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
38
39         [BZ #1373]
40         * lib/argp.h: Remove __NTH for __argp_usage inline function.
41
42 2006-12-28  Jim Meyering  <jim@meyering.net>
43
44         * build-aux/announce-gen: Do not assume that the package
45         builds any of tar.gz, tar.bz2, and .xdelta files.
46         Suggestion from Simon Josefsson.
47
48 2006-12-28  Simon Josefsson  <simon@josefsson.org>
49
50         * modules/announce-gen: New file.
51
52 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
53
54         * lib/mbchar.h: Just include <wctype.h>; the wctype module
55         handles its gotchas now.
56         * lib/mbswidth.c: Likewise.
57         * lib/wcwidth.h: Likewise.
58         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
59         and iswcntrl; the wctype module does this stuff now.
60         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
61         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
62         * modules/mbchar (Depends-on): Add wctype.
63         * modules/mbswidth (Depends-on): Likewise.
64         * modules/wcwidth (Depends-on): Likewise.
65
66 2006-12-27  Eric Blake  <ebb9@byu.net>
67
68         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
69         module uses more than what <wctype.h> is required to provide.
70
71 2006-12-26  Eric Blake  <ebb9@byu.net>
72
73         * gnulib-tool (sed_extract_prog): Avoid space-tab.
74
75 2006-12-26  Eric Blake  <ebb9@byu.net>
76
77         * modules/absolute-header: New module.
78         * modules/fcntl (Depends-on): Depend on it.
79         * modules/inttypes (Depends-on): Likewise.
80         * modules/stdint (Depends-on): Likewise.
81         * modules/sys_stat (Depends-on): Likewise.
82         * modules/wctype (Depends-on): Likewise.
83         * MODULES.html.sh (Support for building libraries and
84         executables): Document it.
85
86 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
87
88         * gnulib-tool (SED): Remove, undoing previous change.
89         The problem was that it broke coreutils on Solaris, because
90         "sed --posix" leaked into a makefile.
91         (sed): New alias, if 'alias' and GNU sed.
92
93 2006-12-24  Jim Meyering  <jim@meyering.net>
94
95         Work around an fchownat bug in glibc-2.4:
96         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
97         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
98         in spite of the -P option.
99         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
100         New macros.
101         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
102         * modules/openat (Files): Add lib/fchownat.c.
103         * lib/openat.c (fchownat): Don't define here.  Move to...
104         * lib/fchownat.c: ...this new file.
105
106 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
107
108         Fix bug reported by Bruno Haible in
109         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
110         where quotearg.c didn't compile on Mac OS X 10.2 because it
111         lacks <wchar.h> and wint_t.
112         * lib/wctype_.h (__wctype_wint_t): New type.
113         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
114         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
115         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
116         Arg is now of type __wctype_wint_t, not wint_t.
117         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
118         substitute HAVE_WINT_T.
119         * modules/wctype (Files): Add m4/wint_t.m4.
120         (wctype.h): Substitute HAVE_WINT_T.
121
122 2006-12-23  Bruno Haible  <bruno@clisp.org>
123
124         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
125
126 2006-12-23  Bruno Haible  <bruno@clisp.org>
127
128         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
129         S_ISLNK.
130         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
131         mingw.
132
133 2006-12-22  Bruno Haible  <bruno@clisp.org>
134
135         * lib/copy-file.c: Include acl.h.
136         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
137         Close the file descriptors only after being done with copy_acl.
138         * modules/copy-file (Depends-on): Add acl.
139
140 2006-12-22  Bruno Haible  <bruno@clisp.org>
141
142         * gnulib-tool (SED): New variable.
143         Use $SED instead of sed everywhere.
144
145 2006-12-22  Bruno Haible  <bruno@clisp.org>
146
147         * modules/no-c++: New file.
148         * m4/no-c++.m4: New file.
149         * MODULES.html.sh (Support for building libraries and executables):
150         Add no-c++.
151
152 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
153
154         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
155         Include <limits.h>, and use its INT_MAX to rewrite the
156         j loop so that it does not overflow 'int'.  Problem reported by
157         Ralf Wildenhues in
158         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
159         Play it safe by shifting left by 1 rather than multiplying by 2,
160         as GCC is less likely to optimize this away when the value
161         is signed (when it assumes overflow leads to undefined behavior).
162         Also, don't assume time_t uses two's complement.
163
164 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
165
166         * MODULES.html.sh: New module wctype.
167         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
168         * lib/fnmatch.c: Don't bother to include <wchar.h> before
169         <wctype.h>, since the new wctype module should fix this.
170         * lib/quotearg.c: Include <wctype.h> unconditionally, since
171         the wctype module should arrange for it.
172         * lib/regex_internal.h: Likewise.
173         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
174         since the wctype module should handle this now.
175         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
176         * modules/fnmatch (Depends-on): Add wctype.
177         * modules/quotearg (Depends-on): Likewise.
178         * modules/regex (Depends-on): Likewise.
179
180 2006-12-19  Bruno Haible  <bruno@clisp.org>
181
182         * lib/strdup.h [C++]: Wrap definitions in extern "C".
183         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
184
185 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
186
187         * modules/savewd (Depends-on): Fix dependency on fcntl.
188
189 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
190
191         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
192         conforms to C99, rather than relying on the user's environment
193         setting of STDINT_H.
194
195 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
196         and Eric Blake  <ebb9@byu.net>
197
198         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
199         This is more consistent with the other defines here.
200         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
201         Port to z/OS.  Problem reported by Paul Gilmartin.
202         Change local vars to use gl_ prefix rather than ac_.
203         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
204         with other defines.
205         * modules/double-slash-root: New module.
206         * modules/dirname (Files): Remove m4/double-slash-root.m4.
207         (Depends-on): Add double-slash-root.
208         * MODULES.html.sh (File system functions): Mention new module.
209
210 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
211
212         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
213         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
214         This is for the benefit of gzip, which doesn't do i18n.
215
216 2006-12-12  Jim Meyering  <jim@meyering.net>
217
218         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
219         Reported by Andreas Schwab <schwab@suse.de>.
220
221 2006-12-12  Bruno Haible  <bruno@clisp.org>
222
223         Merge these changes.
224         2006-09-05  Bruno Haible  <bruno@clisp.org>
225         * lib/iconvme.c (iconv_string): No need to save and restore errno when
226         iconv_alloc succeeded.
227         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
228         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
229         test for " && dest " at the end - dest is always != NULL there. Call
230         iconv with 4xNULL arguments initially, to reset the state. Call iconv
231         with 2xNULL arguments, also to flush the state storage. Handle the
232         IRIX iconv behaviour. Realloc the final result, to throw away unused
233         memory.
234
235 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
236
237         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
238         and fchmodat unconditionally, since glibc 2.4 has them.
239         Problem reported by Arkadiusz Miskiewicz.
240
241 2006-12-10  Bruno Haible  <bruno@clisp.org>
242
243         * gnulib-tool (func_import): Show the include files only for those
244         modules that are copied and specified.
245         Reported by Karl Berry.
246
247 2006-12-08  Jim Meyering  <jim@meyering.net>
248
249         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
250         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
251
252         * build-aux/announce-gen: Add two new options, both optional:
253         --bootstrap-tools=TOOL_LIST
254               a comma-separated list of tools, e.g.,
255               autoconf,automake,bison,gnulib
256         --gnulib-snapshot-date=DATE
257               if gnulib is in the bootstrap tool list,
258               then report this as the snapshot date.
259               If not specified, use the current date/time.
260               If you specify a date here, be sure it's UTC.
261
262 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
263
264         * tests/test-argp-2.sh: Fix test to match actual output.
265         (func_compare): Fix sed script to be portable.
266
267 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
268
269         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
270         workaround for this case.  It is not autoconfigured now; offhand
271         it's hard to see how to autoconfigure it.
272
273 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
274
275         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
276         a directory that is about to be chowned.  Such a directory's
277         initial file permissions should permit the owner only and this
278         should not be changed until after the chown, since the group and
279         other bits would be incorrect if they granted permission before
280         the chown.
281
282         Fix porting problem for iswctype reported by Georg Schwarz in:
283         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
284         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
285         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
286         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
287         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
288
289 2006-12-03  Jim Meyering  <jim@meyering.net>
290
291         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
292         p->fts_statp may not yet be defined.
293         (fts_read): Instead, set it in the caller, once p->fts_statp is
294         sure to be defined, and corresponds to a top-level directory.
295         This bug made du -x fail.  Here's the coreutils test case:
296         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
297         Reported by Mike Frysinger.
298
299 2006-12-01  Jim Meyering  <jim@meyering.net>
300
301         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
302         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
303         Reported by Simon Josefsson.
304
305 2006-11-30  Jim Meyering  <jim@meyering.net>
306
307         * m4/warning.m4: Use the all-permissive copyright notice
308         recommended by RMS (rather than LGPL).
309         * m4/vararrays.m4: Likewise.
310         * m4/flexmember.m4: Likewise.
311
312 2006-11-29  Bruno Haible  <bruno@clisp.org>
313
314         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
315         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
316         using +=.
317         Reported by Simon Josefsson <simon@josefsson.org>.
318
319 2006-11-28  James Youngman <jay@gnu.org>
320
321         * README: Advise users that they might find the bug-gnulib@gnu.org
322         and autotools-announce@gnu.org mailing lists useful.
323
324 2006-11-28  Bruno Haible  <bruno@clisp.org>
325
326         * m4/ptrdiff_max.m4: Remove file.
327
328 2006-11-21  Bruno Haible  <bruno@clisp.org>
329
330         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
331         _AC_COMPUTE_INT.
332         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
333         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
334         _AC_COMPUTE_INT.
335         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
336         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
337         _AC_COMPUTE_INT.
338         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
339
340 2006-11-28  Jim Meyering  <jim@meyering.net>
341
342         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
343         warning from "gcc -Wshadow" about shadowing the builtin.
344
345 2006-11-27  Bruno Haible  <bruno@clisp.org>
346
347         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
348         _AC_COMPUTE_INT.
349         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
350
351 2006-11-27  Bruno Haible  <bruno@clisp.org>
352             Paul Eggert  <eggert@cs.ucla.edu>
353
354         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
355
356 2006-11-26  Bruno Haible  <bruno@clisp.org>
357
358         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
359         noinst_LTLIBRARIES.
360
361 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
362             Bruno Haible  <bruno@clisp.org>
363
364         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
365         if compiling with "gcc -ansi".
366
367 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
368
369         Fix some incompatibilities with gcc -ansi -pedantic.
370         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
371         if compiling pedantically with GCC, unless it's C99 or later.
372         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
373         it mishandles gcc -ansi -pedantic as well.
374         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
375         if gcc -pedantic.
376         * lib/regexec.c (check_node_accept_bytes): Don't use auto
377         initializers for struct if -pedantic, unless it's C99 or later.
378
379 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
380
381         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
382         Don't close an fd more than once. Identical atimes indicate
383         success, not failure.
384
385 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
386
387         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
388
389 2006-11-23  Jim Meyering  <jim@meyering.net>
390
391         * build-aux/announce-gen: New file.  From coreutils.
392
393 2006-11-22  Jim Meyering  <jim@meyering.net>
394
395         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
396         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
397         (fts_read): Use a temporary to narrow the overused st_size member
398         before using it in a switch statement.  Reported by Matthew Woehlke.
399
400         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
401         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
402
403 2006-11-20  Bruno Haible  <bruno@clisp.org>
404
405         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
406         changequote instead of pairs of brackets.
407         Reported by Andreas Schwab <schwab@suse.de>.
408
409 2006-11-21  Jim Meyering  <jim@meyering.net>
410
411         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
412         so as to remain compatible with older compilers.
413         Patch from Michael Deutschmann.
414
415 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
416
417         * MODULES.html.sh (File system functions): Add openat.
418
419         * lib/openat.h (rpl_fstatat): New macro, if
420         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
421         (fstatat): Define to rpl_fstatat under the same conditions,
422         unless COMPILING_FSTATAT.
423         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
424         seems to have the bug.
425         * lib/fstatat.c: New file.
426         * modules/openat (Files): Add it.
427
428 2006-11-20  Bruno Haible  <bruno@clisp.org>
429
430         * Makefile: New file.
431
432 2006-11-20  Jim Meyering  <jim@meyering.net>
433
434         The beginnings of syntax-related checks for gnulib.
435         * lib/Makefile: New file.
436         * lib/t-idcache: New script.  Ensure that the two halves of
437         idcache.c stay in sync.
438
439         * lib/idcache.c: Adjust comments in user- and group- portions to
440         be more accurate, and to be consistent with one another.
441
442 2006-11-20  Jim Meyering  <jim@meyering.net>
443
444         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
445         continue using the flexible array member (thus, this module performs
446         half as many malloc calls), with the addition that...
447         (getgroup, getuser): Consistently record a non-match via an empty
448         "name" string, and map an empty string match to a NULL return value.
449         * modules/idcache (Depends-on): Re-add flexmember.
450
451         * lib/idcache.c (getuser): Remove all uses of the register keyword.
452         (getuidbyname, getgroup, getgidbyname): Likewise.
453
454         Use cleaner syntax: NULL rather than 0.
455         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
456
457 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
458
459         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
460         It mishandled the case where the group was missing.
461         Problem reported by Greg Schafer.
462         * modules/idcache: Likewise.
463
464 2006-11-18  Jim Meyering  <jim@meyering.net>
465
466         * check-module (%exempt_header): Add exception for some
467         conditionally-included headers.
468
469         * modules/i-ring (Depends-on): Add verify.
470         (License): Change to LGPL.
471
472 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
473
474         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
475         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
476         and inttostr.h.  Use snprintf rather than uinttostr, so that
477         LGPLed code doesn't depend on GPLed.
478
479 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
480
481         * modules/inline (License): Change from GPL to LGPL.
482
483 2006-11-17  Jim Meyering  <jim@meyering.net>
484
485         * modules/d-type (License): Switch to LGPL.
486
487 2006-11-15  Bruno Haible  <bruno@clisp.org>
488
489         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
490
491 2006-11-15  Eric Blake  <ebb9@byu.net>
492
493         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
494         the module dependency.
495
496 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
497             Bruno Haible  <bruno@clisp.org>
498
499         * gnulib-tool (func_create_testdir): Add license consistency check.
500
501 2006-11-15  Eric Blake  <ebb9@byu.net>
502
503         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
504         random "(cached)" in configure output.
505
506 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
507
508         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
509         test for conforming inttypes.h is both announced and cached.
510
511         * MODULES.html.sh (seen_modules, seen_files): New variables.
512         (func_module): Rewrite to use a few less gnulib-tool and sed
513         invocations.  Avoid a couple of quadratic algorithms for ...
514         (missed_modules, missed_files): ... these, with ...
515         (func_append, func_tmpdir): ... these new functions, from
516         gnulib-tool.  Analogously, install traps for cleanup.
517
518         * tests/test-gc.c (main): Remove unused variables.
519         * tests/test-read-file.c: Include stdlib.h, for 'free'.
520
521 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
522
523         * modules/inttostr (License): Change to LGPL.
524
525 2006-11-14  Eric Blake  <ebb9@byu.net>
526
527         * modules/tempname (License): Change to LGPL.
528
529 2006-11-14  Eric Blake  <ebb9@byu.net>
530
531         * doc/functions.texi (Function Portability): *printf functions on
532         Cygwin now understand all POSIX size specifiers.
533
534 2006-11-14  Bruno Haible  <bruno@clisp.org>
535
536         * modules/c-ctype (License): Change to LGPL.
537
538 2006-11-12  Bruno Haible  <bruno@clisp.org>
539
540         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
541         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
542         for GNOME libraries, for which the include files are installed in
543         subdirectories of $prefix/include.
544
545 2006-11-12  Bruno Haible  <bruno@clisp.org>
546
547         * m4/lib-link.m4: Require at least autoconf-2.54.
548         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
549         name to underscores for the --with option.
550
551 2006-11-13  Bruno Haible  <bruno@clisp.org>
552
553         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
554         the tests directory.
555         Reported by Ralf Wildenhues.
556
557 2006-11-13  Bruno Haible  <bruno@clisp.org>
558
559         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
560         (func_emit_initmacro_end): Undo the override here.
561         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
562         Works around the famous automake error in coreutils.
563
564 2006-11-13  Eric Blake  <ebb9@byu.net>
565
566         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
567         element, not its node.
568
569 2006-11-12  Bruno Haible  <bruno@clisp.org>
570
571         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
572         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
573
574 2006-11-12  Bruno Haible  <bruno@clisp.org>
575
576         * gnulib-tool: New option --local-symlink.
577         (func_usage): Document it.
578         (lsymbolic): New variable.
579         (func_import, func_create_testdir): If --symlink was not specified,
580         test whether --local-symlink was specified and the file comes from
581         the local_gnulib_dir.
582
583 2006-11-12  Bruno Haible  <bruno@clisp.org>
584
585         * gnulib-tool (func_ln): New function.
586         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
587
588 2006-11-12  Bruno Haible  <bruno@clisp.org>
589
590         Finish support for source files in subdirectories.
591         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
592         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
593         AUTOMAKE_OPTIONS.
594         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
595
596 2006-11-12  Bruno Haible  <bruno@clisp.org>
597
598         * gnulib-tool (func_get_automake_snippet): Synthesize also an
599         EXTRA_lib_SOURCES augmentation.
600         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
601
602 2006-11-12  Jim Meyering  <jim@meyering.net>
603
604         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
605         file descriptors.  This also averts a failure on systems with
606         native openat support when a traversed directory lacks "x" access.
607         * lib/fts_.h: Include "i-ring.h"
608         (struct FTS) [fts_fd_ring]: New member.
609         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
610         (FCHDIR): Add parentheses.
611         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
612         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
613         When descending, rather than simply closing the previous
614         fts_cwd_fd value, push that file descriptor onto the ring.
615         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
616         (fts_open): Initialize the new fd_ring member.
617         (fts_close): Clear the ring.
618         (fts_safe_changedir): When possible, use our new fd_ring to skip
619         the diropen and fstat and dev/ino comparison that would normally
620         accompany a virtual `chdir ("..")'.
621
622         * modules/fts (Depends-on): Add i-ring.
623         * modules/i-ring: New module.
624         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
625         * m4/i-ring.m4: New file.
626
627 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
628
629         * gnulib-tool (func_create_testdir): Fix replacement of
630         `build-aux' in configure.ac.  Run autotools in gltests
631         subdirectory.
632         (func_create_testdir, func_create_megatestdir, test): There is
633         no need for '--force' in most autotool invocations in a new
634         tree.  Actually fail the whole test if any of the tools, or the
635         configure or make stages fail.
636
637         Sync from Automake.
638         * build-aux/gnupload: Revert last change.  Add pointer to upload
639         instructions of the GNU Maintenance Instructions.
640         Suggestion by Karl Berry.
641
642 2006-11-10  Jim Meyering  <jim@meyering.net>
643
644         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
645
646 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
647
648         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
649         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
650         (bind_textdomain_codeset) [! ENABLE_NLS]:
651         Evaluate all the arguments.  That way, callers get compatible behavior
652         if the arguments have side effects.  Also, it avoids some GCC
653         diagnostics in some cases; Joel E. Denny reported problems when Bison
654         was configured with --enable-gcc-warnigs.
655
656 2006-11-10  Jim Meyering  <jim@meyering.net>
657
658         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
659         relevant options in CFLAGS (like -O, -fno-inline) are taken into
660         account.
661
662 2006-11-10  Jim Meyering  <jim@meyering.net>
663
664         * modules/inline: New file/module.
665         * modules/xalloc (Files): Remove m4/inline.m4.
666         (Depends-on): Add inline, instead.
667         * modules/oset: Likewise.
668         * modules/list: Likewise.
669
670 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
671
672         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
673         Problem reported by Matthew Woehlke.
674
675 2006-11-09  Bruno Haible  <bruno@clisp.org>
676
677         * lib/tempname.c (gen_tempname): Remove variant that invokes
678         __gen_tempname.
679         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
680         __gen_tempname.
681
682 2006-11-08  Bruno Haible  <bruno@clisp.org>
683
684         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
685         to 'yes' instead of 'cross-compiling'.
686
687 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
688
689         * lib/quotearg.h (quotearg_free): New decl.
690         * lib/quotearg.c (quotearg_free): New function.
691         (slot0, nslots, slotvec0, slotvec):
692         Now file-scope so that quotearg_free can get at them.
693
694 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
695
696         Sync from Automake.
697         * build-aux/gnupload: Add missing 'gnu' to example URL.
698         Report by Karl Berry.
699
700 2006-11-08  Bruno Haible  <bruno@clisp.org>
701
702         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
703         Suggested by Paul Eggert.
704
705 2006-11-08  Jim Meyering  <jim@meyering.net>
706
707         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
708         It's already included if !_LIBC.
709         (fts_safe_changedir): Add a comment.
710
711 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
712
713         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
714         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
715         Matthew Woehlke.
716
717         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
718         definitions up, to avoid colliding with change below.
719         (static_inline) [HAVE_INLINE]: New macro.
720         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
721         Provide extern decls when !HAVE_INLINE.  Do not define unless
722         static_inline is defined, either by us or by xmalloc.c.  Use
723         static_inline rather than static inline.
724         (XCALLOC): Optimize sizeof(T) = 1 case.
725         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
726
727 2006-11-07  Bruno Haible  <bruno@clisp.org>
728
729         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
730         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
731         AC_C_INLINE.
732         * modules/xalloc (Files): Add m4/inline.m4.
733
734 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
735
736         * README: Fix typo.
737         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
738         (Miscellanous Notes): ...from this.
739
740 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
741
742         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
743         Mention that offsetof should be used instead of sizeof.
744         From Bruno Haible.
745
746 2006-11-07  Bruno Haible  <bruno@clisp.org>
747
748         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
749
750 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
751
752         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
753         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
754         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
755         (gl_tree_add_before, gl_tree_add_after):
756         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
757         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
758         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
759         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
760         (gl_linked_add_after, gl_linked_add_at): Likewise.
761         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
762         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
763         (gl_tree_add_before, gl_tree_add_after): Likewise.
764         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
765         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
766         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
767
768 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
769
770         * lib/gl_oset.h: Use C comment style, not C++ comment style.
771
772 2006-11-06  Bruno Haible  <bruno@clisp.org>
773
774         * m4/inline.m4: New file.
775         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
776         * modules/list (Files): Add m4/inline.m4.
777         * modules/oset (Files): Likewise.
778
779 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
780
781         * lib/idcache.c: Include <stddef.h>, for offsetof.
782         (struct userid.name): Change from char * to a flexible array member.
783         All uses changed.
784         * modules/idcache (Depends-on): Add flexmember.
785
786         * MODULES.html.sh (Core language properties): New module flexmember.
787         * modules/flexmember, m4/flexmember.m4: New files.
788
789         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
790         inline functions that are identical with the old xnmalloc_inline,
791         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
792         that we can avoid some unnecessary integer multiplications and
793         divisions in the common case where the element size is known at
794         compile time.
795         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
796         needed.
797         (xnboundedmalloc): Remove.
798         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
799         arguments, for consistency with rest of this header.
800         (xcharalloc): Rewrite using XNMALLOC.
801         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
802         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
803         versions have been moved to lib/xalloc.h and renamed to be the
804         non-*_inline versions.
805         (xmalloc, xrealloc): Implement without reference to the xnmalloc
806         and xnrealloc functions, since those functions are now inline and
807         now call us.
808         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
809         renaming described above.
810         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
811         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
812         captures the dependency in AC_C_INLINE.
813
814         New module canonicalize-lgpl, proposed by Charles Wilson in
815         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
816         with a few small changes afterwards.
817         * MODULES.html.sh (File system functions): New module
818         canonicalize-lgpl.
819         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
820         and canonicalize_file_name.
821         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
822         * modules/canonicalize-lgpl: New files.
823
824 2006-11-05  Bruno Haible  <bruno@clisp.org>
825
826         * gnulib-tool (func_import, func_create_testdir): Create directories
827         also for files in subdirectories of lib/.
828
829 2006-11-05  Bruno Haible  <bruno@clisp.org>
830
831         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
832         ANSI C compliant.
833
834 2006-11-03  Bruno Haible  <bruno@clisp.org>
835
836         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
837         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
838         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
839         (xnboundedmalloc): New inline function.
840         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
841         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
842         xmalloc.
843         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
844         xmalloc.
845         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
846         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
847         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
848         xmalloc.
849         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
850         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
851         xmalloc.
852         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
853         gl_tree_add_after): Use XMALLOC instead of xmalloc.
854         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
855         xmalloc.
856         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
857         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
858         gl_tree_add_after): Use XMALLOC instead of xmalloc.
859         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
860         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
861         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
862         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
863
864 2006-11-03  Bruno Haible  <bruno@clisp.org>
865
866         * lib/c-ctype.h [C++]: Define functions without name mangling.
867         * lib/fwriteerror.h [C++]: Likewise.
868         * lib/gcd.h [C++]: Likewise.
869         * lib/linebreak.h [C++]: Likewise.
870
871 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
872
873         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
874         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
875         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
876         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
877         Check for functions and headers just once.
878         Check for declaration of canonicalize_file_name.
879         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
880
881 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
882
883         * gnulib-tool (func_import): Fix typo in actioncmd.
884
885 2006-11-02  Bruno Haible  <bruno@clisp.org>
886
887         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
888         newline sequence in the Makefile.am snippet as a space, like "make"
889         does.
890         Reported by Roger Persson <perrog@gmail.com>.
891
892 2006-11-01  Bruno Haible  <bruno@clisp.org>
893
894         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
895         already declared in <string.h>.
896         * lib/strcase.h (strncasecmp): Don't declare it if yes.
897
898 2006-11-01  Bruno Haible  <bruno@clisp.org>
899
900         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
901         * lib/strcase.h: Include <string.h>.
902         (strcasecmp): Define to rpl_strcasecmp here.
903
904 2006-11-01  Bruno Haible  <bruno@clisp.org>
905
906         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
907
908 2006-11-01  Eric Blake  <ebb9@byu.net>
909
910         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
911
912         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
913
914 2006-10-29  Bruno Haible  <bruno@clisp.org>
915
916         Make it compile in C++ mode.
917         * lib/full-write.c (full_rw): Add a cast.
918
919 2006-11-01  Bruno Haible  <bruno@clisp.org>
920
921         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
922         be POSIX compliant.
923         Reported by Roger Persson <perrog@gmail.com>.
924
925 2006-11-01  Eric Blake  <ebb9@byu.net>
926
927         * lib/getopt_.h: Fix comments.
928
929 2006-10-31  Eric Blake  <ebb9@byu.net>
930
931         * modules/tmpdir (Depends-on): Add sys_stat.
932         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
933         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
934         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
935         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
936         tempname.
937
938 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
939
940         Avoid some C++ diagnostics reported by Bruno Haible.
941         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
942         xmalloc.
943         (quotearg_alloc): Use xcharalloc rather than xmalloc.
944         (struct slotvec): Move to top level.
945         (quotearg_n_options): Rewrite to avoid xmalloc.
946         * lib/xalloc.h (xcharalloc): New function.
947         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
948         [defined __cplusplus]: Add function template that provides result
949         type propagation.  This part of the change is from Bruno Haible.
950
951 2006-10-29  Bruno Haible  <bruno@clisp.org>
952
953         Make it compile in C++ mode.
954         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
955         * lib/strnlen1.c (strnlen1): Cast memchr result.
956         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
957         * lib/clean-temp.c (string_equals, string_hash): Add casts.
958         (create_temp_dir): Rename local variable 'template'.
959         (compile_csharp_using_sscli): Add cast.
960         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
961         * lib/findprog.c (find_in_path): Likewise.
962         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
963         * lib/wait-process.c (register_slave_subprocess): Likewise.
964
965 2006-10-22  Bruno Haible  <bruno@clisp.org>
966
967         * modules/tsearch: New file.
968         * lib/tsearch.h: New file.
969         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
970         * m4/tsearch.m4: New file.
971         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
972
973 2006-10-29  Eric Blake  <ebb9@byu.net>
974
975         * lib/arcfour.c: Assume config.h.
976         * lib/arctwo.c: Likewise.
977         * lib/base64.c: Likewise.
978         * lib/check-version.c: Likewise.
979         * lib/crc.c: Likewise.
980         * lib/des.c: Likewise.
981         * lib/gc-gnulib.c: Likewise.
982         * lib/gc-libgcrypt.c: Likewise.
983         * lib/gc-pbkdf2-sha1.c: Likewise.
984         * lib/getaddrinfo.c: Likewise.
985         * lib/getdelim.c: Likewise.
986         * lib/getline.c: Likewise.
987         * lib/hmac-md5.c: Likewise.
988         * lib/hmac-sha1.c: Likewise.
989         * lib/iconvme.c: Likewise.
990         * lib/md2.c: Likewise.
991         * lib/md4.c: Likewise.
992         * lib/memxor.c: Likewise.
993         * lib/read-file.c: Likewise.
994         * lib/readline.c: Likewise.
995         * lib/rijndael-alg-fst.c: Likewise.
996         * lib/rijndael-api-fst.c: Likewise.
997         * lib/xgetdomainname.c: Likewise.
998
999 2006-10-28  Eric Blake  <ebb9@byu.net>
1000
1001         * lib/xstrndup.c: Assume config.h.
1002
1003 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
1004
1005         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
1006         stat-macros.h is now for our own macros, whereas stat_h is for
1007         macros in the <sys/stat.h> name space.
1008         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
1009         (STAT_MACROS_H): Remove.
1010         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
1011         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
1012         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
1013         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
1014         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
1015         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
1016         Move these macros to ...
1017         * lib/stat_.h: here.  Don't include stat-macros.h.
1018         * lib/canonicalize.c: Don't include stat-macros.h.
1019         * lib/chown.c: Likewise.
1020         * lib/euidaccess.c: Likewise.
1021         * lib/file-type.c: Likewise.
1022         * lib/filemode.c: Likewise.
1023         * lib/glob.c: Likewise.
1024         * lib/isapipe.c: Likewise.
1025         * lib/lchown.c: Likewise.
1026         * lib/lstat.c: Likewise.
1027         * lib/mkdir-p.c: Likewise.
1028         * lib/rmdir.c: Likewise.
1029         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
1030         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
1031         unless mkdir isn't declared, to speed up 'configure'.
1032         Always create sys/stat.h, since it's unlikely any real sys/stat.h
1033         would define all the S_* symbols.
1034         * modules/canonicalize (Depends-on):
1035         Depend on sys_stat, not stat-macros.
1036         * modules/chown: Likewise.
1037         * modules/euidaccess: Likewise.
1038         * modules/filemode: Likewise.
1039         * modules/file-type: Likewise.
1040         * modules/glob: Likewise.
1041         * modules/isapipe: Likewise.
1042         * modules/lchown: Likewise.
1043         * modules/lstat: Likewise.
1044         * modules/mkancesdirs: Likewise.
1045         * modules/rmdir: Likewise.
1046         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
1047         * modules/modechange: Likewise.
1048         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
1049         (configure.ac): Remove gl_STAT_MACROS.
1050         * modules/sys_stat (Depends-on): Remove stat-macros.
1051
1052 2006-10-27  Bruno Haible  <bruno@clisp.org>
1053
1054         * m4/signed.m4: Remove file.
1055         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
1056         invocation.
1057         * modules/vasnprintf (Files): Remove m4/signed.m4.
1058
1059 2006-10-27  Bruno Haible  <bruno@clisp.org>
1060
1061         Update to GNU gettext 0.16.
1062         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
1063         m4/inttypes-h.m4, m4/signed.m4.
1064         * m4/gettext.m4: Update to GNU gettext 0.16.
1065         * m4/intl.m4: New file, from GNU gettext.
1066         * m4/intldir.m4: New file, from GNU gettext.
1067         * config/srclist.txt: Update
1068
1069 2006-10-27  Eric Blake  <ebb9@byu.net>
1070
1071         * MODULES.html.sh: Document tempname.
1072         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
1073         dependencies.
1074         (Files): Move lib/tempname.c...
1075         * modules/tempname: ...to this new module.
1076         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
1077         (gl_PREREQ_TEMPNAME): Move...
1078         * m4/tempname.m4: ...to this new file.
1079         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
1080         * modules/sys_stat (Depends-on): Add stat-macros.
1081         * lib/stat_.h (includes): Pick up stat macros.
1082         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
1083         if stat macros are broken.
1084         * lib/tempname.c (includes): No need to include "stat-macros.h".
1085         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
1086         (direxists, __path_search) [!_LIBC]: Don't compile these in
1087         gnulib; the tmpdir module covers that.
1088         * lib/tempname.h: New file.
1089
1090 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
1091
1092         * COPYING: Explain how gnulib-tool converts licence headers.
1093         Almost all wording by Eric Blake.
1094
1095 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
1096
1097         * lib/mbchar.h (is_basic_table): Make read-only.
1098         * lib/mbchar.c (is_basic_table): Likewise.
1099         Reported by John Darrington.
1100
1101 2006-10-25  Bruno Haible  <bruno@clisp.org>
1102
1103         * lib/progname.h (set_program_name): Undefine before defining.
1104
1105 2006-10-25  Bruno Haible  <bruno@clisp.org>
1106
1107         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
1108         false for non-gcc C++ compilers.
1109         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
1110
1111 2006-10-24  Bruno Haible  <bruno@clisp.org>
1112
1113         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
1114         iconv implementations like Irix iconv.
1115
1116 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1117
1118         * modules/vararrays: New file.
1119         * m4/vararrays.m4: New file, taken from diffutils.
1120         * MODULES.html.sh: New module vararrays.
1121
1122 2006-10-24  Karl Berry  <karl@gnu.org>
1123
1124         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
1125         Don't call GNU Unix.
1126
1127 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1128
1129         * users.txt: Add Libtool.
1130
1131         Sync from Libtool:
1132
1133         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1134
1135         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
1136         to gnulib's policy of including config.h unconditionally.
1137
1138 2006-10-24  Bruno Haible  <bruno@clisp.org>
1139
1140         * modules/wcwidth (Files): Add m4/wint_t.m4.
1141         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
1142         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
1143
1144 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1145
1146         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
1147         to pacify GCC with some -W flags enabled.  Problem reported by
1148         Bruno Haible.
1149
1150 2006-10-24  Jim Meyering  <jim@meyering.net>
1151
1152         * MODULES.html.sh: Remove uinttostr.  It's not a module.
1153         Reported by Karl Berry.
1154
1155 2006-10-23  Bruno Haible  <bruno@clisp.org>
1156
1157         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
1158
1159 2006-10-24  Bruno Haible  <bruno@clisp.org>
1160
1161         * lib/gl_list.h: Use C comment style, not C++ comment style.
1162
1163 2006-10-23  Eric Blake  <ebb9@byu.net>
1164
1165         * lib/getaddrinfo.c (includes): Add missing include.
1166
1167 2006-10-23  Bruno Haible  <bruno@clisp.org>
1168             Paul Eggert  <eggert@cs.ucla.edu>
1169
1170         Ability to rename obstack_free.
1171         * lib/obstack.h (__obstack_free): New macro. Declare instead of
1172         obstack_free.
1173         (obstack_free): Invoke the __obstack_free macro.
1174         * lib/obstack.c (obstack_free): Use __obstack_free macro.
1175
1176 2006-10-23  Bruno Haible  <bruno@clisp.org>
1177             Paul Eggert  <eggert@cs.ucla.edu>
1178
1179         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
1180         __argc, __argv from the declaration. (They are defined as macros on
1181         mingw.)
1182
1183 2006-10-22  Bruno Haible  <bruno@clisp.org>
1184
1185         * doc/gnulib-intro.texi: New file.
1186         * doc/gnulib.texi: Include it.
1187
1188 2006-10-21  Bruno Haible  <bruno@clisp.org>
1189
1190         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
1191         "Introduction", "Miscellanous Notes", "Particular Modules".
1192
1193 2006-10-21  Bruno Haible  <bruno@clisp.org>
1194
1195         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1196         Change mostlyclean-local rule to avoid sh syntax error from bash
1197         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
1198
1199 2006-10-23  Jim Meyering  <jim@meyering.net>
1200
1201         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
1202         in place of snprintf.
1203
1204         * modules/inttostr (Files): Add lib/uinttostr.c.
1205         * lib/uinttostr.c (inttostr): New file/function.
1206         * lib/inttostr.h (uinttostr): Declare.
1207         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
1208         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
1209         Add uinttostr.
1210         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
1211
1212 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
1213
1214         * lib/canonicalize.c (ELOOP): Define if not already defined.
1215         Problem reported by Bruno Haible in
1216         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
1217
1218 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
1219
1220         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
1221         Problem reported by Perry Smith and Ville Laurikari.
1222
1223         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
1224         uses.
1225
1226 2006-10-19  Bruno Haible  <bruno@clisp.org>
1227
1228         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
1229         for mingw.
1230
1231 2006-10-19  Bruno Haible  <bruno@clisp.org>
1232
1233         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
1234         Needed for mingw.
1235
1236 2006-10-19  Bruno Haible  <bruno@clisp.org>
1237
1238         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
1239
1240 2006-10-19  Bruno Haible  <bruno@clisp.org>
1241
1242         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
1243         it.
1244
1245 2006-10-19  Bruno Haible  <bruno@clisp.org>
1246
1247         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
1248         invocation.
1249
1250 2006-10-19  Bruno Haible  <bruno@clisp.org>
1251
1252         * gnulib-tool (func_create_testdir): Don't include ftruncate and
1253         mountlist by default.
1254
1255 2006-10-16  Bruno Haible  <bruno@clisp.org>
1256
1257         * lib/c-strstr.c: Include c-strstr.h.
1258
1259 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1260
1261         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
1262         in a slash.
1263
1264 2006-10-18  Bruno Haible  <bruno@clisp.org>
1265
1266         * lib/lock.h [C++]: Wrap definitions in extern "C".
1267
1268 2006-10-18  Bruno Haible  <bruno@clisp.org>
1269
1270         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
1271         gl_LIBOBJS list.
1272
1273 2006-10-18  Bruno Haible  <bruno@clisp.org>
1274
1275         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
1276
1277 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
1278
1279         * lib/xstrtol.h: Include gettext.h.
1280         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
1281         Problem reported by Eric Blake.
1282         * modules/xstrtol (Depends-on): Add gettext-h.
1283
1284 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
1285
1286         * lib/strftime.c (advance): New macro.
1287         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
1288         incomplete type, so you can't add 0 to it.  Problem and patch
1289         reported by Eelco Dolstra for dietlibc.
1290
1291 2006-10-18  Jim Meyering  <jim@meyering.net>
1292
1293         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
1294         type for a local, and rename it: s/up/user_proc/.
1295
1296 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
1297
1298         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
1299         READ_UTMP_USER_PROCESS.
1300         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
1301
1302 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
1303
1304         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
1305         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
1306
1307 2006-10-17  Eric Blake  <ebb9@byu.net>
1308
1309         * lib/sigprocmask.c (sigprocmask): Fix typo.
1310
1311         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
1312
1313         * modules/clean-temp (Makefile.am): Don't add to make output...
1314         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
1315         config.h.
1316
1317 2006-10-17  Bruno Haible  <bruno@clisp.org>
1318
1319         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
1320         differently if DEFAULT_TEXT_DOMAIN is set.
1321
1322 2006-10-16  Bruno Haible  <bruno@clisp.org>
1323
1324         * lib/clean-temp.c: Include fwriteerror.h.
1325
1326 2006-10-16  Bruno Haible  <bruno@clisp.org>
1327
1328         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
1329
1330 2006-10-16  Bruno Haible  <bruno@clisp.org>
1331
1332         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
1333         * lib/sigprocmask.h: Include <sys/types.h>.
1334         (sigset_t): Use the system's definition if present.
1335
1336 2006-10-17  Eric Blake  <ebb9@byu.net>
1337
1338         * lib/xvasprintf.c (includes): Assume config.h.
1339         * lib/xasprintf.c (includes): Likewise.
1340
1341 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
1342
1343         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
1344         at least as wide as intmax_t.
1345
1346 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
1347
1348         (Imported from Automake.)
1349         * build-aux/gnupload: Update to version 1.1 of directive file.
1350
1351 2006-10-16  Eric Blake  <ebb9@byu.net>
1352
1353         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
1354         match Automake 1.10a.
1355
1356 2006-10-14  Bruno Haible  <bruno@clisp.org>
1357
1358         * modules/sigprocmask: New file.
1359         * lib/sigprocmask.h: New file.
1360         * lib/sigprocmask.c: New file.
1361         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
1362         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
1363         request sigprocmask.o.
1364         (gl_PREREQ_SIGPROCMASK): New macro.
1365         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
1366         (Depends-on): Add sigprocmask.
1367         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
1368         gt_SIGNALBLOCKING. Test for 'raise' only once.
1369         * lib/fatal-signal.c: Include sigprocmask.h.
1370         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
1371         unblock_fatal_signals): Define always.
1372         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1373         sigprocmask.
1374
1375 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
1376
1377         Sync from Automake.
1378         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
1379         which incorrectly sets the mode of an existing destination
1380         directory.  In some cases the unpatched install-sh could do the
1381         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
1382         system.  We hope this is rare in practice, but it's clearly worth
1383         fixing.  Problem reported by Alex Unleashed in
1384         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
1385         Also, don't bother to check for -m bugs unless we're using -m;
1386         suggested by Stepan Kasal.
1387
1388 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1389
1390         Sync from Automake.
1391         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
1392         `-c' flag, so they appear at the same position as in %FASTDEP%
1393         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
1394         which ignores unknown options only after the first non-option.
1395         Bug report against M4 by Nelson H. F. Beebe.
1396
1397 2006-10-13  Jim Meyering  <jim@meyering.net>
1398
1399         Fix a bug in yesterday's change.
1400         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
1401         p->fts_statp->st_dev would be used uninitialized.
1402         Ensures that we always call fts_stat on the very first entry.
1403         Miklos Szeredi reported that find -xdev stopped working.
1404
1405 2006-10-12  Bruno Haible  <bruno@clisp.org>
1406
1407         * gnulib-tool (func_get_automake_snippet): Append an automatically
1408         computed EXTRA_DIST augmentation.
1409         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
1410         * modules/alloca-opt (Makefile.am): Likewise.
1411         * modules/allocsa (Makefile.am): Likewise.
1412         * modules/arcfour (Makefile.am): Likewise.
1413         * modules/arctwo (Makefile.am): Likewise.
1414         * modules/argmatch (Makefile.am): Likewise.
1415         * modules/argz (Makefile.am): Likewise.
1416         * modules/atexit (Makefile.am): Likewise.
1417         * modules/backupfile (Makefile.am): Likewise.
1418         * modules/byteswap (Makefile.am): Likewise.
1419         * modules/c-strtod (Makefile.am): Likewise.
1420         * modules/c-strtold (Makefile.am): Likewise.
1421         * modules/calloc (Makefile.am): Likewise.
1422         * modules/canon-host (Makefile.am): Likewise.
1423         * modules/canonicalize (Makefile.am): Likewise.
1424         * modules/chdir-long (Makefile.am): Likewise.
1425         * modules/chdir-safer (Makefile.am): Likewise.
1426         * modules/check-version (Makefile.am): Likewise.
1427         * modules/chown (Makefile.am): Likewise.
1428         * modules/cloexec (Makefile.am): Likewise.
1429         * modules/close-stream (Makefile.am): Likewise.
1430         * modules/closeout (Makefile.am): Likewise.
1431         * modules/crc (Makefile.am): Likewise.
1432         * modules/csharpexec (Makefile.am): Likewise.
1433         * modules/cycle-check (Makefile.am): Likewise.
1434         * modules/des (Makefile.am): Likewise.
1435         * modules/dev-ino (Makefile.am): Likewise.
1436         * modules/dirfd (Makefile.am): Likewise.
1437         * modules/dirname (Makefile.am): Likewise.
1438         * modules/dup2 (Makefile.am): Likewise.
1439         * modules/eealloc (Makefile.am): Likewise.
1440         * modules/error (Makefile.am): Likewise.
1441         * modules/euidaccess (Makefile.am): Likewise.
1442         * modules/exclude (Makefile.am): Likewise.
1443         * modules/exitfail (Makefile.am): Likewise.
1444         * modules/fcntl-safer (Makefile.am): Likewise.
1445         * modules/fcntl (Makefile.am): Likewise.
1446         * modules/file-type (Makefile.am): Likewise.
1447         * modules/fileblocks (Makefile.am): Likewise.
1448         * modules/filemode (Makefile.am): Likewise.
1449         * modules/filenamecat (Makefile.am): Likewise.
1450         * modules/fnmatch (Makefile.am): Likewise.
1451         * modules/fopen-safer (Makefile.am): Likewise.
1452         * modules/fpending (Makefile.am): Likewise.
1453         * modules/fprintftime (Makefile.am): Likewise.
1454         * modules/free (Makefile.am): Likewise.
1455         * modules/fsusage (Makefile.am): Likewise.
1456         * modules/ftruncate (Makefile.am): Likewise.
1457         * modules/fts (Makefile.am): Likewise.
1458         * modules/gc-arcfour (Makefile.am): Likewise.
1459         * modules/gc-des (Makefile.am): Likewise.
1460         * modules/gc-hmac-md5 (Makefile.am): Likewise.
1461         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
1462         * modules/gc-md4 (Makefile.am): Likewise.
1463         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
1464         * modules/gc-sha1 (Makefile.am): Likewise.
1465         * modules/gc (Makefile.am): Likewise.
1466         * modules/getaddrinfo (Makefile.am): Likewise.
1467         * modules/getcwd (Makefile.am): Likewise.
1468         * modules/getdelim (Makefile.am): Likewise.
1469         * modules/getdomainname (Makefile.am): Likewise.
1470         * modules/getgroups (Makefile.am): Likewise.
1471         * modules/gethostname (Makefile.am): Likewise.
1472         * modules/gethrxtime (Makefile.am): Likewise.
1473         * modules/getline (Makefile.am): Likewise.
1474         * modules/getloadavg (Makefile.am): Likewise.
1475         * modules/getlogin_r (Makefile.am): Likewise.
1476         * modules/getndelim2 (Makefile.am): Likewise.
1477         * modules/getopt (Makefile.am): Likewise.
1478         * modules/getpagesize (Makefile.am): Likewise.
1479         * modules/getpass-gnu (Makefile.am): Likewise.
1480         * modules/getpass (Makefile.am): Likewise.
1481         * modules/getsubopt (Makefile.am): Likewise.
1482         * modules/gettime (Makefile.am): Likewise.
1483         * modules/gettimeofday (Makefile.am): Likewise.
1484         * modules/getugroups (Makefile.am): Likewise.
1485         * modules/getusershell (Makefile.am): Likewise.
1486         * modules/glob (Makefile.am): Likewise.
1487         * modules/group-member (Makefile.am): Likewise.
1488         * modules/hard-locale (Makefile.am): Likewise.
1489         * modules/hash (Makefile.am): Likewise.
1490         * modules/hmac-md5 (Makefile.am): Likewise.
1491         * modules/hmac-sha1 (Makefile.am): Likewise.
1492         * modules/human (Makefile.am): Likewise.
1493         * modules/idcache (Makefile.am): Likewise.
1494         * modules/imaxabs (Makefile.am): Likewise.
1495         * modules/imaxdiv (Makefile.am): Likewise.
1496         * modules/inet_ntop (Makefile.am): Likewise.
1497         * modules/inet_pton (Makefile.am): Likewise.
1498         * modules/intprops (Makefile.am): Likewise.
1499         * modules/inttostr (Makefile.am): Likewise.
1500         * modules/inttypes (Makefile.am): Likewise.
1501         * modules/isapipe (Makefile.am): Likewise.
1502         * modules/javaversion (Makefile.am): Likewise.
1503         * modules/lchmod (Makefile.am): Likewise.
1504         * modules/lchown (Makefile.am): Likewise.
1505         * modules/localcharset (Makefile.am): Likewise.
1506         * modules/long-options (Makefile.am): Likewise.
1507         * modules/lstat (Makefile.am): Likewise.
1508         * modules/malloc (Makefile.am): Likewise.
1509         * modules/mathl (Makefile.am): Likewise.
1510         * modules/mbchar (Makefile.am): Likewise.
1511         * modules/md2 (Makefile.am): Likewise.
1512         * modules/md4 (Makefile.am): Likewise.
1513         * modules/md5 (Makefile.am): Likewise.
1514         * modules/memcasecmp (Makefile.am): Likewise.
1515         * modules/memchr (Makefile.am): Likewise.
1516         * modules/memcmp (Makefile.am): Likewise.
1517         * modules/memcoll (Makefile.am): Likewise.
1518         * modules/memcpy (Makefile.am): Likewise.
1519         * modules/memmem (Makefile.am): Likewise.
1520         * modules/memmove (Makefile.am): Likewise.
1521         * modules/mempcpy (Makefile.am): Likewise.
1522         * modules/memrchr (Makefile.am): Likewise.
1523         * modules/memset (Makefile.am): Likewise.
1524         * modules/memxor (Makefile.am): Likewise.
1525         * modules/mkancesdirs (Makefile.am): Likewise.
1526         * modules/mkdir-p (Makefile.am): Likewise.
1527         * modules/mkdir (Makefile.am): Likewise.
1528         * modules/mkdtemp (Makefile.am): Likewise.
1529         * modules/mkstemp (Makefile.am): Likewise.
1530         * modules/mktime (Makefile.am): Likewise.
1531         * modules/modechange (Makefile.am): Likewise.
1532         * modules/mountlist (Makefile.am): Likewise.
1533         * modules/nanosleep (Makefile.am): Likewise.
1534         * modules/obstack (Makefile.am): Likewise.
1535         * modules/openat (Makefile.am): Likewise.
1536         * modules/pagealign_alloc (Makefile.am): Likewise.
1537         * modules/pathmax (Makefile.am): Likewise.
1538         * modules/physmem (Makefile.am): Likewise.
1539         * modules/poll (Makefile.am): Likewise.
1540         * modules/posixtm (Makefile.am): Likewise.
1541         * modules/posixver (Makefile.am): Likewise.
1542         * modules/putenv (Makefile.am): Likewise.
1543         * modules/quote (Makefile.am): Likewise.
1544         * modules/quotearg (Makefile.am): Likewise.
1545         * modules/raise (Makefile.am): Likewise.
1546         * modules/read-file (Makefile.am): Likewise.
1547         * modules/readline (Makefile.am): Likewise.
1548         * modules/readlink (Makefile.am): Likewise.
1549         * modules/readtokens (Makefile.am): Likewise.
1550         * modules/readutmp (Makefile.am): Likewise.
1551         * modules/realloc (Makefile.am): Likewise.
1552         * modules/regex (Makefile.am): Likewise.
1553         * modules/rename-dest-slash (Makefile.am): Likewise.
1554         * modules/rename (Makefile.am): Likewise.
1555         * modules/rijndael (Makefile.am): Likewise.
1556         * modules/rmdir (Makefile.am): Likewise.
1557         * modules/rpmatch (Makefile.am): Likewise.
1558         * modules/safe-read (Makefile.am): Likewise.
1559         * modules/safe-write (Makefile.am): Likewise.
1560         * modules/same-inode (Makefile.am): Likewise.
1561         * modules/same (Makefile.am): Likewise.
1562         * modules/save-cwd (Makefile.am): Likewise.
1563         * modules/savedir (Makefile.am): Likewise.
1564         * modules/setenv (Makefile.am): Likewise.
1565         * modules/settime (Makefile.am): Likewise.
1566         * modules/sha1 (Makefile.am): Likewise.
1567         * modules/sig2str (Makefile.am): Likewise.
1568         * modules/snprintf (Makefile.am): Likewise.
1569         * modules/stat-macros (Makefile.am): Likewise.
1570         * modules/stat-time (Makefile.am): Likewise.
1571         * modules/stdbool (Makefile.am): Likewise.
1572         * modules/stdint (Makefile.am): Likewise.
1573         * modules/stdlib-safer (Makefile.am): Likewise.
1574         * modules/stpcpy (Makefile.am): Likewise.
1575         * modules/stpncpy (Makefile.am): Likewise.
1576         * modules/strcase (Makefile.am): Likewise.
1577         * modules/strcasestr (Makefile.am): Likewise.
1578         * modules/strchrnul (Makefile.am): Likewise.
1579         * modules/strcspn (Makefile.am): Likewise.
1580         * modules/strdup (Makefile.am): Likewise.
1581         * modules/strerror (Makefile.am): Likewise.
1582         * modules/strftime (Makefile.am): Likewise.
1583         * modules/strndup (Makefile.am): Likewise.
1584         * modules/strnlen (Makefile.am): Likewise.
1585         * modules/strpbrk (Makefile.am): Likewise.
1586         * modules/strsep (Makefile.am): Likewise.
1587         * modules/strstr (Makefile.am): Likewise.
1588         * modules/strtod (Makefile.am): Likewise.
1589         * modules/strtoimax (Makefile.am): Likewise.
1590         * modules/strtok_r (Makefile.am): Likewise.
1591         * modules/strtol (Makefile.am): Likewise.
1592         * modules/strtoll (Makefile.am): Likewise.
1593         * modules/strtoul (Makefile.am): Likewise.
1594         * modules/strtoull (Makefile.am): Likewise.
1595         * modules/strtoumax (Makefile.am): Likewise.
1596         * modules/strverscmp (Makefile.am): Likewise.
1597         * modules/sys_socket (Makefile.am): Likewise.
1598         * modules/sys_stat (Makefile.am): Likewise.
1599         * modules/sysexits (Makefile.am): Likewise.
1600         * modules/time_r (Makefile.am): Likewise.
1601         * modules/timegm (Makefile.am): Likewise.
1602         * modules/timespec (Makefile.am): Likewise.
1603         * modules/tmpfile-safer (Makefile.am): Likewise.
1604         * modules/trim (Makefile.am): Likewise.
1605         * modules/unistd-safer (Makefile.am): Likewise.
1606         * modules/unlinkdir (Makefile.am): Likewise.
1607         * modules/unlocked-io (Makefile.am): Likewise.
1608         * modules/userspec (Makefile.am): Likewise.
1609         * modules/utime (Makefile.am): Likewise.
1610         * modules/utimecmp (Makefile.am): Likewise.
1611         * modules/utimens (Makefile.am): Likewise.
1612         * modules/vasnprintf (Makefile.am): Likewise.
1613         * modules/vasprintf (Makefile.am): Likewise.
1614         * modules/vsnprintf (Makefile.am): Likewise.
1615         * modules/xalloc (Makefile.am): Likewise.
1616         * modules/xgetcwd (Makefile.am): Likewise.
1617         * modules/xnanosleep (Makefile.am): Likewise.
1618         * modules/xreadlink (Makefile.am): Likewise.
1619         * modules/xstrtod (Makefile.am): Likewise.
1620         * modules/xstrtol (Makefile.am): Likewise.
1621         * modules/xstrtold (Makefile.am): Likewise.
1622         * modules/yesno (Makefile.am): Likewise.
1623         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
1624
1625 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
1626
1627         * modules/error (Makefile.am): Distribute files through
1628         EXTRA_DIST, not lib_SOURCES.
1629
1630 2006-10-12  Eric Blake  <ebb9@byu.net>
1631
1632         * modules/error (Makefile.am): Distribute files in /lib.
1633         * modules/obstack (Makefile.am): Likewise.
1634
1635 2006-10-12  Bruno Haible  <bruno@clisp.org>
1636
1637         * modules/acl (Makefile.am): Distribute all files in lib/ through
1638         EXTRA_DIST.
1639         * modules/arcfour (Makefile.am): Likewise.
1640         * modules/arctwo (Makefile.am): Likewise.
1641         * modules/argmatch (Makefile.am): Likewise.
1642         * modules/argz (Makefile.am): Likewise.
1643         * modules/atexit (Makefile.am): Likewise.
1644         * modules/backupfile (Makefile.am): Likewise.
1645         * modules/c-strtod (Makefile.am): Likewise.
1646         * modules/c-strtold (Makefile.am): Likewise.
1647         * modules/calloc (Makefile.am): Likewise.
1648         * modules/canon-host (Makefile.am): Likewise.
1649         * modules/canonicalize (Makefile.am): Likewise.
1650         * modules/chdir-long (Makefile.am): Likewise.
1651         * modules/chdir-safer (Makefile.am): Likewise.
1652         * modules/check-version (Makefile.am): Likewise.
1653         * modules/chown (Makefile.am): Likewise.
1654         * modules/cloexec (Makefile.am): Likewise.
1655         * modules/close-stream (Makefile.am): Likewise.
1656         * modules/closeout (Makefile.am): Likewise.
1657         * modules/crc (Makefile.am): Likewise.
1658         * modules/cycle-check (Makefile.am): Likewise.
1659         * modules/des (Makefile.am): Likewise.
1660         * modules/dirfd (Makefile.am): Likewise.
1661         * modules/dirname (Makefile.am): Likewise.
1662         * modules/dup2 (Makefile.am): Likewise.
1663         * modules/euidaccess (Makefile.am): Likewise.
1664         * modules/exclude (Makefile.am): Likewise.
1665         * modules/exitfail (Makefile.am): Likewise.
1666         * modules/fcntl-safer (Makefile.am): Likewise.
1667         * modules/file-type (Makefile.am): Likewise.
1668         * modules/fileblocks (Makefile.am): Likewise.
1669         * modules/filemode (Makefile.am): Likewise.
1670         * modules/filenamecat (Makefile.am): Likewise.
1671         * modules/fnmatch (Makefile.am): Likewise.
1672         * modules/fopen-safer (Makefile.am): Likewise.
1673         * modules/fpending (Makefile.am): Likewise.
1674         * modules/fprintftime (Makefile.am): Likewise.
1675         * modules/free (Makefile.am): Likewise.
1676         * modules/fsusage (Makefile.am): Likewise.
1677         * modules/ftruncate (Makefile.am): Likewise.
1678         * modules/fts (Makefile.am): Likewise.
1679         * modules/gc (Makefile.am): Likewise.
1680         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
1681         * modules/getaddrinfo (Makefile.am): Likewise.
1682         * modules/getcwd (Makefile.am): Likewise.
1683         * modules/getdelim (Makefile.am): Likewise.
1684         * modules/getdomainname (Makefile.am): Likewise.
1685         * modules/getgroups (Makefile.am): Likewise.
1686         * modules/gethostname (Makefile.am): Likewise.
1687         * modules/gethrxtime (Makefile.am): Likewise.
1688         * modules/getline (Makefile.am): Likewise.
1689         * modules/getloadavg (Makefile.am): Likewise.
1690         * modules/getlogin_r (Makefile.am): Likewise.
1691         * modules/getopt (Makefile.am): Likewise.
1692         * modules/getpass (Makefile.am): Likewise.
1693         * modules/getpass-gnu (Makefile.am): Likewise.
1694         * modules/getsubopt (Makefile.am): Likewise.
1695         * modules/gettime (Makefile.am): Likewise.
1696         * modules/gettimeofday (Makefile.am): Likewise.
1697         * modules/getugroups (Makefile.am): Likewise.
1698         * modules/getusershell (Makefile.am): Likewise.
1699         * modules/glob (Makefile.am): Likewise.
1700         * modules/group-member (Makefile.am): Likewise.
1701         * modules/hard-locale (Makefile.am): Likewise.
1702         * modules/hash (Makefile.am): Likewise.
1703         * modules/hmac-md5 (Makefile.am): Likewise.
1704         * modules/hmac-sha1 (Makefile.am): Likewise.
1705         * modules/human (Makefile.am): Likewise.
1706         * modules/idcache (Makefile.am): Likewise.
1707         * modules/imaxabs (Makefile.am): Likewise.
1708         * modules/imaxdiv (Makefile.am): Likewise.
1709         * modules/inet_ntop (Makefile.am): Likewise.
1710         * modules/inet_pton (Makefile.am): Likewise.
1711         * modules/inttostr (Makefile.am): Likewise.
1712         * modules/isapipe (Makefile.am): Likewise.
1713         * modules/lchown (Makefile.am): Likewise.
1714         * modules/long-options (Makefile.am): Likewise.
1715         * modules/lstat (Makefile.am): Likewise.
1716         * modules/malloc (Makefile.am): Likewise.
1717         * modules/mathl (Makefile.am): Likewise.
1718         * modules/mbchar (Makefile.am): Likewise.
1719         * modules/md2 (Makefile.am): Likewise.
1720         * modules/md4 (Makefile.am): Likewise.
1721         * modules/md5 (Makefile.am): Likewise.
1722         * modules/memcasecmp (Makefile.am): Likewise.
1723         * modules/memchr (Makefile.am): Likewise.
1724         * modules/memcmp (Makefile.am): Likewise.
1725         * modules/memcoll (Makefile.am): Likewise.
1726         * modules/memcpy (Makefile.am): Likewise.
1727         * modules/memmem (Makefile.am): Likewise.
1728         * modules/memmove (Makefile.am): Likewise.
1729         * modules/mempcpy (Makefile.am): Likewise.
1730         * modules/memrchr (Makefile.am): Likewise.
1731         * modules/memset (Makefile.am): Likewise.
1732         * modules/memxor (Makefile.am): Likewise.
1733         * modules/mkancesdirs (Makefile.am): Likewise.
1734         * modules/mkdir (Makefile.am): Likewise.
1735         * modules/mkdir-p (Makefile.am): Likewise.
1736         * modules/mkdtemp (Makefile.am): Likewise.
1737         * modules/mkstemp (Makefile.am): Likewise.
1738         * modules/mktime (Makefile.am): Likewise.
1739         * modules/modechange (Makefile.am): Likewise.
1740         * modules/mountlist (Makefile.am): Likewise.
1741         * modules/nanosleep (Makefile.am): Likewise.
1742         * modules/openat (Makefile.am): Likewise.
1743         * modules/pagealign_alloc (Makefile.am): Likewise.
1744         * modules/physmem (Makefile.am): Likewise.
1745         * modules/poll (Makefile.am): Likewise.
1746         * modules/posixtm (Makefile.am): Likewise.
1747         * modules/posixver (Makefile.am): Likewise.
1748         * modules/putenv (Makefile.am): Likewise.
1749         * modules/quote (Makefile.am): Likewise.
1750         * modules/quotearg (Makefile.am): Likewise.
1751         * modules/raise (Makefile.am): Likewise.
1752         * modules/read-file (Makefile.am): Likewise.
1753         * modules/readline (Makefile.am): Likewise.
1754         * modules/readlink (Makefile.am): Likewise.
1755         * modules/readtokens (Makefile.am): Likewise.
1756         * modules/readutmp (Makefile.am): Likewise.
1757         * modules/realloc (Makefile.am): Likewise.
1758         * modules/regex (Makefile.am): Likewise.
1759         * modules/rename (Makefile.am): Likewise.
1760         * modules/rename-dest-slash (Makefile.am): Likewise.
1761         * modules/rijndael (Makefile.am): Likewise.
1762         * modules/rmdir (Makefile.am): Likewise.
1763         * modules/rpmatch (Makefile.am): Likewise.
1764         * modules/safe-read (Makefile.am): Likewise.
1765         * modules/safe-write (Makefile.am): Likewise.
1766         * modules/same (Makefile.am): Likewise.
1767         * modules/save-cwd (Makefile.am): Likewise.
1768         * modules/savedir (Makefile.am): Likewise.
1769         * modules/setenv (Makefile.am): Likewise.
1770         * modules/settime (Makefile.am): Likewise.
1771         * modules/sha1 (Makefile.am): Likewise.
1772         * modules/sig2str (Makefile.am): Likewise.
1773         * modules/snprintf (Makefile.am): Likewise.
1774         * modules/stdlib-safer (Makefile.am): Likewise.
1775         * modules/stpcpy (Makefile.am): Likewise.
1776         * modules/stpncpy (Makefile.am): Likewise.
1777         * modules/strcase (Makefile.am): Likewise.
1778         * modules/strcasestr (Makefile.am): Likewise.
1779         * modules/strchrnul (Makefile.am): Likewise.
1780         * modules/strcspn (Makefile.am): Likewise.
1781         * modules/strdup (Makefile.am): Likewise.
1782         * modules/strerror (Makefile.am): Likewise.
1783         * modules/strftime (Makefile.am): Likewise.
1784         * modules/strndup (Makefile.am): Likewise.
1785         * modules/strnlen (Makefile.am): Likewise.
1786         * modules/strpbrk (Makefile.am): Likewise.
1787         * modules/strsep (Makefile.am): Likewise.
1788         * modules/strstr (Makefile.am): Likewise.
1789         * modules/strtod (Makefile.am): Likewise.
1790         * modules/strtoimax (Makefile.am): Likewise.
1791         * modules/strtok_r (Makefile.am): Likewise.
1792         * modules/strtol (Makefile.am): Likewise.
1793         * modules/strtoll (Makefile.am): Likewise.
1794         * modules/strtoul (Makefile.am): Likewise.
1795         * modules/strtoull (Makefile.am): Likewise.
1796         * modules/strtoumax (Makefile.am): Likewise.
1797         * modules/strverscmp (Makefile.am): Likewise.
1798         * modules/time_r (Makefile.am): Likewise.
1799         * modules/timegm (Makefile.am): Likewise.
1800         * modules/tmpfile-safer (Makefile.am): Likewise.
1801         * modules/unistd-safer (Makefile.am): Likewise.
1802         * modules/unlinkdir (Makefile.am): Likewise.
1803         * modules/userspec (Makefile.am): Likewise.
1804         * modules/utime (Makefile.am): Likewise.
1805         * modules/utimecmp (Makefile.am): Likewise.
1806         * modules/utimens (Makefile.am): Likewise.
1807         * modules/vasnprintf (Makefile.am): Likewise.
1808         * modules/vasprintf (Makefile.am): Likewise.
1809         * modules/vsnprintf (Makefile.am): Likewise.
1810         * modules/xalloc (Makefile.am): Likewise.
1811         * modules/xgetcwd (Makefile.am): Likewise.
1812         * modules/xnanosleep (Makefile.am): Likewise.
1813         * modules/xreadlink (Makefile.am): Likewise.
1814         * modules/xstrtod (Makefile.am): Likewise.
1815         * modules/xstrtol (Makefile.am): Likewise.
1816         * modules/xstrtold (Makefile.am): Likewise.
1817         * modules/yesno (Makefile.am): Likewise.
1818
1819 2006-10-12  Jim Meyering  <jim@meyering.net>
1820
1821         * m4/getloadavg.m4: Revert the change below.
1822
1823         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
1824         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
1825         fail with a symlink, which is what coreutils' ./bootstrap now
1826         creates by default.
1827
1828 2006-10-12  Bruno Haible  <bruno@clisp.org>
1829
1830         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
1831         mingw.
1832         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
1833         MSVC and mingw explicitly.
1834
1835 2006-10-11  Simon Josefsson  <jas@extundo.com>
1836             Bruno Haible  <bruno@clisp.org>
1837
1838         Add support for multiple gnulib-tool invocations in the scope of a
1839         single configure.ac file.
1840         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
1841         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
1842         with the same contents as the _LIBADD variable.
1843         (func_emit_initmacro_start, func_emit_initmacro_end,
1844         func_emit_initmacro_done): New functions.
1845         (func_import, func_create_testdir): Invoke them. Allow the identifiers
1846         gl_LIBOBJS and gl_LTLIBOBJS.
1847
1848 2006-10-11  Bruno Haible  <bruno@clisp.org>
1849
1850         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
1851         (func_create_testdir): Don't create po/Makefile.am, don't invoke
1852         autoreconf. Instead, invoke autopoint explicitly but move back the
1853         *.m4 files from gnulib.
1854
1855 2006-10-11  Bruno Haible  <bruno@clisp.org>
1856
1857         * gnulib-tool (func_usage): Make module names after --create-testdir
1858         optional.
1859         (func_create_testdir): If no module was specified, use nearly all
1860         modules.
1861
1862 2006-10-12  Jim Meyering  <jim@meyering.net>
1863
1864         Big performance improvement for fts-based tools that use FTS_NOSTAT.
1865         Avoid spurious inode-mismatch problems on non-POSIX file systems.
1866         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
1867         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
1868         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
1869         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
1870         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
1871         (fts_set_stat_required): New function.
1872         (fts_open): Defer the calls to fts_stat, if possible or requested.
1873         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
1874         into fts_stat itself.
1875         (fts_read): Perform any required (deferred) fts_stat call.
1876         (fts_build): Likewise, for the directory we're about to open and read.
1877         In the readdir loop, carefully decide whether each entry will require
1878         an eventual call to fts_stat, using dirent.d_type info if available.
1879         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
1880         a command line argument into this function.  Update all callers.
1881         Map a return value of FTS_DOT to FTS_D for a command line argument.
1882         * modules/fts (Depends-on): Add d-type.  Alphabetize.
1883         Thanks to Miklos Szeredi for his tenacity and for the initial
1884         bug report about "find" failing on a FUSE-based file system.
1885
1886         * lib/fts.c (fts_open): Use consistent indentation.
1887
1888 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
1889
1890         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
1891         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
1892         reported by Jim Meyering.  All uses of cache variables renamed
1893         to match Autoconf's.
1894         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
1895         the other one.
1896
1897         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
1898         Fix misspelling in diagnostic.
1899
1900 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1901
1902         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
1903         defined.  Problem reported by Matthew Woehlke.
1904
1905         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
1906         Add support for Tandem NonStop R series.
1907         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
1908         Use new macro.
1909
1910         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
1911         (has_trailing_slash): Omit size arg; all callers changed.
1912         Omit 'inline', since it doesn't help performance and we'd
1913         need to configure it.
1914         Don't count //, ///, etc. as having a trailing slash.
1915         As a side effect, this removes a C99ism reported by Matthew Woehlke.
1916         (rpl_rename_dest_slash): On failure, use rename's errno rather
1917         than (in some cases) an incorrect or junk errno.
1918         Simplify code by removing need to compute length; this does
1919         cause it to make two passes instead of one over the file name,
1920         but it's worth it.
1921
1922         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
1923         change, since Autoconf's version may no longer be appropriate now
1924         that we are using CVS Autoconf's version.  Add support for Tandem.
1925
1926 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1927             Bruno Haible  <bruno@clisp.org>
1928
1929         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
1930         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
1931         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
1932         gl_AC_TYPE_LONG_LONG.
1933
1934         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
1935         instead of HAVE_LONG_LONG.
1936         * lib/printf-args.c (printf_fetchargs): Likewise.
1937         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
1938         * lib/vasnprintf.c (VASNPRINTF): Likewise.
1939         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
1940         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
1941         gl_AC_TYPE_LONG_LONG.
1942
1943 2006-10-11  Bruno Haible  <bruno@clisp.org>
1944
1945         * m4/longlong.m4: Add comments.
1946         * m4/ulonglong.m4: Likewise.
1947
1948 2006-10-10  Bruno Haible  <bruno@clisp.org>
1949
1950         Make it possible to #define stpcpy, strdup to aliases.
1951         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
1952         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
1953
1954 2006-10-10  Bruno Haible  <bruno@clisp.org>
1955
1956         Make it possible to #define gcd to an alias.
1957         * lib/gcd.c: Include config.h.
1958
1959 2006-10-10  Bruno Haible  <bruno@clisp.org>
1960
1961         Make it possible to #define c_isascii to an alias.
1962         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
1963         defined. Undefine the macros before defining them, to avoid gcc
1964         warnings.
1965         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
1966         define NO_C_CTYPE_MACROS early.
1967
1968 2006-10-10  Bruno Haible  <bruno@clisp.org>
1969
1970         Make it possible to #define set_program_name to an alias.
1971         * lib/progname.c: Don't undefine set_program_name; instead, undefine
1972         ENABLE_RELOCATABLE early.
1973
1974 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
1975
1976         Port to Tandem NSK OSS, which has 64-bit signed int but at most
1977         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
1978         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
1979         More generally, don't assume that 64-bit signed int is available
1980         if unsigned int is, and vice versa.
1981         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
1982         unsigned symbols, not on their signed counterparts.
1983         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
1984         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
1985         (UINT64_C, UINTMAX_C):
1986         Likewise.
1987         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
1988         unsigned counterparts.
1989         (Have_long_long, Unsigned): New macros.
1990         (Int): Renamed from INT.
1991         (strtoimax): Use the new macros.
1992         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
1993         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
1994         * modules/inttypes (inttypes.h): Substitute
1995         HAVE_UNSIGNED_LONG_LONG_INT.
1996         * modules/stdint (stdint.h): Likewise.
1997         (Files): Add m4/ulonglong.m4.
1998
1999 2006-10-10  Bruno Haible  <bruno@clisp.org>
2000
2001         Fix a gcc -Wshadow warning.
2002         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
2003         to 'bucket'.
2004         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
2005         gl_linked_indexof_from_to): Likewise.
2006         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
2007         Likewise.
2008         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
2009         Likewise.
2010         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
2011         Reported by Eric Blake.
2012
2013 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
2014
2015         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
2016         for NetBSD.  Problem reported by Bruno Haible.
2017
2018 2006-10-09  Jim Meyering  <jim@meyering.net>
2019
2020         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
2021         Patch from Bruno Haible.
2022
2023 2006-10-09  Jim Meyering  <jim@meyering.net>
2024
2025         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
2026         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
2027         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
2028
2029 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
2030
2031         Don't include <config.h> twice; this doesn't work in some cases,
2032         e.g., when config.h has "#define intmax_t long long int" and
2033         we include <config.h>, <inttypes.h>, <config.h> in that order.
2034         Problem reported by Matthew Woehlke in:
2035         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
2036         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
2037         * lib/fts-cycle.c: Don't include config.h.
2038         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
2039         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
2040         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
2041         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
2042         inttypes.h.
2043         * lib/xstrtoumax.c: Likewise.
2044         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
2045         __strtol and the like, so that this module is more like its siblings.
2046         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
2047         Remove; no longer needed now that we assume gnulib inttypes.h.
2048
2049 2006-10-08  Bruno Haible  <bruno@clisp.org>
2050
2051         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
2052         option.
2053
2054 2006-10-07  Jim Meyering  <jim@meyering.net>
2055
2056         * modules/inttypes (inttypes.h): Revert what seems to have been
2057         an inadvertent part of today's change: use "|", not "/" in the
2058         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
2059
2060 2006-10-07  Bruno Haible  <bruno@clisp.org>
2061
2062         * modules/sublist: New file.
2063
2064 2006-10-07  Bruno Haible  <bruno@clisp.org>
2065
2066         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
2067         * modules/argz (argz.h): Likewise.
2068         * modules/arpa_inet (arpa/inet.h): Likewise.
2069         * modules/byteswap (byteswap.h): Likewise.
2070         * modules/configmake (configmake.h): Likewise.
2071         * modules/fcntl (fcntl.h): Likewise.
2072         * modules/fnmatch (fnmatch.h): Likewise.
2073         * modules/getopt (getopt.h): Likewise.
2074         * modules/glob (glob.h): Likewise.
2075         * modules/inttypes (inttypes.h): Likewise.
2076         * modules/netinet_in (netinet/in.h): Likewise.
2077         * modules/poll (poll.h): Likewise.
2078         * modules/stdbool (stdbool.h): Likewise.
2079         * modules/stdint (stdint.h): Likewise.
2080         * modules/sys_select (sys/select.h): Likewise.
2081         * modules/sys_socket (sys/socket.h): Likewise.
2082         * modules/sys_stat (sys/stat.h): Likewise.
2083         * modules/sysexits (sysexits.h): Likewise.
2084         * modules/unistd (unistd.h): Likewise.
2085         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2086         Add a "DO NOT EDIT" comment to the generated file.
2087         (func_import): Likewise for gnulib-comp.m4.
2088
2089 2006-10-07  Bruno Haible  <bruno@clisp.org>
2090
2091         * lib/gl_sublist.h: New file.
2092         * lib/gl_sublist.c: New file.
2093
2094 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
2095
2096         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
2097         name (relative to the original working directory) and the file
2098         name component (relative to the temporary working directory).  All
2099         callers changed.
2100         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
2101         * lib/mkdir-p.c (make_dir_parents): Likewise.
2102         * lib/mkdir-p.h (make_dir_parents): Likewise.
2103
2104 2006-10-06  Eric Blake  <ebb9@byu.net>
2105
2106         Define several macros for use by the clean-temp module.
2107         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
2108         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
2109         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
2110
2111         * lib/clean-temp.h (close_stream_temp): New declaration.
2112         * lib/clean-temp.c (includes): Pull in headers according to what
2113         other modules are in use.
2114         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
2115
2116 2006-10-06  Bruno Haible  <bruno@clisp.org>
2117
2118         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
2119         instead of fopen, fwriteerror.
2120
2121 2006-10-06  Bruno Haible  <bruno@clisp.org>
2122
2123         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
2124         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
2125         int.
2126         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
2127         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
2128         Return an error indicator.
2129         Suggested by Eric Blake.
2130
2131 2006-10-06  Bruno Haible  <bruno@clisp.org>
2132
2133         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
2134         Reported by Eric Blake.
2135
2136 2006-10-06  Bruno Haible  <bruno@clisp.org>
2137
2138         * modules/closeout (Description): Mention stderr too.
2139
2140 2006-10-06  Bruno Haible  <bruno@clisp.org>
2141         and Paul Eggert  <eggert@cs.ucla.edu>
2142
2143         * lib/closeout.c (close_stdout): Also close stderr.
2144         * lib/closeout.h: Update comment.
2145
2146 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
2147
2148         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
2149         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
2150         * lib/dirchownmod.c: Include lchown.h.
2151         * lib/lchown.c: Don't include files that lchown.h now includes.
2152         Don't declare chown, since lchown.h now does that.
2153         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
2154         (lchown): Define to rpl_chown if lchown is declared but
2155         does not exist.  Declare using a prototype if lchown is not
2156         declared.  Add a copyright notice.
2157         * lib/mkstemp.h: Include <unistd.h>.
2158         * lib/openat.c: Include lchown.h.
2159
2160         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
2161         we now test for that separately.
2162         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
2163         rather than O_NOFOLLOW, when testing whether it's possible to
2164         avoid a race condition reliably.
2165         * lib/savewd.c (savewd_chdir): Likewise.
2166
2167         Remove macros that are no longer needed now that stdint.h is
2168         reliable.
2169         * lib/fsusage.c (UINTMAX_MAX): Remove.
2170         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
2171         * lib/utimecmp.c (SIZE_MAX): Remove.
2172
2173         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
2174
2175         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
2176         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
2177         O_NOATIME works.
2178
2179 2006-10-05  Bruno Haible  <bruno@clisp.org>
2180
2181         * lib/gl_list.h (gl_sortedlist_search_from_to,
2182         gl_sortedlist_indexof_from_to): New declarations.
2183         (gl_list_implementation): New fields sortedlist_search_from_to,
2184         sortedlist_indexof_from_to.
2185         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
2186         inline functions.
2187         * lib/gl_list.c (gl_sortedlist_search_from_to,
2188         gl_sortedlist_indexof_from_to): New functions.
2189         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
2190         function.
2191         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
2192         (gl_array_sortedlist_search_from_to): New function.
2193         (gl_array_list_implementation): Update.
2194         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
2195         function.
2196         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
2197         (gl_carray_sortedlist_search_from_to): New function.
2198         (gl_carray_list_implementation): Update.
2199         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
2200         gl_linked_sortedlist_indexof_from_to): New functions.
2201         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
2202         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
2203         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
2204         gl_tree_sortedlist_indexof_from_to): New functions.
2205         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
2206         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
2207         Update.
2208         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
2209         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
2210         Update.
2211
2212 2006-10-05  Bruno Haible  <bruno@clisp.org>
2213
2214         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
2215         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
2216         (struct gl_list_implementation): Add fields search_from_to,
2217         indexof_from_to. Remove fields search, indexof.
2218         (gl_list_search): Use the search_from_to method.
2219         (gl_list_search_from, gl_list_search_from_to): New functions.
2220         (gl_list_indexof): Use the indexof_from_to method.
2221         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
2222         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
2223         (gl_list_search_from, gl_list_search_from_to): New functions.
2224         (gl_list_indexof): Use the indexof_from_to method.
2225         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
2226         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
2227         gl_array_indexof. Add start_index, end_index arguments.
2228         (gl_array_search_from_to): Renamed from gl_array_search. Add
2229         start_index, end_index arguments.
2230         (gl_array_remove, gl_array_list_implementation): Update.
2231         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
2232         gl_carray_indexof. Add start_index, end_index arguments.
2233         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
2234         start_index, end_index arguments.
2235         (gl_carray_remove, gl_carray_list_implementation): Update.
2236         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
2237         gl_linked_search. Add start_index, end_index arguments.
2238         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
2239         start_index, end_index arguments.
2240         (gl_linked_remove): Update.
2241         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
2242         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
2243         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
2244         field to 'size_t'.
2245         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
2246         gl_tree_search. Add start_index, end_index arguments.
2247         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
2248         start_index, end_index arguments.
2249         (gl_tree_remove): Update.
2250         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
2251         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
2252         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
2253         function.
2254         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
2255         gl_tree_search. Add start_index, end_index arguments.
2256         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
2257         start_index, end_index arguments.
2258         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
2259         Update.
2260         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
2261
2262 2006-10-05  Bruno Haible  <bruno@clisp.org>
2263
2264         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
2265
2266         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
2267         fwriteerror_temp): New declarations.
2268         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
2269         (descriptors): New variable.
2270         (cleanup): First, close the descriptors.
2271         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
2272         fclose_temp, fwriteerror_temp): New functions.
2273
2274 2006-10-04  Jim Meyering  <jim@meyering.net>
2275
2276         * lib/fts.c (fts_open): Tiny comment change.
2277
2278 2006-10-04  Bruno Haible  <bruno@clisp.org>
2279
2280         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
2281         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
2282         gl_LOCK_BODY.
2283         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
2284         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
2285         gl_LOCK_EARLY_BODY.
2286         (gl_LOCK): Require gl_LOCK_BODY.
2287
2288 2006-10-04  Bruno Haible  <bruno@clisp.org>
2289
2290         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
2291         (gl_oset_search_atleast): New declaration.
2292         (struct gl_oset_implementation): Add field 'search_atleast'.
2293         (gl_oset_search_atleast): New inline function.
2294         * lib/gl_oset.c (gl_oset_search_atleast): New function.
2295         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
2296         (gl_array_oset_implementation): Update.
2297         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
2298         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
2299         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
2300
2301 2006-10-04  Bruno Haible  <bruno@clisp.org>
2302
2303         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
2304
2305 2006-10-03  Bruno Haible  <bruno@clisp.org>
2306
2307         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
2308         from gl_avltreehash_list_implementation.
2309
2310 2006-10-03  Bruno Haible  <bruno@clisp.org>
2311
2312         * lib/gl_oset.c (gl_oset_add): Fix return type.
2313
2314 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
2315
2316         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
2317
2318 2006-10-02  Eric Blake  <ebb9@byu.net>
2319
2320         * modules/strnlen (Depends-on): Add extensions.
2321
2322 2006-10-02  Eric Blake  <ebb9@byu.net>
2323
2324         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
2325         definition in 2.60+.
2326
2327 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
2328
2329         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
2330         checks.
2331
2332 2006-10-02  Bruno Haible  <bruno@clisp.org>
2333
2334         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
2335         to the AUTOMAKE_OPTIONS.
2336         Reported by Jim Meyering.
2337
2338 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
2339
2340         Work around bug in Solaris 10 /proc file system:
2341         /proc/self/fd/NNN/.. isn't the parent directory of
2342         the directory whose file descriptor is NNN.  This needs to
2343         be worked around at run time, not compile time, since a
2344         program might be built on Solaris 8, where things work, and
2345         run on Solaris 10.
2346         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
2347         to use the following interface instead:
2348         (OPENAT_BUFFER_SIZE): New macro.
2349         (openat_proc_name): New function.
2350         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
2351         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
2352         Likewise.
2353         * lib/openat-proc.c: New file.
2354         * modules/openat (Files): Add lib/openat-proc.c.
2355         (Depends-on): Add same-inode, stdbool.
2356         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
2357
2358 2006-09-29  Bruno Haible  <bruno@clisp.org>
2359
2360         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
2361         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
2362         argument. Set stdout_closed before testing for ferror, not after.
2363         (fwriteerror, fwriteerror_no_ebadf): New functions.
2364
2365 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2366
2367         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
2368
2369 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
2370
2371         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
2372         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
2373
2374 2006-09-28  Jim Meyering  <jim@meyering.net>
2375
2376         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
2377         Include <unistd.h>.
2378
2379 2006-09-28  Bruno Haible  <bruno@clisp.org>
2380
2381         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
2382         * modules/linkedhash-list (Depends-on): Likewise.
2383         * modules/rbtreehash-list (Depends-on): Likewise.
2384
2385 2006-09-28  Bruno Haible  <bruno@clisp.org>
2386
2387         * lib/strndup.h: Simplify the redefinition of strndup.
2388         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
2389         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
2390
2391 2006-09-28  Bruno Haible  <bruno@clisp.org>
2392
2393         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
2394         * lib/gl_linkedhash_list.c: Likewise.
2395         * lib/gl_rbtreehash_list.c: Likewise.
2396
2397 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
2398
2399         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
2400         getaddrinfo.
2401
2402         * lib/__fpending.h: Don't include <stdio_ext.h> unless
2403         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
2404         it causes <stdio_ext.h> to cause a compile-time error.
2405         Problem reported by Nelson H. F. Beebe.
2406         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
2407         of HAVE_DECL___PENDING.
2408
2409         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
2410         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
2411         declaration.
2412
2413 2006-09-27  Jim Meyering  <jim@meyering.net>
2414
2415         This file could end up with a definition for a function
2416         named __strndup, rather than rpl_strndup on a system with
2417         incomplete weak_alias support.
2418         * lib/strndup.c (strndup): Rename from __strndup.
2419         Remove #defines that used to map __strndup to strndup.
2420         Don't use K&R prototypes.
2421         Remove LIBC-related code, since this file is not sync'd with glibc.
2422         * lib/strndup.h: Revamp, accordingly.
2423         * m4/strndup.m4: Modernize.
2424
2425 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
2426
2427         * modules/savewd (Depends-on): Add 'raise'.
2428         * lib/savewd.c: Include <signal.h>, for 'raise'.
2429
2430 2006-09-26  Jim Meyering  <jim@meyering.net>
2431
2432         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
2433         when we detect Darwin 8.7.0's acl_get_file bug.
2434         Rearrange to perform the new (below) run-test while $LIBS
2435         contains any acl-related library.  Set USE_ACL at the end.
2436         (gl_ACL_GET_FILE): New function.
2437
2438 2006-09-26  Eric Blake  <ebb9@byu.net>
2439
2440         * lib/verror.c: Include <config.h> unconditionally.
2441
2442 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
2443
2444         * modules/clock-time (Maintainer): Add self.
2445         * modules/getlogin_r (Depends-on): Add extensions.
2446
2447 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2448
2449         * modules/clock-time: New module.
2450         * modules/nanosleep (Depends-on): Add clock-time.
2451         * modules/gethrxtime (Depends-on): Likewise.
2452         * modules/gettime (Depends-on): Likewise.
2453         * modules/settime (Depends-on): Likewise.
2454
2455         * modules/fts-lgpl: Depend on openat.
2456         * modules/mkancesdirs: Depend on savewd.
2457         * modules/mkdir-p: Likewise.
2458
2459 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2460
2461         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
2462
2463         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
2464         `gl_have_arbitrary_file_name_length_limit' to
2465         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
2466         actually works between configure runs.
2467
2468 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2469             Bruno Haible  <bruno@clisp.org>
2470
2471         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
2472
2473 2006-09-25  Jim Meyering  <jim@meyering.net>
2474
2475         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
2476         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
2477
2478 2006-09-25  Eric Blake  <ebb9@byu.net>
2479
2480         * gnulib-tool (func_import, func_create_testdir): Fix typos in
2481         exec's in 2006-09-18 patch when shuffling fds.
2482
2483 2006-09-25  Bruno Haible  <bruno@clisp.org>
2484
2485         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
2486         Reported by Jim Meyering.
2487
2488 2006-09-24  Jim Meyering  <jim@meyering.net>
2489
2490         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
2491         compare a pointer against a literal "0".  That caused failures with
2492         at least HP-UX's hpcc.
2493
2494 2006-09-22  Simon Josefsson  <jas@extundo.com>
2495
2496         * modules/gc-sha1:
2497         * modules/gc-md4:
2498         * modules/gc-hmac-sha1:
2499         * modules/gc-hmac-md5:
2500         * modules/gc-des:
2501         * modules/gc-arcfour: Distribute more files.
2502
2503 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2504
2505         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
2506         (gl_linked_iterator_from_to): Initialize struct completely.
2507         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
2508         (gl_tree_iterator_from_to): Likewise
2509         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
2510         * lib/gl_array_list.c [lint] (gl_array_iterator)
2511         (gl_array_iterator_from_to): Likewise.
2512         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
2513         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
2514         (gl_carray_iterator_from_to): Likewise.
2515
2516         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
2517         * lib/md4.c (md4_process_block): Remove unused variable.
2518         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
2519         parentheses for clarity.
2520
2521 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2522
2523         * modules/bison-i18n (Depends-on): Add gettext.
2524
2525 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2526
2527         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
2528         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
2529         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
2530         also add missing comma that caused broken test.
2531         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
2532         stdlib.h, for `abort'.
2533         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
2534         variables.
2535         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
2536         include unistd.h if present, for `rmdir'.
2537         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
2538         variables.
2539         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
2540         in the process include standard headers for prototypes.
2541         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
2542         gets declared on GNU/Linux.
2543         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
2544         unistd.h, for `rmdir'.
2545         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
2546
2547         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
2548         always true.
2549         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
2550
2551         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
2552
2553 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2554
2555         * gnulib-tool (func_version): Create output all at once.  This
2556         may help avoid triggering unnecessary SIGPIPEs, and at any
2557         rate it doesn't hurt.
2558
2559 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2560             Bruno Haible  <bruno@clisp.org>
2561
2562         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
2563         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2564         * m4/signed.m4 (bh_C_SIGNED): Likewise.
2565
2566         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
2567         (gl_FUNC_VASPRINTF): Invoke it.
2568
2569 2006-09-22  Bruno Haible  <bruno@clisp.org>
2570
2571         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
2572         getloadavg.c as first argument.
2573
2574 2006-09-22  Bruno Haible  <bruno@clisp.org>
2575
2576         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
2577         at the beginning of the gl_INIT macro.
2578         * modules/getloadavg (configure.ac): Pass $gl_source_base to
2579         gl_GETLOADAVG.
2580
2581 2006-09-22  Bruno Haible  <bruno@clisp.org>
2582
2583         * gnulib-tool (func_create_megatestdir): Don't include the config-h
2584         module.
2585         Suggested by Ralf Wildenhues.
2586
2587 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
2588
2589         Import this patch from libc:
2590
2591         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
2592
2593         * lib/regex_internal.c (re_string_reconstruct): Handle
2594         offset < pstr->valid_raw_len && pstr->offsets_needed case.
2595         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
2596         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
2597         re_string_context_at.
2598
2599         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
2600         now requires it.
2601         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
2602         gl_REGEX now does it for us.
2603         (gl_REGEX): Add test taken from
2604         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
2605
2606         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
2607         Check that large offsets work.  Modernize Autoconf usages.
2608         Prefer "yes" to mean a good thing rather than a bad.
2609         Don't put "#define mkstemp" in config.h, as this might interfere
2610         with standard system headers that "#define mkstemp mkstemp64".
2611
2612         * modules/mkstemp (Depends-on): Add extensions, so that
2613         mkstemp is visible on some platforms.
2614         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
2615         (Include): Change to "mkstemp.h" from <stdlib.h>.
2616         (Files): Add mkstemp.h.
2617
2618         * lib/mkstemp.h: New file, since some standard headers
2619         #define mkstemp.
2620         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
2621         Include "mkstemp.h".
2622         Make the _LIBC code resemble glibc original more,
2623         e.g., use K&R style.
2624         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
2625         (mkstemp): Remove, since mkstemp.h does this for us.
2626         * lib/stdlib--.h: Include mkstemp.h.
2627
2628         Import this patch from libc:
2629
2630         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
2631
2632         * lib/tempname.c (__gen_tempname): Change attempts_min
2633         into a macro.  Use preprocessor to decide how to initialize
2634         attempts [Coverity CID 67].
2635
2636 2006-09-20  Bruno Haible  <bruno@clisp.org>
2637
2638         * lib/mkdtemp.c: Import from libc.
2639         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
2640                 * sysdeps/posix/tempname.c (__gen_tempname): Change
2641                 attempts_min into a macro.  Use preprocessor to decide how to
2642                 initialize attempts [Coverity CID 67].
2643         2001-11-27  Paul Eggert  <eggert@twinsun.com>
2644                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
2645                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
2646
2647 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2648
2649         * gnulib-tool (func_exit): New function, to allow to pass the
2650         exit status portably through the trap.  Use everywhere.
2651         (--help, --version): Signal a write error.
2652         (trap): catch SIGPIPE, for write errors.
2653         Exit at the end of the trap, with the correct exit status.
2654
2655 2006-09-19  Karl Berry  <karl@gnu.org>
2656
2657         * doc/gnulib.texi: note about the license texinfo files.
2658
2659 2006-09-19  Eric Blake  <ebb9@byu.net>
2660
2661         * gnulib-tool: Avoid space-tab.
2662
2663 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
2664
2665         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
2666         that prevented coreutils 6.1 from building.  Problem reported
2667         by Petter Reinholdtsen.
2668
2669 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
2670
2671         * gnulib-tool (avoidlist): Fix typo that broke options like
2672         --avoid=lock that are used by coreutils bootstrap.
2673
2674 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
2675
2676         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
2677         more systematically.
2678
2679 2006-09-18  Jim Meyering  <jim@meyering.net>
2680
2681         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
2682
2683 2006-09-18  Bruno Haible  <bruno@clisp.org>
2684
2685         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
2686
2687 2006-09-18  Bruno Haible  <bruno@clisp.org>
2688
2689         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
2690         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
2691         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
2692         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
2693         * m4/gettext.m4: Require autoconf >= 2.52.
2694         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
2695         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
2696         of gl_cv_header_inttypes_h.
2697
2698 2006-09-18  Bruno Haible  <bruno@clisp.org>
2699
2700         * lib/javaversion.c: Include configmake.h.
2701
2702 2006-09-18  Bruno Haible  <bruno@clisp.org>
2703
2704         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
2705         avoid that the while loops be executed in a subshell.
2706
2707 2006-09-18  Bruno Haible  <bruno@clisp.org>
2708
2709         * MODULES.html.sh (func_module): Break long lines.
2710         Suggested by Bruce Korb <bkorb@gnu.org>.
2711
2712 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2713
2714         Speed up by a factor of 1.12.
2715         * gnulib-tool (nl): New variable.
2716         (func_import): Rewrite include directive extraction to only read each
2717         directive once.
2718
2719 2006-09-17  Bruno Haible  <bruno@clisp.org>
2720
2721         * modules/javaversion (Makefile.am): Remove DEFS setting.
2722         (Depends-on): Add configmake, for PKGDATADIR definition.
2723
2724 2006-09-17  Bruno Haible  <bruno@clisp.org>
2725
2726         * gnulib-tool (func_create_testdir): Rewrite all files at once.
2727
2728 2006-09-17  Bruno Haible  <bruno@clisp.org>
2729
2730         * gnulib-tool (func_append): New function, stolen from libtool.m4.
2731         (func_modules_transitive_closure, func_modules_add_dummy,
2732         func_modules_to_filelist, func_import, func_create_testdir,
2733         func_create_megatestdir, ...): Use it wherever possible.
2734         Suggested by Ralf Wildenhues.
2735
2736 2006-09-16  Karl Berry  <karl@gnu.org>
2737
2738         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
2739         to avoid sectioning errors.
2740         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
2741         [ifinfo]: blank line after @center-ed titles.
2742         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
2743         Spell FSF address consistently with others.
2744         (These changes approved by rms.)
2745
2746 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2747
2748         Speed up by a factor of 1.61.
2749         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
2750         already checked module names again.
2751
2752 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2753
2754         Speed up by a factor of 1.13.
2755         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
2756         for new_files, and the input to func_add_or_update.
2757
2758 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2759
2760         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
2761         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
2762
2763 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2764
2765         * modules/mkancesdirs (Depends-on): Add fcntl.
2766         * modules/savewd: New file.
2767         * MODULES.html.sh (File system functions): Add savewd.
2768
2769         * modules/configmake (Makefile.am): Add support for the
2770         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
2771
2772 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2773
2774         * m4/savewd.m4: New file.
2775
2776 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2777
2778         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
2779         (dirchownmod): New arg FD.  All callers changed.
2780         Use FD rather than opening the directory ourself, as opening is
2781         now the caller's responsibility.
2782         * lib/dirchownmod.h: Likewise.
2783         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
2784         hosts that require <sys/types.h> before <sys/stat.h>.  Include
2785         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
2786         (test_dir): Remove.
2787         (mkancesdirs): Return length of prefix of FILE that has already
2788         been made, or -2 if there is a child doing the work.  Redo
2789         algorithm so that it is O(N) rather than O(N**2).  Optimize away
2790         ".", and treat ".." specially since it might stray back into
2791         already-created areas.  Use a subprocess if necessary.  New arg
2792         WD; all users changed.  MAKE_DIR function should now return 1
2793         if it creates a directory that is not readable.  Return -2 if
2794         a child process is spun off.
2795         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
2796         Adjust signature to match code.
2797         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
2798         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
2799         all users changed.
2800         * lib/savewd.c, lib/savewd.h: New files.
2801
2802 2006-09-15  Jim Meyering  <jim@meyering.net>
2803
2804         * modules/rename-dest-slash: New module.
2805         * MODULES.html.sh (posix_compat): Add it here.
2806
2807         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
2808
2809 2006-09-15  Jim Meyering  <jim@meyering.net>
2810
2811         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
2812         file.
2813
2814         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
2815
2816 2006-09-15  Jim Meyering  <jim@meyering.net>
2817
2818         * lib/rename-dest-slash.c (has_trailing_slash): Use
2819         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
2820         (rpl_rename_dest_slash): Perform the cheaper trailing slash
2821         test before testing whether SRC is a directory.
2822         Suggestions from Bruno Haible.
2823
2824         Avoid a warning about an unused variable.
2825         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
2826         into the #ifdef block where it's used.
2827
2828         * lib/rename-dest-slash.c: New file.
2829
2830 2006-09-14  Bruno Haible  <bruno@clisp.org>
2831
2832         * lib/allocsa.c: Include <config.h> unconditionally.
2833         * lib/asnprintf.c: Likewise.
2834         * lib/asprintf.c: Likewise.
2835         * lib/c-strcasecmp.c: Likewise.
2836         * lib/c-strcasestr.c: Likewise.
2837         * lib/c-strncasecmp.c: Likewise.
2838         * lib/c-strstr.c: Likewise.
2839         * lib/classpath.c: Likewise.
2840         * lib/clean-temp.c: Likewise.
2841         * lib/concatpath.c: Likewise.
2842         * lib/copy-file.c: Likewise.
2843         * lib/csharpcomp.c: Likewise.
2844         * lib/csharpexec.c: Likewise.
2845         * lib/execute.c: Likewise.
2846         * lib/fatal-signal.c: Likewise.
2847         * lib/findprog.c: Likewise.
2848         * lib/fwriteerror.c: Likewise.
2849         * lib/gl_array_list.c: Likewise.
2850         * lib/gl_array_oset.c: Likewise.
2851         * lib/gl_avltree_list.c: Likewise.
2852         * lib/gl_avltree_oset.c: Likewise.
2853         * lib/gl_avltreehash_list.c: Likewise.
2854         * lib/gl_carray_list.c: Likewise.
2855         * lib/gl_linked_list.c: Likewise.
2856         * lib/gl_linkedhash_list.c: Likewise.
2857         * lib/gl_list.c: Likewise.
2858         * lib/gl_oset.c: Likewise.
2859         * lib/gl_rbtree_list.c: Likewise.
2860         * lib/gl_rbtree_oset.c: Likewise.
2861         * lib/gl_rbtreehash_list.c: Likewise.
2862         * lib/imaxabs.c: Likewise.
2863         * lib/imaxdiv.c: Likewise.
2864         * lib/javacomp.c: Likewise.
2865         * lib/javaexec.c: Likewise.
2866         * lib/javaversion.c: Likewise.
2867         * lib/linebreak.c: Likewise.
2868         * lib/localcharset.c: Likewise.
2869         * lib/lock.c: Likewise.
2870         * lib/mbchar.c: Likewise.
2871         * lib/mbswidth.c: Likewise.
2872         * lib/mkdtemp.c: Likewise.
2873         * lib/pipe.c: Likewise.
2874         * lib/printf-args.c: Likewise.
2875         * lib/printf-parse.c: Likewise.
2876         * lib/progname.c: Likewise.
2877         * lib/progreloc.c: Likewise.
2878         * lib/readlink.c: Likewise.
2879         * lib/sh-quote.c: Likewise.
2880         * lib/stpcpy.c: Likewise.
2881         * lib/stpncpy.c: Likewise.
2882         * lib/strcasecmp.c: Likewise.
2883         * lib/strcasestr.c: Likewise.
2884         * lib/strcspn.c: Likewise.
2885         * lib/striconv.c: Likewise.
2886         * lib/strncasecmp.c: Likewise.
2887         * lib/strnlen1.c: Likewise.
2888         * lib/strstr.c: Likewise.
2889         * lib/strtok_r.c: Likewise.
2890         * lib/tls.c: Likewise.
2891         * lib/tmpdir.c: Likewise.
2892         * lib/unicodeio.c: Likewise.
2893         * lib/unsetenv.c: Likewise.
2894         * lib/vasnprintf.c: Likewise.
2895         * lib/vasprintf.c: Likewise.
2896         * lib/wait-process.c: Likewise.
2897         * lib/xallocsa.c: Likewise.
2898         * lib/xsetenv.c: Likewise.
2899         * lib/xstriconv.c: Likewise.
2900
2901 2006-09-13  Simon Josefsson  <jas@extundo.com>
2902
2903         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
2904         that internally, suggested by Ralf Wildenhues
2905         <Ralf.Wildenhues@gmx.de>.
2906
2907 2006-09-13  Simon Josefsson  <jas@extundo.com>
2908
2909         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
2910         @LIBOBJS@.
2911         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2912
2913 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
2914
2915         * lib/_fpending.c: Include <config.h> unconditionally, since we no
2916         longer worry about uses that don't define HAVE_CONFIG_H.
2917         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
2918         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
2919         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
2920         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
2921         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
2922         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
2923         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
2924         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
2925         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
2926         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
2927         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
2928         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
2929         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
2930         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
2931         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
2932         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
2933         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
2934         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
2935         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
2936         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
2937         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
2938         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
2939         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
2940         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
2941         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
2942         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
2943         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
2944         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
2945         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
2946         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
2947         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
2948         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
2949         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
2950         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
2951         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
2952         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
2953         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
2954         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
2955         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
2956         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
2957         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
2958         Likewise.
2959
2960 2006-09-13  Eric Blake  <ebb9@byu.net>
2961
2962         * lib/getopt.c: Fix typo in last commit.
2963
2964 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2965
2966         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
2967         dgettext.
2968
2969 2006-09-12  Jim Meyering  <jim@meyering.net>
2970
2971         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
2972         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
2973         Reported by Nelson H. F. Beebe.
2974
2975 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
2976
2977         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
2978         program_invocation_name and program_invocation_short_name are
2979         initialized.
2980         * lib/argp-namefrob.h: Move declarations of program_invocation_name
2981         and program_invocation_short_name to argp.h, so they are visible
2982         to user programs.
2983         * lib/argp.h: Likewise
2984
2985 2006-09-10  Bruno Haible  <bruno@clisp.org>
2986
2987         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
2988         m4/inttypes_h.m4, m4/uintmax_t.m4.
2989
2990 2006-09-10  Bruno Haible  <bruno@clisp.org>
2991
2992         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
2993         gl_AC_TYPE_UINTMAX_T.
2994
2995 2006-09-10  Bruno Haible  <bruno@clisp.org>
2996
2997         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
2998
2999 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
3000
3001         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
3002         convention.  Text proposed by Bruno Haible.
3003         (struct argp_option): Document the use of N_() wrappers.
3004
3005         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
3006         '\v', and translate the two parts separately, instead of feeding
3007         the whole string to gettext.  This allows to exclude
3008         '\v' from the strings visible to the translator by writing doc
3009         strings as N_("..") "\v" N_("..").
3010
3011 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
3012
3013         * config/srclist.txt: Undo latest change; the bug was fixed.
3014
3015 2006-09-09  Bruno Haible  <bruno@clisp.org>
3016
3017         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
3018         assignments if building a library without libtool.
3019         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
3020         in func_emit_lib_Makefile_am.
3021         (func_import): When building a static library libfoo.a, arrange to
3022         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
3023         (func_create_testdir): Likewise.
3024         * modules/gc (configure.ac, Makefile.am): If building statically,
3025         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
3026         * modules/iconvme (configure.ac, Makefile.am): Likewise.
3027         * modules/striconv (configure.ac, Makefile.am): Likewise.
3028         Based on a suggestion by Ralf Wildenhues.
3029
3030 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3031
3032         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
3033         Check for unistd.h too, since Autoconf doesn't assume POSIX.
3034         Also:
3035
3036         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3037         Add year_2050_test to catch glibc bug 2821
3038         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3039
3040         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3041         Prefer #ifdef to #if.
3042
3043         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
3044         Return from 'main' instead of calling 'exit'.
3045
3046 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3047
3048         * lib/mktime.c (guess_time_tm): Fix bug where mktime
3049         returned the maximum time_t value rather than (time_t) -1.
3050         Problem originally reported by William Bardwell
3051         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3052
3053         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3054         Moved to here ...
3055         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3056         ... from here.
3057
3058 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3059
3060         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
3061         2821 is fixed.
3062
3063 2006-09-08  Jim Meyering  <jim@meyering.net>
3064
3065         Don't make generated files read-only.  That would bother too many
3066         people.  However, do retain the ability to work when targets are
3067         read-only: remove the destination and temporary files before writing
3068         them (when generated via sed or echo), or by using the -f option for
3069         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
3070         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3071         * modules/byteswap, modules/configmake, modules/fcntl:
3072         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3073         * modules/localcharset, modules/netinet_in, modules/poll:
3074         * modules/stdbool, modules/stdint, modules/sys_select:
3075         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3076
3077 2006-09-08  Jim Meyering  <jim@meyering.net>
3078
3079         Avoid new build failure on FreeBSD 6.0.
3080         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
3081         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
3082         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
3083
3084 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3085
3086         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
3087
3088 2006-09-07  Jim Meyering  <jim@meyering.net>
3089
3090         Fix global typo in last change: use chmod u-w, not chmod u-x.
3091         Spotted by Paul Eggert and Bruce Korb.
3092         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3093         * modules/byteswap, modules/configmake, modules/fcntl:
3094         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3095         * modules/localcharset, modules/netinet_in, modules/poll:
3096         * modules/stdbool, modules/stdint, modules/sys_select:
3097         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3098
3099 2006-09-06  Jim Meyering  <jim@meyering.net>
3100
3101         Make generated files be read-only.
3102         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
3103         Ensure that each generated file is now read-only.
3104         * modules/argz: Likewise.
3105         * modules/arpa_inet: Likewise.
3106         * modules/byteswap: Likewise.
3107         * modules/configmake: Likewise.
3108         * modules/fcntl: Likewise.
3109         * modules/fnmatch: Likewise.
3110         * modules/getopt: Likewise.
3111         * modules/glob: Likewise.
3112         * modules/inttypes: Likewise.
3113         * modules/netinet_in: Likewise.
3114         * modules/poll: Likewise.
3115         * modules/stdbool: Likewise.
3116         * modules/stdint: Likewise.
3117         * modules/sys_select: Likewise.
3118         * modules/sys_socket: Likewise.
3119         * modules/sys_stat: Likewise.
3120         * modules/sysexits: Likewise.
3121         * modules/localcharset: Same as above, but continue using temporary
3122         file named "t-$@" (why different?) rather than the "$@-t" used
3123         everywhere else.
3124
3125         * modules/sysexits (Makefile.am): Replace literal occurrences
3126         of "sysexit.h" more readable, and more consistent, "$@".
3127
3128 2006-09-06  Bruno Haible  <bruno@clisp.org>
3129
3130         * modules/striconv: New file.
3131         * modules/xstriconv: New file.
3132         * MODULES.html.sh (Internationalization functions): Add striconv,
3133         xstriconv.
3134
3135 2006-09-06  Bruno Haible  <bruno@clisp.org>
3136
3137         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
3138         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
3139         not using libtool correctly.
3140
3141 2006-09-06  Bruno Haible  <bruno@clisp.org>
3142
3143         * lib/striconv.h: New file.
3144         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
3145         iconvstring.c.
3146         * lib/xstriconv.h: New file.
3147         * lib/xstriconv.c: New file.
3148
3149 2006-09-06  Bruno Haible  <bruno@clisp.org>
3150
3151         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3152         lib_..._LDFLAGS.
3153
3154 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3155
3156         * lib/argz_.h: Sync from Libtool.
3157
3158         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
3159                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3160
3161         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
3162
3163 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
3164
3165         * modules/trim: New file.
3166
3167 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
3168
3169         * lib/trim.h: New file.
3170         * lib/trim.c: New file.
3171
3172 2006-09-05  Bruno Haible  <bruno@clisp.org>
3173
3174         * MODULES.html.sh (String handling): Add trim.
3175
3176 2006-09-04  Karl Berry  <karl@gnu.org>
3177
3178         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
3179         until next release.
3180
3181 2006-09-03  Bruno Haible  <bruno@clisp.org>
3182
3183         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
3184         correctly.
3185
3186 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3187
3188         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
3189         not gl_GETLOADAVG.  Omit unneeded semicolons.
3190         Problems reported by Ralf Wildenhues in
3191         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
3192         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
3193         at the end, which is the usual gnulib style.
3194
3195         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
3196         of doing all the work ourselves.
3197         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
3198         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
3199
3200 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3201
3202         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
3203         Problem reported by Ralf Wildenhues in
3204         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
3205
3206         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
3207         HAVE_STRUCT_STATFS_F_FSTYPENAME.
3208
3209 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3210
3211         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
3212         yesterday's patch by changing test -n to test -z.
3213
3214 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3215
3216         * modules/getloadavg (Files): Add m4/getloadavg.m4.
3217         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
3218         the former is now obsolescent.
3219
3220         * modules/chdir-long (Depends-on): Add fcntl.
3221
3222 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3223
3224         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
3225         obsolescent, and programs should use gnulib instead.
3226         * m4/getloadavg.m4: New file, with contents taken from Autoconf
3227         but with prefixes changed.
3228
3229 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3230
3231         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
3232         or stdbool.h, because they might not exist while configuring.
3233
3234         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
3235         Don't include unistd.h or limits.h; not needed, since chdir-long.h
3236         does that for us.
3237         (O_DIRECTORY): Remove.
3238
3239 2006-08-31  Eric Blake  <ebb9@byu.net>
3240
3241         * gnulib-tool: Don't let emacs change spaces to TAB.
3242
3243 2006-08-31  Bruno Haible  <bruno@clisp.org>
3244
3245         * gnulib-tool: When calling func_import more than once, do it in a
3246         subshell.
3247         Reported by Eric Blake <ebb9@byu.net>.
3248
3249 2006-08-31  Bruno Haible  <bruno@clisp.org>
3250
3251         * gnulib-tool (nl): Remove variable.
3252         (sed_transform_lib_file): Use more robust test for config-h module.
3253         (func_import): Fix typo in 2006-08-25 patch.
3254
3255 2006-08-31  Bruno Haible  <bruno@clisp.org>
3256
3257         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
3258         specified, augment Makefile.am variables instead of assigning them.
3259
3260 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3261
3262         Work around a bug in both the Linux and SunOS 64-bit kernels:
3263         nanosleep mishandles sleeps for longer than 2**31 seconds.
3264         Problem reported by Frank v Waveren in
3265         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
3266         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
3267         Check for nanosleep bug.
3268         (LIB_NANOSLEEP): Append clock_gettime library if needed.
3269
3270 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3271
3272         Work around a bug in both the Linux and SunOS 64-bit kernels:
3273         nanosleep mishandles sleeps for longer than 2**31 seconds.
3274         Problem reported by Frank v Waveren in
3275         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
3276         * lib/nanosleep.c (BILLION): New constant.
3277         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
3278         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
3279         implementation.
3280
3281 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3282
3283         * modules/nanosleep (Depends-on): Add gettime.
3284
3285 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3286         and Simon Josefsson  <jas@extundo.com>
3287         and Oskar Liljeblad  <oskar@osk.mine.nu>
3288
3289         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
3290         * gnulib-tool (func_import): New license type 'unmodifiable license
3291         text'.
3292         * modules/fdl: Use it.  Longer description.
3293         * module/gpl, module/lgpl: New files.
3294
3295 2006-08-30  Jim Meyering  <jim@meyering.net>
3296
3297         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
3298         shadowing the parameter.
3299
3300 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3301
3302         Sync from Libtool:
3303
3304         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3305
3306         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
3307         sharing with gnulib.  Report by Eric Blake.
3308
3309 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3310
3311         * modules/isapipe: New file.
3312         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
3313
3314 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3315
3316         * modules/configmake (Makefile.am): Add a comment, and omit
3317         the CONFIGMAKE_ prefix from generated macro names.  Suggested
3318         by Bruno Haible.
3319
3320 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3321
3322         * m4/isapipe.m4: New file.
3323
3324 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3325
3326         * lib/isapipe.c, lib/isapipe.h: New files.
3327
3328 2006-08-29  Jim Meyering  <jim@meyering.net>
3329
3330         * modules/configmake (Makefile.am): Make configmake.h depend on
3331         Makefile.  Otherwise, a stale configmake.h could hang around.
3332
3333 2006-08-29  Eric Blake  <ebb9@byu.net>
3334
3335         * lib/error.c (error_at_line, print_errno_message): Match libc, after
3336         resolution of upstream bug 3044.
3337
3338 2006-08-29  Bruno Haible  <bruno@clisp.org>
3339
3340         * modules/localcharset (Depends-on): Add configmake.
3341         (Makefile.am): Remove setting of LIBDIR through DEFS.
3342
3343 2006-08-29  Bruno Haible  <bruno@clisp.org>
3344
3345         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
3346         defined.
3347
3348 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3349
3350         * modules/fcntl: New file.
3351         * modules/chdir-safer (Depends-on): Add fcntl.
3352         * modules/fts: Likewise.
3353         * modules/mkdir-p: Likewise.
3354
3355         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
3356         This undoes the most recent change, since we're now addressing the
3357         problem in a different way.
3358
3359         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
3360         into output, since the output might be called Makefile.am even
3361         if $makefile_name is something different.
3362         (func_import): Use $makefile_am rather than
3363         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
3364         empty.
3365
3366         * modules/inttypes (Files): Add m4/inttypes-h.m4.
3367
3368 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3369
3370         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
3371         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
3372         recent change to stdint.m4, since we're now addressing the problem in a
3373         different way.
3374
3375 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3376
3377         * m4/fcntl_h.m4: New file.
3378
3379 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3380
3381         * lib/fcntl_.h: New file.
3382         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
3383         the fcntl module.
3384         * lib/dirchownmod.c: Likewise.
3385         * lib/fts.c: Likewise.
3386
3387         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
3388         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
3389         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
3390         just before including <inttypes.h>, to avoid circular inclusion.
3391
3392 2006-08-28  Jim Meyering  <jim@meyering.net>
3393
3394         * doc/visibility.texi: Actually read and correct the grammar of the
3395         sentence affected by yesterday's change.
3396
3397 2006-08-28  Eric Blake  <ebb9@byu.net>
3398
3399         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
3400         needs wrapper.
3401
3402 2006-08-28  Eric Blake  <ebb9@byu.net>
3403
3404         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
3405
3406 2006-08-28  Eric Blake  <ebb9@byu.net>
3407
3408         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
3409
3410 2006-08-28  Bruno Haible  <bruno@clisp.org>
3411
3412         * modules/c-strstr: New file, from GNU gettext.
3413         * MODULES.html.sh (String handling): Add c-strstr.
3414
3415 2006-08-28  Bruno Haible  <bruno@clisp.org>
3416
3417         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
3418         macros.
3419         Reported by Eric Blake.
3420
3421 2006-08-28  Bruno Haible  <bruno@clisp.org>
3422
3423         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
3424         (VASNPRINTF): Return a string of length > INT_MAX without failing.
3425         * lib/vasprintf.c: Include errno.h, limits.h.
3426         (EOVERFLOW): New fallback definition.
3427         (vasprintf): Test here whether the string length is > INT_MAX.
3428         * lib/vsnprintf.c: Include errno.h, limits.h.
3429         (EOVERFLOW): New fallback definition.
3430         (vsnprintf): Fix bug when generated string was too long for the buffer.
3431         Test here whether the string length is > INT_MAX.
3432
3433 2006-08-28  Bruno Haible  <bruno@clisp.org>
3434
3435         * lib/inttypes_.h (SCNX*): Remove definitions.
3436         Reported by Eric Blake.
3437
3438 2006-08-28  Bruno Haible  <bruno@clisp.org>
3439
3440         * lib/c-strstr.h: New file, from GNU gettext.
3441         * lib/c-strstr.c: New file, from GNU gettext.
3442
3443 2006-08-28  Bruno Haible  <bruno@clisp.org>
3444
3445         * gnulib-tool: Reorder some statements.
3446
3447 2006-08-28  Bruno Haible  <bruno@clisp.org>
3448
3449         * gnulib-tool: New option --makefile-name.
3450         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
3451         $makefile_name.
3452         (func_import): Write $makefile_name to the cache file, and read it from
3453         there unless explicitly specified. Use $makefile_name as file name
3454         instead of Makefile.am. Adjust the recommendations accordingly.
3455
3456 2006-08-28  Bruno Haible  <bruno@clisp.org>
3457
3458         * gnulib-tool (func_verify_module): Check against misapplying patch.
3459
3460 2006-08-28  Bruno Haible  <bruno@clisp.org>
3461
3462         * gnulib-tool (func_relativize, func_relconcat): New functions.
3463         Give an error if --local-dir is given with --update.
3464         Remove trailing slashes from $local_gnulib_dir.
3465         (func_import): Store the relativized $local_gnulib_dir in
3466         gnulib-cache.m4, and read it from there if not specified explicitly.
3467
3468 2006-08-28  Bruno Haible  <bruno@clisp.org>
3469
3470         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
3471         is the current directory. Respect also $local_gnulib_dir.
3472
3473 2006-08-28  Bruno Haible  <bruno@clisp.org>
3474             Simon Josefsson  <jas@extundo.com>
3475
3476         BeOS portability.
3477         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
3478
3479 2006-08-27  Jim Meyering  <jim@meyering.net>
3480
3481         * doc/visibility.texi: Remove duplicate word: "pointer".
3482
3483 2006-08-26  Bruno Haible  <bruno@clisp.org>
3484
3485         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
3486         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
3487         (Makefile.am): Create inttypes.h from inttypes_.h.
3488         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
3489
3490         * modules/imaxabs: New file.
3491
3492         * modules/imaxdiv: New file.
3493
3494 2006-08-26  Bruno Haible  <bruno@clisp.org>
3495
3496         * m4/inttypes.m4: New file.
3497         * m4/_inttypes_h.m4: Remove file.
3498         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
3499         PRI_MACROS_BROKEN.
3500         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
3501
3502         * m4/imaxabs.m4: New file.
3503
3504         * m4/imaxdiv.m4: New file.
3505
3506 2006-08-26  Bruno Haible  <bruno@clisp.org>
3507
3508         * lib/inttypes_.h: New file.
3509         * lib/inttypes.h: Remove file.
3510         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
3511
3512         * lib/imaxabs.c: New file.
3513
3514         * lib/imaxdiv.c: New file.
3515
3516 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
3517
3518         New config-h module, so that "make" output needn't be cluttered
3519         by -DHAVE_CONFIG_H.
3520         * MODULES.html.sh (Support for building libraries and executables):
3521         Add config-h.
3522         * modules/config-h: New file.
3523         * gnulib-tool (nl, sed_transform_lib_file): New vars.
3524         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
3525         the config-h module is used.
3526
3527         New configmake module, so that "make" output needn't be cluttered
3528         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
3529         * MODULES.html.sh (Support for building libraries and executables):
3530         Add configmake.
3531         * modules/configmake: New file.
3532
3533 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
3534
3535         * m4/config-h.m4: New file.
3536
3537 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
3538
3539         * config/srclist.txt: Add elisp-comp.
3540
3541 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
3542
3543         * MODULES.html.sh (Support for building libraries and executables):
3544         Add elisp-comp.
3545         * build-aux/elisp-comp: New file.
3546         * modules/elisp-comp: New file.
3547
3548 2006-08-24  Bruno Haible  <bruno@clisp.org>
3549
3550         * gnulib-tool (func_create_testdir): Use non-default values of
3551         sourcebase and m4base.
3552
3553 2006-08-24  Bruno Haible  <bruno@clisp.org>
3554
3555         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
3556         HTML structure.
3557
3558 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
3559
3560         * modules/openat (Depends-on): Add lchown.
3561
3562 2006-08-23  Bruno Haible  <bruno@clisp.org>
3563
3564         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
3565         of gl_LOCK_EARLY instead of gl_LOCK.
3566
3567 2006-08-23  Bruno Haible  <bruno@clisp.org>
3568
3569         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
3570         on OSF/1 to no.
3571         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
3572
3573 2006-08-23  Bruno Haible  <bruno@clisp.org>
3574
3575         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
3576         as unusable.
3577
3578         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
3579         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
3580         (gl_LOCK): New macro.
3581
3582 2006-08-22  Simon Josefsson  <jas@extundo.com>
3583
3584         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
3585         to md5 module.
3586
3587 2006-08-22  Simon Josefsson  <jas@extundo.com>
3588
3589         * MODULES.html.sh: Add "Support for maintaining and release
3590         projects".
3591
3592         * build-aux/gnupload: New file, from coreutils.
3593
3594 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3595
3596         Avoid the need for AC_LIBSOURCES in m4 macros.
3597         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
3598         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
3599         * modules/check-version (EXTRA_DIST): Add check-version.h.
3600         * modules/crc (EXTRA_DIST): Add crc.h.
3601         * modules/des (EXTRA_DIST): Add des.h.
3602         * modules/gc (EXTRA_DIST): Add gc.h.
3603         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
3604         * modules/getline (EXTRA_DIST): Add getline.h.
3605         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
3606         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
3607         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
3608         * modules/md2 (EXTRA_DIST): Add md2.h.
3609         * modules/md4 (EXTRA_DIST): Add md4.h.
3610         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
3611         * modules/read-file (EXTRA_DIST): Add read-file.h.
3612         * modules/readline (EXTRA_DIST): Add readline.h.
3613         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
3614         rijndael-api-fst.h.
3615
3616 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3617
3618         * m4/rijndael.m4 (gl_ARCFOUR):
3619         * m4/arctwo.m4 (gl_ARCTWO):
3620         * m4/check-version.m4 (gl_CHECK_VERSION):
3621         * m4/crc.m4 (gl_CRC):
3622         * m4/des.m4 (gl_DES):
3623         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
3624         * m4/gc.m4 (gl_GC):
3625         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
3626         * m4/getline.m4 (gl_FUNC_GETLINE):
3627         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
3628         * m4/hmac-md5.m4 (gl_HMAC_MD5):
3629         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
3630         * m4/md2.m4 (gl_MD2):
3631         * m4/md4.m4 (gl_MD4):
3632         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
3633         * m4/read-file.m4 (gl_FUNC_READ_FILE):
3634         * m4/readline.m4 (gl_FUNC_READLINE):
3635         * m4/rijndael.m4 (gl_RIJNDAEL):
3636         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
3637         to get the necessary .h files and whatnot.
3638
3639 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3640
3641         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
3642         gnulib rather than the other way around.
3643         * config/srclistvars.sh (COREUTILS): Remove.
3644
3645 2006-08-22  Jim Meyering  <jim@meyering.net>
3646
3647         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
3648
3649         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
3650
3651 2006-08-22  Eric Blake  <ebb9@byu.net>
3652
3653         * modules/regexprops-generic: New file.
3654         * MODULES.html.sh (Support for building documentation): List it.
3655
3656 2006-08-22  Eric Blake  <ebb9@byu.net>
3657
3658         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
3659         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
3660         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
3661         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
3662
3663 2006-08-22  Bruno Haible  <bruno@clisp.org>
3664
3665         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
3666         and lib_LTLIBRARIES like the other lib_* variables.
3667
3668 2006-08-22  Bruno Haible  <bruno@clisp.org>
3669
3670         * build-aux/x-to-1.in: New file, from GNU gettext.
3671
3672 2006-08-22  Bruno Haible  <bruno@clisp.org>
3673
3674         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
3675         <utmpx.h> exists.
3676
3677 2006-08-22  Bruno Haible  <bruno@clisp.org>
3678
3679         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
3680         <utmpx.h> exists.
3681
3682 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3683
3684         BeOS portability.
3685         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
3686         exist.
3687         Problem reported by Bruno Haible.
3688
3689 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3690
3691         Avoid the need for AC_LIBSOURCES in m4 macros.
3692         * modules/acl (EXTRA_DIST): Add acl.h.
3693         * modules/argmatch (Files): Add m4/argmatch.m4.
3694         (configure.ac): Add gl_ARGMATCH.
3695         (EXTRA_DIST): Renamed from lib_SOURCES, for
3696         consistency with the other modules.  Remove argmatch.c.
3697         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
3698         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
3699         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
3700         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
3701         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
3702         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
3703         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
3704         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
3705         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
3706         * modules/closeout (EXTRA_DIST): Add closeout.h.
3707         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
3708         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
3709         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
3710         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
3711         dirname.h; remove basename.c and stripslash.c.
3712         * modules/exclude (EXTRA_DIST): Add exclude.h.
3713         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
3714         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
3715         * modules/file-type (EXTRA_DIST): Add file-type.h.
3716         * modules/filemode (EXTRA_DIST): Add filemode.h.
3717         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
3718         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
3719         * modules/fpending (EXTRA_DIST): Add __fpending.h.
3720         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
3721         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
3722         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
3723         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
3724         * modules/getdate (EXTRA_DIST): Add getdate.c.
3725         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
3726         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
3727         * modules/getpass (EXTRA_DIST): Add getpass.h.
3728         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
3729         * modules/group-member (EXTRA_DIST): Add group-member.h.
3730         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
3731         * modules/hash (EXTRA_DIST): Add hash.h.
3732         * modules/human (EXTRA_DIST): Add human.h.
3733         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
3734         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
3735         * modules/lchown (EXTRA_DIST): Add lchown.h.
3736         * modules/long-options (EXTRA_DIST): Add long-options.h.
3737         * modules/lstat (EXTRA_DIST): Add lstat.h.
3738         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
3739         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
3740         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
3741         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
3742         * modules/memxor (EXTRA_DIST): Add memxor.h.
3743         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
3744         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
3745         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
3746         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
3747         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
3748         * modules/physmem (EXTRA_DIST): Add physmem.h.
3749         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
3750         * modules/posixver (EXTRA_DIST): Add posixver.h.
3751         * modules/quote (EXTRA_DIST): Add quote.h.
3752         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
3753         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
3754         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
3755         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
3756         regex_internal.h regexec.c.
3757         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
3758         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
3759         * modules/same (EXTRA_DIST): Add same.h.
3760         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
3761         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
3762         * modules/savedir (EXTRA_DIST): Add savedir.h.
3763         * modules/sha1 (EXTRA_DIST): Add sha1.h.
3764         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
3765         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
3766         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
3767         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
3768         * modules/strdup (EXTRA_DIST): Add strdup.h.
3769         * modules/strftime (EXTRA_DIST): Add strftime.h.
3770         * modules/strndup (EXTRA_DIST): Add strndup.h.
3771         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
3772         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
3773         * modules/time_r (EXTRA_DIST): Add time_r.h.
3774         * modules/timespec (EXTRA_DIST): Add timespec.h.
3775         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
3776         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
3777         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
3778         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
3779         * modules/userspec (EXTRA_DIST): Add userspec.h.
3780         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
3781         * modules/utimens (EXTRA_DIST): Add utimens.h.
3782         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
3783         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
3784         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
3785         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
3786         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
3787         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
3788         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
3789         * modules/yesno (EXTRA_DIST): Add yesno.h.
3790
3791 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3792
3793         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
3794
3795         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
3796         * m4/dev-ino.m4, same-inode.m4: Remove.
3797
3798         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
3799         * m4/acl.m4 (AC_FUNC_ACL):
3800         * m4/backupfile.m4 (gl_BACKUPFILE):
3801         * m4/c-strtod.m4 (gl_C99_STRTOLD):
3802         * m4/canon-host.m4 (gl_CANON_HOST):
3803         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3804         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
3805         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
3806         * m4/cloexec.m4 (gl_CLOEXEC):
3807         * m4/close-stream.m4 (gl_CLOSE_STREAM):
3808         * m4/closeout.m4 (gl_CLOSEOUT):
3809         * m4/dirfd.m4 (gl_FUNC_DIRFD):
3810         * m4/dirname.m4 (gl_DIRNAME):
3811         * m4/exclude.m4 (gl_EXCLUDE):
3812         * m4/exitfail.m4 (gl_EXITFAIL):
3813         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
3814         * m4/file-type.m4 (gl_FILE_TYPE):
3815         * m4/filemode.m4 (gl_FILEMODE):
3816         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
3817         * m4/fpending.m4 (gl_FUNC_FPENDING):
3818         * m4/fprintftime.m4 (gl_FPRINTFTIME):
3819         * m4/fts.m4 (gl_FUNC_FTS):
3820         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
3821         * m4/getdate.m4 (gl_GETDATE):
3822         * m4/gethrxtime.m4 (gl_GETHRXTIME):
3823         * m4/getpagesize.m4 (gl_GETPAGESIZE):
3824         * m4/getpass.m4 (gl_FUNC_GETPASS):
3825         * m4/gettime.m4 (gl_GETTIME):
3826         * m4/getugroups.m4 (gl_GETUGROUPS):
3827         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
3828         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
3829         * m4/hard-locale.m4 (gl_HARD_LOCALE):
3830         * m4/hash.m4 (gl_HASH):
3831         * m4/idcache.m4 (gl_IDCACHE):
3832         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
3833         * m4/lchown.m4 (gl_FUNC_LCHOWN):
3834         * m4/long-options.m4 (gl_LONG_OPTIONS):
3835         * m4/lstat.m4 (gl_FUNC_LSTAT):
3836         * m4/md5.m4 (gl_MD5):
3837         * m4/memcasecmp.m4 (gl_MEMCASECMP):
3838         * m4/memcoll.m4 (gl_MEMCOLL):
3839         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
3840         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
3841         * m4/memxor.m4 (gl_MEMXOR):
3842         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
3843         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
3844         * m4/modechange.m4 (gl_MODECHANGE):
3845         * m4/mountlist.m4 (gl_MOUNTLIST):
3846         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
3847         * m4/openat.m4 (gl_FUNC_OPENAT):
3848         * m4/pathmax.m4 (gl_PATHMAX):
3849         * m4/physmem.m4 (gl_PHYSMEM):
3850         * m4/posixtm.m4 (gl_POSIXTM):
3851         * m4/posixver.m4 (gl_POSIXVER):
3852         * m4/quote.m4 (gl_QUOTE):
3853         * m4/quotearg.m4 (gl_QUOTEARG):
3854         * m4/readtokens.m4 (gl_READTOKENS):
3855         * m4/readutmp.m4 (gl_READUTMP):
3856         * m4/regex.m4 (gl_REGEX):
3857         * m4/safe-read.m4 (gl_SAFE_READ):
3858         * m4/safe-write.m4 (gl_SAFE_WRITE):
3859         * m4/same.m4 (gl_SAME):
3860         * m4/save-cwd.m4 (gl_SAVE_CWD):
3861         * m4/savedir.m4 (gl_SAVEDIR):
3862         * m4/settime.m4 (gl_SETTIME):
3863         * m4/sha1.m4 (gl_SHA1):
3864         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
3865         * m4/stat-macros.m4 (gl_STAT_MACROS):
3866         * m4/stat-time.m4 (gl_STAT_TIME):
3867         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
3868         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
3869         * m4/strdup.m4 (gl_FUNC_STRDUP):
3870         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
3871         * m4/strndup.m4 (gl_FUNC_STRNDUP):
3872         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
3873         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
3874         * m4/time_r.m4 (gl_TIME_R):
3875         * m4/timespec.m4 (gl_TIMESPEC):
3876         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
3877         * m4/unlinkdir.m4 (gl_UNLINKDIR):
3878         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
3879         * m4/userspec.m4 (gl_USERSPEC):
3880         * m4/utimecmp.m4 (gl_UTIMECMP):
3881         * m4/utimens.m4 (gl_UTIMENS):
3882         * m4/xalloc.m4 (gl_XALLOC):
3883         * m4/xgetcwd.m4 (gl_XGETCWD):
3884         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
3885         * m4/xreadlink.m4 (gl_XREADLINK):
3886         * m4/xstrtod.m4 (gl_XSTRTOD):
3887         * m4/yesno.m4 (gl_YESNO):
3888         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
3889         to get the necessary .h files and whatnot.
3890
3891 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
3892             Bruno Haible  <bruno@clisp.org>
3893
3894         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
3895         /bin/sh understanding of '!' conditional negation.
3896
3897 2006-08-21  Jim Meyering  <jim@meyering.net>
3898
3899         * modules/openat (Depends-on): Really alphabetize.
3900
3901         * modules/acl (Depends-on): Add error and quote.
3902
3903         * check-module (find_included_lib_files): Add at-func.c to the
3904         ok-to-include-more-than-once white list.
3905
3906         * modules/openat (Depends-on): Add lstat.  Alphabetize.
3907
3908 2006-08-21  Bruno Haible  <bruno@clisp.org>
3909
3910         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3911         Emit a pkgdata_DATA variable only if some snippets add contents to it.
3912         Reported by Martin Lambers <marlam@marlam.de>.
3913
3914 2006-08-21  Bruno Haible  <bruno@clisp.org>
3915
3916         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
3917         specify an installation location, don't emit a noinst_LIBRARIES or
3918         noinst_LTLIBRARIES assignment.
3919
3920 2006-08-21  Bruno Haible  <bruno@clisp.org>
3921
3922         BeOS portability.
3923         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
3924         BeOS has mbrtowc() but no <wctype.h>.
3925
3926 2006-08-21  Bruno Haible  <bruno@clisp.org>
3927
3928         BeOS portability.
3929         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
3930         exist.
3931
3932 2006-08-21  Bruno Haible  <bruno@clisp.org>
3933
3934         BeOS portability.
3935         * lib/mbchar.h: Include <wctype.h> only if it exists.
3936
3937 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3938
3939         Remove files that are no longer needed by their respective modules.
3940         * m4/obstack.m4: Remove.
3941         * m4/strerror_r.m4: Remove.
3942         * m4/uint32_t.m4: Remove.
3943         * m4/uintptr_t.m4: Remove.
3944         * m4/ullong_max.m4: Remove.
3945         * m4/xstrtoimax.m4: Remove.
3946         * m4/xstrtoumax.m4: Remove.
3947
3948         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
3949         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
3950         dependencies now capture this.
3951
3952         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
3953         Do not use AC_LIBSOURCES, since gnulib modules now do this.
3954         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
3955         * m4/human.m4 (gl_HUMAN): Likewise.
3956         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
3957         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
3958
3959         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
3960
3961         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
3962         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
3963         stdint.
3964         * m4/human.m4 (gl_HUMAN): Likewise.
3965         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
3966         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
3967         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3968         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3969         * m4/xstrtol (gl_XSTRTOL): Likewise.
3970
3971         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
3972         AC_TYPE_LONG_LONG_INT.
3973         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3974         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
3975         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
3976         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3977
3978         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
3979         on stdbool.
3980
3981         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
3982         (gl_PREREQ_XSTRTOUL): Remove.
3983
3984         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
3985
3986         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
3987         mode.
3988
3989 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3990
3991         Add and change modules to make it easier for coreutils to use
3992         gnulib-tool.
3993         * modules/backupfile (Files): Remove m4/d-ino.m4.
3994         (Depends-on): Add d-ino.
3995         * modules/cycle-check (Depends-on): Add stdint.
3996         (lib_SOURCES): Add cycle-check.h.
3997         * modules/d-ino: New module.
3998         * modules/d-type: New module.
3999         * modules/error (Files): Remove m4/strerror_r.m4.
4000         * modules/filemode (Files): Add m4/st_dm_mode.m4.
4001         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4002         m4/inttypes_h.m4, m4/uintmax_t.m4.
4003         (Depends-on): Add stdint.
4004         (lib_SOURCES): Add fsusage.h.
4005         * modules/getcwd (Files): Remove d-ino.m4.
4006         (Depends-on): Add d-ino.
4007         * modules/getndelim2 (Depends-on): Add stdint.
4008         * modules/glob (Files): Remove m4/d-type.m4.
4009         (Depends-on): Add d-type.
4010         * modules/host-os: New module.
4011         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
4012         m4/inttypes_h.m4, m4/uintmax_t.m4.
4013         * Depends-on: Add stdint.
4014         (lib_SOURCES): Add human.h.
4015         * modules/inttostr (Files): Remove m4/intmax_t.m4,
4016         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
4017         m4/uintmax_t.m4, m4/ulonglong.m4.
4018         (Depends-on): Add stdint.
4019         (EXTRA_DIST): Add inttostr.h.
4020         * modules/lchmod: New module.
4021         * modules/link-follow: New module.
4022         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
4023         (Depends-on): Add lchmod.
4024         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
4025         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
4026         (Depends-on): Add stdint.
4027         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
4028         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
4029         (Depends-on): Add stdint.
4030         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
4031         * modules/perl: New module.
4032         * modules/regex (Depends-on): Add stdint.
4033         * modules/rmdir-errno: New module.
4034         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4035         m4/intmax_t.m4.
4036         (Depends-on): Add stdint.
4037         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4038         m4/uintmax_t.m4.
4039         (Depends-on): Add stdint.
4040         * modules/unlink-busy: New module.
4041         * modules/utimecmp (Depends-on): Add stdint.
4042         * modules/uptime: New module.
4043         * modules/winsz-ioctl: New module.
4044         * modules/winsz-termios: New module.
4045         * modules/xnanosleep (Depends-on): Add nanosleep.
4046         * modules/ullong_max: Remove.
4047         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
4048         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
4049         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
4050         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
4051         (Depends-on): Add inttypes.
4052         (lib_SOURCES): Add xstrtol.h.
4053         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
4054         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
4055         * MODULES.html.sh: Move 'assert' into the assert section.
4056         Move 'dummy' into the linking section.
4057         Remove ullong_max.
4058         Add section for compatibility checks for POSIX:2001 functions,
4059         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
4060         winsz-ioctl, and winsz-termios into it.
4061         Add lchmod.
4062         Add top-level Misc section and put host-os, perl, and uptime
4063         into it.
4064
4065 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4066
4067         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
4068         now assume the stdint module.  Do not include inttypes.h.
4069         * lib/fsusage.h: Likewise.
4070         * lib/getndelim2.c: Likewise.
4071         * lib/human.h: Likewise.
4072         * lib/inttostr.h: Likewise.
4073         * lib/obstack.c: Likewise.
4074         * lib/regex_internal.h: Likewise.
4075         * lib/tempname.c: Likewise.
4076         * lib/utimecmp.c: Likewise.
4077         * lib/xstrtol.h: Likewise.
4078
4079         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
4080
4081         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
4082         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
4083         * lib/xtime.h: Likewise.
4084
4085 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4086
4087         * modules/openat (Files): Add lib/fchmodat.c.
4088         Fixes problem reported by Jay Youngman.
4089
4090 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4091
4092         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
4093         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
4094
4095 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
4096             Bruno Haible  <bruno@clisp.org>
4097
4098         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4099         and is a script that invokes bison. Tighten the code. Add comments.
4100
4101 2006-08-18  Jim Meyering  <jim@meyering.net>
4102
4103         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
4104         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
4105         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
4106         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
4107
4108 2006-08-18  Bruno Haible  <bruno@clisp.org>
4109
4110         * modules/bison-i18n: New file.
4111         * MODULES.html.sh (Internationalization functions): Add it.
4112
4113 2006-08-18  Bruno Haible  <bruno@clisp.org>
4114
4115         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
4116         sys/statvfs.h. When getmntinfo was found, check its declaration and
4117         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
4118
4119 2006-08-18  Bruno Haible  <bruno@clisp.org>
4120
4121         * m4/bison-i18n.m4: New file, from bison.
4122
4123 2006-08-18  Bruno Haible  <bruno@clisp.org>
4124
4125         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
4126         (ME_DUMMY): Treat "kernfs" as a dummy.
4127         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
4128
4129 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
4130
4131         Update from coreutils.
4132
4133         2006-08-15  Jim Meyering  <jim@meyering.net>
4134
4135         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
4136
4137         2006-01-17  Jim Meyering  <jim@meyering.net>
4138
4139         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
4140
4141         2006-01-11  Jim Meyering  <jim@meyering.net>
4142
4143         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
4144         Check for the lchmod function.
4145
4146 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
4147
4148         Update from coreutils.
4149
4150         * lib/__fpending.h: Add copyright notice.
4151         * lib/fprintftime.h: Likewise.
4152         * lib/savedir.c: Use (C) in copyright notice.
4153         * lib/savedir.h: Likewise.
4154
4155         2006-08-15  Jim Meyering  <jim@meyering.net>
4156
4157         * lib/at-func.c: New file, with the logic of all emulated at-functions.
4158         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
4159         in support of the EXPECTED_ERRNO macro.
4160         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
4161         definitions.  Instead, define the appropriate symbols and include
4162         "at-func.c".
4163         * lib/mkdirat.c (mkdirat): Likewise.
4164         * lib/fchmodat.c (fchmodat): Likewise.
4165         (ENOSYS): Remove definition.
4166         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
4167         it.  Don't include "unistd--.h" -- it wasn't ever used.
4168
4169         2006-01-17  Jim Meyering  <jim@meyering.net>
4170
4171         Rewrite fts.c not to change the current working directory,
4172         by using openat, fstatat, fdopendir, etc..
4173
4174         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
4175         (HAVE_OPENAT_SUPPORT): Define.
4176         [_LIBC] (fchdir): Don't undef or define; no longer used.
4177         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
4178         Now, this `function' always succeeds, and consumes its file descriptor
4179         parameter -- so callers must not close such FDs.  Update callers.
4180         (diropen_fd, opendirat, cwd_advance_fd): New functions.
4181         (diropen): Add parameter, SP.  Adjust all callers.
4182         Implement using diropen_fd, rather than open.
4183         (fts_open): Initialize new member, fts_cwd_fd.
4184         Remove fts_rft-setting code.
4185         (fts_close): Close fts_cwd_fd, if necessary.
4186         (__opendir2): Define in terms of opendir or opendirat,
4187         depending on whether the FST_NOCHDIR flag is set.
4188         (fts_build): Since fts_safe_changedir consumes its FD, and since
4189         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
4190         and close the dup'd file descriptor upon failure.
4191         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
4192         (fts_safe_changedir): Tweak semantics to reflect that this function
4193         now calls cwd_advance_fd and hence consumes its FD argument.
4194         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
4195         [struct FTS] (fts_rft): Remove now-unused member.
4196         [struct FTS] (fts_cycle.state): Improve comment.
4197
4198         * lib/openat.c (openat_needs_fchdir): New function.
4199         * lib/openat.h (openat_needs_fchdir): Declare it.
4200
4201 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
4202
4203         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
4204         Problem and fix reported by Pádraig Brady in
4205         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
4206
4207 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4208
4209         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
4210
4211 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4212
4213         * lib/memcoll.c (memcoll): Optimize for the common case where the
4214         arguments are bytewise equal.
4215
4216 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4217
4218         * doc/regexprops-generic.texi: Add a copyright notice.
4219
4220 2006-08-15  Bruno Haible  <bruno@clisp.org>
4221
4222         * modules/tmpdir (License): Change to LGPL.
4223
4224 2006-08-15  Bruno Haible  <bruno@clisp.org>
4225
4226         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
4227         module.
4228
4229 2006-08-14  Simon Josefsson  <jas@extundo.com>
4230
4231         * config/srclist.txt: Add gnupload.
4232
4233 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4234
4235         Change copyright notice from LGPL 2 to GPL 2, since that's the
4236         standard form used in the gnulib repository.
4237         * tests/test-lock.c: Likewise.
4238         * tests/test-stdint.c: Likewise.
4239         * tests/test-tls.c: Likewise.
4240
4241         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
4242         prelude-manager.  User shorter URLs for GNU projects, without '?'.
4243         Add copyright notice.
4244
4245         * check-module: Add copyright notice.  Output a copyright
4246         notice if "--version" is specified.
4247         * modules/COPYING: New file.
4248         * tests/test-getaddrinfo.c: Add copyright notice.
4249         * tests/test-verify.c: Likewise.
4250
4251 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4252
4253         Change copyright notice from LGPL 2 to GPL 2, since that's the
4254         standard form used in the gnulib repository.
4255         * lib/lock.c: LGPL -> GPL.
4256         * lib/lock.h: Likewise.
4257         * lib/strnlen1.c: Likewise.
4258         * lib/strnlen1.h: Likewise.
4259         * lib/tls.c: Likewise.
4260         * lib/tls.h: Likewise.
4261         * lib/tmpdir.c: Likewise.
4262
4263         * lib/TODO: Remove; this belongs only in coreutils.
4264
4265 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4266
4267         Add copyright notices to long-enough files that lack them, since
4268         otherwise the files aren't clearly free.  Use the same notice that
4269         getdate.texi already uses.
4270         * doc/alloca-opt.texi: Add copyright notice.
4271         * doc/alloca.texi: Likewise.
4272         * doc/ctime.texi: Likewise.
4273         * doc/functions.texi: Likewise.
4274         * doc/gcd.texi: Likewise.
4275         * doc/gnulib-tool.texi: Likewise.
4276         * doc/inet_ntoa.texi: Likewise.
4277         * doc/visibility.texi: Likewise.
4278
4279         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
4280         * doc/quote.texi: Add copyright notice.
4281
4282         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
4283         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
4284         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
4285         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
4286         is now obsolete, and give a pointer to the Sun list.
4287         Add copyright notice.
4288
4289 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4290
4291         * config/srclistvars.sh: Add copyright notice.
4292
4293 2006-08-14  Eric Blake  <ebb9@byu.net>
4294
4295         Import the following change from libc:
4296
4297         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4298
4299         Upstream bug 2997.
4300         * lib/misc/error.c: Add space between program name and message if file
4301         name is missing.
4302
4303 2006-08-12  Karl Berry  <karl@gnu.org>
4304
4305         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
4306         remove, these originate in gnulib now.
4307
4308 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4309
4310         * doc/Makefile (standards.info standards.html standards.dvi):
4311         Also depend on make-stds.texi.
4312
4313 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
4314
4315         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
4316         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
4317
4318         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
4319         in wchar_t.  Problem reported by Eric Blake.
4320
4321         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
4322         LEN is smaller than SIZE.  Suggested by Bruno Haible.
4323         Also, help the compiler to keep LEN in a register.
4324
4325 2006-08-11  Eric Blake  <ebb9@byu.net>
4326
4327         * users.txt: Sort.  Add tar.
4328
4329 2006-08-11  Bruno Haible  <bruno@clisp.org>
4330
4331         * users.txt: New file.
4332
4333 2006-08-11  Bruno Haible  <bruno@clisp.org>
4334
4335         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
4336         before <wchar.h>. Needed for OSF/1 and BSD/OS.
4337
4338 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
4339
4340         * modules/snprintf (Depends-on): Remove minmax.
4341         (Maintainer): Add self and Bruno.
4342
4343 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
4344
4345         * lib/.cppi-disable: Add snprintf.h, socket_.h.
4346         * lib/snprintf.c: Include <errno.h> and <limits.h>.
4347         (EOVERFLOW): Define if the system does not.
4348         Do not include "minmax.h"; it wasn't used.
4349         (snprintf): Don't assume size_t promotes to an unsigned type.
4350         Fix bug when generated string was too long for the buffer: the
4351         buffer's contents are supposed to be the initial prefix of the
4352         output.  Don't assume vasnprintf returns EOVERFLOW if the size
4353         exceeds INT_MAX; do the check ourselves.
4354
4355         Import the following changes from libc:
4356
4357         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
4358
4359         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
4360         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
4361         set wc to the byte which couldn't be converted.
4362         (re_string_reconstruct): Don't clear valid_raw_len before calling
4363         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
4364         tip_context using re_string_context_at.
4365
4366         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
4367
4368         * lib/posix/regex.h: g++ still cannot handled [restrict].
4369
4370         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
4371
4372         * lib/posix/regex.h: Remove special handling for VMS.
4373
4374 2006-08-10  Jim Meyering  <jim@meyering.net>
4375
4376         * modules/same-inode: New module.
4377         * modules/dev-ino: New module.
4378         * modules/cycle-check: Depend on these modules, rather than simply
4379         including their .h files.
4380         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
4381         required via m4/cycle-check.m4.
4382         * modules/same: Depend on new same-inode module, rather than
4383         including same-inode.h.
4384         * modules/chdir-safer: New file.
4385
4386         * modules/chown (Depends-on): Add stat-macros.
4387
4388 2006-08-10  Jim Meyering  <jim@meyering.net>
4389
4390         * m4/cycle-check.m4: New file.
4391         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
4392         * m4/dev-ino.m4, m4/same-inode.m4: New files.
4393
4394 2006-08-10  Eric Blake  <ebb9@byu.net>
4395
4396         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
4397         in from original proposal.
4398
4399 2006-08-10  Eric Blake  <ebb9@byu.net>
4400         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4401
4402         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
4403         namespace.
4404
4405 2006-08-10  Bruno Haible  <bruno@clisp.org>
4406
4407         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
4408         as well.
4409
4410 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4411
4412         Sync from coreutils.
4413
4414         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
4415
4416         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
4417         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
4418
4419 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4420
4421         * modules/restrict: Remove; no longer needed now that we assume
4422         Autoconf 2.59 or later.
4423         * MODULES.html.sh: Remove 'restrict'.
4424         * modules/argp (Depends-on): Remove 'restrict'.
4425         * modules/base64 (Depends-on): Likewise.
4426         * modules/gc (Depends-on): Likewise.
4427         * modules/getaddrinfo (Depends-on): Likewise.
4428         * modules/glob (Depends-on): Likewise.
4429         * modules/inet_ntop (Depends-on): Likewise.
4430         * modules/inet_pton (Depends-on): Likewise.
4431         * modules/memxor (Depends-on): Likewise.
4432         * modules/regex (Depends-on): Likewise.
4433         * modules/strtok_r (Depends-on): Likewise.
4434         * modules/time_r (Depends-on): Likewise.
4435
4436 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4437
4438         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
4439         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
4440         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
4441         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
4442         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
4443         * m4/memxor.m4 (gl_MEMXOR): Likewise.
4444         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
4445         gl_C_RESTRICT replaced by AC_C_RESTRICT.
4446
4447         Merge from coreutils.
4448         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
4449         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
4450         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
4451         * m4/time_r.m4 (gl_TIME_R): Likewise.
4452
4453 2006-08-09  Karl Berry  <karl@gnu.org>
4454
4455         * config/srclist.txt: no more gettext-tools, per Bruno.
4456
4457 2006-08-08  Eric Blake  <ebb9@byu.net>
4458
4459         * modules/verror: New module.
4460         * MODULES.html.sh: Document it.
4461
4462 2006-08-08  Eric Blake  <ebb9@byu.net>
4463
4464         * lib/verror.h, lib/verror.c: New files.
4465
4466 2006-08-08  Eric Blake  <ebb9@byu.net>
4467
4468         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
4469         verror_at_line output complies with GNU Coding Standards even when
4470         file is NULL.
4471
4472 2006-08-07  Bruno Haible  <bruno@clisp.org>
4473
4474         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
4475         versions of AIX.
4476         Reported by Ralf Wildenhues.
4477
4478 2006-08-07  Bruno Haible  <bruno@clisp.org>
4479
4480         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
4481         in an AC_DEFUN. Needed so that the autoconf snippets can use
4482         AC_REQUIRE.
4483
4484 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4485
4486         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4487         Initialize pkgdata_DATA.
4488         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
4489         overriding it.
4490
4491 2006-08-06  Eric Blake  <ebb9@byu.net>
4492
4493         * lib/error.h: Fold in some upstream changes from glibc.
4494         * lib/error.c: Likewise.
4495
4496 2006-08-04  Bruno Haible  <bruno@clisp.org>
4497
4498         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4499         Make the mostlyclean-local rule depend on mostlyclean-generic.
4500         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
4501
4502 2006-07-31  Bruno Haible  <bruno@clisp.org>
4503
4504         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
4505         <stdlib.h>, <string.h>.
4506
4507 2006-07-30  Bruno Haible  <bruno@clisp.org>
4508
4509         * modules/readlink (License): Change to LGPL.
4510
4511 2006-07-30  Bruno Haible  <bruno@clisp.org>
4512
4513         * modules/javaversion (Makefile.am): Distribute javaversion.java and
4514         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
4515         set PKGDATADIR to point to it.
4516
4517 2006-07-30  Bruno Haible  <bruno@clisp.org>
4518
4519         * modules/csharpexec (configure.ac): Comment out macro invocation.
4520         * modules/javaexec (configure.ac): Likewise.
4521         * modules/javacomp-script (configure.ac): Likewise.
4522
4523         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
4524
4525 2006-07-30  Bruno Haible  <bruno@clisp.org>
4526
4527         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
4528         linked-list.
4529
4530 2006-07-30  Bruno Haible  <bruno@clisp.org>
4531
4532         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
4533
4534 2006-07-30  Bruno Haible  <bruno@clisp.org>
4535
4536         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4537         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
4538         get removed.
4539
4540 2006-07-29  Bruno Haible  <bruno@clisp.org>
4541
4542         Make it possible for gnulib-tool to work with locally modified or
4543         augmented gnulib repositories.
4544         * gnulib-tool (func_usage): Document --local-dir option.
4545         (local_gnulib_dir): New variable.
4546         Handle --local-dir option.
4547         (func_lookup_file): New function.
4548         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
4549         (func_get_description, func_get_filelist, func_get_description,
4550         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
4551         func_get_automake_snippet, func_get_include_directive,
4552         func_get_license, func_get_maintainer): Use func_lookup_file.
4553         (func_import, func_create_testdir): Use func_lookup_file.
4554
4555 2006-07-29  Bruno Haible  <bruno@clisp.org>
4556
4557         * modules/setenv (Depends-on): Add unistd.
4558
4559 2006-07-29  Bruno Haible  <bruno@clisp.org>
4560
4561         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
4562
4563 2006-07-29  Bruno Haible  <bruno@clisp.org>
4564
4565         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
4566
4567 2006-07-29  Bruno Haible  <bruno@clisp.org>
4568
4569         * gnulib-tool (import, update): If there is no Makefile.am, look at
4570         aclocal.m4, instead of bailing out.
4571
4572 2006-07-29  Bruno Haible  <bruno@clisp.org>
4573
4574         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
4575         Categorize the options by when they are useful.
4576
4577 2006-07-29  Bruno Haible  <bruno@clisp.org>
4578
4579         * gnulib-tool (func_usage): Document option --no-libtool.
4580         Handle option --no-libtool.
4581         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
4582         for changed semantics of $libtool variable.
4583         (func_import): Likewise. If libtool is not used, show this through
4584         an option --no-libtool.
4585         (func_create_testdir): Update.
4586
4587 2006-07-29  Bruno Haible  <bruno@clisp.org>
4588
4589         * gnulib-tool (func_import): Extend error message about missing
4590         --doc-base.
4591
4592 2006-07-29  Bruno Haible  <bruno@clisp.org>
4593
4594         * gnulib-tool (func_import): Don't create the $docbase directory if
4595         there is no file to store there.
4596
4597 2006-07-29  Bruno Haible  <bruno@clisp.org>
4598
4599         * gnulib-tool (autoconf_minversion): If a --dir option is given and
4600         relevant, look for configure.ac there, not in the current directory.
4601         Also use a simple search for AC_PREREQ, not "autoconf --trace".
4602
4603 2006-07-29  Bruno Haible  <bruno@clisp.org>
4604
4605         * gnulib-tool (SORT): New variable.
4606         (func_usage): Undocument --assume-autoconf option.
4607         Remove --assume-autoconf option handling.
4608         (autoconf_minversion): Determine from the contents of configure.ac.
4609         (func_import): Remove autoconf_minversion handling.
4610         Suggested by Eric Blake.
4611
4612 2006-07-29  Bruno Haible  <bruno@clisp.org>
4613
4614         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
4615
4616 2006-07-29  Bruno Haible  <bruno@clisp.org>
4617
4618         * config/srclist.txt (*setenv.[ch]): Remove rules.
4619
4620 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4621
4622         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
4623
4624 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4625
4626         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
4627         arpa/inet.h.
4628
4629 2006-07-28  Simon Josefsson  <jas@extundo.com>
4630
4631         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
4632         * modules/inet_pton (Depends-on): Likewise.
4633
4634 2006-07-28  Simon Josefsson  <jas@extundo.com>
4635
4636         * m4/netinet_in_h.m4: New file.
4637
4638 2006-07-28  Simon Josefsson  <jas@extundo.com>
4639
4640         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
4641         #include's.
4642
4643 2006-07-28  Simon Josefsson  <jas@extundo.com>
4644
4645         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
4646         #include's.
4647
4648 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
4649
4650         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
4651         setgid on directories only if they set these bits.
4652         * lib/modechange.h: Remove obsolete comment about masks.
4653
4654 2006-07-28  Eric Blake  <ebb9@byu.net>
4655
4656         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
4657         macro expansion.
4658
4659 2006-07-28  Bruno Haible  <bruno@clisp.org>
4660
4661         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
4662
4663 2006-07-28  Bruno Haible  <bruno@clisp.org>
4664
4665         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
4666
4667 2006-07-28  Bruno Haible  <bruno@clisp.org>
4668
4669         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
4670         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
4671         Define fallbacks.
4672         Avoids link error on FreeBSD 4.x.
4673         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
4674
4675         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
4676         encoding.
4677         * lib/mbswidth.c (iswcntrl): Likewise.
4678
4679 2006-07-27  Bruno Haible  <bruno@clisp.org>
4680
4681         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
4682         test.
4683
4684 2006-07-27  Bruno Haible  <bruno@clisp.org>
4685
4686         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
4687         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
4688         defined.
4689
4690 2006-07-26  Eric Blake  <ebb9@byu.net>
4691
4692         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
4693
4694 2006-07-26  Eric Blake  <ebb9@byu.net>
4695
4696         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
4697         like mingw that lack mkstemp.
4698         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
4699         avoid compilation warning on mingw.
4700
4701 2006-07-26  Bruno Haible  <bruno@clisp.org>
4702
4703         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
4704         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
4705         INT_FAST*_MIN, INTPTR_MIN.
4706
4707 2006-07-25  Bruno Haible  <bruno@clisp.org>
4708
4709         * modules/version-etc (Depends-on): Add stdarg.
4710
4711 2006-07-25  Bruno Haible  <bruno@clisp.org>
4712
4713         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
4714         complex commands.
4715
4716 2006-07-25  Bruno Haible  <bruno@clisp.org>
4717
4718         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
4719         defined in <stdarg.h> or config.h.
4720
4721 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
4722
4723         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
4724         (gl_STDIO_SAFER): Remove.
4725
4726 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
4727
4728         * MODULES.html.sh (File stream based Input/Output):
4729         Add fopen-safer, tmpfile-safer; remove stdio-safer.
4730         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
4731         * modules/fopen-safer, modules/tmpfile-safer: New files.
4732         * modules/stdio-safer: Remove.
4733
4734 2006-07-24  Bruno Haible  <bruno@clisp.org>
4735
4736         * modules/tmpdir: New file.
4737         * MODULES.html.sh (File system functions): Add it.
4738
4739 2006-07-24  Bruno Haible  <bruno@clisp.org>
4740
4741         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
4742         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
4743
4744 2006-07-24  Bruno Haible  <bruno@clisp.org>
4745
4746         * modules/clean-temp: New file.
4747
4748 2006-07-24  Bruno Haible  <bruno@clisp.org>
4749
4750         * m4/tmpdir.m4: New file, from GNU gettext.
4751
4752 2006-07-24  Bruno Haible  <bruno@clisp.org>
4753
4754         * lib/tmpdir.h: New file, from GNU gettext.
4755         * lib/tmpdir.c: New file, from GNU gettext.
4756
4757 2006-07-24  Bruno Haible  <bruno@clisp.org>
4758
4759         * lib/clean-temp.h: New file, from GNU gettext.
4760         * lib/clean-temp.c: New file, from GNU gettext.
4761
4762 2006-07-23  Eric Blake  <ebb9@byu.net>
4763
4764         * modules/stdio-safer (Files): Add tmpfile-safer.c.
4765         (Depends-on): Add binary-io.
4766
4767 2006-07-23  Eric Blake  <ebb9@byu.net>
4768
4769         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
4770
4771 2006-07-23  Eric Blake  <ebb9@byu.net>
4772
4773         * lib/tmpfile-safer.c: New file.
4774         * lib/stdio-safer.h (fopen_safer): Add prototype.
4775         * lib/stdio--.h (tmpfile): Make safer.
4776
4777 2006-07-23  Bruno Haible  <bruno@clisp.org>
4778
4779         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
4780         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
4781         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
4782         gl_linked_remove_at): Use it.
4783
4784 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4785         and Simon Josefsson <jas@extundo.com>
4786
4787         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
4788
4789         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
4790
4791 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4792
4793         * modules/close-stream: New file.
4794         * modules/closeout (Description): Make it clear that it exits
4795         with a diagnostic on error.
4796         (Depends-on): Add close-stream.  Remove fpending, stdbool.
4797         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
4798
4799 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4800
4801         * m4/close-stream.m4: New file.
4802
4803 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4804
4805         * lib/close-stream.c, lib/close-stream.h: New files.
4806
4807 2006-07-22  Bruno Haible  <bruno@clisp.org>
4808
4809         Merge from GNU gettext 0.15.
4810
4811         2006-05-01  Bruno Haible  <bruno@clisp.org>
4812
4813                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
4814
4815         2006-07-22  Bruno Haible  <bruno@clisp.org>
4816
4817                 * modules/javaversion: New file.
4818                 * MODULES.html.sh (Java): Add javaversion.
4819
4820         2006-03-12  Bruno Haible  <bruno@clisp.org>
4821
4822                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
4823
4824         2005-12-04  Bruno Haible  <bruno@clisp.org>
4825
4826                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
4827                 (untested).
4828
4829         2006-06-21  Bruno Haible  <bruno@clisp.org>
4830
4831                 Avoid warnings from recent versions of mcs.
4832                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
4833                 -o, -L, -r any more. Use options documented since mcs-1.0
4834                 instead. Similarly for -g.
4835
4836         2005-12-04  Bruno Haible  <bruno@clisp.org>
4837
4838                 * build-aux/csharpcomp.sh.in: Suffix for resources is
4839                 .resources, not .resource.
4840
4841         2005-07-09  Bruno Haible  <bruno@clisp.org>
4842
4843                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
4844                 add a .dll suffix.
4845                 Reported by Mark Junker <mjscod@gmx.de>.
4846
4847         2006-07-22  Bruno Haible  <bruno@clisp.org>
4848
4849                 * modules/gettext: Upgrade to gettext-0.15.
4850                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
4851                 m4/visibility.m4.
4852                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
4853
4854 2006-07-22  Bruno Haible  <bruno@clisp.org>
4855
4856         Merge from GNU gettext 0.15.
4857
4858         2006-03-25  Bruno Haible  <bruno@clisp.org>
4859
4860                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
4861
4862         2006-07-21  Bruno Haible  <bruno@clisp.org>
4863
4864                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
4865                 "1.1".
4866
4867         2006-05-09  Bruno Haible  <bruno@clisp.org>
4868
4869                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
4870                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
4871                 for the conftestver execution.
4872
4873         2006-05-01  Bruno Haible  <bruno@clisp.org>
4874
4875                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
4876                 optional target-version argument. Verify that the compiler
4877                 groks source of the specified source-version, or add -source
4878                 option as necessary. Verify that the compiler produces
4879                 bytecode in the specified target-version, or add -target and
4880                 -source options as necessary. Make the result of the test
4881                 available as variable CONF_JAVAC. Also log error output in
4882                 config.log.
4883
4884         2006-03-11  Bruno Haible  <bruno@clisp.org>
4885
4886                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
4887
4888         2006-05-09  Bruno Haible  <bruno@clisp.org>
4889
4890                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
4891                 CLASSPATH_SEPARATOR to a semicolon.
4892
4893         2006-03-12  Bruno Haible  <bruno@clisp.org>
4894
4895                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
4896                 available as variable CONF_JAVA, for subsequent autoconf
4897                 tests. Also log error output in config.log.
4898
4899         2006-07-19  Bruno Haible  <bruno@clisp.org>
4900
4901                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
4902                 that getline works on glibc2 systems. Needed to avoid trouble
4903                 in relocatable.c.
4904                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
4905
4906         2005-12-04  Bruno Haible  <bruno@clisp.org>
4907
4908                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
4909                 launcher (untested).
4910
4911         2005-12-04  Bruno Haible  <bruno@clisp.org>
4912
4913                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
4914
4915         2006-07-22  Bruno Haible  <bruno@clisp.org>
4916
4917                 * gettext.m4: Update from GNU gettext-0.15.
4918                 * nls.m4: Likewise.
4919                 * po.m4: Likewise.
4920                 * inttypes-pri.m4: Likewise.
4921                 * inttypes-h.m4: Renamed from inttypes.m4.
4922                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
4923
4924 2006-07-22  Bruno Haible  <bruno@clisp.org>
4925
4926         Merge from GNU gettext 0.15.
4927
4928         2005-07-05  Bruno Haible  <bruno@clisp.org>
4929
4930                 * printf-args.c (printf_fetchargs): Work around broken
4931                 definition of wint_t on mingw.
4932
4933         2005-02-12  Bruno Haible  <bruno@clisp.org>
4934
4935                 * xallocsa.h: Add extern "C" for C++.
4936
4937         2006-05-17  Bruno Haible  <bruno@clisp.org>
4938
4939                 Cygwin portability.
4940                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
4941
4942         2006-04-30  Bruno Haible  <bruno@clisp.org>
4943
4944                 * progreloc.c: Include <mach-o/dyld.h> if available.
4945                 (find_executable): Use _NSGetExecutablePath when possible.
4946
4947         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4948
4949                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
4950                 function.
4951
4952         2005-12-29  Bruno Haible  <bruno@clisp.org>
4953
4954                 * progreloc.c (set_program_name_and_installdir): Fix
4955                 compilation error.
4956
4957         2005-12-04  Bruno Haible  <bruno@clisp.org>
4958
4959                 Cygwin portability.
4960                 * progreloc.c: Include <windows.h> also on Cygwin.
4961                 (find_executable): Add support for Cygwin.
4962                 (set_program_name_and_installdir): Handle also platforms with
4963                 nonempty EXEEXT.
4964
4965         2006-07-11  Bruno Haible  <bruno@clisp.org>
4966
4967                 * javacomp.c: Fix a comment.
4968                 Reported by Jim Meyering.
4969
4970         2006-04-30  Bruno Haible  <bruno@clisp.org>
4971
4972                 * javacomp.h (compile_java_class): Add source_version,
4973                 target_version arguments.
4974                 * javacomp.c: Rewritten to choose only a compiler that
4975                 respects the specified source_version and target_version.
4976
4977         2006-06-27  Bruno Haible  <bruno@clisp.org>
4978
4979                 Assume correct S_ISDIR macro.
4980                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
4981
4982         2006-07-22  Bruno Haible  <bruno@clisp.org>
4983
4984                 * javaversion.h: New file, from GNU gettext.
4985                 * javaversion.c: New file, from GNU gettext.
4986                 * javaversion.java: New file, from GNU gettext.
4987                 * javaversion.class: New file, from GNU gettext.
4988
4989         2006-05-17  Bruno Haible  <bruno@clisp.org>
4990
4991                 Cygwin portability.
4992                 * javaexec.c (execute_java_class): Test for jview program
4993                 also on Cygwin.
4994
4995         2006-04-09  Bruno Haible  <bruno@clisp.org>
4996
4997                 * fatal-signal.c: Don't include string.h.
4998                 (at_fatal_signal): Use a copying loop instead of memcpy.
4999
5000         2005-12-04  Bruno Haible  <bruno@clisp.org>
5001
5002                 * csharpexec.c: Add support for 'clix' launcher (untested).
5003                 (execute_csharp_using_sscli): New function.
5004                 (execute_csharp_program): Call it.
5005
5006         2006-06-21  Bruno Haible  <bruno@clisp.org>
5007
5008                 Avoid warnings from recent versions of mcs.
5009                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
5010                 -o, -L, -r any more. Use options documented since mcs-1.0
5011                 instead. Similarly for -g.
5012
5013         2005-07-09  Bruno Haible  <bruno@clisp.org>
5014
5015                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
5016                 add a .dll suffix.
5017                 Reported by Mark Junker <mjscod@gmx.de>.
5018
5019         2006-06-17  Bruno Haible  <bruno@clisp.org>
5020
5021                 * config.charset: Update for NetBSD 3.0.
5022
5023         2006-05-17  Bruno Haible  <bruno@clisp.org>
5024
5025                 Cygwin portability.
5026                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
5027
5028         2006-05-16  Bruno Haible  <bruno@clisp.org>
5029
5030                 * localcharset.c [CYGWIN]: Include <windows.h>.
5031                 (get_charset_aliases): For Cygwin, return the same CPxxx
5032                 aliases list as under WIN32.
5033                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
5034                 the environment variables. Fall back to GetACP().
5035
5036         2006-04-05  Bruno Haible  <bruno@clisp.org>
5037
5038                 * config.charset: Update Juan Manuel Guerrero's address.
5039
5040         2005-02-12  Bruno Haible  <bruno@clisp.org>
5041
5042                 * allocsa.h: Add extern "C" for C++.
5043
5044         2005-02-10  Bruno Haible  <bruno@clisp.org>
5045
5046                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
5047                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
5048
5049         2006-07-22  Bruno Haible  <bruno@clisp.org>
5050
5051                 * gettext.h: Update to GNU gettext-0.15.
5052
5053 2006-07-22  Bruno Haible  <bruno@clisp.org>
5054
5055         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
5056         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
5057         lib-prefix.m4, longdouble.m4, ssize_t.m4.
5058
5059 2006-07-21  Eric Blake  <ebb9@byu.net>
5060
5061         * modules/stdlib-safer: New file.
5062         * MODULES.html.sh (File stream based Input/Output): Add
5063         stdlib-safer.
5064
5065 2006-07-21  Eric Blake  <ebb9@byu.net>
5066
5067         * lib/stdlib-safer.h: New file from coreutils, required by
5068         stdlib--.h.
5069
5070 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
5071
5072         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
5073
5074 2006-07-20  Bruno Haible  <bruno@clisp.org>
5075
5076         * gnulib-tool: Recognize new option --assume-autoconf.
5077         (autoconf_minversion): New variable.
5078         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
5079
5080 2006-07-20  Bruno Haible  <bruno@clisp.org>
5081
5082         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
5083
5084 2006-07-19  Derek R. Price  <derek@ximbiot.com>
5085
5086         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
5087         Reindent and repaginate.
5088
5089 2006-07-19  Derek Price  <derek@ximbiot.com>
5090
5091         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
5092         Correct grammar.
5093
5094 2006-07-17  Bruno Haible  <bruno@clisp.org>
5095
5096         * modules/list: New file.
5097         * modules/array-list: New file.
5098         * modules/carray-list, modules/carray-list-tests: New files.
5099         * modules/linked-list, modules/linked-list-tests: New files.
5100         * modules/avltree-list, modules/avltree-list-tests: New files.
5101         * modules/rbtree-list, modules/rbtree-list-tests: New files.
5102         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
5103         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
5104         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
5105         * modules/oset: New file.
5106         * modules/array-oset: New file.
5107         * modules/avltree-oset, modules/avltree-oset-tests: New files.
5108         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
5109         * tests/test-carray_list.c: New file.
5110         * tests/test-linked_list.c: New file.
5111         * tests/test-avltree_list.c: New file.
5112         * tests/test-rbtree_list.c: New file.
5113         * tests/test-linkedhash_list.c: New file.
5114         * tests/test-avltreehash_list.c: New file.
5115         * tests/test-rbtreehash_list.c: New file.
5116         * tests/test-avltree_oset.c: New file.
5117         * tests/test-rbtree_oset.c: New file.
5118         * MODULES.html.sh (Container data structures): New section.
5119
5120 2006-07-17  Bruno Haible  <bruno@clisp.org>
5121
5122         * m4/gl_list.m4: New file.
5123
5124 2006-07-17  Bruno Haible  <bruno@clisp.org>
5125
5126         * lib/gl_list.h: New file.
5127         * lib/gl_list.c: New file.
5128         * lib/gl_array_list.h: New file.
5129         * lib/gl_array_list.c: New file.
5130         * lib/gl_carray_list.h: New file.
5131         * lib/gl_carray_list.c: New file.
5132         * lib/gl_linked_list.h: New file.
5133         * lib/gl_linked_list.c: New file.
5134         * lib/gl_anylinked_list1.h: New file.
5135         * lib/gl_anylinked_list2.h: New file.
5136         * lib/gl_avltree_list.h: New file.
5137         * lib/gl_avltree_list.c: New file.
5138         * lib/gl_anyavltree_list1.h: New file.
5139         * lib/gl_anyavltree_list2.h: New file.
5140         * lib/gl_rbtree_list.h: New file.
5141         * lib/gl_rbtree_list.c: New file.
5142         * lib/gl_anyrbtree_list1.h: New file.
5143         * lib/gl_anyrbtree_list2.h: New file.
5144         * lib/gl_anytree_list1.h: New file.
5145         * lib/gl_anytree_list2.h: New file.
5146         * lib/gl_linkedhash_list.h: New file.
5147         * lib/gl_linkedhash_list.c: New file.
5148         * lib/gl_anyhash_list1.h: New file.
5149         * lib/gl_anyhash_list2.h: New file.
5150         * lib/gl_avltreehash_list.h: New file.
5151         * lib/gl_avltreehash_list.c: New file.
5152         * lib/gl_rbtreehash_list.h: New file.
5153         * lib/gl_rbtreehash_list.c: New file.
5154         * lib/gl_anytreehash_list1.h: New file.
5155         * lib/gl_anytreehash_list2.h: New file.
5156
5157         * lib/gl_oset.h: New file.
5158         * lib/gl_oset.c: New file.
5159         * lib/gl_array_oset.h: New file.
5160         * lib/gl_array_oset.c: New file.
5161         * lib/gl_avltree_oset.h: New file.
5162         * lib/gl_avltree_oset.c: New file.
5163         * lib/gl_rbtree_oset.h: New file.
5164         * lib/gl_rbtree_oset.c: New file.
5165         * lib/gl_anytree_oset.h: New file.
5166
5167 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5168
5169         * m4/mkancesdirs.m4: New file.
5170         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
5171         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
5172         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
5173         it.
5174
5175 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5176
5177         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
5178         * lib/mkancesdirs.h: New files.
5179         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
5180         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
5181         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
5182         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
5183         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
5184         callers changed.  Revamp internals significantly, by not
5185         attempting to create directories that are temporarily more
5186         permissive than the final results.  Do not attempt to use
5187         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
5188         This removes some race conditions, fixes some bugs, and simplifies
5189         things.  Use new dirchownmod function to do owner and mode changes.
5190         * lib/mkdir-p.h: Likewise.
5191         * lib/modechange.c (octal_to_mode): New function.
5192         (struct mode_change): New member mentioned.
5193         (make_node_op_equals): New arg mentioned.  All callers changed.
5194         (mode_compile): Keep track of which mode bits the user has explicitly
5195         mentioned.
5196         (mode_adjust): New arg DIR, so that we implement the X op correctly.
5197         New arg PMODE_BITS, to keep track of which mode bits the user
5198         mentioned; it treats S_ISUID and S_ISGID speciall.
5199         All callers changed.
5200         * lib/modechange.h: Likewise.
5201
5202 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5203
5204         * MODULES.html.sh: Add mkancestors.
5205         * modules/mkancesdirs: New module.
5206         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
5207         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
5208         The chdir-safer and afs files are now orphans; I'll remove them
5209         unless someone speaks up.
5210         Add lib/dirchownmod.c, lib/dirchownmod.h.
5211         (Depends-on): Remove alloca, chown, save-cwd, dirname.
5212         Add lchown, mkancesdirs.
5213         (Maintainer): Add self.
5214
5215 2006-07-15  Karl Berry  <karl@gnu.org>
5216
5217         * gnulib-tool: help message wording/arrangement.
5218
5219 2006-07-14  Simon Josefsson  <jas@extundo.com>
5220
5221         * doc/gnulib.texi (Libtool and Windows): New section.
5222
5223 2006-07-12  Simon Josefsson  <jas@extundo.com>
5224
5225         * modules/gendocs (License): Fix license, approved by Karl.
5226
5227 2006-07-12  Eric Blake  <ebb9@byu.net>
5228
5229         * MODULES.html.sh: Add gendocs.
5230
5231 2006-07-11  Eric Blake  <ebb9@byu.net>
5232
5233         * modules/fdl: New module, to install doc/fdl.texi.
5234         * MODULES.html.sh: Add new section for documentation modules.
5235         * gnulib-tool: Avoid space-tab.
5236         (--doc-base): New option, to manage files from doc.
5237
5238 2006-07-11  Eric Blake  <ebb9@byu.net>
5239
5240         * m4/absolute-header.m4: Fix comments to match recent change.
5241
5242 2006-07-11  Eric Blake  <ebb9@byu.net>
5243
5244         * gnulib-tool: List --doc-base before --tests-base.
5245
5246 2006-07-11  Derek R. Price  <derek@ximbiot.com>
5247
5248         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
5249
5250 2006-07-11  Bruno Haible  <bruno@clisp.org>
5251
5252         * README: Mention where to put documentation.
5253
5254 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5255
5256         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
5257
5258 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
5259
5260         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
5261         to stdint.m4.
5262
5263 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
5264
5265         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
5266         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
5267         "no/such/file/stdint.h" when there is no such file, so that
5268         the resulting C code can be parsed by dodgy compilers.
5269         Problems reported by Bob Proulx.
5270
5271 2006-07-10  Derek R. Price  <derek@ximbiot.com>
5272
5273         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
5274         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
5275         macros into the GNU _D_EXACT_NAMLEN.
5276         * lib/savedir.c:  Likewise.
5277         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
5278
5279 2006-07-10  Derek R. Price  <derek@ximbiot.com>
5280         and Paul Eggert  <eggert@cs.ucla.edu>
5281
5282         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
5283         * m4/savedir.m4:
5284         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
5285         macros into the GNU _D_EXACT_NAMLEN.
5286
5287 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5288
5289         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
5290         around the absolute name, to work around a problem with the HP-UX
5291         11.23 native C compiler, reported by Bob Proulx.
5292
5293 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5294
5295         * doc/maintain.texi, make-stds.texi: Sync from
5296         <http://savannah.gnu.org/projects/gnustandards>.
5297
5298 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5299
5300         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
5301
5302 2006-07-09  Jim Meyering  <jim@meyering.net>
5303
5304         * m4/glob.m4: Remove a doubled word in a comment.
5305
5306 2006-07-09  Jim Meyering  <jim@meyering.net>
5307
5308         * lib/argp-pv.c: Remove a doubled word in a comment.
5309         * lib/check-version.c (check_version): Likewise.
5310         * lib/javacomp.c (compile_java_class): Likewise.
5311
5312 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
5313
5314         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
5315         for the benefit of people using Autoconf 2.60.  If you want to
5316         support older Autoconf versions you can copy m4/onceonly_2_57.m4
5317         (or m4/onceonly.m4, if pre-2.57) manually.
5318
5319 2006-07-08  Jim Meyering  <jim@meyering.net>
5320
5321         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
5322         comment.
5323         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
5324         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
5325         comment.
5326
5327 2006-07-08  Jim Meyering  <jim@meyering.net>
5328
5329         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
5330
5331 2006-07-07  Simon Josefsson  <jas@extundo.com>
5332
5333         * tests/test-crc.c: Change expected crc value, the test vector
5334         were probably computed using the old broken crc.c?
5335
5336 2006-07-06  Simon Josefsson  <jas@extundo.com>
5337
5338         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
5339         now the canonical place for the M4 file).
5340
5341         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
5342         from the sys_socket dependency now.
5343
5344         * modules/inet_pton (Files): Ditto.
5345
5346         * modules/inet_ntop (Files): Ditto.
5347
5348 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
5349
5350         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
5351         not gl_PREREQ_GETUSERSHELL.
5352
5353 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5354
5355         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
5356         with only one argument, for Autoconf 2.60.
5357         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
5358         expand to nothing, so add a shell command to avoid syntax error.
5359         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
5360
5361 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5362
5363         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
5364
5365 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5366
5367         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
5368         no longer needed.  Check for isblank decl.
5369         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
5370         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
5371         of existence.
5372
5373 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5374
5375         * lib/getloadavg.c: Use __VMS, not VMS.
5376         * lib/getopt.c: Likewise.
5377         * lib/getpagesize.h: Likewise.
5378         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
5379         and probably does not work.
5380
5381 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5382
5383         * lib/.cppi-disable: Add wcwidth.
5384         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
5385         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
5386         (ISGRAPH): Remove.  All uses changed to isgraph.
5387         (FOLD) [!defined _LIBC]: Remove special case.
5388         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
5389         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
5390         HAVE_ISBLANK.
5391         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
5392         case.
5393
5394 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
5395
5396         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
5397         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
5398         brackets.  Other minor changes to suppress some compiler
5399         warnings.
5400
5401 2006-07-06  Derek R. Price  <derek@ximbiot.com>
5402         and Paul Eggert  <eggert@cs.ucla.edu>
5403
5404         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
5405         of invoking obsolescent AC_HEADER_DIRENT macro.
5406         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
5407         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
5408         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
5409         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
5410         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
5411         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5412         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
5413         * m4/readdir.m4: Remove; no longer needed.
5414
5415 2006-07-06  Derek R. Price  <derek@ximbiot.com>
5416         and Paul Eggert  <eggert@cs.ucla.edu>
5417
5418         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
5419         Don't worry about this obsolete case any more.
5420         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
5421         directories.
5422         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
5423         worry about this obsolete case any more.
5424         * lib/fts.c: Likewise.
5425         * lib/getcwd.c: Likewise.
5426         * lib/glob.h: Likewise.
5427         * lib/savedir.c: Likewise.
5428
5429 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
5430
5431         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
5432         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
5433         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
5434         needed.
5435         All uses removed.
5436         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5437         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
5438         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
5439         needed.
5440         * m4/getdate.m4 (gl_GETDATE): Likewise.
5441         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
5442         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
5443         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
5444         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5445         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
5446         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
5447         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
5448         needed.
5449
5450 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
5451
5452         * lib/memcasecmp.c: Include <limits.h>.
5453         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
5454         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
5455         Don't assume isdigit succeeds only on '0' through '9'.
5456
5457 2006-07-05  Eric Blake  <ebb9@byu.net>
5458
5459         * modules/getaddrinfo (Depends-on): Add snprintf.
5460
5461 2006-07-05  Eric Blake  <ebb9@byu.net>
5462
5463         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
5464         to avoid 'header present but could not be compiled' on cygwin.
5465
5466 2006-07-05  Eric Blake  <ebb9@byu.net>
5467
5468         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
5469         missing from netdb.h.
5470         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
5471
5472 2006-07-05  Derek R. Price  <derek@ximbiot.com>
5473
5474         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
5475         no longer needed.
5476         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
5477         * m4/getdate.m4 (gl_GETDATE): Likewise.
5478         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
5479         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
5480         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
5481         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5482         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
5483
5484 2006-07-05  Derek R. Price  <derek@ximbiot.com>
5485
5486         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
5487         All uses of is_space replaced by isspace.
5488         * lib/exit.h: Don't talk about STDC_HEADERS.
5489         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
5490         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
5491         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
5492         replaced by isprint etc.
5493         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
5494         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
5495         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
5496         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
5497         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
5498         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
5499
5500 2006-07-05  Bruno Haible  <bruno@clisp.org>
5501
5502         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
5503         the function exists, before testing against AIX.
5504         Reported by Martin Lambers <marlam@marlam.de>.
5505
5506 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
5507
5508         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
5509         From Mark D. Baushke.
5510
5511 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
5512
5513         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
5514         to the absolute name, not just one, to bypass Sun C 5.8's
5515         "warning: #include of /usr/include/... may be non-portable".
5516
5517 2006-07-04  Eric Blake  <ebb9@byu.net>
5518
5519         * modules/dirname-tests: New test module.
5520         * tests/test-dirname.c: New file, replacing dirname.c
5521         TEST_DIRNAME section that was recently deleted.
5522
5523 2006-07-04  Bruno Haible  <bruno@clisp.org>
5524
5525         Assume ANSI C header files and <ctype.h> functions.
5526         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
5527         (mbsnwidth): Use isprint, iscntrl instead.
5528
5529 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5530
5531         Merge from coreutils.
5532         * MODULES.html.sh: Add xstrtold.
5533         * modules/xstrtold: New file.
5534         * modules/cycle-check (Files): Add lib/same-inode.h.
5535         * modules/dirname (Files): Add m4/double-slash-root.m4.
5536         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
5537         * modules/mkdir-p (Files): Add lib/same-inode.h.
5538         * modules/same (Files): Add lib/same-inode.h.
5539
5540 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5541
5542         * m4/absolute-header.m4: Renamed from full-header-path.m4.
5543         This is to keep the terminology clean; POSIX talks about
5544         "absolute pathnames", not "full pathnames", but the GNU
5545         Coding Standards say to use "path" for something else;
5546         so use "absolute" to keep both sides happy.
5547         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
5548         Set gl_absolute_header, not gl_full_header_path.
5549         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
5550         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
5551         All uses changed.
5552
5553         Merge from coreutils.
5554
5555         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
5556
5557         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
5558         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
5559         want to require the building of c-strtod.o.
5560         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
5561         needs -lm directly.
5562         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
5563
5564         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
5565
5566         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
5567         --as-needed option if available.  Problem reported by Albert Chin in
5568         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
5569         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
5570         cc merely issues a bunch of annoying warnings for --as-needed
5571         (this problem was reported by Bob Proulx).  Also, try linking with
5572         -lm to detect a bug in binutils 2.16 (this problem was reported
5573         by Ralf Wildenhues).
5574
5575         2006-06-18  Jim Meyering  <jim@meyering.net>
5576
5577         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
5578         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
5579         macro.
5580         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
5581         also check for glibc-2.4's abort-inducing bug.
5582
5583         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
5584         Low-probability clean-up should be to use rmdir to get rid of
5585         the just-created directory, not unlink.
5586
5587         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
5588         configure fail, and request a bug report to inform us about it.
5589         Add a comment that, barring reports to the contrary, in 2007 we'll
5590         assume ftruncate is universally available.
5591
5592         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
5593
5594         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
5595
5596         2006-03-12  Jim Meyering  <jim@meyering.net>
5597
5598         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
5599         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
5600         * m4/same.m4 (gl_SAME): Likewise.
5601         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
5602
5603         2006-03-11  Eric Blake  <ebb9@byu.net>
5604
5605         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
5606         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
5607         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
5608         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
5609
5610 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5611
5612         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
5613         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
5614         reported by Mark D. Baushke, one in
5615         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
5616
5617         Merge from coreutils.
5618
5619         * lib/.cppi-disable: Add stdint_.h.
5620         * lib/.cvsignore: Add stdint.h.
5621
5622         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
5623
5624         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
5625         both double and long double versions.
5626         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
5627         * lib/xstrtold.c: New file.
5628         * lib/xstrtod.h (xstrtold): New decl.
5629
5630         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
5631
5632         * lib/filemode.c (setst): Remove.
5633         (strmode): Rewrite to avoid setst.  This makes the code shorter,
5634         (arguably) clearer, and the generated code is a bit smaller on my
5635         Debian GNU/Linux stable x86 host.
5636
5637         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
5638
5639         * lib/filemode.c: Include "filemode.h" first, to test the interface.
5640         Assume that filemode.h includes sys/types.h and sys/stat.h.
5641         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
5642         (ftypelet): Reorder to put common cases first, for efficiency.
5643         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
5644         to do 'M'.
5645         (strmode): Renamed from mode_string, and now stores 12 bytes instead
5646         of 10, for compatibility with FreeBSD.  All callers changed.
5647         (filemodestring): Now stores 12 bytes instead of 10, and sets file
5648         types that can't be deduced solely from st_mode.  First arg is now a
5649         const pointer.
5650         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
5651         (strmode): Renamed from mode_string.
5652         (filemodestring): New decl.
5653         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
5654         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
5655         needed.
5656         (S_ISPORT, S_ISWHT): New macros, if not already defined.
5657
5658         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
5659
5660         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
5661         fsusage.h now does that.  Include fsusage.h first, to test interface.
5662         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
5663         at most one method (the old code could have generated decls that
5664         didn't conform to C89, not that this was ever exercised).
5665         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
5666
5667         2006-03-19  Jim Meyering  <jim@meyering.net>
5668
5669         Work even in a chroot where d_ino values for entries in "/"
5670         don't match the stat.st_ino values for the same names.
5671         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
5672         number, iterate through all entries again, using lstat instead.
5673         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
5674         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
5675
5676         * lib/getcwd.c (__getcwd): Clarify a comment.
5677         Use memcpy in place of a call to strcpy.
5678
5679         2006-03-12  Jim Meyering  <jim@meyering.net>
5680
5681         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
5682         matches that of the current directory (which we're about to chdir ".."
5683         out of), then save the dev-ino of the parent, instead.
5684
5685         * lib/same-inode.h (SAME_INODE): New file/macro.
5686         * lib/chdir-safer.c (SAME_INODE): Remove definition.
5687         Include "same-inode.h", instead.
5688         * lib/same.c: Likewise.
5689         * lib/cycle-check.h: Include "same-inode.h".
5690         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
5691         * lib/cycle-check.c (SAME_INODE): Remove definition.
5692         * lib/root-dev-ino.h: Include "same-inode.h".
5693
5694         2006-03-11  Eric Blake  <ebb9@byu.net>
5695
5696         * lib/same.c (same_name): s/base_name/last_component/
5697         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
5698         * lib/filenamecat.c (file_name_concat): Likewise.
5699
5700         2006-03-11  Eric Blake  <ebb9@byu.net>,
5701                     Paul Eggert  <eggert@cs.ucla.edu>
5702
5703         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
5704         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
5705         drive prefix.
5706         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
5707         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
5708         (last_component): New method.
5709         * lib/dirname.c (dir_len): Determine when drive letters need a
5710         subsequent slash.  Preserve // when it is special.
5711         (dir_name): Don't append dot when drive letter is absolute.
5712         [TEST_DIRNAME]: Move into a full-blown gnulib test.
5713         * lib/basename.c (base_name): New semantics - malloc the result.
5714         Preserve // when it is special.  Preserve relative files that look
5715         like drive letters.
5716         (base_len): Preserve // when it is special.
5717         (last_component): New method, similar to old base_name semantics.
5718         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
5719         base_name.  Strip redundant slashes from ///.
5720
5721 2006-07-03  Jim Meyering  <jim@meyering.net>
5722
5723         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
5724         macro is used before the first cycle_check call.
5725
5726 2006-07-03  Eric Blake  <ebb9@byu.net>
5727
5728         * modules/dirname (Depends-on): Add xstrndup.
5729
5730 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
5731
5732         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
5733         test cases, so that config.log is a bit easier to follow.
5734
5735 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
5736
5737         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
5738         both are 64 bits, since this seems to be the tradition, and this
5739         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
5740         we ever run into a host that prefers long long to long in this
5741         case, we'll need another configure-time test.  Problem reported by
5742         Jim Meyering.
5743
5744 2006-07-02  Eric Blake  <ebb9@byu.net>
5745
5746         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
5747
5748 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5749
5750         * modules/inttypes (Depends-on): No longer depends on stdint.
5751         * modules/stdint (Description): Say more about assumptions.
5752         Say that the fast types might differ.  Say macros are used.
5753         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
5754         (Makefile.am): Revise list of substituted symbols to match
5755         new stdint.m4.
5756         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
5757         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
5758         * tests/test-stdint.c (verify_same_types)
5759         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
5760         the code conforms to C99/C89.
5761         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
5762         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
5763
5764 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5765
5766         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
5767         but fix a bug, by requiring at least 64 bits.
5768         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
5769         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
5770         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
5771         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
5772
5773         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
5774         changes.  Make 2.59 a prerequisite.  Check and substitute for
5775         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
5776         inttypes.h.  Do not use special include files; just use the
5777         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
5778         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
5779         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
5780         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
5781         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
5782         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
5783         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
5784         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
5785         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
5786         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
5787         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
5788         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
5789         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
5790         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
5791         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
5792         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
5793         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
5794         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
5795         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
5796         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
5797         WINT_MAX.  Check for C99 conformance more strictly, by detecting
5798         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
5799         not check for things that C99 does not require, e.g., int8_t.  If
5800         a test isn't needed unless <stdint.h> isn't working, and is
5801         unlikely to be needed for any other reason, then don't do it
5802         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
5803         size_t, since we assume C89 freestanding at least.  Do not check
5804         for sig_atomic_t, wchar_t, or wint_t, since the code now does
5805         the right thing even if the types are not defined.  Instead use:
5806         (gl_STDINT_TYPE_PROPERTIES): New macro.
5807         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
5808         testing whether <sys/types.h> clashes, as Autoconf does this for
5809         us now.  All uses removed.
5810         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
5811         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
5812         (gl_CHECK_TYPE_SAME):
5813         Remove; no longer needed.
5814         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
5815         exists, since we'll return 0 anyway in that case.
5816         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
5817
5818 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5819
5820         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
5821         possible collision with system files.
5822         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
5823         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
5824         WCHAR_MIN and WCHAR_MAX in this case.
5825         (<stddef.h>): Do not include; no longer needed.
5826         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
5827         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
5828         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
5829         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
5830         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
5831         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
5832         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
5833         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
5834         !defined(__c99))]: Include in this case too, since it's harmless
5835         now.
5836         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
5837         dangerous to do so.
5838         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
5839         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
5840         (_STDINT_MIN, _STDINT_MAX): New macros.
5841         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
5842         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
5843         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
5844         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
5845         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
5846         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
5847         macros, not typedefs; this simplifies things quite a bit.
5848         Use long int for all types narrower than int64_t.
5849         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
5850         Define in terms of long long int or int64_t or long int,
5851         not int64_t or int32_t.  This saves some compile-time testing.
5852         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
5853         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
5854         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
5855         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
5856         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
5857         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
5858         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
5859         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
5860         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
5861         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
5862         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
5863         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
5864         undef any previous version and define our own version, for
5865         simplicity and consistency with the new macros for types.
5866         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
5867         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
5868         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
5869         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
5870         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
5871         @WINT_T_SUFFIX@ to keep things simple here.
5872         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
5873         Simplify by assuming typical 8/16/32/64 host, since we're
5874         already doing that elsewhere anyway.
5875         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
5876         and assume long long int is 64 bits if available.  This
5877         speeds up 'configure'.
5878
5879 2006-07-01  Eric Blake  <ebb9@byu.net>
5880
5881         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
5882         Reported by Andreas Buening.
5883
5884 2006-07-01  Eric Blake  <ebb9@byu.net>
5885
5886         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
5887
5888 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
5889
5890         * lib/getaddrinfo.c: fixed typo
5891
5892 2006-06-29  Jim Meyering  <jim@meyering.net>
5893
5894         * modules/strftime (Maintainer): Add my name, since with the
5895         FPRINTFTIME changes strftime.c has forked from glibc.
5896
5897 2006-06-29  Eric Blake  <ebb9@byu.net>
5898
5899         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
5900
5901 2006-06-29  Eric Blake  <ebb9@byu.net>
5902
5903         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
5904
5905 2006-06-29  Eric Blake  <ebb9@byu.net>
5906
5907         * lib/stat_.h: New file.
5908
5909 2006-06-29  Eric Blake  <ebb9@byu.net>
5910
5911         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
5912         unused static function.
5913
5914 2006-06-29  Eric Blake  <ebb9@byu.net>
5915
5916         * doc/functions.texi (Function Portability): Document missing lstat
5917         on mingw.
5918
5919 2006-06-29  Eric Blake  <ebb9@byu.net>
5920
5921         * MODULES.html.sh: Add sys_stat.
5922         * modules/sys_stat: New module.
5923         * modules/mkstemp (Depends-on): Add sys_stat.
5924
5925 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5926
5927         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
5928
5929 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5930
5931         * m4/c-bs-a.m4: Removed.
5932
5933 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5934
5935         * lib/strftime.c: Assume strftime() exists.
5936
5937 2006-06-29  Derek Price  <derek@ximbiot.com>
5938
5939         * modules/c-bs-a: Removed - \a is C89.
5940         * MODULES.html.sh: Remove c-bs-a.
5941
5942 2006-06-29  Bruno Haible  <bruno@clisp.org>
5943
5944         * modules/wcwidth (License): Change to LGPL.
5945
5946 2006-06-28  Simon Josefsson  <jas@extundo.com>
5947
5948         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
5949         on _WIN32.
5950
5951         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
5952         getnameinfo.
5953
5954 2006-06-28  Simon Josefsson  <jas@extundo.com>
5955
5956         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
5957
5958 2006-06-28  Simon Josefsson  <jas@extundo.com>
5959
5960         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
5961         functions there.  It will succeed on Windows XP, but on Windows
5962         2000 and (presumably) earlier, it will fail, and use the internal
5963         re-implementation.
5964         (use_win32_p): New function.
5965         (getaddrinfo): Use strtoul on servname, to support numeric ports.
5966         Support AI_NUMERICSERV to disable getservbyname.
5967         (getnameinfo): New function, only supports
5968         NI_NUMERICHOST|NI_NUMERICSERV for now.
5969
5970         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
5971         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
5972         getnameinfo.
5973
5974 2006-06-28  Eric Blake  <ebb9@byu.net>
5975
5976         * modules/wcwidth: New file.
5977         * modules/mbchar (Depends-on): Add wcwidth.
5978         * modules/mbswidth (Depends-on): Add wcwidth.
5979         * MODULES.html.sh: Add wcwidth.
5980
5981 2006-06-28  Eric Blake  <ebb9@byu.net>
5982
5983         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
5984         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
5985
5986 2006-06-28  Eric Blake  <ebb9@byu.net>
5987
5988         * lib/xvasprintf.h: Fix comments.
5989
5990 2006-06-28  Eric Blake  <ebb9@byu.net>
5991
5992         * lib/mbchar.h (wcwidth): Include wcwidth.h.
5993         * lib/mbswidth.c (wcwidth): Move from here...
5994         * lib/wcwidth.h: ...to this new file.
5995
5996 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5997
5998         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
5999
6000         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
6001         it's obsolete.
6002         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
6003
6004 2006-06-28  Derek R. Price  <derek@ximbiot.com>
6005
6006         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
6007         Autoconf 2.60 says this stuff was obsolete.
6008
6009 2006-06-28  Bruno Haible  <bruno@clisp.org>
6010
6011         * modules/wcwidth (Files): Add m4/wchar_t.m4.
6012
6013 2006-06-28  Bruno Haible  <bruno@clisp.org>
6014
6015         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
6016         gt_TYPE_WCHAR_T.
6017
6018 2006-06-28  Bruno Haible  <bruno@clisp.org>
6019
6020         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
6021         declaration for wcwidth.
6022         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
6023
6024 2006-06-28  Bruno Haible  <bruno@clisp.org>
6025
6026         * lib/mkdtemp.c [MINGW]: Include <io.h>.
6027         (mkdir): Define using _mkdir.
6028
6029 2006-06-28  Bruno Haible  <bruno@clisp.org>
6030
6031         * lib/getaddrinfo.h: Fix POSIX URL.
6032         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
6033         _WIN32.
6034         (use_win32_p): Make static.
6035         (getaddrinfo): Reject service name if it is empty or does not consist
6036         solely of decimal digits, or if its value is > 65535.
6037         (getnameinfo): Remove useless casts.
6038
6039 2006-06-27  Simon Josefsson  <jas@extundo.com>
6040
6041         * modules/sys_select: New file, suggested by Bruno Haible, Paul
6042         Eggert and Martin Lambers.
6043
6044 2006-06-27  Simon Josefsson  <jas@extundo.com>
6045
6046         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
6047         Eggert and Martin Lambers.
6048
6049 2006-06-27  Bruno Haible  <bruno@clisp.org>
6050
6051         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
6052         result to 0, not to empty.
6053         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
6054
6055 2006-06-27  Bruno Haible  <bruno@clisp.org>
6056
6057         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
6058
6059 2006-06-26  Simon Josefsson  <jas@extundo.com>
6060
6061         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
6062         present.
6063
6064 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
6065
6066         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
6067         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
6068         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
6069
6070 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
6071
6072         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
6073
6074 2006-06-26  Bruno Haible  <bruno@clisp.org>
6075
6076         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
6077
6078 2006-06-26  Bruno Haible  <bruno@clisp.org>
6079
6080         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
6081
6082 2006-06-26  Bruno Haible  <bruno@clisp.org>
6083
6084         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
6085         SGI C compiler in pre-C99 mode.
6086         Suggested by Mark D. Baushke and Larry Jones.
6087
6088 2006-06-26  Bruno Haible  <bruno@clisp.org>
6089
6090         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
6091         WCHAR_MAX.
6092         Reported by Mark D. Baushke and Larry Jones.
6093
6094 2006-06-26  Bruno Haible  <bruno@clisp.org>
6095
6096         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
6097         in pre-C99 mode.
6098         Suggested by Mark D. Baushke and Larry Jones.
6099
6100 2006-06-23  Simon Josefsson  <jas@extundo.com>
6101             Bruno Haible  <bruno@clisp.org>
6102
6103         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
6104         Emit mostlyclean-local rule.
6105         (func_emit_tests_Makefile_am): Likewise.
6106         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
6107
6108 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
6109
6110         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
6111
6112 2006-06-23  Bruno Haible  <bruno@clisp.org>
6113
6114         * tests/test-stdint.c: Update to match ISO C 99 Technical
6115         Corrigendum 1.
6116
6117 2006-06-23  Bruno Haible  <bruno@clisp.org>
6118
6119         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
6120
6121 2006-06-23  Bruno Haible  <bruno@clisp.org>
6122
6123         * lib/stdint_.h: Treat IRIX like OpenBSD.
6124
6125 2006-06-23  Bruno Haible  <bruno@clisp.org>
6126
6127         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
6128         ISO C 99 Technical Corrigendum 1.
6129
6130 2006-06-22  Simon Josefsson  <jas@extundo.com>
6131
6132         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
6133         MinGW.
6134
6135 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
6136
6137         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
6138         needed.  Some compiler complained about some of them.  Problem reported
6139         by Larry Jones in
6140         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
6141
6142 2006-06-21  Simon Josefsson  <jas@extundo.com>
6143
6144         * tests/test-getaddrinfo.c: New file.
6145
6146         * modules/getaddrinfo-tests: New file.
6147
6148         * MODULES.html.sh: Add inet_pton.
6149
6150         * modules/inet_pton: New file.
6151
6152 2006-06-21  Simon Josefsson  <jas@extundo.com>
6153
6154         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
6155         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
6156         of using the (limited) gnulib implementation on Windows XP.
6157
6158         * m4/inet_pton.m4: New file.
6159
6160 2006-06-21  Simon Josefsson  <jas@extundo.com>
6161
6162         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
6163         variable.
6164
6165         * lib/socket_.h: Don't define WINVER.
6166
6167         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
6168         slightly modified to work in gnulib.
6169
6170 2006-06-21  Simon Josefsson  <jas@extundo.com>
6171
6172         * doc/gnulib.texi (Windows sockets): Add.
6173
6174 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
6175
6176         * lib/read-file.c (fread_file): Start with buffer allocation of
6177         0 bytes rather than 1 byte; this simplifies the code.
6178         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
6179         code to free buffer and save/restore errno.
6180         (internal_read_file): Remove unused local.
6181
6182 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
6183
6184         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
6185         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
6186         Problem reported by Denis Excoffier in
6187         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
6188
6189 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6190
6191         * modules/sys_socket, modules/socklen: Include sys/types since
6192         FreeBSD 4.x's sys/socket.h needs it.
6193
6194 2006-06-19  Simon Josefsson  <jas@extundo.com>
6195
6196         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
6197
6198 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6199
6200         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
6201
6202 2006-06-19  Bruno Haible  <bruno@clisp.org>
6203
6204         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
6205         and FULL_PATH_INTTYPES_H in angle brackets.
6206         Reported by Mark D. Baushke <mdb@gnu.org>.
6207
6208 2006-06-17  Eric Blake  <ebb9@byu.net>
6209
6210         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
6211         errno.
6212
6213 2006-06-17  Bruno Haible  <bruno@clisp.org>
6214
6215         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
6216         <sys/inttypes.h>.
6217
6218 2006-06-17  Bruno Haible  <bruno@clisp.org>
6219
6220         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
6221         whether errno is declared. Assume <errno.h> declares errno.
6222
6223 2006-06-17  Bruno Haible  <bruno@clisp.org>
6224
6225         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
6226
6227 2006-06-17  Bruno Haible  <bruno@clisp.org>
6228
6229         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
6230         problem on Solaris 2.5.1.
6231
6232 2006-06-16  Eric Blake  <ebb9@byu.net>
6233
6234         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
6235         * lib/unicodeio.c [!defined errno]: Likewise.
6236         * lib/strtol.c [!defined errno]: Likewise.
6237         * lib/strtod.c [!defined errno]: Likewise.
6238
6239 2006-06-15  Eric Blake  <ebb9@byu.net>
6240
6241         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
6242
6243 2006-06-15  Eric Blake  <ebb9@byu.net>
6244
6245         * config/srclist.txt (ssize_t.m4): Lose sync.
6246
6247 2006-06-15  Bruno Haible  <bruno@clisp.org>
6248
6249         * modules/stdint (Files): Include m4/full-header-path.m4,
6250         m4/size_max.m4, m4/wchar_t.m4.
6251         (Makefile.am): Many more substitutions.
6252         * modules/stdint-tests: New file.
6253         * tests/test-stdint.c: New file.
6254
6255 2006-06-15  Bruno Haible  <bruno@clisp.org>
6256
6257         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
6258         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
6259         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
6260         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
6261         gl_CHECK_TYPE_SAME): New macros.
6262
6263 2006-06-15  Bruno Haible  <bruno@clisp.org>
6264
6265         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
6266
6267 2006-06-15  Bruno Haible  <bruno@clisp.org>
6268
6269         * lib/stdint_.h: Rewritten to be fully auto-configured.
6270         Fixes bug on HP-UX/IA64.
6271
6272 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
6273
6274         * lib/getdate.y (__attribute__): Don't define if already defined.
6275         Problem reported by Larry Jones.
6276         * lib/utimens.c (__attribute__): Likewise.
6277
6278 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
6279
6280         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
6281         reported by Andreas Schwab.
6282
6283 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6284             Bruno Haible  <bruno@clisp.org>
6285
6286         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
6287         check for the declaration of strnlen and a run test that exposes the
6288         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
6289         rpl_strndup.
6290
6291 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6292             Bruno Haible  <bruno@clisp.org>
6293
6294         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
6295
6296 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6297
6298         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
6299         compile test, for Tru64 4.0D.
6300
6301 2006-05-28  Karl Berry  <karl@gnu.org>
6302
6303         * config/srclist.txt (printf-args.c): lose sync.
6304
6305 2006-05-26  Martin Lambers  <marlam@marlam.de>
6306
6307         * lib/getpass.c: Updates the test for the native W32 API, and adds
6308         missing includes, thus fixing compilation warnings.
6309
6310 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
6311
6312         * lib/exclude.c (exclude_fnmatch): New function.
6313         (excluded_file_name): Call exclude_fnmatch.
6314         * lib/exclude.h (excluded_file_name): New prototype
6315
6316 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
6317
6318         * lib/tempname.c (small_open, large_open): New macros.
6319         (__open, __open64) [!_LIBC]: Remove.
6320         (__gen_tempname): Use small_open and large_open instead of __open
6321         and __open64.  This fixes a portability bug on HP-UX 11.11i
6322         reported by Simon Wing-Tang in
6323         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
6324
6325 2006-05-24  Bruno Haible  <bruno@clisp.org>
6326
6327         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
6328         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
6329         Reported by Thorsten Maerz <torte@netztorte.de> via
6330         Aaron Stone <aaron@serendipity.cx>.
6331
6332 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
6333
6334         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
6335         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
6336         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
6337         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
6338         not really conditional on the cache.
6339         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
6340
6341 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
6342
6343         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
6344         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
6345         (my_usleep): Don't mishandle maximum value.
6346
6347 2006-05-19  Jim Meyering  <jim@meyering.net>
6348
6349         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
6350
6351 2006-05-17  Bruno Haible  <bruno@clisp.org>
6352
6353         Cygwin portability.
6354         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
6355
6356 2006-05-17  Bruno Haible  <bruno@clisp.org>
6357
6358         * lib/stdint_.h: Fix recognition of Cygwin.
6359
6360 2006-05-15  Bruno Haible  <bruno@clisp.org>
6361
6362         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
6363         on libtool patch by Ralf Wildenhues.
6364
6365 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
6366
6367         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
6368         test for C99 conformance; (bool) 0.5 is an integer constant
6369         expression, but (bool) -0.5 is not.  Problem reported by Fedor
6370         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
6371
6372 2006-05-11  Simon Josefsson  <jas@extundo.com>
6373
6374         * m4/xvasprintf.m4: Fix obvious typo.
6375
6376 2006-05-11  Jim Meyering  <jim@meyering.net>
6377
6378         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
6379         James Lemley.
6380
6381 2006-05-10  Simon Josefsson  <jas@extundo.com>
6382
6383         * lib/md4.c: Typo fix, update copyright years.
6384         (K1, K2): Don't use L because it turn computations into 64-bit on
6385         64-bit platforms.
6386
6387 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
6388
6389         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
6390         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
6391         unwanted sign propagation, e.g., on hosts with 64-bit int.
6392         There still are some problems with reeelly weird theoretical hosts
6393         (e.g., 33-bit int) but it's not worth worrying about now.
6394         * lib/sha1.c (rol): Likewise.
6395         (K1, K2, K3, K4): Remove unnecessary L suffix.
6396
6397 2006-05-10  Bruno Haible  <bruno@clisp.org>
6398
6399         * lib/des.c: Cast to avoid warnings.
6400
6401 2006-05-09  Bruno Haible  <bruno@clisp.org>
6402
6403         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
6404         (Depends-on): Depend also on xsize, stdarg.
6405         (configure.ac): Add gl_XVASPRINTF.
6406
6407 2006-05-09  Bruno Haible  <bruno@clisp.org>
6408
6409         * m4/xvasprintf.m4: New file.
6410
6411 2006-05-09  Bruno Haible  <bruno@clisp.org>
6412
6413         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
6414         (EOVERFLOW): Define fallback value.
6415         (xstrcat): New function.
6416         (xvasprintf): Recognize the special case of a string concatenation.
6417
6418 2006-05-08  Eric Blake  <ebb9@byu.net>
6419
6420         * gnulib-tool (func_version): Base copyright year on CVS date.
6421         (func_emit_copyright_notice): New function.
6422         (func_emit_lib_Makefile_am): Use it.
6423         (func_emit_tests_Makefile_am): Likewise.
6424         (func_import): Likewise.
6425
6426 2006-05-08  Bruno Haible  <bruno@clisp.org>
6427
6428         * modules/stdarg: New file.
6429         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
6430
6431 2006-05-08  Bruno Haible  <bruno@clisp.org>
6432
6433         * m4/stdarg.m4: New file, from GNU gettext.
6434
6435 2006-05-08  Bruno Haible  <bruno@clisp.org>
6436
6437         * config/srclist.txt (build-aux/config.rpath): different from latest
6438         release.
6439
6440 2006-05-08  Bruno Haible  <bruno@clisp.org>
6441
6442         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
6443
6444 2006-05-05  Jim Meyering  <jim@meyering.net>
6445
6446         * m4/warning.m4: New file, derived from bison's file by the same name.
6447
6448 2006-05-03  Bruno Haible  <bruno@clisp.org>
6449
6450         * lib/stdint_.h: Shorter URL.
6451         * lib/inttypes.h: Likewise.
6452
6453 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6454
6455         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
6456
6457 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6458
6459         * lib/verify.h: Document the internals better.  Most of this change
6460         was written by Bruno Haible.
6461
6462 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6463
6464         * doc/verify.texi: New file, partly based on a proposal by
6465         Bruno Haible.
6466
6467 2006-05-02  Bruno Haible  <bruno@clisp.org>
6468
6469         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
6470         test from here...
6471         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
6472
6473 2006-04-29  Bruno Haible  <bruno@clisp.org>
6474
6475         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
6476         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
6477
6478 2006-04-29  Bruno Haible  <bruno@clisp.org>
6479
6480         * gnulib-tool: Make --update option actually work.
6481
6482 2006-04-29  Bruno Haible  <bruno@clisp.org>
6483
6484         * doc/gcd.texi: New file.
6485         * doc/gnulib.texi: Include it.
6486
6487 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
6488
6489         * lib/getdate.y (get_date): When adding relative date, start with the
6490         initial time, not with the result of the first mktime call.
6491
6492 2006-04-25  Bruno Haible  <bruno@clisp.org>
6493
6494         * gnulib-tool (func_import): Output the include directives in three
6495         blocks, sorted separately.
6496         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6497
6498 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
6499
6500         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
6501         to define main with arguments, for C++.  Reported by Eric Blake.
6502         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
6503         Prefer 'int main ()' to 'int main (void)', for C++.
6504         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
6505         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
6506         for 'main', for C99 and C++.
6507
6508 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
6509
6510         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
6511         Don't assume that exit status -1 is valid.
6512         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6513         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
6514         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
6515         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
6516         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
6517         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
6518         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
6519         functions can be used without declaring them, or that you can
6520         exit with status -1.
6521         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
6522
6523 2006-04-24  Karl Berry  <karl@gnu.org>
6524
6525         * config/srclist.txt (longdouble.m4): sync lost.
6526
6527 2006-04-24  Eric Blake  <ebb9@byu.net>
6528
6529         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
6530
6531 2006-04-24  Bruno Haible  <bruno@clisp.org>
6532
6533         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
6534         poll() implementation in AIX.
6535         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6536
6537 2006-04-24  Bruno Haible  <bruno@clisp.org>
6538
6539         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
6540         assigned exactly once.
6541
6542 2006-04-23  Claudio Fontana  <claudio@gnu.org>
6543             Bruno Haible  <bruno@clisp.org>
6544
6545         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
6546         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
6547         for AM_CPPFLAGS.
6548
6549 2006-04-23  Bruno Haible  <bruno@clisp.org>
6550
6551         * modules/copy-file: Depend on unistd.
6552         * modules/execute: Likewise.
6553         * modules/fatal-signal: Likewise.
6554         * modules/findprog: Likewise.
6555         * modules/mkdtemp : Likewise.
6556         * modules/pipe: Likewise.
6557         * modules/wait-process: Likewise.
6558
6559 2006-04-23  Bruno Haible  <bruno@clisp.org>
6560
6561         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
6562         condition was already detected.
6563         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6564
6565 2006-04-23  Bruno Haible  <bruno@clisp.org>
6566
6567         * lib/copy-file.c: Include <unistd.h> unconditionally.
6568         * lib/execute.c: Likewise.
6569         * lib/fatal-signal.c: Likewise.
6570         * lib/findprog.c: Likewise.
6571         * lib/mkdtemp.c: Likewise.
6572         * lib/pipe.h: Likewise.
6573         * lib/pipe.c: Likewise.
6574         * lib/wait-process.h: Likewise.
6575
6576 2006-04-23  Bruno Haible  <bruno@clisp.org>
6577
6578         * gnulib-tool (func_usage): Fix --import description. Document
6579         --update.
6580         (func_import): Create temporary file in a temporary directory, if
6581         --dry-run is specified. Silence errors from 'grep' when there are no
6582         m4 files in $m4dir.
6583         (func_create_testdir): Silence errors from 'grep' when there are no
6584         m4 files in $m4dir.
6585         Reported by Karl Berry <karl@freefriends.org>.
6586
6587 2006-04-20  Bruno Haible  <bruno@clisp.org>
6588
6589         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
6590         one argument, so that the code will be portable to Autoconf 2.60.
6591         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
6592         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6593         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
6594
6595 2006-04-19  Derek Price  <derek@ximbiot.com>
6596             Eric Blake  <ebb9@byu.net>
6597
6598         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
6599         rather than "/full/path.h".  Update comment to match.  Shorten &
6600         generalize m4_translit call via AS_TR_CPP.
6601
6602 2006-04-19  Derek Price  <derek@ximbiot.com>
6603             Eric Blake  <ebb9@byu.net>
6604
6605         * lib/inttypes.h: Correct grammar in comment.
6606
6607 2006-04-18  Derek Price  <derek@ximbiot.com>
6608             Paul Eggert  <eggert@cs.ucla.edu>
6609
6610         * modules/inttypes: New file.
6611         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
6612
6613 2006-04-18  Derek Price  <derek@ximbiot.com>
6614             Paul Eggert  <eggert@cs.ucla.edu>
6615
6616         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
6617         New files.
6618
6619 2006-04-18  Derek Price  <derek@ximbiot.com>
6620             Paul Eggert  <eggert@cs.ucla.edu>
6621
6622         * lib/inttypes.h: New file.
6623         * lib/strtoimax.c: Assume <inttypes.h>.
6624
6625 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
6626
6627         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
6628         isn't mounted.  Problem reported by Kir Kolyshkin.
6629
6630 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
6631
6632         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
6633         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
6634         Derek R. Price.
6635         * lib/regex.h (RE_DUP_MAX): Update comment to match current
6636         implementation.
6637
6638 2006-04-12  Eric Blake  <ebb9@byu.net>
6639
6640         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
6641         is now done automatically by the corresponding Autoconf macro.
6642
6643 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
6644
6645         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
6646         time_r.h.
6647
6648 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6649
6650         Merge regex changes from libc, removing some of our
6651         POSIX-conformance changes that were rejected and redoing them in a
6652         less-intrusive way.
6653
6654         * lib/regcomp.c (re_compile_internal, init_dfa):
6655         Length arg is now size_t, not Idx.  All uses changed.
6656         (peek_token): Forward decl now says internal_function.
6657         (__re_error_msgid, __re_error_msgid_idx):
6658         Now static rather than extern with attribute_hidden.
6659         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
6660         For some reason libc prefers K&R style defns for external functions.
6661         (regerror) [!defined _LIBC]: Likewise.
6662         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
6663         (seek_collating_symbol_entry, lookup_collation_sequence_value):
6664         (build_range_exp, build_collating_symbol):
6665         Use K&R-style defn.
6666         (re_compile_fastmap): Use '\0' to memset, not 0.
6667         (utf8_sb_map): Make the calculations more obvious.
6668         (init_dfa, parse_bracket_exp, build_charclass_op):
6669         Call calloc and cast result, as glibc does.
6670         (init_word_char, fetch_token, peek_token, peek_token_bracket):
6671         (build_range_exp, build_collating_symbol):
6672         Now internal functions.
6673
6674         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
6675
6676         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
6677         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
6678         Don't depend on VMS; depend on __VMS instead, for POSIX
6679         namespace cleanness.
6680         (regoff_t): Define to ssize_t, not long int.
6681
6682         Remove the REG_ macros named below.  Instead, make the old names
6683         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
6684         __USE_GNU_REGEX.
6685         (REG_BACKSLASH_ESCAPE_IN_LISTS):
6686         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
6687         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
6688         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
6689         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
6690         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
6691         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
6692         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
6693         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
6694         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
6695         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
6696         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
6697         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
6698         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
6699         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
6700         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
6701         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
6702         (REG_NREGS):
6703         Remove.  All uses replaced by the old RE_* names.
6704         (RE_BACKSLASH_ESCAPE_IN_LISTS):
6705         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
6706         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
6707         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
6708         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
6709         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
6710         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
6711         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
6712         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
6713         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
6714         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
6715         Don't bother having these macros be independent of each others'
6716         values, since they no longer exist in the POSIX name space.
6717
6718         Rename the following member names back to their old names,
6719         unless !__USE_GNU_REGEX.  All uses changed back.
6720         (buffer): Renamed from re_buffer.
6721         (allocated): Renamed from re_allocated.
6722         (used): Renamed from re_used.
6723         (syntax): Renamed from re_syntax.
6724         (fastmap): Renamed from re_fastmap.
6725         (translate): Renamed from re_translate.
6726         (can_be_null): Renamed from re_can_be_null.
6727         (regs_allocated): Renamed from re_regs_allocated.
6728         (fastmap_accurate): Renamed from re_fastmap_accurate.
6729         (no_sub): Renamed from re_no_sub.
6730         (not_bol): Renamed from re_not_bol.
6731         (not_eol): Renamed from re_not_eol.
6732         (newline_anchor): Renamed from re_newline_anchor.
6733         (num_regs): Renamed from rm_num_regs.
6734         (start): Renamed from rm_start.
6735         (end): Renamed from rm_end.
6736
6737         (free_state): Move up a bit.
6738
6739         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
6740         #define to be empty.
6741         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
6742         when that is what is intended.
6743         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
6744         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
6745         (MAX): New macro.
6746         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
6747         All uses changed back to re_malloc, etc.  It's now the caller's
6748         responsibility to check for overflow; all callers changed.
6749         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
6750         (re_x2nrealloc): Remove.
6751         (free_state): Remove decl.
6752
6753         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
6754         (re_set_registers, re_exec):
6755         Use K&R-style defn.
6756
6757         2006-01-31  Roland McGrath  <roland@redhat.com>
6758
6759         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
6760         Reported by Mike Frysinger <vapier@gentoo.org>.
6761
6762         2006-01-15  Andreas Jaeger  <aj@suse.de>
6763
6764         [BZ #1950]
6765         * lib/regex_internal.c (re_string_reconstruct): Adjust for
6766         build_wcs_upper_buffer change.
6767         (build_wcs_upper_buffer): Change return type.
6768
6769         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
6770
6771         * lib/regex_internal.h: Include <stdint.h> if available.
6772
6773         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
6774
6775         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
6776
6777         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
6778
6779         * lib/regcomp.c: Adjust for changed secondary hash function.
6780
6781         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
6782
6783         * lib/regex.h: Pretty printing.
6784         Clean up namespace a bit.
6785
6786         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
6787
6788         * lib/regexec.c (update_cur_sifted_state, check_arrival,
6789         check_arrival_add_next_nodes): Avoid using uninitialized variable.
6790
6791         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
6792                     Ulrich Drepper  <drepper@redhat.com>
6793
6794         [BZ #1302]
6795         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
6796         changed.
6797         (bitset_word_t): Renamed from bitset_word.  All uses changed.
6798
6799         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
6800
6801         [BZ #281]
6802         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
6803         * lib/regcomp.c: Remove unnecessary uses of
6804         unsigned RE_TRANSLATE_TYPE.
6805         * lib/regex_internal.h: Likewise.
6806         * lib/regex_internal.c: Likewise.
6807         * lib/regexec.c: Likewise.
6808         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
6809
6810         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
6811
6812         * lib/regexec.c (find_recover_state): Remove unnecessary
6813         initialization.
6814         (transit_state_bkref): Make DFA a const pointer.
6815         (get_subexp): Likewise.
6816         (check_arrival): Likewise.
6817         (update_cur_sifted_state): Likewise.
6818         (re_search_internal): Likewise.
6819         (prune_impossible_nodes): Likewise.
6820         (acquire_init_state_context): Likewise.
6821         (proceed_next_node): Likewise.
6822         (set_regs): Likewise.
6823         (free_fail_stack_return): Likewise.
6824         (check_arrival_expand_ecl): Mark DFA parameter as const.
6825         (check_arrival_expand_ecl_sub): Likewise.
6826         (check_subexp_limits): Likewise.
6827         (sub_epsilon_src_nodes):  Likewise.
6828         (add_epsilon_src_nodes):  Likewise.
6829         (merge_state_array): Likewise.
6830         (update_regs): Likewise.
6831         (build_trtable): Likewise.
6832         (sift_states_backward): Mark MCTX parameter as const.
6833         (build_sifted_states): Likewise.
6834         (update_cur_sifted_state): Likewise.
6835         (sift_states_mkref): Likewise.
6836         (check_arrival_expand_ecl): Mark eclosure as const.
6837         (check_dst_limits_calc_pos_1): Likewise.
6838         * lib/regex_internal.h (re_match_context_t): Make dfa a const
6839         pointer.
6840
6841         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
6842
6843         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
6844         (transit_state_sb): Likewise.
6845         (transit_state_mb): Likewise.
6846         (sift_states_iter_mb): Likewise.
6847         (check_arrival_add_next_nodes): Likewise.
6848         (check_node_accept_bytes): Change first parameter to pointer-to-const.
6849         [_LIBC] (re_search_2_stub): Use mempcpy.
6850
6851         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
6852         mbrtowc for very simple UTF-8 case.
6853
6854         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
6855         a pointer-to-const.
6856         (re_acquire_state_context): Likewise.
6857         * lib/regex_internal.h: Adjust prototypes.
6858
6859         * lib/regex.c: Prevent using C++ compilers.
6860
6861         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
6862         (re_acquire_state_context): Likewise.
6863
6864 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6865
6866         * modules/regex (Depends-on): Add ssize_t.
6867
6868 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6869
6870         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
6871         translation table.
6872
6873 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6874
6875         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
6876
6877 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
6878             Bruno Haible  <bruno@clisp.org>
6879
6880         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
6881         <sys/types.h> and <inttypes.h>.
6882
6883 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6884
6885         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
6886         `__error_t_defined', so argp.h will not typedef the former.
6887
6888 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
6889
6890         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
6891         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
6892         glibc names.  Even if glibc is changed to conform to POSIX, the
6893         traditional names will be available anyway, since regex depends on
6894         the extensions module.  Also, fix a longstanding typo in the
6895         implementation of Spencer ERE test #75 from grep 2.3.  Problems
6896         reported by Emanuele Giaquinta.  Also, change sense of cached
6897         variable, so that the message makes sense.
6898
6899 2006-03-24  Simon Josefsson  <jas@extundo.com>
6900
6901         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
6902         including some doc fixes.
6903         (base64_encode_alloc): Fix +1 bug on allocation failures.
6904
6905 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6906
6907         * lib/base64.c (base64_encode): Do not read past end of array with
6908         unsanitized input on systems with CHAR_BIT > 8.
6909
6910 2006-03-24  Eric Blake  <ebb9@byu.net>
6911
6912         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
6913
6914 2006-03-22  Karl Berry  <karl@gnu.org>
6915
6916         * config/srclist.txt (*setenv.[ch]): get from coreutils.
6917         * config/srclistvars.sh (COREUTILS): new var.
6918
6919 2006-03-17  Jim Meyering  <jim@meyering.net>
6920
6921         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
6922         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
6923
6924 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6925
6926         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
6927         no longer needs it.  Instead, check that regoff_t is as least
6928         as wide as ptrdiff_t.
6929
6930         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
6931         so that our regex.h stays compatible with the installed regex.
6932         This is helpful for installers who configure --without-included-regex.
6933         Problem reported by Emanuele Giaquinta.
6934
6935 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6936
6937         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
6938         Typedef to long int, not to off_, as POSIX will likely change
6939         in that direction.
6940
6941 2006-03-15  Eric Blake  <ebb9@byu.net>
6942
6943         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
6944
6945 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6946
6947         * lib/argp-help.c (validate_uparams): Fix typo
6948         * lib/argp-parse.c (argp_default_options): Consistently begin help
6949         messages with a lowercase letter.
6950
6951 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
6952
6953         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
6954         overrun buffers and shouldn't be used (much as gets shouldn't be
6955         used).
6956         * lib/time_r.c (asctime_r, ctime_r): Likewise.
6957
6958 2006-03-08  Simon Josefsson  <jas@extundo.com>
6959
6960         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
6961         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6962
6963 2006-03-08  Simon Josefsson  <jas@extundo.com>
6964
6965         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
6966         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6967
6968 2006-03-08  Simon Josefsson  <jas@extundo.com>
6969
6970         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
6971         signal that configure disabled the device.
6972
6973 2006-03-08  Simon Josefsson  <jas@extundo.com>
6974
6975         * build-aux/maint.mk: Fix refresh-po, to handle no translated
6976         languages.
6977
6978 2006-03-07  Simon Josefsson  <jas@extundo.com>
6979
6980         * modules/getopt (Depends-on): Add unistd.
6981
6982         * modules/unistd: New file.
6983
6984 2006-03-07  Simon Josefsson  <jas@extundo.com>
6985
6986         * modules/gc-random: New file.
6987
6988 2006-03-07  Simon Josefsson  <jas@extundo.com>
6989
6990         * m4/unistd_h.m4: New file.
6991
6992 2006-03-07  Simon Josefsson  <jas@extundo.com>
6993
6994         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
6995         test to be side-effect free by storing the result in the cache
6996         variable gl_cv_lib_readline, and moving the assignment of
6997         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
6998         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6999
7000 2006-03-07  Simon Josefsson  <jas@extundo.com>
7001
7002         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
7003         error on missing devices (the functions will return an error).
7004
7005         * m4/gc.m4: Move random stuff to gc-random.m4
7006
7007 2006-03-07  Simon Josefsson  <jas@extundo.com>
7008
7009         * lib/unistd_.h: New file.
7010
7011 2006-03-07  Simon Josefsson  <jas@extundo.com>
7012
7013         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
7014
7015 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7016
7017         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
7018         Problem reported by Juan Manuel Guerrero.
7019
7020 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7021
7022         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
7023         the unistd module.
7024         * lib/getlogin_r.c: Likewise.
7025         * lib/getlogin_r.h: Likewise.
7026         * lib/glob.c: Likewise.
7027         * lib/pagealign_alloc.c: Likewise.
7028         * lib/unistd_.h: Remove; no longer needed.
7029
7030 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7031
7032         * MODULES.html.sh (Support for systems lacking POSIX:2001):
7033         Add unistd.
7034         * modules/c-stack (Depends-on): Add unistd.
7035         * modules/getlogin_r: Likewise.
7036         * modules/glob: Likewise.
7037         * modules/pagealign_alloc: Likewise.
7038         * modules/unistd (Files): Remove lib/unistd_.h.
7039         (EXTRA_DIST): Remove.
7040         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
7041         need unistd_.h.
7042         (MOSTLYCLEANFILES): Remove unistd.h-t.
7043
7044 2006-03-03  Simon Josefsson  <jas@extundo.com>
7045
7046         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
7047
7048 2006-03-03  Simon Josefsson  <jas@extundo.com>
7049
7050         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
7051         libidn and bison.
7052
7053 2006-03-03  Simon Josefsson  <jas@extundo.com>
7054
7055         * build-aux/maint.mk: Add indent target.
7056
7057 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
7058
7059         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
7060         our replacement poll.h in any case, to avoid a differing
7061         declaration from a system header.  Seen on AIX.
7062
7063 2006-03-01  Simon Josefsson  <jas@extundo.com>
7064
7065         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
7066         <kasal@ucw.cz>.
7067
7068 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7069
7070         * modules/gettime (Depends-on): Add extensions module.
7071         * modules/nanosleep (Depends-on): Likewise.
7072         * modules/settime (Depends-on): Likewise.
7073
7074 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7075
7076         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
7077         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
7078         pedantically.
7079         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7080         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
7081
7082         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
7083         not "==".  Reported by Ralf Wildenhues.
7084
7085 2006-03-01  Karl Berry  <karl@gnu.org>
7086
7087         * doc/Copyright/request-*: new files, synced from gnuorg.
7088
7089 2006-03-01  Karl Berry  <karl@gnu.org>
7090
7091         * config/srclist.txt (Copyright/*): new entries.
7092
7093 2006-02-28  Simon Josefsson  <jas@extundo.com>
7094
7095         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
7096
7097 2006-02-27  Simon Josefsson  <jas@extundo.com>
7098
7099         * lib/base64.h: Indent #define's.  From Jim Meyering
7100         <jim@meyering.net>.
7101
7102 2006-02-27  Jim Meyering  <jim@meyering.net>
7103
7104         Revert the change of 2006-02-24, so these files can continue
7105         to be sync'd from gettext.
7106         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
7107         of `config.h'.
7108
7109 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
7110
7111         * modules/intprops: New file.
7112         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
7113         Add intprops.
7114         * modules/getloadavg (Files): Remove lib/intprops.h.
7115         (Depends-on): Add intprops.
7116         * modules/human: Likewise.
7117         * modules/inttostr: Likewise.
7118         * modules/openat: Likewise.
7119         * modules/sig2str: Likewise.
7120         * modules/userspec: Likewise.
7121         * modules/utimecmp: Likewise.
7122         * modules/xnanosleep: Likewise.
7123         * modules/xstrtol: Likewise.
7124
7125 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
7126
7127         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
7128         * modules/lock-tests (TESTS): Use $(EXEEXT).
7129         * modules/tls-tests: Likewise.
7130         * modules/argp-tests: Likewise.
7131         (check_PROGRAMS): New var, replacing...
7132         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
7133
7134 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7135
7136         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
7137         `config.h'.
7138
7139 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
7140
7141         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
7142
7143 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7144
7145         Sync from coreutils.
7146         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
7147         gl_CHDIR_SAFER.
7148
7149 2006-02-22  Jim Meyering  <jim@meyering.net>
7150
7151         Sync from coreutils.
7152         * m4/chdir-safer.m4: New file.
7153
7154 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
7155
7156         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
7157         AT_FDCWD exceeds INT_MAX.
7158         * lib/openat.h (AT_FDCWD): Likewise.
7159
7160 2006-02-17  Eric Blake  <address@hidden>
7161
7162         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
7163
7164 2006-02-16  Simon Josefsson  <jas@extundo.com>
7165
7166         * modules/getaddrinfo (Depends-on): Add sys_socket.
7167
7168 2006-02-15  Simon Josefsson  <jas@extundo.com>
7169
7170         * build-aux/maint.mk: Add dsyntax-check rule.
7171
7172 2006-02-15  Eric Blake  <ebb9@byu.net>
7173
7174         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
7175         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
7176         'present but cannot compile' warnings on cygwin.
7177         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
7178         use ws2tcpip.h if sys/socket.h works.
7179         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
7180         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
7181
7182 2006-02-14  Simon Josefsson  <jas@extundo.com>
7183
7184         * modules/maintainer-makefile (Files): Rename.
7185
7186         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
7187         and (the local) Makefile.cfg to maint-cfg.mk.
7188
7189         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
7190         to the latter.
7191
7192         * modules/maintainer-makefile: New module.
7193
7194         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
7195         severaly stripped to make it possible to build it up from scratch
7196         with reliable tests.
7197
7198         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
7199         fixes to permit overriding the default actions when configure and
7200         makefile are not available.
7201
7202 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
7203
7204         Sync from coreutils.
7205         * modules/lstat (Depends-on): Don't depend on xalloc.
7206         (License): Change from GPL to LGPL, since this is now simply a
7207         replacement for a libc function.
7208
7209 2006-02-14  Jim Meyering  <jim@meyering.net>
7210
7211         Sync from coreutils.
7212
7213         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
7214         failure on deficient systems, and simplify gnulib lgpl dependencies.
7215         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
7216         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
7217
7218         * lib/xalloc-die.c: Remove unused definition of N_.
7219
7220 2006-02-14  Jim Meyering  <jim@meyering.net>
7221
7222         Sync from coreutils.
7223         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
7224         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
7225         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
7226         double-quote uses of that variable, to accommodate the rare case in
7227         which getmntent is available in none of the libraries checked.  This
7228         happens at least on FreeBSD 5.0.
7229
7230 2006-02-13  Simon Josefsson  <jas@extundo.com>
7231
7232         * gnulib-tool (Usage): Fix --import, from
7233         karl@freefriends.org (Karl Berry).
7234
7235 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7236
7237         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
7238
7239 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
7240
7241         * lib/argp-namefrob.h: Restore changes accidentally lost during the
7242         "autoupdate" on 2005-12-12.
7243
7244 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
7245
7246         * modules/closeout (Depends-on): Remove atexit.
7247
7248 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
7249
7250         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
7251         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
7252
7253 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
7254
7255         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
7256         __EXTENSIONS__ if this causes compilation to fail.  Problem
7257         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
7258         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
7259
7260 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
7261
7262         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
7263         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
7264         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
7265         All uses changed.
7266
7267 2006-01-26  Simon Josefsson  <jas@extundo.com>
7268
7269         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
7270         prototype is visible on mingw32.
7271
7272         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
7273         for mingw32.
7274
7275         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
7276         mingw32).
7277
7278 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
7279
7280         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
7281         attempt to open for write; this always fails, at least on POSIX
7282         hosts.  This reinstates the 2006-01-09 change, which was
7283         inadvertently removed.
7284
7285 2006-01-26  Bruno Haible  <bruno@clisp.org>
7286
7287         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
7288         Reported by Paul Eggert.
7289
7290 2006-01-26  Bruno Haible  <bruno@clisp.org>
7291             Paul Eggert  <eggert@cs.ucla.edu>
7292
7293         * lib/stdbool_.h (_Bool)
7294         [(! (defined __cplusplus || defined __BEOS__)
7295           && !defined __GNUC__
7296           && !(defined __HP_cc || defined __xlc__
7297                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
7298                || defined __sgi))]:
7299         #define to signed char in these cases too; this simplifies
7300         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
7301         etc., separately) and makes it more conservative.
7302
7303 2006-01-25  Simon Josefsson  <jas@extundo.com>
7304
7305         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
7306         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
7307         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
7308
7309 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7310
7311         * lib/argp-namefrob.h: Bugfix. Remove stray #
7312
7313 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
7314
7315         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
7316         so that we test the test.
7317         Check for yet another HP-UX cc bug involving *bool |= bool.
7318
7319 2006-01-25  Karl Berry  <karl@gnu.org>
7320
7321         * config/srclist.txt (vasnprintf.c): sync lost.
7322
7323 2006-01-25  Jim Meyering  <jim@meyering.net>
7324
7325         Sync from the stable (b5) branch of coreutils:
7326
7327         * lib/fts.c (fts_children): Don't let close() clobber errno from
7328         failed fchdir().
7329
7330         * lib/fts.c (fts_stat): When following a symlink-to-directory,
7331         don't necessarily interpret stat-fails+lstat-succeeds as indicating
7332         a dangling symlink.  That can also happen at least for ELOOP.
7333         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
7334         FYI, this bug predates the inclusion of fts.c in coreutils.
7335
7336         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
7337         in their own block, so pre-c99 compilers don't object.
7338
7339         Avoid the double-free (first in fts_read, second in fts_close) that
7340         would occur when an `active' directory is made inaccessible (e.g.,
7341         via chmod a-x) during a traversal.
7342         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
7343         before returning.  Reproduce this failure by
7344         mkdir -p a/b; cd a; chmod a-x . b
7345         Reported by Stavros Passas.
7346
7347 2006-01-25  Jim Meyering  <jim@meyering.net>
7348
7349         * lib/fileblocks.c: Remove more useless parentheses.
7350         * lib/readutmp.h: Likewise.
7351
7352 2006-01-25  Bruno Haible  <bruno@clisp.org>
7353
7354         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
7355         warnings.
7356         Reported by Paul Eggert.
7357
7358 2006-01-25  Bruno Haible  <bruno@clisp.org>
7359
7360         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
7361         rid of a trap command. For Solaris sh.
7362         Reported by Mark D. Baushke <mdb@gnu.org>.
7363
7364 2006-01-24  Simon Josefsson  <jas@extundo.com>
7365
7366         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
7367         Bruno.
7368
7369 2006-01-24  Karl Berry  <karl@gnu.org>
7370
7371         * config/srclist.txt (argp-namefrob.h): sync lost.
7372
7373 2006-01-24  Jim Meyering  <jim@meyering.net>
7374
7375         * modules/openat (Files): Add lib/intprops.h.
7376         From Mark D. Baushke.
7377
7378 2006-01-24  Jim Meyering  <jim@meyering.net>
7379
7380         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
7381         Reported by Mark D. Baushke.
7382
7383 2006-01-24  Jim Meyering  <jim@meyering.net>
7384
7385         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
7386
7387 2006-01-24  Bruno Haible  <bruno@clisp.org>
7388
7389         * modules/strnlen (Maintainer): Change from glibc to all.
7390
7391 2006-01-24  Bruno Haible  <bruno@clisp.org>
7392
7393         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
7394         Patch by Paul Eggert.
7395
7396 2006-01-24  Bruno Haible  <bruno@clisp.org>
7397
7398         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
7399         already has it.
7400         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
7401         2005-11-26.
7402
7403         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
7404         'signed char' to avoid problems with the built-in _Bool type.
7405         Reported by Paul Eggert on 2005-11-26.
7406
7407 2006-01-24  Bruno Haible  <bruno@clisp.org>
7408
7409         * gnulib-tool (func_import): Avoid constructing complicated sed
7410         expressions inside backquote.
7411         Report and solution by Mark D. Baushke <mdb@gnu.org>.
7412
7413 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
7414
7415         These changes imported from libc.
7416         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
7417         test and two separate function calls.
7418         * lib/strndup.c (__strndup): Add libc_hidden_def.
7419
7420 2006-01-23  Simon Josefsson  <jas@extundo.com>
7421
7422         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
7423         Remove the test_*_SOURCES variable: automake infers it by default.
7424         * modules/tls-tests: Likewise.
7425
7426 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7427
7428         Work around porting bugs reported by Dieter in
7429         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
7430         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
7431         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
7432         Include "getopt.h" first, to check interface.
7433         (getenv): Declare only if defined HAVE_DECL_GETENV &&
7434         !HAVE_DECL_GETENV.
7435         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
7436         (__strndup): Revert to K&R-style function dfns, the glibc style.
7437         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
7438         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
7439         Include strnlen.h first, to get prototype properly.
7440         (strnlen): Renamed from __strnlen.
7441         Remove weak alias.
7442
7443 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7444
7445         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
7446
7447 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7448
7449         * config/srclist.txt: Adjust to reflect glibc reorganization.
7450         This affects only comments.
7451
7452 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7453
7454          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
7455          Reported by Bruce Korb <bkorb@gnu.org>.
7456
7457 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7458
7459         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
7460         to pacify gcc -Wswitch-default.
7461
7462 2006-01-22  Bruno Haible  <bruno@clisp.org>
7463
7464         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
7465         temporary buffer for sprintf, take into account the precision also
7466         for 'd', 'i', 'u', 'o', 'x', 'X'.
7467
7468 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7469
7470         * modules/argp-tests: New module
7471         * tests/test-argp.c: New file
7472         * tests/test-argp-2.sh: New file
7473
7474 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7475
7476         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
7477         (__argp_base_name): Removed
7478         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
7479         typo.
7480         (__argp_base_name): Provide macro definition or extern declaration
7481         depending on the configuration
7482
7483 2006-01-20  Simon Josefsson  <jas@extundo.com>
7484
7485         * modules/inet_ntop (Depends-on): Depend on sys_socket.
7486
7487 2006-01-20  Simon Josefsson  <jas@extundo.com>
7488
7489         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
7490
7491 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
7492
7493         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
7494         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
7495         Suggested by Bruno Haible.
7496
7497 2006-01-20  Karl Berry  <karl@gnu.org>
7498
7499         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
7500         until changes propagate, I guess.
7501
7502 2006-01-19  Simon Josefsson  <jas@extundo.com>
7503
7504         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
7505
7506 2006-01-19  Simon Josefsson  <jas@extundo.com>
7507
7508         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
7509
7510 2006-01-19  Simon Josefsson  <jas@extundo.com>
7511
7512         * gnulib-tool: Set check_PROGRAMS.
7513
7514         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
7515         modules/des-tests, modules/gc-arcfour-tests,
7516         modules/gc-arctwo-tests, modules/gc-des-tests,
7517         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
7518         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
7519         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
7520         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
7521         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
7522         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
7523         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
7524         test_*_SOURCES.
7525
7526 2006-01-18  Simon Josefsson  <jas@extundo.com>
7527
7528         * modules/socklen (Depends-on): Depend on sys_socket.
7529
7530 2006-01-18  Simon Josefsson  <jas@extundo.com>
7531
7532         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
7533         modules/des-tests, modules/gc-arcfour-tests,
7534         modules/gc-arctwo-tests, modules/gc-des-tests,
7535         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
7536         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
7537         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
7538         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
7539         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
7540         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
7541         $(EXEEXT) to automake TESTS variable, for mingw32.
7542
7543 2006-01-17  Simon Josefsson  <jas@extundo.com>
7544
7545         * modules/socklen (Include): Need sys/socket.h.
7546
7547 2006-01-17  Bruno Haible  <bruno@clisp.org>
7548
7549         * modules/ssize_t (Include): Add <sys/types.h>.
7550
7551 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
7552
7553         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
7554         it's not portable and it doesn't work with cross-compiles.
7555         Problem reported by Bruno Haible.  Fix missing-$ typo in
7556         'test "gl_cv_ignore_unused_libraries" ...' that prevented
7557         -zignore from being used with Sun's C compiler.
7558
7559 2006-01-12  Simon Josefsson  <jas@extundo.com>
7560
7561         * lib/base64.c: Fix warning, reported by Bruno Haible
7562         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
7563
7564 2006-01-12  Bruno Haible  <bruno@clisp.org>
7565
7566         * modules/ldd: New file.
7567         * build-aux/ldd.sh.in: New file.
7568         * MODULES.html.sh (Support for building libraries and executables): Add
7569         ldd.
7570
7571 2006-01-12  Bruno Haible  <bruno@clisp.org>
7572
7573         * m4/ldd.m4: New file.
7574
7575 2006-01-12  Bruno Haible  <bruno@clisp.org>
7576
7577         * gnulib-tool (func_import, func_create_testdir): Don't go into an
7578         endless loop while replacing $auxdir with build-aux.
7579
7580 2006-01-11  Simon Josefsson  <jas@extundo.com>
7581
7582         * lib/stdint_.h (SIZE_MAX): Add missing (.
7583
7584 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
7585
7586         Sync from coreutils.
7587         * lib/md5.c: Fix commentary typos.
7588         (alignof, UNALIGNED_P): No need for a GCC-specific version.
7589         * lib/md5.h (__attribute__): Remove; unused.
7590         * lib/sha1.c: Fix commentary to match md5 better.
7591         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
7592         so that we don't need to worry about alignment.  All uses changed.
7593         This merges the 2005-10-28 md5 change into sha1.
7594
7595 2006-01-11  Jim Meyering  <jim@meyering.net>
7596
7597         Sync from coreutils.
7598         * lib/md5.c (OP): Fix spacing.
7599
7600 2006-01-11  Bruno Haible  <bruno@clisp.org>
7601
7602         Ensure automatic ordering between gl_LOCK and gl_ARGP.
7603         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
7604         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
7605
7606 2006-01-11  Bruno Haible  <bruno@clisp.org>
7607
7608         Ensure automatic ordering between gl_LOCK and gl_ARGP.
7609         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
7610         the "early" section as well.
7611
7612 2006-01-11  Bruno Haible  <bruno@clisp.org>
7613
7614         Avoid "ar: no archive members specified" error on MacOS X.
7615         * gnulib-tool (func_modules_add_dummy): New function.
7616         (func_import, func_create_testdir): Invoke it.
7617
7618 2006-01-11  Bruno Haible  <bruno@clisp.org>
7619
7620         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
7621         with $auxdir in AC_CONFIG_FILES statements.
7622
7623 2006-01-11  Bruno Haible  <bruno@clisp.org>
7624
7625         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7626         Initialize also noinst_HEADERS to empty.
7627
7628 2006-01-11  Bruno Haible  <bruno@clisp.org>
7629
7630         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
7631         variables.
7632         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
7633         autoreconf.
7634
7635 2006-01-11  Bruno Haible  <bruno@clisp.org>
7636
7637         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
7638         overridable by the user.
7639         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7640
7641 2006-01-10  Simon Josefsson  <jas@extundo.com>
7642
7643         * modules/sys_socket: New file.
7644
7645 2006-01-10  Simon Josefsson  <jas@extundo.com>
7646
7647         * m4/sys_socket_h.m4: New file.
7648
7649 2006-01-10  Simon Josefsson  <jas@extundo.com>
7650
7651         * lib/socket_.h: New file.
7652
7653 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7654
7655         * modules/readutmp (Maintainer): Add myself.
7656
7657 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7658
7659         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
7660         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
7661         People who are still concerned with buggy memcmp implementations
7662         can invoke gl_FUNC_MEMCMP themselves.
7663
7664 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7665
7666         * lib/regex_internal.h (BITSET_WORD_BITS):
7667         Work around a bug in 64-bit PGC (before version 6.1-2), where the
7668         preprocessor mishandles large unsigned values as if they were signed.
7669         Problem reported by Claudio Fontana in
7670         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
7671
7672 2006-01-10  Jim Meyering  <jim@meyering.net>
7673
7674         Avoid the double-free (first in fts_read, second in fts_close) that
7675         would occur when an `active' directory is made inaccessible (e.g.,
7676         via chmod a-x) during a traversal.
7677         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
7678         before returning.  Reproduce this failure by
7679         mkdir -p a/b; cd a; chmod a-x . b
7680         Reported by Stavros Passas.
7681
7682         Sync from coreutils.
7683         * lib/sha1.c: Tweak grammar in a comment.
7684
7685 2006-01-10  Jim Meyering  <jim@meyering.net>
7686
7687         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
7688         Patch by Joerg Sonnenberger.
7689
7690 2006-01-10  Bruno Haible  <bruno@clisp.org>
7691
7692         * modules/readutmp: Depend on module free.
7693         * modules/strtok_r: Depend on module restrict.
7694
7695 2006-01-10  Bruno Haible  <bruno@clisp.org>
7696
7697         * modules/gettext (configure.ac): Add an invocation of
7698         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
7699
7700 2006-01-10  Bruno Haible  <bruno@clisp.org>
7701
7702         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
7703         Reported by Werner Lemberg <wl@gnu.org>.
7704
7705 2006-01-10  Bruno Haible  <bruno@clisp.org>
7706
7707         * lib/localcharset.c: Update from GNU gettext.
7708
7709 2006-01-10  Bruno Haible  <bruno@clisp.org>
7710
7711         * lib/argp.h (__const): Remove macro. Use const instead.
7712         * lib/argp-fmtstream.h (__const): Likewise.
7713         * lib/glob_.h (__const): Remove macro.
7714         * lib/glob-libc.h: Use const instead of __const.
7715
7716 2006-01-10  Bruno Haible  <bruno@clisp.org>
7717
7718         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
7719         variable.
7720         Needed to avoid an automake error regarding the 'gettext' module.
7721
7722 2006-01-09  Simon Josefsson  <jas@extundo.com>
7723
7724         * modules/inet_ntop (Depends-on): Add restrict.
7725
7726 2006-01-09  Simon Josefsson  <jas@extundo.com>
7727
7728         * modules/gc-rijndael-tests (License): Put under LGPL.
7729
7730         * modules/gc-des-tests (License): Likewise.
7731
7732         * modules/gc-arcfour-tests (License): Likewise.
7733
7734         * modules/gc-arctwo-tests (License): Likewise.
7735
7736         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
7737
7738         * modules/gc-hmac-sha1-tests (Files): Likewise.
7739
7740         * modules/gc-hmac-md5-tests (License): Likewise.
7741
7742         * modules/gc-sha1-tests (License): Likewise.
7743
7744         * modules/gc-md5-tests (License): Likewise.
7745
7746         * modules/gc-md4-tests (License): Likewise.
7747
7748         * modules/gc-md2-tests (License): Likewise.
7749
7750         * modules/gc-tests (License): Likewise.
7751
7752         * modules/des-tests (License): Likewise.
7753
7754         * modules/md4-tests (License): Likewise.
7755
7756         * modules/md2-tests (License): Likewise.
7757
7758 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7759
7760         Sync from coreutils:
7761
7762         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
7763         * modules/lib-ignore: New file.
7764         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
7765         chdir-safer.m4, lchmod.m4.
7766         * modules/openat: Add mkdirat.c, openat-priv.h.
7767
7768 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7769
7770         Sync from coreutils.
7771         * m4/lib-ignore.m4: New file.
7772         * m4/lchmod.m4: New file.
7773
7774 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7775
7776         Sync from coreutils.
7777         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
7778         for write access: POSIX says that must fail.
7779         * lib/fts.c (diropen): Likewise.
7780         * lib/save-cwd.c (save_cwd): Likewise.
7781         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
7782         well, for minor improvements on hosts that lack O_DIRECTORY.
7783         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
7784         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
7785         Fall back on chown if open failed with EACCES.
7786
7787         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
7788         Report an error at compile-time if only a 1-second nominal clock
7789         resolution is found.
7790
7791         * lib/lchmod.h: New file.
7792         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
7793         (make_dir_parents): Use lchown rather than chown, and
7794         lchmod rather than chmod.
7795
7796         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
7797         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
7798         "proc" reported by n0dalus.
7799
7800         * lib/mountlist.c: Include <limits.h>.
7801         (dev_from_mount_options)
7802         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
7803         New function.  It no longer assumes "dev=" has the System V meaning
7804         on Linux (since it doesn't).  It also parses "dev=" more carefully.
7805         (read_file_system_list)
7806         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
7807         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
7808         dev= in that case.
7809
7810         * lib/posixtm.h (PDS_PRE_2000): New macro.
7811         * lib/posixtm.c (year): Arg is now syntax_bits rather than
7812         allow_century.  All usages changed.  Reject dates outside the range
7813         1969-1999 if PDS_PRE_2000 is used.
7814
7815 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7816
7817         Sync from coreutils.
7818         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
7819         (Time of day items): Mention the possibility of leap seconds.
7820         Problem reported by Dr. David Alan Gilbert.
7821
7822 2006-01-09  Jim Meyering  <jim@meyering.net>
7823
7824         Sync from coreutils.
7825
7826         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
7827
7828         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
7829
7830         * lib/modechange.c (mode_compile): Reject an invalid mode string
7831         that starts with an octal digit.  From Andreas Gruenbacher.
7832
7833         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
7834         and dup to open_safer and dup_safer, respectively.
7835         (openat_permissive): Fix typo in comment.
7836
7837         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
7838         "gettext.h"; either no longer needed or are guaranteed by openat.h.
7839         (_): Remove; no longer needed.
7840         (openat): Renamed from rpl_openat; no need for rpl_openat
7841         since openat.h renames openat for us.
7842         Replace most of the body with a call to openat_permissive,
7843         to avoid duplicate code.
7844         Port to (probably hypothetical) environments were mode_t is
7845         wider than int.
7846         (openat_permissive): Require mode arg, so that we can check
7847         types better.  Put it just after flags.  Change cwd failure
7848         indicator from pointer-to-bool to pointer-to-errno-value.
7849         All callers changed.
7850         Invoke openat_save_fail and/or openat_restore_fail if
7851         cwd_errno is null, so that openat can call us.
7852         (openat_permissive, fdopendir, fstatat, unlinkat):
7853         Simplify errno handling to avoid some duplicate code,
7854         as it's OK to set errno on success.
7855         * lib/openat.h: Revamp code so that function macros depend on
7856         __OPENAT_PREFIX only, not also on AT_FDCWD.
7857         (openat_ro): Remove.  Caller changed to use openat_permissive.
7858         (openat_permissive): Now a macro, if not a function.
7859         (openat_restore_fail, openat_save_fail): Now always functions,
7860         since mkdirat needs them even if __OPENAT_PREFIX is defined.
7861
7862         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
7863         and openat.c.
7864         * lib/mkdirat.c: Include openat-priv.h.
7865         Remove definitions of macros defined therein.
7866         * lib/openat.c: Likewise.
7867
7868         * lib/mkdirat.c (mkdirat): New file and function.
7869         * lib/openat.h (mkdirat): Declare.
7870
7871         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
7872
7873         * lib/openat.h (openat_permissive): Declare.
7874         (openat_ro): Define.
7875
7876         * lib/openat.c (EXPECTED_ERRNO): New macro.
7877         (openat_permissive): New function -- used in remove.c rewrite.
7878         (all functions): Set errno just before returning, only if there
7879         was an actual failure.
7880         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
7881
7882         Emulate openat-family functions using Linux's procfs, if possible.
7883         Idea and some code based on Ulrich Drepper's glibc changes.
7884
7885         * lib/openat.c: (BUILD_PROC_NAME): New macro.
7886         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
7887         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
7888         before falling back on save_cwd and restore_cwd.
7889         (fdopendir, fstatat, unlinkat): Likewise.
7890
7891         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
7892         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
7893
7894         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
7895         as second argument to va_arg.  Otherwise, some versions of gcc
7896         warn that `if this code is reached, the program will abort'.
7897
7898 2006-01-09  Jim Meyering  <jim@meyering.net>
7899
7900         Sync from coreutils.
7901         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
7902         Require openat-priv.h.
7903
7904 2006-01-09  Bruno Haible  <bruno@clisp.org>
7905
7906         * modules/strnlen (Include): Use strnlen.h.
7907
7908 2006-01-09  Bruno Haible  <bruno@clisp.org>
7909
7910         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
7911
7912 2006-01-09  Bruno Haible  <bruno@clisp.org>
7913
7914         * lib/sysexit_.h (EX_OK): New macro.
7915         Suggested by Martin Lambers <marlam@marlam.de>.
7916
7917 2006-01-09  Bruno Haible  <bruno@clisp.org>
7918
7919         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
7920         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
7921
7922 2006-01-09  Bruno Haible  <bruno@clisp.org>
7923
7924         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
7925         numbers.
7926
7927 2006-01-09  Bruno Haible  <bruno@clisp.org>
7928
7929         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
7930         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
7931         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
7932         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
7933
7934 2006-01-09  Bruno Haible  <bruno@clisp.org>
7935
7936         * build-aux/javacomp.sh.in: New file, moved from lib/.
7937         * modules/javacomp-script (Files): Update.
7938         (configure.ac): Add AC_CONFIG_FILES invocation.
7939         (EXTRA_DIST): Remove variable.
7940
7941         * build-aux/javaexec.sh.in: New file, moved from lib/.
7942         * modules/javaexec (Files): Update.
7943         (configure.ac): Add AC_CONFIG_FILES invocation.
7944         (EXTRA_DIST): Remove javaexec.sh.in.
7945
7946         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
7947         * modules/csharpcomp-script (Files): Update.
7948         (configure.ac): Add AC_CONFIG_FILES invocation.
7949         (EXTRA_DIST): Remove variable.
7950
7951         * build-aux/csharpexec.sh.in: New file, moved from lib/.
7952         * modules/csharpexec (Files): Update.
7953         (configure.ac): Add AC_CONFIG_FILES invocation.
7954         (EXTRA_DIST): Remove csharpexec.sh.in.
7955
7956 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7957
7958         Sync from coreutils.
7959
7960         Add POSIX ACL support
7961         * lib/acl.h (copy_acl, set_acl): Add declarations.
7962         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
7963         systems other than Linux.
7964         (chmod_or_fchmod): New function: use fchmod when possible,
7965         and chmod otherwise.
7966         (file_has_acl): Add a POSIX ACL implementation, with a
7967         Linux-specific subcase.
7968         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
7969         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
7970         acls are unsupported.
7971         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
7972         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
7973         are unsupported.
7974
7975 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7976
7977         Sync from coreutils.
7978         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
7979
7980 2006-01-07  Bruno Haible  <bruno@clisp.org>
7981
7982         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
7983         gl_EARLY.
7984
7985 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7986
7987         * lib/strftime.c (tzname): Don't declare if it is already #defined.
7988         Problem reported for Mingw by Mark Junker.
7989
7990 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7991
7992         * README: Gnulib normally doesn't generate a tarball.
7993
7994 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
7995
7996         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
7997         long int, not int, for nanosecond counts, so that people who are
7998         used to POSIX struct timespec won't be surprised.  Reported by Jim
7999         Meyering.
8000
8001 2005-12-28  Bruno Haible  <bruno@clisp.org>
8002
8003         * build-aux/config.rpath: Update from GNU gettext.
8004
8005 2005-12-16  Jim Meyering  <jim@meyering.net>
8006
8007         * modules/fprintftime: New module.
8008         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
8009
8010 2005-12-16  Jim Meyering  <jim@meyering.net>
8011
8012         * m4/fprintftime.m4: New file.
8013
8014 2005-12-16  Jim Meyering  <jim@meyering.net>
8015
8016         * lib/fprintftime.c, lib/fprintftime.h: New files.
8017
8018 2005-12-15  Simon Josefsson  <jas@extundo.com>
8019
8020         * modules/socklen (configure.ac): Fix M4 macro name, to align with
8021         new m4/socklen.m4.
8022
8023 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8024
8025         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
8026         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
8027
8028 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8029
8030         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
8031         * lib/argp-help.c (fill_in_uparams): Check if the constructed
8032         struct uparams is valid. Fall back to the default values if it is
8033         not.
8034
8035 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8036
8037         * modules/argp (Files): Add argp-pin.c
8038         (Depends-on): dirname
8039         (lib_SOURCES): Add argp-pin.c
8040
8041 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8042
8043         * m4/argp.m4:  Check if program_invocation_name and
8044         program_invocation_short_name are declared and define appropriate
8045         macros if they are not.
8046
8047 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8048
8049         * lib/argp-help.c (__argp_base_name): New function
8050         (__argp_short_program_name): Rewrite using __argp_base_name
8051         * lib/argp-namefrob.h: Define program_invocation_name and
8052         program_invocation_short_name if requested
8053         (__argp_base_name): Add prototype
8054         * lib/argp-parse.c (argp_def): Use gettext wrappers
8055         (argp_default_parser): Use __argp_base_name
8056         * lib/argp-pin.c: New file. Defines program_invocation_name and
8057         program_invocation_short_name on systems that lack them.
8058
8059 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8060
8061         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
8062         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8063         porting problem reported by Georg Schwarz in
8064         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8065
8066 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8067
8068         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
8069         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8070         porting problem reported by Georg Schwarz in
8071         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8072
8073 2005-12-05  Bruno Haible  <bruno@clisp.org>
8074
8075         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
8076         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
8077         Reported by Mark Junker <mjscod@gmx.de>.
8078
8079 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
8080
8081         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
8082         Use implementation from Albert Chin, with some
8083         comments/corrections by Stepan Kasal and myself.
8084
8085 2005-12-02  Bruno Haible  <bruno@clisp.org>
8086
8087         * gnulib-tool (func_import): Accept GPLed build tool modules when
8088         --lgpl is given.
8089         * modules/csharpcomp-script: New file.
8090         * modules/csharpcomp: Depend on it.
8091         * modules/javacomp-script: New file.
8092         * modules/javacomp: Depend on it.
8093         Suggested by Simon Josefsson.
8094
8095 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
8096
8097         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
8098         statement, to work around an HP-UX 10.20 compiler bug reported by
8099         Peter O'Gorman.
8100
8101 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8102
8103         * modules/savedir (Depends-on): Add openat.
8104
8105 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8106
8107         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
8108         (uintmax_t) [defined uintmax_t]: Do not declare.
8109         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
8110         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
8111         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
8112         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
8113         sake of portability to weird hosts that C allows (though we don't
8114         know of any practical examples).
8115
8116         * lib/savedir.h (fdsavedir): New decl.
8117         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
8118         contains most of the former guts of savedir.
8119         (savedir): Use savedirstream.
8120         Include "openat.h".
8121
8122 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
8123
8124         * modules/obstack (Files): Add m4/ulonglong.m4.
8125         Problem reported by Davide Angelocola.
8126
8127 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
8128
8129         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
8130         coreutils no longer futzes with rounding modes.
8131
8132 2005-11-14  Jim Meyering  <jim@meyering.net>
8133
8134         * lib/mkstemp-safer.c: Include <config.h>, required for possible
8135         replacement of mkstemp.
8136
8137 2005-11-10  Simon Josefsson  <jas@extundo.com>
8138
8139         * lib/readline.c: Remove EOL.
8140
8141 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8142
8143         * modules/gethrxtime (Depends-on): Add gettime.
8144
8145 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8146
8147         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
8148         or gettimeofday; no longer needed.
8149
8150 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8151
8152         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
8153         time business.
8154         (gethrxtime) [! (HAVE_NANOUPTIME
8155         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
8156         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
8157         our own approximation.
8158
8159 2005-11-08  Eric Blake  <ebb9@byu.net>
8160
8161         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
8162
8163 2005-11-08  Eric Blake  <ebb9@byu.net>
8164
8165         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
8166
8167 2005-11-04  Bruno Haible  <bruno@clisp.org>
8168
8169         * gnulib-tool: Implement --update mode.
8170
8171 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
8172
8173         Fix porting problem reported by Theodoros V. Kalamatianos.
8174         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
8175         Don't assume that futimes failing means we must fail.
8176
8177 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
8178
8179         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
8180         variables to suggest the intended function of the PATH_MAX check.
8181
8182 2005-10-30  Kean Johnston  <jkj@sco.com>
8183
8184         Trivial changes to support SCO systems.
8185         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
8186         as PATH_MAX.
8187         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
8188         where __ptr is null when no I/O is pending.
8189
8190 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
8191
8192         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
8193         leave errno alone.  Problem reported by Dmitry V. Levin.
8194
8195 2005-10-28  Simon Josefsson  <jas@extundo.com>
8196
8197         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
8198         Test more.
8199
8200         * tests/test-gc-md2.c, tests/test-md2.c: New files.
8201
8202         * modules/md2, modules/md2-tests: New files.
8203
8204 2005-10-28  Simon Josefsson  <jas@extundo.com>
8205
8206         * m4/inet_ntop.m4: More tests.
8207
8208         * m4/gc-md2.m4, md2.m4: New file.
8209
8210 2005-10-28  Simon Josefsson  <jas@extundo.com>
8211
8212         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
8213         "restrict" keywords, as per POSIX.  Protect the function
8214         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
8215         Don't use K&R prototypes.  Check the sprintf return values.
8216         Re-define EAFNOSUPPORT if not present.  Indent.
8217
8218         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
8219         suggested by Bruno Haible <bruno@clisp.org>.
8220
8221         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
8222
8223         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
8224
8225         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
8226         libgcrypt).
8227
8228         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
8229
8230         * lib/md2.h, lib/md2.c: New files.
8231
8232 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
8233
8234         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
8235         errno alone.  Problem reported by Frederic Jolliton.
8236
8237 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
8238
8239         * modules/verify (License): Change from GPL to LGPL.  This is a
8240         tiny module and there are apparently near-equivalents that are
8241         under the BSD license.
8242
8243 2005-10-24  Simon Josefsson  <jas@extundo.com>
8244
8245         * modules/sha1: Relicense to LGPL.
8246
8247 2005-10-24  Simon Josefsson  <jas@extundo.com>
8248
8249         * lib/md4.h: Shrink buffer size, now that we changed the type.
8250
8251 2005-10-23  Simon Josefsson  <jas@extundo.com>
8252
8253         * gnulib-tool (func_import): Fix --tests-base.
8254
8255 2005-10-22  Simon Josefsson  <jas@extundo.com>
8256
8257         * modules/arcfour (Depends-on): Need stdint.
8258
8259 2005-10-22  Simon Josefsson  <jas@extundo.com>
8260
8261         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
8262         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
8263
8264 2005-10-22  Simon Josefsson  <jas@extundo.com>
8265
8266         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
8267         suggested by Bruno Haible <bruno@clisp.org>.
8268
8269 2005-10-22  Simon Josefsson  <jas@extundo.com>
8270
8271         * lib/crc.h: Include stddef.h, for size_t.
8272
8273 2005-10-22  Simon Josefsson  <jas@extundo.com>
8274
8275         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
8276         arcfour_context struct (simplify test vector testing in GNU
8277         Shishi).
8278
8279 2005-10-21  Simon Josefsson  <jas@extundo.com>
8280
8281         * modules/des, modules/des-tests: New files.
8282
8283         * modules/gc-des, modules/gc-des-tests: New files.
8284
8285         * tests/test-des.c, tests/test-gc-des.c: New file.
8286
8287 2005-10-21  Simon Josefsson  <jas@extundo.com>
8288
8289         * modules/arctwo, modules/arctwo-tests: New files.
8290
8291         * tests/test-arctwo.c: New file.
8292
8293         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
8294
8295         * tests/test-gc-arctwo.c: New file.
8296
8297 2005-10-21  Simon Josefsson  <jas@extundo.com>
8298
8299         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
8300         Bruno Haible <bruno@clisp.org>.
8301
8302         * m4/gc-des.m4: New file.
8303
8304 2005-10-21  Simon Josefsson  <jas@extundo.com>
8305
8306         * m4/arctwo.m4: New file.
8307
8308         * m4/gc-arctwo.m4: New file.
8309
8310 2005-10-21  Simon Josefsson  <jas@extundo.com>
8311
8312         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
8313         block.
8314
8315 2005-10-21  Simon Josefsson  <jas@extundo.com>
8316
8317         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
8318         <bruno@clisp.org>.
8319
8320         * lib/hmac-sha1.c (hmac_sha1): Likewise.
8321
8322         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
8323         Bruno Haible <bruno@clisp.org>.
8324
8325         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
8326         <bruno@clisp.org>.
8327
8328 2005-10-21  Simon Josefsson  <jas@extundo.com>
8329
8330         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
8331
8332 2005-10-21  Simon Josefsson  <jas@extundo.com>
8333
8334         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
8335
8336 2005-10-21  Simon Josefsson  <jas@extundo.com>
8337
8338         * lib/des.h, lib/des.c: New files.
8339
8340         * lib/gc-gnulib.c: Support DES.c
8341
8342 2005-10-21  Simon Josefsson  <jas@extundo.com>
8343
8344         * lib/arctwo.h, lib/arctwo.c: New files.
8345
8346         * lib/gc-gnulib.c: Support ARCTWO.
8347
8348 2005-10-21  Simon Josefsson  <jas@extundo.com>
8349
8350         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
8351         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8352
8353 2005-10-21  Simon Josefsson  <jas@extundo.com>
8354
8355         * gnulib-tool (func_import, func_create_testdir): Define automake
8356         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
8357         Makefile.am snippet),
8358         suggested by Bruno Haible <bruno@clisp.org>.
8359
8360         * modules/gc (Makefile.am): Use it.
8361
8362 2005-10-21  Bruno Haible  <bruno@clisp.org>
8363
8364         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
8365         patch.
8366
8367 2005-10-19  Simon Josefsson  <jas@extundo.com>
8368
8369         * tests/test-gc-rijndael.c: New file.
8370
8371         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
8372
8373 2005-10-19  Simon Josefsson  <jas@extundo.com>
8374
8375         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
8376         interface too.
8377
8378 2005-10-19  Simon Josefsson  <jas@extundo.com>
8379
8380         * tests/test-gc-arcfour.c: New file.
8381
8382         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
8383
8384 2005-10-19  Simon Josefsson  <jas@extundo.com>
8385
8386         * modules/gc-md4, modules/gc-md4-tests: New file.
8387
8388         * tests/test-gc-md4.c: New file.
8389
8390 2005-10-19  Simon Josefsson  <jas@extundo.com>
8391
8392         * m4/gc-md4.m4: New file.
8393
8394 2005-10-19  Simon Josefsson  <jas@extundo.com>
8395
8396         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
8397         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
8398         <kasal@ucw.cz>.
8399
8400 2005-10-19  Simon Josefsson  <jas@extundo.com>
8401
8402         * m4/gc-arcfour.m4: New file.
8403
8404         * m4/gc-rijndael.m4: New file.
8405
8406 2005-10-19  Simon Josefsson  <jas@extundo.com>
8407
8408         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
8409
8410 2005-10-19  Simon Josefsson  <jas@extundo.com>
8411
8412         * lib/gc-gnulib.c: Support ARCFOUR.
8413
8414 2005-10-19  Simon Josefsson  <jas@extundo.com>
8415
8416         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
8417         support.
8418
8419         * lib/gc.h: Add ECB enum type.
8420
8421         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
8422
8423 2005-10-18  Simon Josefsson  <jas@extundo.com>
8424
8425         * tests/test-md5.c: New file.
8426
8427         * modules/md5-tests: New file.
8428
8429 2005-10-18  Simon Josefsson  <jas@extundo.com>
8430
8431         * tests/test-md4.c: New file.
8432
8433         * modules/md4, modules/md4-tests: New files.
8434
8435 2005-10-18  Simon Josefsson  <jas@extundo.com>
8436
8437         * m4/md4.m4: New file.
8438
8439 2005-10-18  Simon Josefsson  <jas@extundo.com>
8440
8441         * lib/md4.h, lib/md4.c: New files, based on md5.?.
8442
8443 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
8444
8445         * gnulib-tool (func_create_testdir): Omit the second check whether
8446         BUILT_SOURCES in nonempty.
8447
8448 2005-10-17  Simon Josefsson  <jas@extundo.com>
8449
8450         * tests/test-rijndael.c: New file.
8451
8452 2005-10-17  Simon Josefsson  <jas@extundo.com>
8453
8454         * modules/sha1: Depend on stdint instead of md5.
8455
8456         * modules/md5: Depend on stdint, remove uint32_t.
8457
8458 2005-10-17  Simon Josefsson  <jas@extundo.com>
8459
8460         * modules/gc-sha1-tests: New file.
8461
8462         * tests/test-gc-sha1.c: New file.
8463
8464 2005-10-17  Simon Josefsson  <jas@extundo.com>
8465
8466         * m4/md5.m4: Remove call to uint32_t.m4.
8467
8468 2005-10-17  Simon Josefsson  <jas@extundo.com>
8469
8470         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
8471
8472         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
8473         md5.h.
8474
8475         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
8476
8477         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
8478
8479 2005-10-17  Simon Josefsson  <jas@extundo.com>
8480
8481         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
8482
8483 2005-10-17  Simon Josefsson  <jas@extundo.com>
8484
8485         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
8486
8487 2005-10-17  Simon Josefsson  <jas@extundo.com>
8488
8489         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
8490
8491         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
8492
8493 2005-10-17  Bruno Haible  <bruno@clisp.org>
8494
8495         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
8496         that it can also be used in a test.
8497
8498 2005-10-16  Bruno Haible  <bruno@clisp.org>
8499
8500         * gnulib-tool (func_emit_tests_Makefile_am): Also define
8501         TESTS_ENVIRONMENT, so that individual tests can augment it.
8502
8503         * gnulib-tool (func_create_testdir): Use an intermediate target for
8504         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
8505         macros, like $(ALLOCA_H), which cannot be passed through the command
8506         line.
8507
8508 2005-10-15  Simon Josefsson  <jas@extundo.com>
8509
8510         * modules/rijndael-tests: New file.
8511
8512         * modules/rijndael: New file.
8513
8514 2005-10-15  Simon Josefsson  <jas@extundo.com>
8515
8516         * m4/rijndael.m4: New file.
8517
8518 2005-10-15  Simon Josefsson  <jas@extundo.com>
8519
8520         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
8521
8522         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
8523
8524 2005-10-14  Simon Josefsson  <jas@extundo.com>
8525
8526         * tests/test-arcfour.c: New file.
8527
8528         * modules/arcfour, modules/arcfour-tests: New files.
8529
8530 2005-10-14  Simon Josefsson  <jas@extundo.com>
8531
8532         * m4/arcfour.m4: New file.
8533
8534 2005-10-14  Simon Josefsson  <jas@extundo.com>
8535
8536         * lib/arcfour.h, lib/arcfour.c: New files.
8537
8538 2005-10-14  Roland McGrath  <roland@redhat.com>
8539
8540         Import from libc.  [BZ #1331]
8541         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
8542         macro argument.
8543         Reported by Matej Vela <vela@debian.org>.
8544
8545 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
8546
8547         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
8548         include <wchar.h>; no longer needed.
8549
8550 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
8551
8552         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
8553
8554 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
8555         and  Ulrich Drepper  <drepper@redhat.com>
8556
8557         Import from libc.
8558         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
8559         instead of inline stream orientation test and two separate
8560         function calls.  Pay no attention to USE_IN_LIBIO.
8561
8562 2005-10-13  Simon Josefsson  <jas@extundo.com>
8563
8564         * modules/gc-hmac-md5-tests: New file.
8565
8566         * tests/test-gc-hmac-sha1.c: New file.
8567
8568         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
8569
8570         * modules/gc-hmac-md5-tests: New file.
8571
8572         * tests/test-gc-md5.c: New file.
8573
8574         * modules/gc-md5-tests: New file.
8575
8576 2005-10-13  Simon Josefsson  <jas@extundo.com>
8577
8578         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
8579         Move memory allocation outside of loop.
8580
8581 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
8582
8583         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
8584         intermediate directory is in a read-only file system.  Problem
8585         reported by Eric Blake.
8586
8587 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
8588
8589         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
8590
8591 2005-10-12  Simon Josefsson  <jas@extundo.com>
8592
8593         * tests/test-hmac-sha1.c: New file.
8594
8595         * modules/hmac-sha1-tests: New file.
8596
8597         * modules/hmac-sha1: New file.
8598
8599 2005-10-12  Simon Josefsson  <jas@extundo.com>
8600
8601         * modules/gc-sha1: New file.
8602
8603 2005-10-12  Simon Josefsson  <jas@extundo.com>
8604
8605         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
8606
8607         * tests/test-gc-pbkdf2-sha1.c: New file.
8608
8609 2005-10-12  Simon Josefsson  <jas@extundo.com>
8610
8611         * modules/gc-md5, modules/gc-hmac-md5: New files.
8612
8613         * modules/gc (Files): Remove md5, memxor and hmac files.
8614
8615 2005-10-12  Simon Josefsson  <jas@extundo.com>
8616
8617         * m4/gc-pbkdf2-sha1.m4: New file.
8618
8619         * m4/gc-hmac-sha1.m4: New file.
8620
8621         * m4/gc-sha1: New file.
8622
8623         * m4/hmac-sha1.m4: New file.
8624
8625 2005-10-12  Simon Josefsson  <jas@extundo.com>
8626
8627         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
8628
8629         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
8630
8631 2005-10-12  Simon Josefsson  <jas@extundo.com>
8632
8633         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
8634         suggested by Bruno Haible <bruno@clisp.org>.
8635
8636 2005-10-12  Simon Josefsson  <jas@extundo.com>
8637
8638         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
8639
8640 2005-10-12  Simon Josefsson  <jas@extundo.com>
8641
8642         * lib/gc-pbkdf2-sha1.c: New file.
8643
8644         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
8645
8646 2005-10-12  Simon Josefsson  <jas@extundo.com>
8647
8648         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
8649
8650         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
8651
8652 2005-10-12  Simon Josefsson  <jas@extundo.com>
8653
8654         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
8655         GC_USE_HMAC_MD5, respectively.
8656
8657         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
8658         (gc_md5): Fix typo.
8659
8660         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
8661
8662         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
8663
8664         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
8665
8666 2005-10-12  Bruno Haible  <bruno@clisp.org>
8667
8668         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
8669         Reported by Stepan Kasal <kasal@ucw.cz>.
8670
8671 2005-10-11  Simon Josefsson  <jas@extundo.com>
8672
8673         * tests/test-crc.c: New file.
8674
8675         * modules/crc, modules/crc-tests: New files.
8676
8677 2005-10-11  Simon Josefsson  <jas@extundo.com>
8678
8679         * m4/crc.m4: New file.
8680
8681 2005-10-11  Simon Josefsson  <jas@extundo.com>
8682
8683         * lib/gc.h: Add gc_hash and gc_hash_buffer.
8684
8685         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
8686
8687         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
8688
8689 2005-10-11  Simon Josefsson  <jas@extundo.com>
8690
8691         * lib/crc.h, lib/crc.c: New files.
8692
8693         * lib/gc.h (gc_hash_buffer): Add doc.
8694
8695 2005-10-11  Bruno Haible  <bruno@clisp.org>
8696
8697         * modules/c-strcasestr: New file.
8698         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
8699
8700 2005-10-11  Bruno Haible  <bruno@clisp.org>
8701
8702         * modules/c-strcase: New file.
8703         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
8704
8705 2005-10-11  Bruno Haible  <bruno@clisp.org>
8706
8707         * lib/strcasecmp.c: Include limits.h.
8708         (strcasecmp): Avoid integer overflow on exotic platforms.
8709         * lib/strncasecmp.c: Include limits.h.
8710         (strncasecmp): Avoid integer overflow on exotic platforms.
8711         Reported by Paul Eggert.
8712
8713 2005-10-11  Bruno Haible  <bruno@clisp.org>
8714
8715         * lib/c-strcasestr.h: New file, from GNU gettext.
8716         * lib/c-strcasestr.c: New file, from GNU gettext.
8717
8718 2005-10-11  Bruno Haible  <bruno@clisp.org>
8719
8720         * lib/c-strcase.h: New file, from GNU gettext.
8721         * lib/c-strcasecmp.c: New file, from GNU gettext.
8722         * lib/c-strncasecmp.c: New file, from GNU gettext.
8723
8724 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
8725
8726         * modules/mempcpy (License): GPL -> LGPL.
8727         * modules/strchrnul (License): Likewise.
8728         * modules/sysexits (License): Likewise.
8729
8730 2005-10-08  Simon Josefsson  <jas@extundo.com>
8731
8732         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
8733
8734 2005-10-07  Simon Josefsson  <jas@extundo.com>
8735
8736         * m4/memxor.m4: Remove gl_C_RESTRICT call.
8737
8738 2005-10-06  Simon Josefsson  <jas@extundo.com>
8739
8740         * tests/test-hmac-md5.c: New file.
8741
8742         * modules/hmac-md5-tests: New file.
8743
8744         * modules/hmac-md5: New file.
8745
8746 2005-10-06  Simon Josefsson  <jas@extundo.com>
8747
8748         * m4/hmac-md5.m4: New file.
8749
8750         * m4/memxor.m4: Require gl_C_RESTRICT.
8751
8752 2005-10-06  Simon Josefsson  <jas@extundo.com>
8753
8754         * lib/memxor.c (memxor): Avoid casts and warnings.
8755
8756 2005-10-06  Simon Josefsson  <jas@extundo.com>
8757
8758         * lib/hmac-md5.c: New file.
8759
8760         * lib/hmac.h: New file.
8761
8762 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
8763
8764         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
8765         promotes to int, not unsigned int, to catch the AIX 5.3
8766         compiler bug.
8767
8768 2005-10-05  Simon Josefsson  <jas@extundo.com>
8769
8770         * modules/memxor: New file.
8771
8772         * modules/iconv (Files): Move config.rpath to havelib, it is used
8773         there.
8774
8775         * modules/havelib (Files): Add config.rpath.
8776
8777 2005-10-05  Simon Josefsson  <jas@extundo.com>
8778
8779         * m4/memxor.m4: New file.
8780
8781 2005-10-05  Simon Josefsson  <jas@extundo.com>
8782
8783         * lib/memxor.c (memxor): Fix compiler error.
8784
8785         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
8786         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
8787
8788         * lib/memxor.h, lib/memxor.c: New files.
8789
8790         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
8791         we assume all systems have it, suggested by Jim Meyering
8792         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
8793         any systems lack sys/socket.h; mingw32 is known to lack it, but we
8794         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
8795         same reasons.
8796
8797 2005-10-05  Simon Josefsson  <jas@extundo.com>
8798
8799         * config/srclist.txt: Add glibc bug 1423 for md5.h.
8800
8801 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
8802
8803         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
8804         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
8805         needed, since the source code now assumes these .h files.
8806
8807 2005-10-05  Derek Price  <derek@ximbiot.com>
8808
8809         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
8810
8811 2005-10-05  Bruno Haible  <bruno@clisp.org>
8812
8813         * modules/stdint (License): Change to LGPL.
8814
8815 2005-10-04  Simon Josefsson  <jas@extundo.com>
8816
8817         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
8818         D. Baushke" <mdb@gnu.org>.
8819
8820 2005-10-04  Bruno Haible  <bruno@clisp.org>
8821
8822         * lib/verify.h (verify_true): Provide alternative definition for C++.
8823
8824 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
8825
8826         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
8827         (SSIZE_MAX): New macro, if not already defined.
8828         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
8829         than 2 GiB.
8830
8831 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8832
8833         Sync from coreutils.
8834         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
8835         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
8836         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
8837         ULLONG_MAX doesn't work with 2.7.2.1.
8838
8839 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8840
8841         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
8842         From Ben Pfaff.
8843
8844         * modules/exclude (Depends-on): Depend on verify.
8845         * modules/strtoimax (Depends-on): Likewise.
8846         * modules/utimecmp (Depends-on): Likewise.
8847
8848 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8849
8850         * lib/exclude.c: Include verify.h.
8851         (verify): Remove.  All callers changed to use verify.h's version.
8852         * lib/strtoimax.c: Likewise.
8853         * lib/utimecmp.c: Likewis.e
8854
8855         Sync from coreutils.
8856         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
8857         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
8858         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
8859         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
8860         bother returning ENOSYS if settimeofday or stime fails; just let
8861         them return whatever errno they want to return.
8862         * lib/utimens.c: Include unistd.h, for dup2.
8863         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
8864         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
8865
8866 2005-10-02  Jim Meyering  <jim@meyering.net>
8867
8868         Sync from coreutils.
8869         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
8870         from glibc-2.2.5 that fails for read-only files.
8871
8872 2005-10-02  Jim Meyering  <jim@meyering.net>
8873
8874         Sync from coreutils.
8875         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
8876         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
8877         `#if HAVE_CONFIG_H'.
8878         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
8879         Remove AT_FDCWD test.
8880         Do not consume the fd unless successful.
8881         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
8882         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
8883         block, so that we don't even try to compile it if settimeofday is
8884         available.  This works around a compilation failure on OSF1 V5.1,
8885         due to stime requiring a `long int*' while tv_sec is `int'.
8886
8887 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
8888
8889         Sync from coreutils.
8890         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
8891         against `yes', rather than just testing for nonempty.
8892
8893 2005-10-01  Simon Josefsson  <jas@extundo.com>
8894
8895         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
8896         and Darwin.
8897
8898         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
8899         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
8900         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
8901         freeaddrinfo and gai_strerror are declared by the POSIX headers.
8902         Check if struct addrinfo is declared.
8903
8904 2005-10-01  Simon Josefsson  <jas@extundo.com>
8905
8906         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
8907         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
8908         AI_* and EAI_* definitions.  Protect function declarations.
8909
8910 2005-10-01  Jim Meyering  <jim@meyering.net>
8911
8912         Sync from coreutils.
8913
8914         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
8915         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
8916         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
8917         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8918         in the inet and nsl libraries.  Required on Solaris 5.7.
8919
8920 2005-10-01  Jim Meyering  <jim@meyering.net>
8921
8922         Sync from coreutils.
8923         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8924         in the inet and nsl libraries.  Required on Solaris 5.7.
8925
8926 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
8927
8928         * lib/getdelim.c (getdelim): Remove unused variables.
8929
8930 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
8931
8932         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
8933         so that the code works even with ancient cpp.  Portability problem
8934         with GCC 2.7.2.1 reported by Thomas M.Ott.
8935
8936 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
8937
8938         * modules/regex (Depends-on): Add strcase.
8939
8940         * modules/gethostname (Licence): Change from GPL to LGPL, since
8941         gethostname.c is a trivial implementation of a standard library
8942         function.
8943         * modules/poll (License): Change from GPL to LGPL, since it's
8944         derived from LGPL code.
8945
8946 2005-09-27  Jim Meyering  <jim@meyering.net>
8947
8948         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
8949         HAVE_CONFIG_H.
8950
8951         * lib/intprops.h (signed_type_or_expr__): Define.
8952         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
8953         for unsigned types.
8954
8955 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
8956
8957         * lib/verify.h (verify_expr): Remove, replacing with:
8958         (verify_true): New macro that returns true instead of void.
8959         (verify_type__): Remove.
8960         (verify): Use verify_true rather than verify_type__.
8961
8962 2005-09-26  Bruno Haible  <bruno@clisp.org>
8963
8964         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
8965         is necessary.
8966         (lib_SOURCES): Remove mbchar.c.
8967         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
8968         (Files): Add m4/mbrtowc.m4.
8969         * modules/mbiter: Likewise.
8970         * modules/mbuiter: Likewise.
8971
8972 2005-09-26  Bruno Haible  <bruno@clisp.org>
8973
8974         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
8975         compile mbchar.c if they are not both present.
8976         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
8977         * m4/mbiter.m4 (gl_MBITER): Likewise.
8978         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
8979         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
8980         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
8981
8982 2005-09-25  Jim Meyering  <jim@meyering.net>
8983
8984         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
8985         also uses socklen_t.
8986
8987 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
8988
8989         * lib/utimens.c (ENOSYS): Define if not already defined.
8990         (futimens): Support having a null PATH if the file descriptor
8991         is nonnegative.
8992
8993         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
8994         Remove.
8995         (__attribute): Define to empty unless GCC 3.1 or later.
8996         This works around a core dump on OpenBSD 3.4, which has GCC
8997         2.95.3, which dumps core when given __attribute__(()).  It also
8998         simplifies other tests, since we really don't want to bother with
8999         worrying about which ancient version of GCC supported what.
9000         Original problem reported by Yoann Vandoorselaere, with part of
9001         the fix suggested by Derek Price.
9002
9003 2005-09-24  Jim Meyering  <jim@meyering.net>
9004
9005         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
9006         so we can once again use a positive bitfield width of 1 -- now we
9007         don't have to explain why we were using a bitfield width of 2.
9008
9009 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
9010
9011         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
9012         and similarly for the other external symbols.  Problem reported
9013         by James Gallager.
9014
9015         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
9016         bug reported by Jim Meyering.
9017
9018         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
9019         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
9020         not needed, since socklen is a prerequisite module.
9021
9022 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
9023
9024         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
9025         Problem reported by Eric Blake.
9026         (getaddrinfo): Initialize se so that it's not garbage.
9027         Redo internal storage allocation so that it doesn't make unportable
9028         assumptions about alignment.
9029         Fix a memory leak.
9030
9031         * lib/utimens.c (futimens): Use futimesat if available.
9032         Prefer it to futimes since it doesn't have the futimes bug.
9033
9034         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
9035         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
9036         Instead, declare a function that returns a pointer to an array,
9037         and use verify_type__ to declare the size of the array.
9038         Problem and germ of a solution reported by Bruno Haible.
9039         (verify_type__): Use 2, not 1, for bitfield size, to avoid
9040         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
9041
9042 2005-09-23  Jim Meyering  <jim@meyering.net>
9043
9044         Sync from coreutils.
9045         Correct build failure (socklen_t not defined) on at least
9046         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
9047         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
9048
9049 2005-09-23  Jim Meyering  <jim@meyering.net>
9050
9051         * modules/getaddrinfo (Depends-on): Add socklen.
9052
9053 2005-09-23  Bruno Haible  <bruno@clisp.org>
9054
9055         * tests/test-verify.c: New file.
9056
9057 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9058
9059         Sync from coreutils.
9060
9061         * modules/argmatch (Depends-on): Add verify.
9062         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
9063         unistd-safer.
9064         * modules/save-cwd (Depends-on): Likewise.
9065
9066         * modules/openat (Files): Add lib/openat-die.c.
9067         (Depends-on): Remove error, exitfail.
9068         Add dirname.
9069
9070         * modules/verify: New file.
9071         * MODULES.html.sh (Diagnostics <assert.h>): New section,
9072         with "verify" module.
9073
9074 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9075
9076         Sync from coreutils.
9077
9078         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
9079         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
9080         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
9081         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
9082         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
9083         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
9084         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
9085         Don't bother checking for string.h, stdlib.h, unistd.h.
9086         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
9087         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
9088         module's job.
9089         * m4/jm-macros.m4 (gl_MACROS): Likewise.
9090         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
9091
9092         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
9093         (gl_GETDATE): Use it.
9094
9095         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
9096
9097 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9098
9099         Sync from coreutils.
9100
9101         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
9102         stat-time.h.
9103         * lib/argmatch.h: Include verify.h
9104         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
9105         (ARGMATCH_ASSERT): Remove; unused.
9106         * lib/canonicalize.c: Assume STDC_HEADERS.
9107         * lib/exclude.c: Include "strcase.h".
9108         * lib/regex_internal.h [!defined _LIBC]: Likewise.
9109         * lib/getusershell.c: Include stdio--.h rather than stdio.h
9110         and stdio-safer.h.
9111         (getusershell): Call fopen, not fopen_safer.
9112         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
9113         Do not include unistd-safer.h.
9114         (save_cwd): Don't call fd_safer; no longer needed
9115         now that we include fcntl--.h.
9116
9117         * lib/getdate.y (relative_time): New type.
9118         (RELATIVE_TIME_0): New constant.
9119         (parser_control): Use relative_time instead of doing it ourselves.
9120         (%union): Add new relative_time rel member.
9121         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
9122         Now typeless.
9123         (relunit, relunit_snumber): Now of type rel.
9124         (zone, rel, relunit, get_date): Adjust to above changes.
9125
9126         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
9127         Do not include unistd-safer.h.
9128         (getloadavg): Don't call fd_safer; no longer needed
9129         now that we include fcntl--.h.
9130
9131         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
9132         (make_dir_parents): Treat ENOSYS like EEXIST.
9133
9134         Improve quality of diagnostics on restore_cwd failure.
9135         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
9136         (make_dir_parents): Last arg is now int * (for errno), not bool *.
9137         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
9138         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
9139         each time through the loop.  Do not diagnose restore_cwd failure;
9140         that is the caller's job (and perhaps the caller does not care).
9141
9142         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
9143         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
9144         If the file already exists but is not a directory, don't bother
9145         to try to make its parents.
9146         Close potential file descriptor leak if we can't chdir("/") (!).
9147         Don't always return true if chdir($PWD) fails; return true only
9148         if the requested action was done successfully (except for the
9149         chdir($PWD)).
9150         Don't log final directory unless we actually made it.
9151         Refactor to avoid duplicate code to fix up permissions.
9152         Don't attempt to fix up parent permissions if chdir($PWD) fails.
9153
9154         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
9155         to make it a bit faster and (I hope) clearer.
9156         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
9157         Fix bug in formats like %2N.
9158
9159         * lib/verify.h: New file.
9160
9161 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9162
9163         Sync from coreutils.
9164         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
9165
9166 2005-09-22  Jim Meyering  <jim@meyering.net>
9167
9168         Sync from coreutils.
9169
9170         * m4/lstat.m4 (gl_FUNC_LSTAT):
9171         Use AC_LIBSOURCES to require lstat.c and lstat.h.
9172         Remove obsolete comment.
9173         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
9174         * m4/xstrtod.m4: Likewise.
9175
9176         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
9177
9178 2005-09-22  Jim Meyering  <jim@meyering.net>
9179
9180         Sync from coreutils.
9181
9182         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
9183
9184         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
9185         the .tm_year member, since otherwise gcc-4.0 would now warn about
9186         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
9187
9188         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
9189         order to avoid an unsuppressible warning from gcc on 64-bit systems.
9190
9191         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
9192         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
9193         when run in a time zone for which daylight savings time is in effect
9194         for the starting date.
9195
9196         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
9197         stop us from restricting permissions of just-created absolute-named
9198         directories.
9199         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
9200         to restore initial working directory.
9201         * lib/mkdir-p.c (make_dir_parents): New parameter:
9202         different_working_dir, to tell caller if/when we change the working
9203         directory and are unable to return to the initial one.
9204         * lib/mkdir-p.h (make_dir_parents): Update prototype.
9205         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
9206         `return false'.  This fixes a bug introduced on 2004-07-30.
9207
9208         * lib/openat.c (fdopendir): Be sure to close the supplied
9209         file descriptor before returning.  This makes our replacement
9210         implementation a little closer to Solaris's, where fdopendir
9211         ties the file descriptor to the returned DIR* pointer.
9212         * lib/openat.c (unlinkat): New function.
9213         * lib/openat.h (unlinkat): Add prototype.
9214         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
9215         (openat_restore_fail): Rename from openat_restore_die.
9216         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
9217
9218         Provide an alternative to exiting immediately upon save_cwd or
9219         restore_cwd failure.  Now, an application can arrange e.g.,
9220         to perform a longjump in that case.
9221         * lib/openat.c: Include dirname.h.
9222         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
9223         (rpl_openat, fdopendir, fstatat): Call openat_save_die
9224         and openat_restore_die rather than calling error directly.
9225         Don't include "error.h" or "exitfail.h"; they're no longer needed.
9226
9227         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
9228         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
9229         define.
9230
9231         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
9232         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
9233                             int utc, int nanoseconds);
9234         Background:
9235         date should not have to allocate a megabyte of virtual memory to
9236         handle a format argument like +%1048575T.  When implemented with
9237         strftime, it must allocate such a buffer, use strftime to fill it
9238         in, print it, then free it.
9239         With fprintftime, it simply prints everything and exits.
9240         With no need for memory allocation, that's one fewer way to fail.
9241         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
9242         optional field width, not before, so we accept %9:z, not %:9z.
9243         (my_strftime): Be sure to use L_('x') for literals.
9244
9245         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
9246         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
9247         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
9248         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
9249         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
9250         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
9251         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
9252         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
9253         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
9254         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
9255         * lib/xgethostname.c, lib/xreadlink.c:
9256         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
9257
9258         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
9259         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
9260         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
9261         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
9262         and don't include <sys/file.h>).
9263
9264 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
9265
9266         Sync from coreutils.
9267
9268         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
9269         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
9270         [!LDAV_DONE]: Avoid unused variable warning.
9271
9272 2005-09-21  Bruno Haible  <bruno@clisp.org>
9273
9274         * lib/unicodeio.h (unicode_to_mb): New declaration.
9275
9276 2005-09-20  Derek Price  <derek@ximbiot.com>
9277
9278         * lib/getaddrinfo.c: Don't include <netdb.h> included from
9279         getaddrinfo.h.
9280
9281 2005-09-20  Bruno Haible  <bruno@clisp.org>
9282
9283         * gnulib-tool: Remove trailing slashes from the values specified for
9284         --source-base, --m4-base, --tests-base, --aux-dir.
9285         Suggested by Simon Josefsson <jas@extundo.com>.
9286
9287 2005-09-20  Bruno Haible  <bruno@clisp.org>
9288
9289         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
9290         func_modules_to_filelist, func_import, func_create_testdir): Make all
9291         sorting results locale-independent, so that gnulib-cache.m4 doesn't
9292         change when gnulib-tool is invoked in a different locale.
9293
9294 2005-09-19  Simon Josefsson  <jas@extundo.com>
9295
9296         * m4/socklen.m4: Fix typo.
9297
9298 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9299
9300         Use a consistent style for including <config.h>.
9301         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
9302         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
9303         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
9304         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
9305         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
9306         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
9307         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
9308         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
9309         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
9310         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
9311         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
9312         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
9313         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
9314         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
9315         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
9316         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
9317         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
9318         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
9319         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
9320         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
9321         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
9322         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
9323         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
9324         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
9325         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
9326         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
9327         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
9328         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
9329         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
9330         lib/xstrtoumax.c, lib/yesno.c:
9331         Standardize inclusion of config.h.
9332         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
9333         lib/inttostr.h:  Removed inclusion of config.h from header files.
9334         * lib/inttostr.c:  Adjusted in-tree users.
9335         * lib/timespec.h: Remove superfluous warning to include config.h.
9336         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
9337         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
9338         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
9339         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
9340         config.h with HAVE_CONFIG_H.
9341
9342 2005-09-19  Jim Meyering  <jim@meyering.net>
9343
9344         * modules/pathmax (License): Change to LGPL.
9345
9346 2005-09-19  Derek Price  <derek@ximbiot.com>
9347
9348         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
9349
9350 2005-09-19  Bruno Haible  <bruno@clisp.org>
9351
9352         * gnulib-tool (import): Provide default for --tests-base.
9353
9354 2005-09-19  Bruno Haible  <bruno@clisp.org>
9355
9356         * doc/quote.texi: New file, extracted from gnulib.texi.
9357         * doc/ctime.texi: New file, extracted from gnulib.texi.
9358         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
9359         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
9360         * doc/gnulib.texi: Include them.
9361
9362 2005-09-18  Bruno Haible  <bruno@clisp.org>
9363
9364         Portability fix.
9365         * gnulib-tool (func_readlink): New function.
9366         (func_ln_if_changed): Use it.
9367
9368 2005-09-18  Bruno Haible  <bruno@clisp.org>
9369
9370         * gnulib-tool: Support --with-tests also with --import.
9371         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
9372         (func_import): Use variables $testsbase and $inctests. Emit a
9373         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
9374         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
9375         SUBDIRS += $testsdir.
9376         (func_create_testdir): Update.
9377
9378 2005-09-18  Bruno Haible  <bruno@clisp.org>
9379
9380         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
9381         instead of $dry_run.
9382         (func_cp_if_changed, func_mv_if_changed): Remove functions.
9383         (func_ln_if_changed): Don't handle dry-run here.
9384         (func_import): In dry-run mode, detect more precisely which actions
9385         would be performed, and don't use "...ing" verbs.
9386
9387 2005-09-18  Bruno Haible  <bruno@clisp.org>
9388
9389         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
9390         (func_import): Use join on two temporary files instead of three nested
9391         loops, in order to determine which files are new or old.
9392
9393 2005-09-18  Bruno Haible  <bruno@clisp.org>
9394
9395         * gnulib-tool (func_import): Comment out code that spits out the
9396         new files with --dry-run.
9397
9398 2005-09-18  Bruno Haible  <bruno@clisp.org>
9399
9400         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
9401
9402 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9403
9404         * lib/stat-time.h: New file.
9405         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
9406         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
9407         in a different way.
9408         (timespec_cmp): New function.
9409         * lib/utimecmp.c: Include stat-time.h.
9410         (SYSCALL_RESOLUTION): Depend on whether various struct stat
9411         members exist, not on the obsolescent ST_MTIM_NSEC.
9412         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
9413
9414 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9415
9416         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
9417
9418 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9419
9420         * MODULES.html.sh (File system functions): Add stat-time.
9421         * modules/stat-time: New file.
9422         * modules/timespec (Files): Remove m4/st_mtim.m4; this
9423         is now done in a different way, by the stat-time module.
9424         * modules/utimecmp (Depends-on): Add stat-time.
9425
9426 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
9427
9428         * m4/st_mtim.m4: Remove.  Superseded by...
9429         * m4/stat-time.m4: New file.
9430         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
9431         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
9432
9433 2005-09-15  Derek Price  <derek@ximbiot.com>
9434
9435         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
9436
9437 2005-09-15  Derek Price  <derek@ximbiot.com>
9438
9439         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
9440         * lib/regex_internal.c: Ditto, using this...
9441         (__GNUC_PREREQ): ...new macro.
9442         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
9443         using...
9444         (__GNUC_PREREQ): ...this new macro.
9445
9446         * lib/strstr.h: Include string.h. Define strstr as a macro here.
9447
9448 2005-09-15  Derek Price  <derek@ximbiot.com>
9449             Paul Eggert  <eggert@cs.ucla.edu>
9450
9451         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
9452         changes, consolidating in...
9453         * lib/regex_internal.h: ...this file.
9454
9455 2005-09-13  Jim Meyering  <jim@meyering.net>
9456
9457         * lib/canon-host.c: Filter through gnu indent and reword comments
9458         slightly.
9459         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
9460
9461 2005-09-13  Derek Price  <derek@ximbiot.com>
9462
9463         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
9464         failure.
9465         Reported by Jim Meyering  <jim@meyering.net>.
9466
9467 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9468
9469         * lib/base64.c: Typo.
9470         (base64_encode): Put b64str in initialized data section.
9471
9472 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
9473
9474         Merge glibc and coreutils changes into gnulib, plus a few
9475         extra fixes.
9476         * lib/md5.c: Use #error rather than a string.
9477         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
9478         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
9479         (__attribute__): Define to empty for non recent-GCC.
9480         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
9481         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
9482         Renamed from their non-__ counterparts, with new macros replacing
9483         them if not _LIBC.  Add __THROW attribute.
9484         (rol): Remove.
9485         (struct md5_ctx): Align buffer if using GCC.
9486         * lib/sha1.h (struct sha1_ctx): Likewise.
9487         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
9488         The old name was backwards.
9489         (NOTSWAP): Remove; not used.
9490         (rol): New macro, moved here from md5.h.
9491         (sha1_process_block): Remove a FIXME that doesn't make sense.
9492
9493 2005-09-12  Derek Price  <derek@ximbiot.com>
9494
9495         Return usable errors from canon-host.
9496         * lib/canon-host.h: New file.
9497         * lib/canon-host.c (canon_host): Wrap...
9498         (canon_host_r): ...this new function, which now relies exclusively on
9499         getaddrinfo.
9500         (ch_strerror): New function.
9501         (last_cherror): New global.
9502         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
9503         interface.
9504         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
9505         void *.
9506         (freeaddrinfo): Free ai->ai_canonname when set.
9507
9508 2005-09-12  Derek Price  <derek@ximbiot.com>
9509
9510         Make canon-host require getaddrinfo.
9511         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
9512         AC_LIBSOURCE canon-host.h.  Call...
9513         (gl_PREREQ_CANON_HOST): ...this new function, which requires
9514         gl_GETADDRINFO.
9515         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
9516
9517 2005-09-12  Derek Price  <derek@ximbiot.com>
9518
9519         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
9520         LGPL.
9521         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
9522
9523 2005-09-12  Derek Price  <derek@ximbiot.com>
9524
9525         * lib/gai_strerror.c: Include config.h when available.  Include
9526         getaddrinfo.h before other headers to test interface.
9527         Reported by Larry Jones <lawrence.jones@ugs.com>.
9528
9529 2005-09-12  Derek Price  <derek@ximbiot.com>
9530             Paul Eggert  <eggert@cs.ucla.edu>
9531
9532         * modules/glob (Files): Add glob-libc.h.
9533
9534 2005-09-12  Derek Price  <derek@ximbiot.com>
9535             Paul Eggert  <eggert@cs.ucla.edu>
9536
9537         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
9538         glob_.h, glob-libc.h.
9539         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
9540
9541 2005-09-12  Derek Price  <derek@ximbiot.com>
9542             Paul Eggert  <eggert@cs.ucla.edu>
9543
9544         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
9545         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
9546         protecting things that should be done only in gnulib contexts.
9547         * lib/glob_.h: New file, containing only the glob things needed for
9548         gnulib.
9549         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
9550         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
9551         (glob, globfree, glob_pattern_p): Now defined simply in terms of
9552         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
9553         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
9554         and to respect the namespace rules better.
9555
9556 2005-09-08  Simon Josefsson  <jas@extundo.com>
9557
9558         * modules/socklen: New file.
9559
9560 2005-09-08  Simon Josefsson  <jas@extundo.com>
9561
9562         * m4/socklen.m4: New file.
9563
9564 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9565
9566         * modules/utimens (Files): Add m4/utimbuf.m4, since
9567         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
9568         Reported by Sergey Poznyakoff.
9569
9570 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9571
9572         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
9573         definitions, since that's the preferred style in glibc.
9574         Fix a minor spacing issue, and update copyright notice to match
9575         glibc's.
9576
9577 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9578
9579         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
9580
9581 2005-09-06  Simon Josefsson  <jas@extundo.com>
9582
9583         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
9584         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
9585
9586 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9587
9588         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
9589         warning.
9590
9591 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9592
9593         * config/srclist.txt: Add glibc bug 1302.
9594
9595 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
9596
9597         Change bitset word type from unsigned int to unsigned long int,
9598         as this has better performance on typical 64-bit hosts.
9599         Port bitset code to hosts with unusual word sizes.
9600         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
9601         (build_collating_symbol):
9602         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
9603         argument is a bitset.  This is merely a style issue, but it makes
9604         it clearer that an entire array is expected.
9605         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
9606         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
9607         Port to the case where bitset_word is not the same as unsigned int.
9608         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
9609         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
9610         Likewise.
9611         * lib/regexec.c (check_dst_limits_calc_pos_1,
9612         check_subexp_matching_top):
9613         (build_trtable, group_nodes_into_DFAstates):
9614         Likewise.
9615         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
9616         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
9617         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
9618         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
9619         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
9620         * lib/regcomp.c (optimize_subexps, lower_subexp):
9621         Work even if bitset_word has holes in its bitwise representation.
9622         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
9623         * lib/regexec.c (check_dst_limits_calc_pos_1,
9624         check_subexp_matching_top):
9625         Likewise.
9626         * lib/regex_internal.c (re_string_reconstruct):
9627         Don't assume UCHAR_MAX == 255.
9628         * lib/regex_internal.h (bitset_set_all): Likewise.
9629         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
9630         All uses changed.
9631         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
9632         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
9633         All uses changed.
9634         (BITSET_WORD_MAX): New macro.
9635         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
9636         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
9637         (bitset_empty, bitset_copy):
9638         Prefer sizeof (bitset) to multiplying it out ourselves.
9639         (bitset_not_merge): Remove; unused.
9640         (bitset_contain): Return bool, not unsigned int with one bit on.
9641         All callers changed.
9642         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
9643         alignment than re_node_set; do this by defining a new internal
9644         type struct dests_alloc and using it to allocate memory.
9645
9646 2005-09-05  Bruno Haible  <bruno@clisp.org>
9647
9648         * gnulib-tool (func_import): Fix comparison in handling of symbolic
9649         links.
9650
9651 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
9652
9653         * modules/size_max (Makefile.am): Add size_max.h
9654
9655 2005-09-04  Derek Price  <derek@ximbiot.com>
9656
9657         * gnulib-tool (func_import): Fix reversed $symbolic logic.
9658
9659 2005-09-03  Simon Josefsson  <jas@extundo.com>
9660
9661         * gnulib-tool: Fix typo.
9662
9663 2005-09-03  Simon Josefsson  <jas@extundo.com>
9664
9665         * config/srclist.txt: Add glibc bug 1293.
9666
9667 2005-09-03  Derek Price  <derek@ximbiot.com>
9668
9669         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
9670         From Larry Jones <lawrence.jones@ugs.com>.
9671
9672 2005-09-02  Simon Josefsson  <jas@extundo.com>
9673
9674         * modules/socklen: New file.
9675
9676 2005-09-02  Simon Josefsson  <jas@extundo.com>
9677
9678         * modules/havelib: New module.
9679
9680         * modules/gettext, modules/iconv, modules/lock, modules/readline:
9681         Use havelib.
9682
9683 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
9684
9685         Check for arithmetic overflow when calculating sizes, to prevent
9686         some buffer-overflow issues.  These patches are conservative, in the
9687         sense that when I couldn't determine whether an overflow was possible,
9688         I inserted a run-time check.
9689         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
9690         macros.
9691         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
9692         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
9693         (re_xnrealloc, re_x2nrealloc): New inline functions.
9694         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
9695         parse_bracket_exp):
9696         (build_equiv_class, build_charclass): Check for arithmetic overflow
9697         in size expression calculations.
9698         * lib/regex_internal.c (re_string_realloc_buffers):
9699         (build_wcs_upper_buffer, re_node_set_add_intersect):
9700         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
9701         (re_dfa_add_node, register_state): Likewise.
9702         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
9703         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
9704         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
9705         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
9706
9707 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
9708
9709         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
9710         m4/ulonglong.m4.  Problem reported by Martin Lambers.
9711
9712 2005-09-02  Bruno Haible  <bruno@clisp.org>
9713
9714         Support for lib vs. lib64 distinction on biarch platforms.
9715         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
9716         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
9717         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
9718
9719 2005-09-02  Bruno Haible  <bruno@clisp.org>
9720
9721         * gnulib-tool (import): In the other first-use case, provide defaults
9722         as well.
9723
9724 2005-09-02  Bruno Haible  <bruno@clisp.org>
9725
9726         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
9727         patches not yet found in the latest gettext release.
9728
9729 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9730
9731         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
9732         to avoid a collision with bits/local_lim.h in glibc.
9733         All uses changed.  Problem reported by Dmitry V. Levin in
9734         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
9735
9736         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
9737         bugs in int versus size_t comparisons.
9738         (re_string_context_at): Fix bug where the code assumed that
9739         Idx is signed.
9740
9741         Use bool where appropriate.
9742         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
9743         All callers changed.
9744         (calc_eclosure_iter): Likewise, for ROOT arg.
9745         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
9746         (build_charclass_op): Likewise, for NON_MATCH arg.
9747         * lib/regex_internal.c (re_string_allocate, re_string_construct):
9748         (re_string_construct_common): Likewise, for ICASE arg.
9749         * lib/regexec.c (re_search_2_stub, re_search_stub):
9750         Likewise, for RET_LEN arg.
9751         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
9752         (set_regs): Likewise, for FL_BACKTRACK arg.
9753         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
9754         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
9755         (calc_eclosure_iter, parse_bracket_exp):
9756         Use bool for internal variables that are booleans.
9757         * lib/regexec.c (re_search_internal, check_matching,
9758         proceed_next_node):
9759         (set_regs, build_sifted_states, sift_states_bkref):
9760         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
9761         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
9762         (find_collation_sequence_value):
9763         Likewise.
9764         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
9765         (re_node_set_compare):
9766         Return bool, not int. All callers changed.
9767         * lib/regexec.c (check_halt_node_context, check_dst_limits):
9768         (build_trtable, check_node_accept): Likewise.
9769         * lib/regex_internal.h: Include stdbool.h.
9770
9771         Fix bugs uncovered when converting to bool.
9772         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
9773         failure instead of charging ahead blindly.
9774         * lib/regex_internal.c (register_state): Likewise.
9775         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
9776         for freeing internal storage.
9777         (group_nodes_into_DFA_states): Use unsigned int, not int, for
9778         bitset pieces used as boolean, to avoid undefined behavior
9779         on hosts that do int overflow checking.
9780
9781 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9782
9783         * config/srclist.txt: Add glibc bugs 1285-1287.
9784
9785 2005-09-01  Jim Meyering  <jim@meyering.net>
9786
9787         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
9788         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
9789         Require gl_STAT_MACROS, too.
9790
9791 2005-09-01  Bruno Haible  <bruno@clisp.org>
9792
9793         * gnulib-tool (import): In the first-use case, provide defaults.
9794
9795 2005-09-01  Bruno Haible  <bruno@clisp.org>
9796
9797         * gnulib-tool (func_import): Remove the .tmp files.
9798
9799 2005-09-01  Bruno Haible  <bruno@clisp.org>
9800
9801         * gnulib-tool (func_import): Fix handling of symbolic links.
9802
9803 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9804
9805         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
9806         old glibc regex code mishandles strings longer than 2**31 bytes.
9807         This patch fixes this when the regex code is used in gnulib
9808         (i.e., outside glibc).
9809
9810         This patch should not affect the use of the regex code inside
9811         glibc.  No doubt this problem also needs to be handled for glibc
9812         as well, but the result will be an incompatible change to the
9813         glibc ABI, and the old ABI will have to be supported too.  That
9814         can be the the subject for another patch.
9815
9816         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
9817         governing whether the rest of this patch is active.  By default,
9818         the macro is disabled and the patch has no effect.
9819         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
9820         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
9821         (struct re_pattern_buffer, re_search, re_search_2, re_match):
9822         (re_match_2, re_set_registers): Use the new types.
9823         * lib/regex_internal.h (Idx, re_hashval_t): New types.
9824         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
9825         New macros.
9826         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
9827         (re_string_context_at, bin_tree_t, re_dfastate_t):
9828         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
9829         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
9830         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
9831         (re_string_char_size_at, re_string_wchar_at):
9832         (re_string_elem_size_at):
9833         Use the new types and macros to port to 64-bit hosts.
9834         Use unsigned types for internal values, so that the code
9835         mostly works even for arrays larger than SSIZE_MAX.
9836         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
9837         (search_duplicated_node, calc_eclosure_iter, fetch_number):
9838         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
9839         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
9840         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
9841         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
9842         (calc_inveclosure, parse_dup_op, build_range_exp):
9843         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
9844         (fetch_number, create_token_tree, mark_opt_subexp):
9845         Likewise.
9846         * lib/regex_internal.c (re_string_construct_common,
9847         create_ci_newstate):
9848         (create_cd_newstate, re_string_allocate, re_string_construct):
9849         (re_string_realloc_buffers, build_wcs_upper_buffer):
9850         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
9851         (re_string_reconstruct, re_string_peek_byte_case):
9852         (re_string_fetch_byte_case, re_string_context_at):
9853         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
9854         (re_node_set_init_copy, re_node_set_add_intersect):
9855         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
9856         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
9857         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
9858         (re_acquire_state, re_acquire_state_context, register_state):
9859         Likewise.
9860         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
9861         search_cur_bkref_entry):
9862         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
9863         (re_search_internal, re_search_2_stub, re_search_stub)
9864         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
9865         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
9866         (update_cur_sifted_state, check_dst_limits):
9867         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
9868         (check_subexp_limits, sift_states_bkref, merge_state_array):
9869         (check_subexp_matching_top, get_subexp, get_subexp_sub):
9870         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
9871         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
9872         (expand_bkref_cache, check_node_accept_bytes):
9873         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
9874         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
9875         (acquire_init_state_context, check_halt_node_context):
9876         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
9877         (sift_states_backward, clean_state_log_if_needed):
9878         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
9879         (find_recover_state, transit_state_sb, transit_state_mb):
9880         (transit_state_bkref, build_trtable, match_ctx_clean):
9881         Likewise.
9882         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
9883         to work around an assumption that REG_MISSING is negative.
9884
9885         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
9886         (seek_collating_symbol_entry) [defined _LIBC]:
9887         (lookup_collation_sequence_value) [defined _LIBC]:
9888         (build_range_exp, build_collating_symbol) [defined _LIBC]:
9889         Use prototypes rather than old-style function definitions.
9890         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
9891         (transit_state_sb) [0]:
9892         (find_collation_sequence_value) [defined _LIBC]: Likewise.
9893
9894         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
9895         rm_eo.
9896
9897         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
9898         (optimize_subexps, lower_subexp):
9899         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
9900         since the signed shift might overflow.  Use 1u<<31 instead.
9901         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
9902         Likewise.
9903         * lib/regexec.c (check_dst_limits_calc_pos_1,
9904         check_subexp_matching_top): Likewise.
9905
9906         * lib/regcomp.c (optimize_subexps, lower_subexp):
9907         Use CHAR_BIT rather than 8, for clarity.
9908         * lib/regexec.c (check_dst_limits_calc_pos_1):
9909         (check_subexp_matching_top): Likewise.
9910         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
9911         have to worry about portability issues when shifting it left.
9912         Remove no-longer-needed test for table_size > 0.
9913         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
9914         in a word, as the resulting behavior is undefined.
9915         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
9916         in one case, a <= should have been an <, and in another case the
9917         whole test was missing.
9918         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
9919         the standard name CHAR_BIT.
9920         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
9921         this is not true on one's complement and signed-magnitude hosts.
9922
9923         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
9924         next_last_offset.
9925         (struct re_dfa_t): Remove unused member states_alloc.
9926         * lib/regcomp.c (init_dfa): Don't initialize unused members.
9927
9928 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9929
9930         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
9931         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
9932         and large-file glibc and in 32-bit large-file Solaris.
9933
9934 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9935
9936         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
9937         lengths fit in regoff_t; this isn't true if regoff_t is the same
9938         width as size_t.
9939         * lib/regex.c (re_search_internal): 5th arg is LAST_START
9940         (= START + RANGE) instead of RANGE.  This avoids overflow
9941         problems when regoff_t is the same width as size_t.
9942         All callers changed.
9943         (re_search_2_stub): Check for overflow when adding the
9944         sizes of the two strings.
9945         (re_search_stub): Check for overflow when adding START
9946         to RANGE; if it occurs, substitute the extreme value.
9947
9948 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9949
9950         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
9951
9952 2005-08-31  Jim Meyering  <jim@meyering.net>
9953
9954         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
9955         a pointer-to-const.
9956         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
9957         (register_state): Likewise.
9958         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
9959         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
9960         (group_nodes_into_DFAstates): Likewise.
9961
9962 2005-08-31  Jim Meyering  <jim@meyering.net>
9963
9964         * check-module: Add a FIXME comment.
9965
9966 2005-08-31  Eric Blake  <ebb9@byu.net>
9967
9968         * modules/unistd-safer (Files): Add unistd--.h.
9969         * modules/stdio-safer (Files): Add stdio--.h.
9970
9971 2005-08-31  Derek Price  <derek@ximbiot.com>
9972
9973         * lib/getdelim.c (getdelim): Return EOF on EOF.
9974         Reported by Larry Jones <lawrence.jones@ugs.com>.
9975
9976 2005-08-31  Bruno Haible  <bruno@clisp.org>
9977
9978         Avoid unnecessary diffs in the generated lib/Makefile.am.
9979         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
9980         the generated files.
9981         (func_import): Don't set cmd.
9982
9983 2005-08-31  Bruno Haible  <bruno@clisp.org>
9984
9985         * lib/strstr.c: Include <stddef.h>, for NULL.
9986         * lib/strcasestr.c: Likewise.
9987         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
9988
9989 2005-08-31  Bruno Haible  <bruno@clisp.org>
9990
9991         * gnulib-tool: New option --macro-prefix.
9992         (func_import): Use macro_prefix.
9993         (import): Handle option --macro-prefix.
9994
9995 2005-08-31  Bruno Haible  <bruno@clisp.org>
9996
9997         * gnulib-tool (import): Rename most ac_* variables to cached_*.
9998         Also use new variables cached_lgpl, cached_libtool.
9999
10000 2005-08-31  Bruno Haible  <bruno@clisp.org>
10001
10002         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
10003         always instantiating them.
10004
10005 2005-08-31  Bruno Haible  <bruno@clisp.org>
10006
10007         * gnulib-tool (func_import): Read the previous cached settings
10008         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
10009         earlier added by gnulib but are now dropped. Warn when a gnulib file
10010         overwrites a non-gnulib file.
10011
10012 2005-08-31  Bruno Haible  <bruno@clisp.org>
10013
10014         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
10015         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
10016         projects that don't keep autogenerated files in CVS. Put into
10017         actioncmd only the specified modules, not the transitive closure.
10018
10019 2005-08-31  Bruno Haible  <bruno@clisp.org>
10020
10021         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
10022         Create directories that shall be filled.
10023         (import): Don't look for gl_* macros in configure.ac. Recurse across
10024         all directories containing a gnulib-cache.m4 files, if meaningful.
10025
10026 2005-08-31  Bruno Haible  <bruno@clisp.org>
10027
10028         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
10029         (import): Set seen_libtool when we see gl_LIBTOOL.
10030
10031 2005-08-31  Bruno Haible  <bruno@clisp.org>
10032
10033         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
10034         declaration macro definitions from generated gnulib.m4.
10035
10036 2005-08-30  "Oskar Liljeblad"  <oskar@osk.mine.nu>
10037
10038         * lib/iconvme.h: Add prototype for iconv_alloc.
10039
10040 2005-08-29  Simon Josefsson  <jas@extundo.com>
10041
10042         * lib/iconvme.c: Fix errno.
10043
10044 2005-08-29  Bruno Haible  <bruno@clisp.org>
10045
10046         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
10047         that it works when the directory contains spaces.
10048
10049 2005-08-29  Bruno Haible  <bruno@clisp.org>
10050
10051         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
10052
10053 2005-08-29  Bruno Haible  <bruno@clisp.org>
10054
10055         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
10056         Emit more advice.
10057
10058 2005-08-29  Bruno Haible  <bruno@clisp.org>
10059         and Stepan Kasal  <kasal@ucw.cz>
10060
10061         * check-module: If more parameters are given, check each of them
10062         separately; add more exceptions, as noted by Jim Meyering.
10063         (check_module): New procedure.
10064         (%exempt_header): Now contains all exceptions.
10065
10066 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
10067
10068         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
10069
10070 2005-08-29  "Oskar Liljeblad"  <oskar@osk.mine.nu>
10071
10072         * lib/iconvme.c: Split iconv_string into iconv_alloc.
10073
10074 2005-08-28  Bruno Haible  <bruno@clisp.org>
10075
10076         * m4/gnulib-tool.m4: New file.
10077
10078 2005-08-27  Jim Meyering  <jim@meyering.net>
10079
10080         * modules/unistd-safer (Files): Add pipe-safer.c.
10081         * modules/fcntl-safer (Files): Add creat-safer.c.
10082
10083 2005-08-27  Jim Meyering  <jim@meyering.net>
10084
10085         * m4/stdlib-safer.m4: New file.  From coreutils.
10086         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
10087         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
10088         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
10089         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
10090         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
10091
10092 2005-08-27  Jim Meyering  <jim@meyering.net>
10093
10094         * lib/fopen-safer.c: Merge minor changes from coreutils.
10095         * lib/dup-safer.c: Likewise.
10096         * lib/fd-safer.c: Likewise.
10097
10098         Merge from coreutils.
10099         * lib/stdio--.h: New file.
10100         * lib/stdlib--.h: New file.
10101         * lib/mkstemp-safer.c: New file.
10102
10103         GNU tar needs these.
10104         * lib/pipe-safer.c: New file.
10105         * lib/creat-safer.c: New file.
10106         * lib/fcntl--.h (creat): Define to creat_safer.
10107         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
10108         * lib/unistd--.h (pipe): Define to pipe_safer.
10109         * lib/unistd-safer.h: Declare pipe_safer.
10110
10111 2005-08-26  Simon Josefsson  <jas@extundo.com>
10112
10113         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
10114         Haible <bruno@clisp.org>.
10115
10116 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
10117
10118         * lib/regex_internal.h: Remove all references to
10119         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
10120         or better.
10121         (bitset_not, bitset_merge, bitset_not_merge):
10122         (bitset_mask, re_string_allocate, re_string_construct):
10123         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
10124         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
10125         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
10126         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
10127         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10128         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10129         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
10130         (re_acquire_state_context):
10131         Remove unnecessary forward decls.
10132         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
10133         Put __attribute at function definition,
10134         now that the function decl has been removed.
10135         * lib/regex_internal.c (re_string_peek_byte_case):
10136         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
10137         Likewise.
10138
10139 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
10140
10141         * m4/regex.m4: Add AC_PREREQ(2.50).
10142         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
10143
10144 2005-08-25  Simon Josefsson  <jas@extundo.com>
10145
10146         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
10147         __fsetlocking.
10148
10149 2005-08-25  Simon Josefsson  <jas@extundo.com>
10150
10151         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
10152         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
10153         GLIBC specific code.
10154
10155 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10156
10157         Make regex safe for g++.  This fixes one real bug (an "err"
10158         that should have been "*err").  g++ problem reported by
10159         Sam Steingold.
10160         * lib/regex_internal.h (re_calloc): New macro, consistent with
10161         re_malloc etc.  All callers of calloc changed to use re_calloc.
10162         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
10163         not int.  All callers changed.
10164         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
10165         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
10166         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
10167         (find_recover_state): Change "err" to "*err"; this fixes what
10168         appears to be a real bug.
10169         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
10170         versus int.
10171
10172 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10173
10174         * modules/regex (Depends-on): Add malloc, since the code
10175         assumes that !malloc(0) means failure.
10176
10177 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10178
10179         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
10180
10181         alloca modernization/simplification for regex.
10182         * lib/regex.c: Remove portability cruft for alloca.  This no longer
10183         needs to be at the start of the file, and can be moved into
10184         regex_internal.h and simplified.
10185         * lib/regex_internal.h: Include <alloca.h>.
10186         (__libc_use_alloca) [!defined _LIBC]: New macro.
10187         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
10188         now works outside glibc.
10189
10190 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10191
10192         * config/srclist.txt: Add glibc bugs 1241, 1245.
10193
10194 2005-08-25  Jim Meyering  <jim@meyering.net>
10195
10196         * lib/open-safer.c: Include <config.h>.
10197         Otherwise, we'd lose LARGEFILE support in any file using
10198         e.g. "fcntl--.h"
10199
10200 2005-08-25  Bruno Haible  <bruno@clisp.org>
10201
10202         * m4/minmax.m4: Require autoconf 2.52.
10203         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
10204         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
10205         alternatives of translit over the alphabet.
10206         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
10207
10208 2005-08-24  Simon Josefsson  <jas@extundo.com>
10209
10210         * tests/test-getpass.c: New file.
10211
10212 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10213
10214         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
10215         for GNU regex features.
10216
10217 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10218
10219         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
10220         * lib/regex.h (regerror): Likewise.
10221
10222         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
10223         requires this.  (The code never needed it.)
10224
10225         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
10226         All uses of recently-renamed identifiers changed to use the new,
10227         POSIX-compliant names.  The code will build and run just fine
10228         without these changes, but it's better to eat our own dog food
10229         and use the standard-conforming names.
10230
10231         * lib/regex.h: Fix a multitude of POSIX name space violations.
10232         These changes have an effect only for programs that define
10233         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
10234         do not change anything for programs compiled in the normal way.
10235         Also, there is no effect on the ABI.
10236
10237         (_REGEX_SOURCE): New macro.
10238         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
10239         defined and _GNU_SOURCE is not; this fixes a name space violation.
10240
10241         Rename the following macros to obey POSIX requirements.
10242         The old names are still visible as macros if _REGEX_SOURCE is defined.
10243         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
10244         RE_BACKSLASH_ESCAPE_IN_LISTS.
10245         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
10246         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
10247         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
10248         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
10249         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
10250         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
10251         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
10252         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
10253         (REG_INTERVALS): renamed from RE_INTERVALS.
10254         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
10255         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
10256         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
10257         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
10258         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
10259         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
10260         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
10261         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
10262         RE_UNMATCHED_RIGHT_PAREN_ORD.
10263         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
10264         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
10265         (REG_DEBUG): renamed from RE_DEBUG.
10266         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
10267         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
10268         unusual, since we can't clash with the POSIX REG_ICASE.
10269         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
10270         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
10271         (REG_NO_SUB): renamed from RE_NO_SUB.
10272         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
10273         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
10274         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
10275         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
10276         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
10277         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
10278         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
10279         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
10280         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
10281         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
10282         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
10283         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
10284         RE_SYNTAX_POSIX_MINIMAL_BASIC.
10285         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
10286         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
10287         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
10288         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
10289         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
10290         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
10291         (REG_FIXED): Renamed from REGS_FIXED.
10292         (REG_NREGS): Renamed from RE_NREGS.
10293
10294         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
10295         of other REG_* macros, since POSIX says the user is allowed to
10296         #undef these macros selectively.
10297
10298         (reg_errcode_t): Update comment stating what other tables need
10299         to be consistent.
10300
10301         Rename the following enum values to obey POSIX requirements.
10302         The old names are still visible as macros.
10303         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
10304         is not defined, since GNU is supposed to be a superset of POSIX as
10305         much as possible, and since we want reg_errcode_t to be a signed
10306         type for implementation consistency.
10307         (_REG_NOERROR): Renamed from REG_NOERROR.
10308         (_REG_NOMATCH): Renamed from REG_NOMATCH.
10309         (_REG_BADPAT): Renamed from REG_BADPAT.
10310         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
10311         (_REG_ECTYPE): Renamed from REG_ECTYPE.
10312         (_REG_EESCAPE): Renamed from REG_EESCAPE.
10313         (_REG_ESUBREG): Renamed from REG_ESUBREG.
10314         (_REG_EBRACK): Renamed from REG_EBRACK.
10315         (_REG_EPAREN): Renamed from REG_EPAREN.
10316         (_REG_EBRACE): Renamed from REG_EBRACE.
10317         (_REG_BADBR): Renamed from REG_BADBR.
10318         (_REG_ERANGE): Renamed from REG_ERANGE.
10319         (_REG_ESPACE): Renamed from REG_ESPACE.
10320         (_REG_BADRPT): Renamed from REG_BADRPT.
10321         (_REG_EEND): Renamed from REG_EEND.
10322         (_REG_ESIZE): Renamed from REG_ESIZE.
10323         (_REG_ERPAREN): Renamed from REG_ERPAREN.
10324         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
10325         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
10326         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
10327         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
10328
10329         (_REG_RE_NAME, _REG_RM_NAME): New macros.
10330         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
10331         changed.  But support the old name if the new one is not defined
10332         and if _REGEX_SOURCE.
10333
10334         Change the following member names in struct re_pattern_buffer.
10335         The old names are still supported if !_REGEX_SOURCE.
10336         The new names are always supported, regardless of _REGEX_SOURCE.
10337         (re_buffer): Renamed from buffer.
10338         (re_allocated): Renamed from allocated.
10339         (re_used): Renamed from used.
10340         (re_syntax): Renamed from syntax.
10341         (re_fastmap): Renamed from fastmap.
10342         (re_translate): Renamed from translate.
10343         (re_can_be_null): Renamed from can_be_null.
10344         (re_regs_allocated): Renamed from regs_allocated.
10345         (re_fastmap_accurate): Renamed from fastmap_accurate.
10346         (re_no_sub): Renamed from no_sub.
10347         (re_not_bol): Renamed from not_bol.
10348         (re_not_eol): Renamed from not_eol.
10349         (re_newline_anchor): Renamed from newline_anchor.
10350
10351         Change the following member names in struct re_registers.
10352         The old names are still supported if !_REGEX_SOURCE.
10353         The new names are always supported, regardless of _REGEX_SOURCE.
10354         (rm_num_regs): Renamed from num_regs.
10355         (rm_start): Renamed from start.
10356         (rm_end): Renamed from end.
10357
10358         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
10359         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
10360         Prepend __ to parameter names.
10361
10362         Undo yesterday's changes.
10363
10364 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10365
10366         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
10367         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
10368         lib/regex.c.
10369
10370 2005-08-24  Jim Meyering  <jim@meyering.net>
10371
10372         Sync from coreutils.
10373         * m4/fcntl-safer.m4: New file.
10374
10375         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
10376         and object files for this module.
10377
10378 2005-08-24  Jim Meyering  <jim@meyering.net>
10379
10380         Sync from coreutils.
10381         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
10382
10383 2005-08-24  Jim Meyering  <jim@meyering.net>
10384
10385         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
10386         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
10387
10388 2005-08-24  Jim Meyering  <jim@meyering.net>
10389
10390         * modules/fcntl-safer: New module.
10391         * modules/fts (Depends-on): Add fcntl-safer.
10392         * MODULES.html.sh (File descriptor based Input/Output):
10393         Add fcntl-safer.
10394
10395 2005-08-24  Bruno Haible  <bruno@clisp.org>
10396
10397         Support for unit test modules.
10398         * modules/README: Mention tests modules.
10399         * modules/TEMPLATE-TESTS: New file.
10400         * gnulib-tool: New options --extract-tests-module, --with-tests and
10401         --tests-base (unused for the moment).
10402         (testsbase, inctests): New variables.
10403         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
10404         (func_verify_module): Exclude TEMPLATE-TESTS.
10405         (func_verify_nontests_module, func_verify_tests_module): New functions.
10406         (func_get_dependencies): Add implicit dependency for tests modules.
10407         (func_get_tests_module): New function.
10408         (func_modules_transitive_closure): When --with-tests was specified,
10409         include the unit tests as well, unless explicitly avoided.
10410         (func_emit_lib_Makefile_am): Ignore the tests modules here.
10411         (func_emit_tests_Makefile_am): New function.
10412         (func_create_testdir): When --with-tests was specified, emit a
10413         tests/ directory.
10414         * MODULES.html.sh (Future developments): Update.
10415
10416 2005-08-24  Bruno Haible  <bruno@clisp.org>
10417
10418         * modules/tls-tests: New file.
10419         * tests/test-tls.c: New file, from GNU gettext.
10420
10421 2005-08-24  Bruno Haible  <bruno@clisp.org>
10422
10423         * modules/lock-tests: New file.
10424         * tests/test-lock.c: New file, from GNU gettext.
10425
10426 2005-08-24  Bruno Haible  <bruno@clisp.org>
10427
10428         * lib/lock.h: Add multiple inclusion guard.
10429         * lib/tls.h: Add multiple inclusion guard.
10430
10431 2005-08-24  Bruno Haible  <bruno@clisp.org>
10432
10433         * gnulib-tool: Add support for the --aux-dir option to
10434         --create-testdir, --create-megatestdir, --test, --megatest.
10435         (func_create_testdir, func_create_megatestdir): Optionally emit a
10436         AC_CONFIG_AUX_DIR directive.
10437         (create-testdir, create-megatestdir, test, megatest): Provide a
10438         default value for $auxdir.
10439
10440 2005-08-24  Bruno Haible  <bruno@clisp.org>
10441
10442         * gnulib-tool (import): Use compound statement instead of subshell
10443         where possible.
10444
10445 2005-08-24  Bruno Haible  <bruno@clisp.org>
10446
10447         * gnulib-tool (import): Change --aux-dir default to "build-aux".
10448
10449 2005-08-24  Bruno Haible  <bruno@clisp.org>
10450
10451         * gnulib-tool (func_version): Update.
10452
10453 2005-08-24  Bruno Haible  <bruno@clisp.org>
10454
10455         * gnulib-tool (func_import, func_create_testdir,
10456         func_create_megatestdir): Quote all autoconf macro arguments.
10457
10458 2005-08-24  Bruno Haible  <bruno@clisp.org>
10459
10460         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
10461         option --force, because --force causes the aclocal.m4 of each
10462         subdirectory to be newer than the corresponding config.h.in.
10463
10464 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10465
10466         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
10467         All contents moved to gl_REGEX.
10468         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
10469         assume that it does.
10470
10471 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10472
10473         * lib/regex.h (REG_NOSYS)
10474         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
10475         Define, since POSIX requires it as of 2001.
10476         (_REG_ENOSYS)
10477         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
10478         New private symbol, used to keep the enum signed in all cases.
10479         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
10480         Youngman in
10481         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
10482
10483         * lib/regex_internal.c (re_string_skip_chars, register_state):
10484         (calc_state_hash):
10485         Remove forward decls; no longer needed now that we use prototypes.
10486         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
10487         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
10488         (clean_state_log_if_needed): Likewise.
10489
10490 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10491
10492         * config/srclist.txt: Add glibc bugs 1231-1233.
10493
10494 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10495
10496         Fix problems reported by Sam Steingold in
10497         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
10498         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
10499         assumed that reg_errcode_t is a signed type, which is not
10500         necessarily true if _XOPEN_SOURCE is not defined.
10501         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
10502         since some compilers warn about it otherwise.
10503
10504 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10505
10506         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
10507         (init_word_char, create_initial_state, duplicate_node_closure):
10508         (fetch_token, peek_token_bracket, build_range_exp):
10509         (build_collating_symbol): Remove forward decls; no longer needed
10510         now that we use prototypes.
10511
10512         * lib/regcomp.c:
10513         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
10514         (re_compile_fastmap_iter, regcomp, regerror, regfree):
10515         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
10516         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
10517         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
10518         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
10519         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
10520         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
10521         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
10522         (build_range_exp, build_collating_symbol, parse_bracket_exp):
10523         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
10524         (build_charclass, build_charclass_op, fetch_number, create_tree):
10525         (create_token_tree, mark_opt_subexp, duplicate_tree):
10526         Use prototypes rather than old-style definitions.
10527
10528         * lib/regex_internal.c:
10529         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
10530         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
10531         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
10532         (re_string_reconstruct, re_string_peek_byte_case):
10533         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
10534         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
10535         (re_node_set_init_copy, re_node_set_add_intersect):
10536         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10537         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10538         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
10539         (re_acquire_state, re_acquire_state_context, register_state):
10540         (create_ci_newstate, create_cd_newstate, free_state):
10541         Likewise.
10542         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
10543         re_search_2):
10544         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
10545         (re_search_internal, prune_impossible_nodes):
10546         (acquire_init_state_context, check_matching, static):
10547         (check_halt_node_context, check_halt_state_context, proceed_next_node):
10548         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
10549         (update_regs, sift_states_backward, build_sifted_states):
10550         (clean_state_log_if_needed, merge_state_array):
10551         (update_cur_sifted_state, add_epsilon_src_nodes):
10552         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
10553         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
10554         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
10555         (find_recover_state, check_subexp_matching_top, transit_state_mb):
10556         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
10557         (check_arrival, check_arrival_add_next_nodes):
10558         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
10559         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
10560         (check_node_accept_bytes, check_node_accept, extend_buffers):
10561         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
10562         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
10563         (sift_ctx_init):
10564         Likewise.
10565
10566         * lib/regex_internal.h:
10567         (re_string_allocate, re_string_construct, re_string_reconstruct):
10568         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
10569         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
10570         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
10571         (re_string_context_at, re_string_peek_byte_case):
10572         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
10573         is defined, since we now use prototypes always.
10574
10575         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
10576         C89 or better.  All uses removed.
10577
10578 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10579
10580         * config/srclist.txt: Add glibc bugs 1220-1227.
10581
10582 2005-08-20  Jim Meyering  <jim@meyering.net>
10583
10584         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
10585         of unused local, dfa.
10586
10587 2005-08-20  Bruno Haible  <bruno@clisp.org>
10588
10589         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
10590
10591 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10592
10593         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
10594         (re_node_set_insert_last, re_dfa_add_node):
10595         Rename local variables to avoid GCC shadowing warnings.
10596
10597 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10598
10599         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
10600         [defined lint]: Suppress bogus uninitialized-variable warnings.
10601
10602         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
10603         and let the caller return REG_ESPACE if out of space.  This
10604         removes an uninitialied-variable warning with GCC 4.0.1, and also
10605         avoids taking the address of a local variable.  All callers
10606         changed.
10607
10608 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10609
10610         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
10611         $LIBCSRC/posix/regexec.c.
10612         Add glibc bug 1217 for regcomp.c.
10613
10614 2005-08-19  Jim Meyering  <jim@meyering.net>
10615
10616         * lib/regexec.c (proceed_next_node): Redo local variables to
10617         avoid GCC shadowing warnings.
10618
10619 2005-08-18  Bruno Haible  <bruno@clisp.org>
10620
10621         * lib/strstr.c (strstr): Fix return value in multibyte case.
10622         * lib/strcasestr.c (strcasestr): Likewise.
10623
10624 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
10625
10626         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
10627
10628 2005-08-17  Jim Meyering  <jim@meyering.net>
10629
10630         Make the %s format (seconds since the epoch) work for a negative
10631         number and when used with a zero-padded field width, e.g. %015s.
10632
10633         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
10634         label so that it precedes the code to set `digits'.  Otherwise,
10635         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
10636         print `00-22'.  Now, it prints `-0022', as it should.
10637
10638 2005-08-17  Bruno Haible  <bruno@clisp.org>
10639
10640         * modules/strstr (Files): Add m4/mbrtowc.m4.
10641         (Depends-on): Add mbuiter.
10642
10643 2005-08-17  Bruno Haible  <bruno@clisp.org>
10644
10645         * modules/strcasestr: New file.
10646         * MODULES.html.sh (String handling, based on ANSI C 89): Add
10647         strcasestr.
10648
10649 2005-08-17  Bruno Haible  <bruno@clisp.org>
10650
10651         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
10652
10653 2005-08-17  Bruno Haible  <bruno@clisp.org>
10654
10655         * modules/mbuiter: New file.
10656         * MODULES.html.sh (Extended multibyte and wide character utilities):
10657         Add mbuiter.
10658
10659 2005-08-17  Bruno Haible  <bruno@clisp.org>
10660
10661         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
10662         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
10663
10664 2005-08-17  Bruno Haible  <bruno@clisp.org>
10665
10666         * m4/strcasestr.m4: New file.
10667
10668 2005-08-17  Bruno Haible  <bruno@clisp.org>
10669
10670         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
10671         * lib/strstr.c: Completely rewritten, with multibyte locale support.
10672
10673 2005-08-17  Bruno Haible  <bruno@clisp.org>
10674
10675         * lib/strcasestr.h: New file.
10676         * lib/strcasestr.c: New file.
10677
10678 2005-08-17  Bruno Haible  <bruno@clisp.org>
10679
10680         * lib/strcasecmp.c: Use mbuiter.h.
10681
10682 2005-08-17  Bruno Haible  <bruno@clisp.org>
10683
10684         * lib/mbuiter.h: New file.
10685
10686 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
10687
10688         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
10689         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
10690         and gl_GETOPT are both invoked via different paths (as happens
10691         with GNU tar CVS because it uses both argp and getopt), the former
10692         wins.
10693
10694 2005-08-16  Bruno Haible  <bruno@clisp.org>
10695
10696         * modules/tls: New file.
10697         * MODULES.html.sh (Multithreading): Add tls.
10698
10699 2005-08-16  Bruno Haible  <bruno@clisp.org>
10700
10701         * modules/strnlen1: New file.
10702         * MODULES.html.sh (String handling): Add strnlen1.
10703
10704 2005-08-16  Bruno Haible  <bruno@clisp.org>
10705
10706         * modules/strcase (Files): Add m4/mbrtowc.m4.
10707         (Depends-on): Add strnlen1, mbchar.
10708
10709 2005-08-16  Bruno Haible  <bruno@clisp.org>
10710
10711         * modules/mbiter: New file.
10712         * MODULES.html.sh (Extended multibyte and wide character utilities):
10713         Add mbiter.
10714
10715 2005-08-16  Bruno Haible  <bruno@clisp.org>
10716
10717         * modules/mbfile: New file.
10718         * MODULES.html.sh (Extended multibyte and wide character utilities):
10719         Add mbfile.
10720
10721 2005-08-16  Bruno Haible  <bruno@clisp.org>
10722
10723         * modules/mbchar: New file.
10724         * MODULES.html.sh (Extended multibyte and wide character utilities):
10725         New section.
10726
10727 2005-08-16  Bruno Haible  <bruno@clisp.org>
10728
10729         * m4/tls.m4: New file, from GNU gettext.
10730
10731 2005-08-16  Bruno Haible  <bruno@clisp.org>
10732
10733         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
10734         always.
10735         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
10736
10737 2005-08-16  Bruno Haible  <bruno@clisp.org>
10738
10739         * m4/mbiter.m4: New file.
10740
10741 2005-08-16  Bruno Haible  <bruno@clisp.org>
10742
10743         * m4/mbfile.m4: New file.
10744
10745 2005-08-16  Bruno Haible  <bruno@clisp.org>
10746
10747         * m4/mbchar.m4: New file.
10748
10749 2005-08-16  Bruno Haible  <bruno@clisp.org>
10750
10751         * lib/tls.h: New file, from GNU gettext.
10752         * lib/tls.c: New file, from GNU gettext.
10753
10754 2005-08-16  Bruno Haible  <bruno@clisp.org>
10755
10756         * lib/strnlen1.h: New file.
10757         * lib/strnlen1.c: New file.
10758
10759 2005-08-16  Bruno Haible  <bruno@clisp.org>
10760
10761         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
10762         (mbi_init): Update.
10763         (mbi_avail, mbi_advance): Let the iteration end before the terminating
10764         NUL byte, not after it.
10765
10766 2005-08-16  Bruno Haible  <bruno@clisp.org>
10767
10768         * lib/strcase.h (strcasecmp): Add note in comments.
10769         * lib/strncasecmp.c: Use code from strcasecmp.c.
10770         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
10771         (strcasecmp): Work correctly in multibyte locales.
10772
10773 2005-08-16  Bruno Haible  <bruno@clisp.org>
10774
10775         * lib/mbiter.h: New file.
10776
10777 2005-08-16  Bruno Haible  <bruno@clisp.org>
10778
10779         * lib/mbfile.h: New file.
10780
10781 2005-08-16  Bruno Haible  <bruno@clisp.org>
10782
10783         * lib/mbchar.h: New file.
10784         * lib/mbchar.c: New file.
10785
10786 2005-08-16  Bruno Haible  <bruno@clisp.org>
10787
10788         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
10789         the valid ones. Makes the comparison operations transitive:
10790         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
10791         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
10792
10793 2005-08-15  Simon Josefsson  <jas@extundo.com>
10794
10795         * modules/ssize_t (License): Change to 'unlimited'.
10796
10797         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
10798
10799 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10800
10801         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
10802         Add comments for each pending glibc patch.
10803
10804 2005-08-15  Bruno Haible  <bruno@clisp.org>
10805
10806         * lib/regex.h (__restrict_arr): Don't define to __restrict if
10807         __cplusplus is defined.
10808
10809 2005-08-14  Jim Meyering  <jim@meyering.net>
10810
10811         Sync from coreutils.
10812
10813         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
10814         Use the hash-table-based cycle-detection code not just when
10815         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
10816         Reported by James Youngman in
10817         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
10818         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
10819         FTS_TIGHT_CYCLE_CHECK.
10820         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
10821         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
10822         once again.
10823         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
10824         * lib/fts.c (fd_safer): Remove decl.
10825         Include fcntl--.h rather than unistd-safer.h
10826         (fts_safe_changedir): Don't call fd_safer; no longer needed
10827         now that we include fcntl--.h.
10828
10829 2005-08-12  Simon Josefsson  <jas@extundo.com>
10830
10831         * modules/getndelim2: Use ssize_t module.
10832         * modules/getnline: Likewise.
10833         * modules/safe-read: Likewise.
10834         * modules/xreadlink: Likewise.
10835
10836         * modules/ssize_t: New file.
10837
10838 2005-08-12  Simon Josefsson  <jas@extundo.com>
10839
10840         * m4/readline.m4: Look for termcap, curses or ncurses if required.
10841
10842 2005-08-12  Simon Josefsson  <jas@extundo.com>
10843
10844         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10845         ssize_t.
10846
10847 2005-08-12  Simon Josefsson  <jas@extundo.com>
10848
10849         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
10850         readline, getdelim and check_version.
10851         (Support for systems lacking ISO C 99: Sizes of integer types):
10852         Add size_max.
10853
10854 2005-08-12  Bruno Haible  <bruno@clisp.org>
10855
10856         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
10857
10858 2005-08-11  Simon Josefsson  <jas@extundo.com>
10859
10860         * modules/readline: New file.
10861
10862         * modules/strnlen (Files): Add strnlen.h.
10863
10864 2005-08-11  Simon Josefsson  <jas@extundo.com>
10865
10866         * m4/readline.m4: New file.
10867
10868 2005-08-11  Simon Josefsson  <jas@extundo.com>
10869
10870         * lib/readline.h, readline.c: New file.
10871
10872 2005-08-11  Simon Josefsson  <jas@extundo.com>
10873
10874         * doc/gnulib.texi (Initial import, Finishing touches): Mention
10875         gl_AVOID.
10876
10877 2005-08-11  Bruno Haible  <bruno@clisp.org>
10878
10879         * lib/strnlen.h (strnlen): Change parameter name to match comment.
10880
10881 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
10882
10883         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
10884
10885 2005-08-10  Simon Josefsson  <jas@extundo.com>
10886
10887         * tests/test-iconvme.c: New file.
10888
10889 2005-08-10  Simon Josefsson  <jas@extundo.com>
10890
10891         * m4/strnlen.m4: New file.
10892
10893         * m4/strndup.m4: Don't check for strnlen declaration, done in
10894         strnlen.m4.
10895
10896 2005-08-10  Simon Josefsson  <jas@extundo.com>
10897
10898         * lib/strndup.c: Use strnlen.h.
10899
10900         * lib/strnlen.h: New file.
10901
10902 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10903
10904         * README: Typos.
10905
10906 2005-08-02  Simon Josefsson  <jas@extundo.com>
10907
10908         * modules/readline: New file.
10909
10910 2005-08-02  Simon Josefsson  <jas@extundo.com>
10911
10912         * modules/getdelim: New file.
10913
10914         * modules/getline: Rewrite, don't use getndelim2.
10915
10916 2005-08-02  Simon Josefsson  <jas@extundo.com>
10917
10918         * m4/getline.m4: Separate out getdelim stuff into separate module.
10919
10920         * m4/getdelim.m4: New file.
10921
10922 2005-08-02  Simon Josefsson  <jas@extundo.com>
10923
10924         * lib/getline.h, getline.c: Rewrite.
10925
10926         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
10927
10928 2005-07-31  Bruno Haible  <bruno@clisp.org>
10929
10930         * lib/lock.h (gl_lock_initializer): New macro.
10931         (gl_lock_define_initialized): Use it.
10932         (gl_rwlock_initializer): New macro.
10933         (gl_rwlock_define_initialized): Use it.
10934         (gl_recursive_lock_initializer): New macro.
10935         (gl_recursive_lock_define_initialized): Use it.
10936
10937 2005-07-30  Karl Berry  <karl@gnu.org>
10938
10939         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
10940         Report from Ben Pfaff, regarding getopt.
10941
10942 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
10943
10944         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
10945         normal way.
10946         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
10947         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
10948         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
10949         (gl_GETOPT): Use the new macros.  Most of the implementation
10950         is moved to the new macros.  This is for programs like Emacs
10951         that don't want all the functionality of gl_GETOPT.
10952
10953 2005-07-26  Bruno Haible  <bruno@clisp.org>
10954
10955         * m4/lock.m4: Update from GNU gettext.
10956
10957 2005-07-26  Bruno Haible  <bruno@clisp.org>
10958
10959         * lib/lock.h: Update from GNU gettext.
10960         * lib/lock.c: Update from GNU gettext.
10961
10962 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
10963
10964         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
10965         obsolescent AC_TRY_RUN.  Include the default includes files, for
10966         'exit'.
10967
10968 2005-07-24  Bruno Haible  <bruno@clisp.org>
10969
10970         * modules/visibility: New file.
10971         * MODULES.html.sh (Misc): Add visibility.
10972
10973 2005-07-24  Bruno Haible  <bruno@clisp.org>
10974
10975         * m4/visibility.m4: New file.
10976
10977 2005-07-24  Bruno Haible  <bruno@clisp.org>
10978
10979         * doc/visibility.texi: New file.
10980
10981 2005-07-22  Bruno Haible  <bruno@clisp.org>
10982
10983         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
10984         $(ALLOCA_H), redundant through BUILT_SOURCES.
10985         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
10986         redundant through BUILT_SOURCES.
10987         * modules/byteswap (Makefile.am): Remove explicit dependency on
10988         $(BYTESWAP_H), redundant through BUILT_SOURCES.
10989         * modules/fnmatch (Makefile.am): Remove explicit dependency on
10990         $(FNMATCH_H), redundant through BUILT_SOURCES.
10991         * modules/getopt (Makefile.am): Remove explicit dependency on
10992         $(GETOPT_H), redundant through BUILT_SOURCES.
10993         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
10994         redundant through BUILT_SOURCES.
10995         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
10996         redundant through BUILT_SOURCES.
10997         * modules/stdbool (Makefile.am): Remove explicit dependency on
10998         $(STDBOOL_H), redundant through BUILT_SOURCES.
10999         * modules/stdint (Makefile.am): Remove explicit dependency on
11000         $(STDINT_H), redundant through BUILT_SOURCES.
11001         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
11002         Remove explicit dependency on $(SYSEXITS_H).
11003         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
11004
11005 2005-07-18  Simon Josefsson  <jas@extundo.com>
11006
11007         * lib/check-version.c (check_version): Accept identical versions too.
11008
11009 2005-07-18  Bruno Haible  <bruno@clisp.org>
11010
11011         * modules/lock: New file.
11012         * MODULES.html.sh (Multithreading): New section.
11013
11014 2005-07-18  Bruno Haible  <bruno@clisp.org>
11015
11016         * m4/lock.m4: New file, from GNU gettext.
11017
11018 2005-07-18  Bruno Haible  <bruno@clisp.org>
11019
11020         * lib/lock.h: New file, from GNU gettext.
11021         * lib/lock.c: New file, from GNU gettext.
11022
11023 2005-07-18  Bruno Haible  <bruno@clisp.org>
11024
11025         * lib/lock.h (gl_once_t): New type.
11026         (gl_once_define, gl_once): New macros.
11027         * lib/lock.c (fresh_once): New variable.
11028         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
11029         functions.
11030
11031 2005-07-16  Simon Josefsson  <jas@extundo.com>
11032
11033         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
11034         workaround, suggested by Bruno.
11035
11036 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11037
11038         * modules/xalloc (Depends-on): Add xalloc-die.
11039         * modules/xvasprintf (Depends-on): Add xalloc-die.
11040
11041 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11042
11043         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
11044         with a minor change.
11045
11046 2005-07-15  Bruno Haible  <bruno@clisp.org>
11047
11048         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
11049         When using lib/poll.c, define poll as rpl_poll.
11050
11051 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
11052
11053         * modules/argp (Depends-on): Remove unlocked-io.
11054
11055 2005-07-14  Derek Price  <derek@ximbiot.com>
11056
11057         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
11058         for glob symlink bug.
11059
11060 2005-07-14  Bruno Haible  <bruno@clisp.org>
11061
11062         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
11063         Instead, test for *_unlocked function declarations directly.
11064
11065 2005-07-11  Simon Josefsson  <jas@extundo.com>
11066
11067         * modules/size_max: New file.
11068
11069         * modules/xsize: Depend on size_max module for size_max.m4.
11070
11071 2005-07-11  Simon Josefsson  <jas@extundo.com>
11072
11073         * lib/size_max.h: New file.
11074
11075 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
11076
11077         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
11078         copyright symbol and the year.
11079         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
11080         (version_etc_va): Use parameterized copyright notice.
11081         Reword to conform to the current GNU coding standards.
11082
11083 2005-07-11  Karl Berry  <karl@gnu.org>
11084
11085         * doc/gnulib.texi (Quoting): new node.
11086         (Initial import): more info, from Patrice.
11087
11088 2005-07-11  Bruno Haible  <bruno@clisp.org>
11089
11090         * gnulib-tool (func_usage): Document option --avoid.
11091         (Command line options): Handle --avoid.
11092         (func_acceptable): New function.
11093         (func_modules_transitive_closure): Use it.
11094
11095 2005-07-11  Bruno Haible  <bruno@clisp.org>
11096
11097         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
11098         Reported by Jim Meyering.
11099
11100 2005-07-10  Bruno Haible  <bruno@clisp.org>
11101
11102         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
11103         Needed when size_t is smaller than 'unsigned int'.
11104         Reported by Paul Eggert.
11105
11106 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11107
11108         * modules/argp (Depends-on): Add unlocked-io
11109
11110 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11111
11112         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
11113         block of defines.
11114
11115 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
11116
11117         * config/srclist.txt: Comment out regcomp.c, since we have a porting
11118         fix now.
11119
11120 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
11121         and Paul Eggert  <eggert@cs.ucla.edu>
11122
11123         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
11124         in wint_t, not wchar_t.  Remove now-unnecessary cast.
11125
11126 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11127
11128         * modules/regex (Files): Add lib/regex_internal.c,
11129         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
11130         (Depends-on): Add extensions.
11131         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
11132
11133 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11134
11135         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
11136         pathconf.
11137         * m4/same.m4 (gl_SAME): Likewise.
11138         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
11139
11140         * m4/regex.m4: Adjust to new libc regex implementation.
11141         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
11142         all the .c and .h parts of (the new) regex.
11143         Quote the m4 stuff better.
11144         Check for RE_ICASE bug of old gnulib.
11145         Check for REG_STARTEND of recent libc.
11146         Rename local variables from jm_* to gl_*.
11147         Quote operand of "test -f".
11148         Say "recent enough" version of libc, not "version 2".
11149         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
11150         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
11151         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
11152         Remove check for btowc, isascii.
11153         Require AM_LANGINFO_CODESET.
11154
11155 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11156
11157         * lib/regex.c, regex.h: Sync from libc.
11158         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
11159         * lib/regexec.c:
11160         New files, synced from libc, except that regex_internal.h
11161         currently has a small porting fix.
11162
11163 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11164
11165         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
11166         regex_internal.c, regexec.c.
11167         Add regex_internal.h too, but as a comment, since the libc version
11168         is currently broken in gnulib mode.
11169
11170 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
11171
11172         Support programs like Emacs that use gnulib but not gettext.
11173         * MODULES.html.sh (Internationalization functions): Add gettext-h.
11174         * modules/gettext-h: New file.
11175         * modules/gettext (Files): Remove lib/gettext.h.
11176         (Depends-on): Add gettext-h.
11177         (Makefile.am): Remove lib_SOURCES.
11178         * modules/argmatch, modules/c-stack, modules/closeout:
11179         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
11180         * modules/execute, modules/file-type, modules/getaddrinfo:
11181         * modules/getopt, modules/human, modules/javacomp:
11182         * modules/javaexec, modules/mkdir-p, modules/obstack:
11183         * modules/openat, modules/pagealign_alloc, modules/pipe:
11184         * modules/quotearg, modules/regex, modules/rpmatch:
11185         * modules/unicodeio, modules/userspec, modules/version-etc:
11186         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
11187         * modules/xsetenv:
11188         Depend on gettext-h, not gettext.
11189
11190 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
11191
11192         * gnulib-tool (func_import): Add support for 'public domain' license.
11193         * modules/alloca, modules/atexit, modules/memmove:
11194         Now public domain, not GPL.
11195         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
11196         * modules/realloc, modules/strerror, modules/strtod:
11197         Now LGPL, not GPL.
11198
11199 2005-07-05  Bruno Haible  <bruno@clisp.org>
11200
11201         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
11202         autoconf CVS. Needed for mingw.
11203
11204 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11205
11206         Remove the dependency of the strftime module on the tzset module.
11207         * modules/strftime (Depends-on): Remove dependency on tzset.
11208
11209 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11210
11211         Remove the dependency of the strftime module on the tzset module.
11212         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
11213         gl_FUNC_TZSET_CLOBBER.
11214
11215 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11216
11217         Remove the dependency of the strftime module on the tzset module.
11218         * lib/strftime.c (my_strftime)
11219         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
11220         Copy the input structure, to work around some of the bug with
11221         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
11222         Solaris releases, you should also use the tzset module, but we won't
11223         require it as a dependency any more since we don't want LGPLed code
11224         to depend on GPLed code.
11225
11226 2005-07-02  Jim Meyering  <jim@meyering.net>
11227
11228         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
11229         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
11230         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
11231         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
11232
11233 2005-07-02  Jim Meyering  <jim@meyering.net>
11234
11235         * lib/backupfile.c (backup_args): Change a `0' to NULL.
11236
11237 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11238
11239         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
11240         declares only 'struct timespec;' (!).
11241
11242 2005-07-01  Jim Meyering  <jim@meyering.net>
11243
11244         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
11245         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
11246         * lib/save-cwd.c, tempname.c:
11247         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11248         and don't include <sys/file.h>).
11249
11250 2005-06-29  Jim Meyering  <jim@meyering.net>
11251
11252         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
11253         type name.  Use the variable name instead.
11254         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
11255         Likewise.
11256
11257 2005-06-28  Simon Josefsson  <jas@extundo.com>
11258
11259         * modules/check-version (Files): Add check-version.m4.
11260
11261 2005-06-28  Simon Josefsson  <jas@extundo.com>
11262
11263         * m4/check-version.m4: New file, suggested by Jim Meyering
11264         <jim@meyering.net>.
11265
11266 2005-06-28  Simon Josefsson  <jas@extundo.com>
11267
11268         * lib/check-version.h, lib/check-version.c: New files.
11269
11270 2005-06-28  Simon Josefsson  <jas@extundo.com>
11271
11272         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
11273         collision with global variable.  Better indentation.  Don't
11274         increment buffer pointer beyond buffer end.  Based on comments
11275         from Paul Eggert <eggert@cs.ucla.edu>.
11276
11277         * lib/base64.h: Indent.
11278
11279 2005-06-28  Simon Josefsson  <jas@extundo.com>
11280
11281         * doc/gnulib.texi (Library version handling): New section.
11282
11283 2005-06-28  Jim Meyering  <jim@meyering.net>
11284
11285         * check-module (find_included_lib_files): Hard-code another
11286         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
11287         but modules/fts-lgpl (correctly) does not list those files.
11288
11289         * modules/canonicalize (Files): Add lib/pathmax.h.
11290
11291 2005-06-25  Simon Josefsson  <jas@extundo.com>
11292
11293         * modules/check-version: New file.
11294
11295 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
11296
11297         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
11298         initializer of struct addrinfo, as an indication that we don't
11299         care how many members the structure has.
11300
11301 2005-06-24  Derek Price  <derek@ximbiot.com>
11302         and Bruno Haible  <bruno@clisp.org>
11303
11304         Remove stat module & update lstat.
11305         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
11306         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
11307         * m4/stat.m4: Remove this file.
11308
11309 2005-06-24  Derek Price  <derek@ximbiot.com>
11310         and Bruno Haible  <bruno@clisp.org>
11311
11312         Remove stat module & update lstat.
11313         * lib/stat.c: Remove this file...
11314         (slash_aware_lstat): ...moving this content and its support...
11315         * lib/lstat.c (rpl_lstat): ...into here.
11316         * lib/lstat.h: New file.
11317
11318 2005-06-24  Derek Price  <derek@ximbiot.com>
11319         and Bruno Haible  <bruno@clisp.org>
11320
11321         Remove stat module & update lstat.
11322         * config/srclist.txt (libc sources): Remove stat.
11323
11324 2005-06-24  Derek Price  <derek@ximbiot.com>
11325         and Bruno Haible  <bruno@clisp.org>
11326
11327         Remove stat module & update lstat.
11328         * MODULES.html.sh (stat): Remove.
11329         * MODULES.html: Regenerated.
11330         * modules/lstat (Description): Correct function name.
11331         (Files): Add "lstat.h".
11332         (Depends-on): Remove stat, add xalloc, stat-macros.
11333         * modules/stat: Remove this file.
11334         (Include): Add "lstat.h", remove <sys/stat.h>.
11335
11336 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
11337
11338         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
11339         (ranged_convert): Don't save conversion in a temporary struct.
11340         This causes a warning with GCC 4.0.0, and anyway in the typical
11341         case it's not worth the extra 100 bytes or so of code.
11342         (ranged_convert, __mktime_internal): When calling a function via a
11343         pointer P, use P () rather than (*P) (), as we now assume C89 or
11344         better.
11345
11346 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
11347
11348         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
11349         "who -r" failed to give output.  Problem reported by Tim Waugh.
11350
11351         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
11352         (xcalloc): Use it to avoid needless tests.
11353         Problem reported by Jim Meyering.
11354
11355 2005-06-20  Derek Price  <derek@ximbiot.com>
11356
11357         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
11358         unnecessary for Autoconfs > 2.59c.
11359
11360 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11361
11362         * lib/argp.h (__option_is_short): Check upper limit of
11363         __key. Isprint() requires its argument to have the value
11364         of an unsigned char or EOF.
11365
11366 2005-06-16  Jim Meyering  <jim@meyering.net>
11367
11368         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
11369         when either N or S is zero.
11370
11371 2005-06-16  Derek Price  <derek@ximbiot.com>
11372
11373         * m4/bison.m4: Declare YACC & YFLAGS precious.
11374
11375 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
11376
11377         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
11378         multibyte string or pattern, fall back on unibyte matching.
11379         Problem reported by James Youngman.
11380
11381 2005-06-08  Bruno Haible  <bruno@clisp.org>
11382
11383         * modules/csharpcomp: New file.
11384         * MODULES.html.sh (C#): Add csharpcomp.
11385
11386 2005-06-08  Bruno Haible  <bruno@clisp.org>
11387
11388         * m4/csharpcomp.m4: New file, from GNU gettext.
11389
11390 2005-06-08  Bruno Haible  <bruno@clisp.org>
11391
11392         * lib/csharpcomp.h: New file, from GNU gettext.
11393         * lib/csharpcomp.c: New file, from GNU gettext.
11394         * lib/csharpcomp.sh.in: New file, from GNU gettext.
11395
11396 2005-06-08  Bruno Haible  <bruno@clisp.org>
11397
11398         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
11399         warning on mingw.
11400
11401 2005-06-07  Derek Price  <derek@ximbiot.com>
11402
11403         Sync from CVS.
11404         * lib/glob_.h: Indent nested #ifdef.
11405
11406 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11407
11408         Sync from coreutils.
11409         Use "file name" when talking about file names, instead of "filename"
11410         or "path", as per the GNU coding standards.
11411         * lib/mkdir-p.c: Renamed from makepath.c.
11412         (make_dir_parents): Renamed from make_path.  All callers changed.
11413         * lib/mkdir-p.h: Likewise.  All includers changed.
11414         * lib/filenamecat.c: Renamed from path-concat.c.
11415         (file_name_concat): Renamed from path_concat.  All callers changed.
11416         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
11417         * lib/filenamecat.h: Likewise.  All includers changed.
11418         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
11419         in comments or local variable names.
11420         * lib/basename.c: Likewise.
11421         * lib/canonicalize.c, canonicalize.h: Likewise.
11422         * lib/dirname.c, dirname.h: Likewise.
11423         * lib/euidaccess.c: Likewise.
11424         * lib/exclude.c: Likewise
11425         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
11426         * lib/fsusage.c, fsuage.h: Likewise.
11427         * lib/fts.c, fts_.h: Likewise.
11428         * lib/getcwd.c: Likewise.
11429         * lib/getloadavg.c: Likewise.
11430         * lib/mkstemp.c: Likewise.
11431         * lib/mountlist.c, mountlist.h: Likewise.
11432         * lib/openat.c, openat.h: Likewise.
11433         * lib/readlink-stub.c: Likewise.
11434         * lib/readutmp.c, readutmp.h: Likewise.
11435         * lib/rename.c: Likewise.
11436         * lib/rmdir.c: Likewise.
11437         * lib/same.c: Likewise.
11438         * lib/savedir.c: Likewise.
11439         * lib/stripslash.c: Likewise.
11440         * lib/tempname.c: Likewise.
11441         * lib/xreadlink.c: Likewise.
11442         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
11443         All uses changed.
11444         * lib/exclude.h: Likewise.
11445
11446         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
11447         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11448         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
11449         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11450         * lib/pathmax.h: Include <limits.h> unconditionally, since other
11451         files have been getting away with it for years (MORE/BSD 4.3
11452         is extinct now).
11453         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
11454         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11455
11456         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
11457         Define to 256, not 255, as per modern POSIX.
11458
11459 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11460
11461         Sync from coreutils.
11462         Use "file name" when talking about file names, instead of "filename"
11463         or "path", as per the GNU coding standards.
11464         * MODULES.html.sh: mkdir-p renamed from makepath.
11465         filenamecat renamed from path-concat.
11466         * modules/filenamecat: Renamed from modules/path-concat.
11467         (Files): filenamecat.h and filenamecat.c renamed from
11468         path-concat.h and path-concat.c.
11469         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
11470         (Include): filenamecat.h, not path-concat.h.
11471         * modules/mkdir-p: Renamed from modules/makepath.
11472         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
11473         makepath.c.
11474         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
11475         (Include): mkdir-p.h, not makepath.h.
11476
11477 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11478
11479         Sync from coreutils.
11480         * m4/mkdir-p.m4: Renamed from makepath.m4.
11481         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
11482         Rename files from makepath.c to mkdir-p.c, and from
11483         makepath.h to mkdir-p.h.
11484         * m4/filenamecat.m4: Renamed from path-concat.m4.
11485         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
11486         Rename files from path-concat.c to filenamecat.c,
11487         and from path-concat.h to filenamecat.h.
11488         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
11489         "file name" in local variables or comments.
11490         * m4/rename.m4: Likewise.
11491
11492 2005-06-01  Bruno Haible  <bruno@clisp.org>
11493
11494         * modules/csharpexec: New file.
11495         * MODULES.html.sh (C#): New section.
11496
11497 2005-06-01  Bruno Haible  <bruno@clisp.org>
11498
11499         * m4/csharp.m4: New file, from GNU gettext.
11500         * m4/csharpexec.m4: New file, from GNU gettext.
11501
11502 2005-06-01  Bruno Haible  <bruno@clisp.org>
11503
11504         * lib/csharpexec.h: New file, from GNU gettext.
11505         * lib/csharpexec.c: New file, from GNU gettext.
11506         * lib/csharpexec.sh.in: New file, from GNU gettext.
11507
11508 2005-05-31  Derek Price  <derek@ximbiot.com>
11509             Paul Eggert  <eggert@cs.ucla.edu>
11510
11511         Sync from cvs.
11512         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
11513
11514 2005-05-31  Derek Price  <derek@ximbiot.com>
11515             Paul Eggert  <eggert@cs.ucla.edu>
11516
11517         Sync from cvs.
11518         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
11519
11520 2005-05-29  Derek Price  <derek@ximbiot.com>
11521
11522         * config/srclist.txt (glob_.h, glob.c): Add these files.
11523
11524 2005-05-29  Derek Price  <derek@ximbiot.com>
11525
11526         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
11527         * modules/glob: New file.
11528         * modules/getlogin_r: Add link to POSIX spec in description.
11529
11530 2005-05-29  Derek Price  <derek@ximbiot.com>
11531             Paul Eggert  <eggert@cs.ucla.edu>
11532
11533         * m4/glob.m4: New file.
11534
11535 2005-05-29  Derek Price  <derek@ximbiot.com>
11536             Paul Eggert  <eggert@cs.ucla.edu>
11537
11538         * lib/glob_.h, lib/glob.c: New files.
11539
11540 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11541
11542         * modules/fts (Files): Remove m4/inttypes-pri.m4.
11543         * modules/fts-lgpl (Depends-on): Remove gettext.
11544
11545 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11546
11547         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
11548         and don't require gt_INTTYPES_PRI.
11549
11550 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11551
11552         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
11553
11554         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
11555         the configuration hassle isn't worth it.
11556         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
11557         (LONGEST_MODIFIER, PRIuMAX): Remove.
11558
11559 2005-05-27  Bruno Haible  <bruno@clisp.org>
11560
11561         * lib/getlogin_r.h: Remove second include of <stddef.h>.
11562
11563 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
11564
11565         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
11566         _POSIX_PTHREAD_SEMANTICS for Solaris.
11567
11568 2005-05-25  Derek Price  <derek@ximbiot.com>
11569
11570         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
11571
11572 2005-05-25  Derek Price  <derek@ximbiot.com>
11573             Paul Eggert  <eggert@cs.ucla.edu>
11574
11575         * modules/getlogin_r, m4/getlogin_r.m4: New files.
11576         * lib/getlogin_r.c, getlogin_r.h: New files.
11577
11578 2005-05-25  Bruno Haible  <bruno@clisp.org>
11579             Derek Price  <derek@ximbiot.com>
11580
11581         * lib/getlogin_r.h: Simplify API documentation.
11582
11583 2005-05-23  Derek Price  <derek@ximbiot.com>
11584
11585         * modules/minmax (Files): Add m4/minmax.m4.
11586         (configure.ac): Add gl_MINMAX.
11587
11588 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
11589
11590         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
11591         so that unistd-safer.h (GPL'ed code) need not be included.
11592
11593 2005-05-22  Bruno Haible  <bruno@clisp.org>
11594
11595         * m4/minmax.m4: New file.
11596         Based on a patch by Derek Price <derek@ximbiot.com>.
11597
11598 2005-05-22  Bruno Haible  <bruno@clisp.org>
11599
11600         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
11601         (INT64_MIN): Fix definition.
11602         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
11603
11604         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
11605         NEED_SIGNED_INT_TYPES.
11606
11607         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
11608         HAVE_SYSTEM_INTTYPES.
11609
11610 2005-05-22  Bruno Haible  <bruno@clisp.org>
11611
11612         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
11613         Also include <sys/param.h> if it defines MIN, MAX.
11614         Based on a patch by Derek Price <derek@ximbiot.com>.
11615
11616 2005-05-21  Jim Meyering  <jim@meyering.net>
11617
11618         * modules/fts (Files): Add m4/inttypes-pri.m4.
11619         (Depends-on): Add lstat and remove gettext.  Alphabetize.
11620
11621 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11622
11623         New fts module.
11624         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
11625         (setup_dir, free_dir): New functions.
11626         (enter_dir, leave_dir): Define trivial
11627         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
11628         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
11629         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
11630         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
11631         Move to fts-cycle.c.
11632         (fts_open): Use setup_dir.
11633         (fts_close): Use free_dir.
11634         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
11635         This adds a label and some gotos, but the alternatives were messier.
11636         Check for memory allocation failure when entering a dir.
11637         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
11638         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
11639         (FTS): New member fts_cycle, that is a union that contains the
11640         old active_dir_ht and cycle_state.  All uses changed to mention
11641         fts_cycle.ht and fts_cycle.state.
11642         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
11643         fts.c, with the following changes:
11644         (setup_dir, free_dir): New functions.
11645         (enter_dir): Now returns bool.  Return true if successful, false
11646         if memory exhausted.  All callers changed.
11647         Do not bother partly cleaning up on
11648         memory allocation failure; that is free_dir's job.
11649         However, free ad if hash_insert fails, to avoid memory leak.
11650         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
11651         fts->fts_options to see which union member to use.
11652
11653 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11654
11655         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
11656         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
11657
11658 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11659
11660         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
11661
11662 2005-05-20  Jim Meyering  <jim@meyering.net>
11663
11664         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
11665         Now a macro, to pacify GCC.
11666
11667 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
11668
11669         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
11670         of -1.
11671
11672 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
11673
11674         * lib/chown.c (rpl_chown): Return -1 on failure.
11675
11676 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
11677
11678         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
11679         Don't check for stddef.h.
11680         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
11681         don't use its results.
11682         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
11683         since we include them unconditionally.  Don't require
11684         AM_STDBOOL_H, since stdbool is a prerequisite.
11685         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
11686         since we assume C89 or better.
11687         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
11688         as we don't use their results.
11689         Don't check for fchdir, memmove, memset, strrchr, as we use
11690         them unconditionally.
11691         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
11692         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
11693
11694 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
11695
11696         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
11697         Include <stddef.h> unconditionally, since we assume C89 now.
11698         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
11699         * lib/fts.c: Include fts_.h first, to check interface.
11700         Do not include intprops.h; no longer needed.
11701         Include cycle-check.h and hash.h, since fts_.h no longer does.
11702         Remove unnecessary casts of closedir to void.
11703         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
11704         decide whether to decrement nlinks.
11705         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
11706         (FTS): Use struct hash_table * instead of Hash_table, so that
11707         we no longer need to include hash.h here.
11708
11709 2005-05-18  Jim Meyering  <jim@meyering.net>
11710
11711         * modules/dirfd (License): Change to LGPL.  Most of the code
11712         is already in the public domain.
11713
11714 2005-05-18  Jim Meyering  <jim@meyering.net>
11715
11716         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
11717         Reported by Yoann Vandoorselaere.
11718
11719 2005-05-17  Jim Meyering  <jim@meyering.net>
11720
11721         * m4/fts.m4: New file, from coreutils.
11722
11723 2005-05-17  Jim Meyering  <jim@meyering.net>
11724
11725         * lib/fts.c, lib/fts_.h: New files, from coreutils.
11726
11727 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11728
11729         Sync from coreutils.
11730         * m4/unlinkdir.m4: New file.
11731
11732 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11733
11734         Sync from coreutils.
11735         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
11736         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
11737         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
11738         White space changes only.
11739         * lib/makepath.c (make_path): Port to hosts where leading "//" is
11740         special.
11741         * lib/yesno.c: Include getline.h, not ctype.h.
11742         (yesno): Don't remove leading white space; POSIX doesn't allow it.
11743         Use getline to remove arbitrary restriction on response length.
11744
11745 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11746
11747         * config/srclist-update: Spell out "Street" in FSF postal
11748         mail address; this is the style the FSF seems to prefer.
11749
11750         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
11751         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
11752         this updates FSF postal mail address.
11753
11754         Sync from coreutils.
11755         * modules/unlinkdir: New file.
11756         * modules/yesno (Depends-on): Add getline.
11757         * MODULES.html.sh (File system functions): Add unlinkdir.
11758
11759 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
11760
11761         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
11762         lib/strsep.h:
11763         Change the initial comment to refer to GPL, not LGPL.
11764         gnulib-tool will change it to LGPL as needed.
11765
11766         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
11767         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
11768         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
11769         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
11770         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
11771         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
11772         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
11773         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
11774         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
11775         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
11776         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
11777         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
11778         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
11779         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
11780         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
11781         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
11782         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
11783         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
11784         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
11785         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
11786         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
11787         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
11788         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
11789         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
11790         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
11791         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
11792         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
11793         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
11794         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
11795         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
11796         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
11797         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
11798         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
11799         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
11800         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
11801         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
11802         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
11803         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
11804         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
11805         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
11806         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
11807         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
11808         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
11809         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
11810         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
11811         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
11812         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
11813         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
11814         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
11815         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
11816         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
11817         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
11818         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
11819         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
11820         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
11821         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
11822         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
11823         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
11824         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
11825         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
11826         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
11827         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
11828         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
11829         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
11830         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
11831         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
11832         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
11833         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
11834         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
11835         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
11836         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
11837         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
11838         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
11839         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
11840         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
11841         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
11842         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
11843         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
11844         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
11845         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
11846         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
11847         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
11848         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
11849         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
11850         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
11851         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
11852         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
11853         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
11854         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
11855         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
11856         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
11857         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
11858         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
11859         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
11860         lib/yesno.c, lib/yesno.h:
11861         Update FSF postal mail address.
11862
11863 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
11864
11865         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
11866         tests/test-memmem.c, tests/test-stpncpy.c:
11867         Update FSF postal mail address.
11868
11869 2005-05-13  Bruno Haible  <bruno@clisp.org>
11870
11871         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
11872         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
11873         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
11874         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
11875         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
11876         Add support for 64-bit integers in the MSVC compiler.
11877
11878 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11879
11880         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
11881
11882 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
11883
11884         * gnulib-tool (func_import): Sort and uniquify recommended includes.
11885
11886 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
11887
11888         * doc/getdate.texi (General date syntax): Don't say that date
11889         date --iso-8601=ns generates acceptable dates; it doesn't yet.
11890         Problem reported by Nic Ferrier.
11891
11892 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11893
11894         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
11895         specified in ai_socktype. Fix invalid ai_protocol
11896         check. ai_protocol is usually set to 0 or depending on
11897         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
11898         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
11899         ai_socktype / ai_protocol in the returned addrinfo structure.
11900
11901 2005-05-10  Simon Josefsson  <jas@extundo.com>
11902
11903         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
11904         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11905
11906 2005-05-10  Karl Berry  <karl@gnu.org>
11907
11908         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
11909         (from http://www.gnu.org/licenses).
11910         * doc/COPYING.LIB: also rename to COPYING.LESSER.
11911         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
11912         fdl.texi suffices.
11913
11914 2005-05-10  Karl Berry  <karl@gnu.org>
11915
11916         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
11917         (COPYING.DOC): remove.
11918
11919         * config/srclist-update: new FSF address.
11920
11921 2005-05-10  Derek Price  <derek@ximbiot.com>
11922
11923         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
11924         possible.
11925
11926 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11927             Bruno Haible  <bruno@clisp.org>
11928
11929         * modules/inet_ntop: New file.
11930         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11931         inet_ntop.
11932
11933 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11934             Bruno Haible  <bruno@clisp.org>
11935
11936         * m4/inet_ntop.m4: New file.
11937
11938 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11939             Bruno Haible  <bruno@clisp.org>
11940
11941         * lib/inet_ntop.h: New file.
11942         * lib/inet_ntop.c: New file, from glibc with modifications.
11943
11944 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
11945
11946         * modules/time_r (License): Change to LGPL.
11947         * modules/extensions (License): Change to LGPL.  Actually,
11948         the license is more permissive than that, but currently gnulib-tool
11949         doesn't know how to handle more-permissive licenses.
11950
11951         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
11952         Problem reported by Dave Love.
11953
11954 2005-05-08  Jim Meyering  <jim@meyering.net>
11955
11956         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
11957         blank.
11958
11959 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
11960
11961         * modules/argmatch (Depends-on): Add stdbool.
11962         * modules/backupfile (Depends-on): Likewise.
11963         * modules/chdir-long (Depends-on): Likewise.
11964         * modules/closeout (Depends-on): Likewise.
11965         * modules/cycle-check (Depends-on): Likewise.
11966         * modules/dirname (Depends-on): Likewise.
11967         * modules/fnmatch (Depends-on): Likewise.
11968         * modules/fsusage (Depends-on): Likewise.
11969         * modules/fwriteerror (Depends-on): Likewise.
11970         * modules/getcwd (Depends-on): Likewise.
11971         * modules/getloadavg (Depends-on): Likewise.
11972         * modules/hard-locale (Depends-on): Likewise.
11973         * modules/makepath (Depends-on): Likewise.
11974         * modules/mountlist (Depends-on): Likewise.
11975         * modules/nanosleep (Depends-on): Likewise.
11976         * modules/posixtm (Depends-on): Likewise.
11977         * modules/quotearg (Depends-on): Likewise.
11978         * modules/readtokens (Depends-on): Likewise.
11979         * modules/readtokens0 (Depends-on): Likewise.
11980         * modules/readutmp (Depends-on): Likewise.
11981         * modules/save-cwd (Depends-on): Likewise.
11982         * modules/strftime (Depends-on): Likewise.
11983         * modules/userspec (Depends-on): Likewise.
11984         * modules/utimecmp (Depends-on): Likewise.
11985         * modules/xgetcwd (Depends-on): Likewise.
11986         * modules/xnanosleep (Depends-on): Likewise.
11987         * modules/xstrtod (Depends-on): Likewise.
11988         * modules/yesno (Depends-on): Likewise.
11989
11990 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
11991
11992         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
11993         needless checks.
11994
11995 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11996
11997         Merge from coreutils.  Among other things,
11998         add bulletproofing for cases where stdin, stdout, or stderr are closed.
11999         * lib/fd-safer.c: New file.
12000         * lib/fcntl-safer.h, open-safer.c: Remove.
12001         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
12002         * lib/dup-safer.c: Include unistd-safer.h first.
12003         Don't include errno.h.
12004         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
12005         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
12006         * lib/file-type.c: Rely on file-type.h change.
12007         * lib/getloadavg.c: Include unistd-safer.h.
12008         (getloadavg): Use safer open.
12009         * lib/getusershell.c: Include "stdio-safer.h".
12010         (getusershell): Use safer fopen.
12011         * lib/long-options.c (long_options): Use NULL rather than 0.
12012         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
12013         'free'.
12014         * lib/modechange.c: Likewise.
12015         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
12016         (MODE_DONE): New constant.
12017         (struct mode_change): Remove 'next' member.
12018         (make_node_op_equals): New function; like the old one of the
12019         same name, except it allocates an array.
12020         (mode_compile, mode_create_from_ref): Use it.
12021         (mode_compile): Allocate result as an array, not a linked list.
12022         Parse octal string ourself, so that we catch mistakes like "+0".
12023         (mode_adjust): Arg is an array, not a linked list.
12024         * lib/modechange.c: Include stat-macros.h, xalloc.h.
12025         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
12026         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
12027         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
12028         Remove.  This is now stat-macros.h's job.
12029         (talloc): Remove.  All callers replaced by xalloc, so that
12030         our invokers don't have to worry about reporting memory failures.
12031         (make_node_op_equals): Remove.
12032         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12033         New constants.
12034         (struct mode_change): Moved here from modechange.h.
12035         (mode_append_entry): Remove.
12036         (mode_compile): Remove MASKED_OPS arg, since it encouraged
12037         apps to have incorrect behavior.  Use simpler algorithm for head
12038         and tail.  Don't futz with umask; that's now the job of mode_adjust.
12039         Detect more invalid usages rather than having somewhat-random behavior.
12040         Don't insert an "a=" action, as that leads to incorrect behavior.
12041         (mode_compile, mode_create_from_ref): Return NULL on error instead
12042         of an enum, since now there's only one way to have an error.  All
12043         callers changed.
12044         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
12045         at the correct time.  Simplify calculation of "+u" and its ilk.
12046         Don't mishandle "+X".
12047         (mode_free): Remove "register" and localize decls.
12048         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12049         (struct mode_change): Move to modechange.c; callers don't
12050         need to see this stuff.
12051         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
12052         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
12053         (mode_change, mode_adjust): Reflect the new signatures noted above.
12054         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
12055         that might redefine system include files.
12056         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
12057         (my_usleep): Use NULL rather than (void *) 0.
12058         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
12059         Use siginterrupt to specify that system calls should be interrupted.
12060         (rpl_nanosleep): Move initialization of suspended closer to call of
12061         my_usleep.
12062         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
12063         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
12064         (desirable_utmp_entry): New function.
12065         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
12066         using x2nrealloc, to simplify logic.
12067         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
12068         size calculation.  Do not assume utmp file is a regular file.
12069         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
12070         (READ_UTMP_CHECK_PIDS): New constant.
12071         * lib/save-cwd.c: Include unistd-safer.h.
12072         (save_cwd): Use fd_safer.
12073         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
12074         [!_LIBC] Include "stat-macros.h" instead.
12075         * lib/unistd-safer.h (fd_safer): New decl.
12076
12077 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12078
12079         * modules/getloadavg (Depends-on): Add unistd-safer.
12080         * modules/getusershell (Depends-on): Add stdio-safer.
12081         * modules/lstat (Depends-on): Remove xalloc.
12082         * modules/mkstemp (Depends-on): Add stat-macros.
12083         * modules/modechange (Depends-on): Remove xstrtol.
12084         Add stat-macros, xalloc.
12085         * modules/save-cwd (Depends-on): Add unistd-safer.
12086         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
12087         * modules/unistd-safer (Files): Add lib/fd-safer.c
12088         (Makefile.am): Remove lib_SOURCES.
12089
12090         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
12091         Remove fcntl-safer; unistd-safer supersedes it.
12092
12093 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12094
12095         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
12096         AC_HEADER_STAT.
12097         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
12098         (gl_PREREQ_CHOWN): Remove.
12099         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
12100         it.  Don't require AC_HEADER_STAT.
12101         (gl_PREREQ_LSTAT): Remove.
12102         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
12103         Don't require AC_HEADER_STAT.
12104         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
12105         (gl_PREREQ_RMDIR): Remove.
12106         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
12107         mention stat-macros.h or AC_HEADER_STAT, since we'll make
12108         the stat-macros module a prerequisite.
12109         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
12110         * m4/filemode.m4 (gl_FILEMODE): Likewise.
12111         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
12112         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
12113         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
12114         variable names.
12115         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
12116         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
12117         variable prefixes.
12118         * m4/fcntl-safer.m4: Remove.
12119         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
12120         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
12121         Invoke gl_PREREQ_FD_SAFER.
12122         (gl_PREREQ_FD_SAFER): New macro.
12123         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
12124         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
12125         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
12126         Remove duplicate call to AC_LIBOBJ(readutmp).
12127         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
12128
12129         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
12130         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
12131
12132 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12133
12134         * MODULES.html.sh (Misc): Add byteswap.
12135
12136 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12137
12138         * modules/getcwd (Depends-on): Add extensions.
12139         * modules/openat (Depends-on): Likewise.
12140
12141 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12142
12143         * modules/byteswap: New file.
12144
12145 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12146
12147         * m4/byteswap.m4: New file.
12148
12149 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12150
12151         * lib/byteswap_.h: New file.
12152
12153 2005-04-25  Karl Berry  <karl@gnu.org>
12154
12155         * m4/gettext.m4: Update from GNU gettext 0.14.4.
12156
12157 2005-04-25  Albert Chin  <china@thewrittenword.com>
12158
12159         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
12160         Toolkit C bug.
12161
12162 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
12163
12164         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
12165         (func_ln_if_changed) Remove forcibly for no error message
12166         in case file does not exist.
12167
12168 2005-04-19  Simon Josefsson  <jas@extundo.com>
12169
12170         * gnulib-tool (Options): Make --symlink mean --symbolic.
12171
12172 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
12173
12174         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
12175
12176 2005-04-16  Simon Josefsson  <jas@extundo.com>
12177
12178         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
12179
12180 2005-04-15  Simon Josefsson  <jas@extundo.com>
12181
12182         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
12183
12184 2005-04-15  Simon Josefsson  <jas@extundo.com>
12185
12186         * gnulib-tool: Rename --symlink to --symbolic.
12187
12188 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
12189
12190         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
12191         symbolic links to files instead of copying/moving.  Add --aux-dir,
12192         specifying directory relative --dir where auxiliary build tools
12193         are placed.
12194
12195 2005-04-14  Bruno Haible  <bruno@clisp.org>
12196
12197         * modules/allocsa (License): Change to LGPL.
12198         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
12199
12200 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
12201
12202         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
12203         that "UTC +1 second" continues to work.  Problem reported
12204         by Dmitry V. Levin.
12205         (relunit_snumber): New rule.
12206         (relunit): Use it.
12207
12208 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
12209
12210         * lib/getdate.y (universal_time_zone_table): New constant.
12211         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
12212         universal_time_zone_table.
12213         (lookup_zone): Prefer universal_time_zone_table to
12214         local_time_zone_table, so that "GMT" time stamps are allowed in
12215         London during the summer.  Problem reported by Ian Abbott.
12216
12217 2005-04-12  Jim Meyering  <jim@meyering.net>
12218
12219         * lib/human.c (humblock): Set *options even when returning due to
12220         xstrtoumax conversion failure.  Thanks to a used-uninitialized
12221         warning from gcc-4.
12222
12223 2005-04-09  Jim Meyering  <jim@meyering.net>
12224
12225         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
12226         -Wuninitialized: initialize tm0.tm_year.
12227
12228 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
12229
12230         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
12231         count, since there's no maximum.  All uses changed.
12232         Add member dsts_seen.
12233         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
12234         not being INT_MAX.
12235         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
12236         Use pc_rels_seen to decide whther a date is absolute.
12237
12238         * lib/getdate.y (number): Don't overwrite year.
12239         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
12240         check.
12241
12242 2005-04-02  Simon Josefsson  <jas@extundo.com>
12243
12244         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
12245         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
12246
12247 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
12248
12249         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
12250         where no absolute path name can be longer than PATH_MAX.
12251
12252 2005-03-27  Jim Meyering  <jim@meyering.net>
12253
12254         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
12255
12256 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
12257
12258         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
12259         "one's complement" -> "ones' complement" in comment, as per Knuth.
12260         "value of type" -> "type or expression" in comment.
12261         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
12262
12263 2005-03-26  Jim Meyering  <jim@meyering.net>
12264
12265         Comment nits.
12266         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
12267         Correct typos: s/or/of/.
12268
12269 2005-03-26  Jim Meyering  <jim@meyering.net>
12270
12271         * modules/check-include-files: Move to ../ and rename to...
12272         * check-module: ...this.
12273
12274 2005-03-25  Jim Meyering  <jim@meyering.net>
12275
12276         * modules/xvasprintf (Files): Add xalloc.h.
12277
12278 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
12279
12280         * modules/gettext (Files): config/config.rpath ->
12281         build-aux/config.rpath
12282         * modules/iconv (Files): Likewise.
12283         Problem reported by Oskar Liljeblad.
12284
12285 2005-03-23  Jim Meyering  <jim@meyering.net>
12286
12287         * modules/check-include-files: New script to check for
12288         missing dependencies, multiple includes, etc.
12289
12290         * modules/c-strtold (Depends-on): Add xalloc.
12291         * modules/c-strtod (Depends-on): Add xalloc.
12292         * modules/hash (Depends-on): Add xalloc.
12293         (Files): Remove lib/xalloc.h.
12294
12295         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
12296         * modules/userspec (Files): Add lib/inttostr.h.
12297
12298 2005-03-23  Jim Meyering  <jim@meyering.net>
12299
12300         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
12301
12302 2005-03-22  Jim Meyering  <jim@meyering.net>
12303
12304         * modules/stat-macros: New module.
12305         * modules/canonicalize, modules/euidaccess, modules/file-type,
12306         * modules/filemode, modules/lchown, modules/makepath,
12307         * modules/rmdir, modules/stat: Depend on new stat-macros module
12308         rather than listing lib/stat-macros.h manually.
12309         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
12310
12311 2005-03-22  Jim Meyering  <jim@meyering.net>
12312
12313         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
12314
12315 2005-03-22  Bruno Haible  <bruno@clisp.org>
12316
12317         * config/srclist.txt: Replace target directory 'config' with
12318         'build-aux'.
12319         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
12320         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
12321         ../build-aux/.
12322
12323 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
12324
12325         * modules/chdir-long (Depends-on): Add mempcpy.
12326
12327         * modules/acl, modules/backupfile, modules/c-strtod,
12328         modules/c-strtold, modules/canon-host, modules/canonicalize,
12329         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
12330         modules/exclude, modules/exitfail, modules/file-type,
12331         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
12332         modules/getdate, modules/getline, modules/getpagesize,
12333         modules/getpass, modules/getugroups, modules/group-member,
12334         modules/hard-locale, modules/hash, modules/human, modules/idcache,
12335         modules/inttostr, modules/long-options, modules/makepath,
12336         modules/md5, modules/memcasecmp, modules/memcoll,
12337         modules/modechange, modules/mountlist, modules/path-concat,
12338         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
12339         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
12340         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
12341         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
12342         modules/strftime, modules/strndup, modules/strverscmp,
12343         modules/timespec, modules/unlocked-io, modules/userspec,
12344         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
12345         modules/yesno:
12346         Remove lib_SOURCES line from Makefile.am section, as this is now
12347         done automatically by the corresponding Autoconf macro.
12348
12349 2005-03-21  Jim Meyering  <jim@meyering.net>
12350
12351         Changes imported from coreutils.
12352
12353         * lib/cycle-check.c: Don't include xalloc.h.
12354
12355         * lib/path-concat.c: Don't include assert.h.
12356         (path_concat): Remove assertion that would have triggered
12357         for ABASE starting with more than one slash.
12358         Reported by Andreas Schwab.
12359
12360         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
12361         properly when ABASE is an absolute file name.
12362         Correct the description of this function.
12363         Include <assert.h>.
12364         Add an assertion and a test driver.
12365         This fixes a bug introduced on 2004-07-02.
12366         Andreas Schwab reported the resulting failure of cp --parents:
12367         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
12368
12369 2005-03-21  Jim Meyering  <jim@meyering.net>
12370
12371         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
12372         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
12373
12374 2005-03-21  Jim Meyering  <jim@meyering.net>
12375         and  Paul Eggert  <eggert@cs.ucla.edu>
12376
12377         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
12378         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
12379         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
12380         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
12381         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
12382         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
12383         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
12384         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
12385         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
12386         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
12387         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
12388         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
12389         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
12390         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
12391         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
12392         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
12393         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
12394         for these modules.
12395
12396 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
12397
12398         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
12399         (which shouldn't happen), generate nothing instead of returning 0
12400         immediately, so that nstrftime (NULL, ...) doesn't return 0.
12401
12402 2005-03-16  Bruno Haible  <bruno@clisp.org>
12403
12404         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
12405         HAVE_LONGLONG_64BIT.
12406
12407 2005-03-16  Bruno Haible  <bruno@clisp.org>
12408
12409         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
12410         HAVE_LONGLONG_64BIT.
12411
12412 2005-03-16  Bruno Haible  <bruno@clisp.org>
12413
12414         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
12415         HAVE_LONGLONG_64BIT.
12416
12417 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
12418
12419         * lib/strftime.c (my_strftime): Prepend space to format so that we can
12420         reliably distinguish strftime failure from empty output on POSIX
12421         hosts.
12422
12423 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
12424
12425         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
12426         (iconv_string): Don't guess a size-zero buffer, as that might cause
12427         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
12428         result would be 'too large', where 'too large' is (heuristically)
12429         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
12430         overflow concerns.  This will prevent some unwanted malloc failures
12431         when the inputs are very large.
12432
12433 2005-03-15  Karl Berry  <karl@gnu.org>
12434
12435         * config/srclist.txt (config.rpath): from gettext.
12436         * config/config.rpath: update.
12437
12438 2005-03-15  Bruno Haible  <bruno@clisp.org>
12439
12440         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
12441         to 'negate'.
12442
12443         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
12444         variable.
12445
12446         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
12447         results.
12448
12449 2005-03-14  Simon Josefsson  <jas@extundo.com>
12450
12451         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
12452         <fx@gnu.org>.
12453
12454 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
12455
12456         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
12457         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
12458         intprops.h.
12459         * lib/strtol.c: Likewise.
12460
12461 2005-03-14  Jim Meyering  <jim@meyering.net>
12462
12463         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
12464         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
12465         to be nonzero so that we (and caller) can detect the difference
12466         between a valid zero-length expansion and an error return, even
12467         when the underlying strftime fails before writing anything into
12468         that location.
12469
12470 2005-03-14  Bruno Haible  <bruno@clisp.org>
12471
12472         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
12473         Update from GNU gettext 0.14.3.
12474
12475 2005-03-10  Jim Meyering  <jim@meyering.net>
12476
12477         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
12478
12479 2005-03-10  Jim Meyering  <jim@meyering.net>
12480
12481         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
12482         so that this module works on systems without fchdir.
12483
12484 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
12485
12486         Factor int-properties macros into a single file, except for
12487         glibc-related files.
12488         * lib/intprops.h: New file.
12489         * lib/getloadavg.c: Include it instead of limits.h.
12490         (INT_STRLEN_BOUND): Remove.
12491         * lib/human.c: Include intprops.h.
12492         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
12493         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
12494         302/1000.
12495         * lib/inttostr.h: Include intprops.h instead of limits.h.
12496         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
12497         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
12498         for consistency with intprops.h.
12499         (time_t_is_integer, twos_complement_arithmetic): Use them.
12500         * lib/sig2str.h: Include <signal.h>, intprops.h.
12501         (INT_STRLEN_BOUND): Remove.
12502         * lib/strftime.c (TYPE_SIGNED): Remove.
12503         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
12504         * lib/strtol.c: Adjust comments to match intprops.h.
12505         * lib/userspec.c: Include intprops.h.
12506         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
12507         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
12508         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
12509         instead of rolling our own expressions.
12510         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
12511
12512         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
12513         instead of int.
12514         (my_strftime): Do not mishandle years close to INT_MAX, by doing
12515         the right thing even if adding 1900 would overflow.  Similarly
12516         for tm_mon + 1 and tm_yday + 1.
12517         Make %Y always equivalent to %C%y, and similarly for %G and %g.
12518         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
12519         (DO_SIGNED_NUMBER): New macro.
12520         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
12521
12522 2005-03-07  Bruno Haible  <bruno@clisp.org>
12523
12524         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
12525
12526 2005-03-07  Bruno Haible  <bruno@clisp.org>
12527
12528         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
12529
12530 2005-03-04  Derek R. Price  <derek@ximbiot.com>
12531
12532         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
12533         (func_import): Only replace files via --import when they have actually
12534         changed.
12535
12536 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12537
12538         * m4/mmap-anon.m4: New file.
12539         * m4/pagealign_alloc.m4: New file.
12540
12541 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12542             Bruno Haible  <bruno@clisp.org>
12543
12544         * modules/pagealign_alloc: New file.
12545         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
12546
12547 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12548             Bruno Haible  <bruno@clisp.org>
12549
12550         * lib/pagealign_alloc.h: New file.
12551         * lib/pagealign_alloc.c: New file.
12552
12553 2005-03-03  Bruno Haible  <bruno@clisp.org>
12554
12555         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
12556         Use an all-permissive copyright notice, recommended by RMS.
12557
12558 2005-03-02  Bruno Haible  <bruno@clisp.org>
12559
12560         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
12561         of AIX, the replacement has to be done only after <string.h> is
12562         included, therefore not in config.h. stpncpy.h does the replacement,
12563         and stpncpy.c uses it.
12564
12565 2005-03-02  Bruno Haible  <bruno@clisp.org>
12566
12567         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
12568         stpncpy.c uses it.
12569
12570 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12571
12572         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
12573         The workaround isn't strictly needed for POSIX conformance, and
12574         it's too much of a pain to configure and maintain.  We'll ask
12575         people to fix their kernels instead.
12576         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
12577         (NANOSLEEP_BUG_WORKAROUND): Remove.
12578         (xnanosleep): Remove the workaround.
12579
12580 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12581
12582         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
12583         Reported by Derek Price.
12584         (Include): Add "timespec.h".
12585
12586         * modules/xnanosleep (Depends-on): Remove gethrxtime.
12587
12588 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12589
12590         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
12591         to detect nanosleep bug.
12592
12593 2005-03-01  Bruno Haible  <bruno@clisp.org>
12594
12595         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
12596
12597 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
12598
12599         * modules/gethrxtime: New file.
12600         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
12601         (Depends-on): Add gethrxtime.
12602         (configure.ac): Add gl_XNANOSLEEP.
12603         (Makefile.am): Remove lib_SOURCES line.
12604
12605 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
12606
12607         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
12608         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
12609
12610 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
12611
12612         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
12613         * lib/timespec.h (gettime): Return void, since it always
12614         succeeds now.  All uses changed.
12615         * lib/gettime.c (gettime) Likewise.
12616         [HAVE_NANOTIME]: Prefer nanotime.
12617         Assume gettimeofday succeeds, as POSIX requires.
12618         Assime time () succeeds, since other code already does.
12619         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
12620         (timespec_subtract): Remove.
12621         (NANOSLEEP_BUG_WORKAROUND): New constant.
12622         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
12623         things considerably.  Use it only on GNU/Linux hosts, since the
12624         workaround shouldn't be needed elsewhere.
12625
12626 2005-02-24  Bruno Haible  <bruno@clisp.org>
12627
12628         * modules/gettext (Files): Add m4/glibc2.m4.
12629
12630 2005-02-24  Bruno Haible  <bruno@clisp.org>
12631
12632         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
12633         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
12634         * m4/progtest.m4:
12635         Update from GNU gettext 0.14.2.
12636         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
12637
12638 2005-02-24  Bruno Haible  <bruno@clisp.org>
12639
12640         * lib/localcharset.c: Update from GNU gettext 0.14.2.
12641         * lib/config.charset: Update from GNU gettext 0.14.2.
12642
12643 2005-02-24  Bruno Haible  <bruno@clisp.org>
12644
12645         * lib/gettext.h: Update from GNU gettext 0.14.2.
12646
12647 2005-02-23  Simon Josefsson  <jas@extundo.com>
12648
12649         * m4/iconvme.m4: New file.
12650
12651 2005-02-23  Jim Meyering  <jim@meyering.net>
12652
12653         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
12654         change.
12655         Thanks to Bruno Haible for catching it.
12656
12657 2005-02-22  Simon Josefsson  <jas@extundo.com>
12658
12659         * modules/iconvme: New file.
12660
12661         * MODULES.html.sh: Add iconvme.
12662
12663 2005-02-22  Simon Josefsson  <jas@extundo.com>
12664
12665         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
12666
12667 2005-02-22  Simon Josefsson  <jas@extundo.com>
12668
12669         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
12670
12671 2005-02-22  Jim Meyering  <jim@meyering.net>
12672
12673         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
12674         s/ifndef/ifdef/.
12675
12676 2005-02-20  Neil Conway  <neilc@samurai.com>
12677
12678         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
12679         returned by OSX/Darwin if the specified buffer is not large
12680         enough for the hostname.
12681
12682 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12683
12684         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
12685         pass it to _help, otherwise the latter coredumps trying to
12686         dereference state.root_argp.
12687
12688 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12689
12690         * modules/chdir-long (Depends-on): Add memrchr.
12691         * modules/memrchr (Files): Add lib/memrchr.h.
12692         (Include): "memrchr.h".
12693
12694 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12695
12696         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
12697
12698 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12699
12700         * lib/memrchr.h: New file.
12701         * lib/chdir-long.c: Include it.
12702         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
12703         Don't bother including stddef.h.
12704
12705 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
12706
12707         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
12708         inclusion.
12709         Include <sys/types.h>, for dev_t.
12710         (ME_DUMMY, ME_REMOTE): Move from here....
12711         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
12712         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
12713         Dmitry V. Levin.
12714         Include mountlist.h first, to test the interface.
12715
12716 2005-01-29  Bruno Haible  <bruno@clisp.org>
12717
12718         * lib/progname.c (program_name): Initialize.
12719         Needed when linking statically on MacOS X.
12720
12721 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
12722
12723         Sync from coreutils.
12724         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
12725         (Depends-on): Add c-strtod.
12726         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
12727
12728 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
12729
12730         Sync from coreutils.
12731         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
12732
12733         Remove files that are specific to coreutils.
12734         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
12735
12736 2005-01-28  Bruno Haible  <bruno@clisp.org>
12737
12738         * modules/javacomp: New file.
12739         * MODULES.html.sh (Java): Add javacomp.
12740
12741 2005-01-28  Bruno Haible  <bruno@clisp.org>
12742
12743         * m4/javacomp.m4: New file, from GNU gettext.
12744
12745 2005-01-28  Bruno Haible  <bruno@clisp.org>
12746
12747         * lib/javacomp.sh.in: New file, from GNU gettext.
12748         * lib/javacomp.h: New file, from GNU gettext.
12749         * lib/javacomp.c: New file, from GNU gettext.
12750
12751 2005-01-26  Simon Josefsson  <jas@extundo.com>
12752
12753         * lib/gai_strerror.c: Use GPL in header.
12754
12755 2005-01-26  Bruno Haible  <bruno@clisp.org>
12756
12757         * modules/javaexec: New file.
12758         * MODULES.html.sh (Java): Add javaexec.
12759
12760 2005-01-26  Bruno Haible  <bruno@clisp.org>
12761
12762         * m4/javaexec.m4: New file, from GNU gettext.
12763
12764 2005-01-26  Bruno Haible  <bruno@clisp.org>
12765
12766         * lib/javaexec.sh.in: New file, from GNU gettext.
12767         * lib/javaexec.h: New file, from GNU gettext.
12768         * lib/javaexec.c: New file, from GNU gettext.
12769
12770 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12771
12772         * modules/lchown (Depends-on): Remove lchown.h
12773
12774 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12775
12776         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
12777         must be defined if the header file was not found, in order
12778         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
12779
12780 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12781
12782         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
12783         initializers for struct pentry_state.
12784         (__argp_error): Check return value of __asprintf
12785         (__argp_failure): Translate error message
12786
12787         * lib/argp-parse.c: Removed braces around the expansion of N_()
12788
12789 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12790
12791         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
12792         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
12793         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
12794         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
12795         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
12796         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
12797         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
12798         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
12799         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
12800         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
12801         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
12802         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
12803         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
12804         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
12805         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
12806         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
12807         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
12808         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
12809         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
12810         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
12811         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
12812         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
12813         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
12814         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
12815         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
12816         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
12817         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
12818         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
12819         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
12820         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
12821         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
12822         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
12823         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
12824         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
12825         xstrtol.m4, xstrtoumax.m4, yesno.m4:
12826         Use an all-permissive copyright notice, recommended by RMS.
12827
12828 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
12829
12830         * modules/chdir-long (Depends-on): Remove mempcpy.
12831
12832 2005-01-21  Jim Meyering  <jim@meyering.net>
12833
12834         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
12835         same value as for Solaris 9.
12836
12837         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
12838         component length.  This included changing the parameter to be
12839         of type `char *' rather than `char const *'.
12840         * lib/chdir-long.h (chdir_long): Update prototype.
12841
12842         * lib/openat.c (fdopendir, fstatat): New functions.
12843         * lib/openat.h: Include headers required for use of DIR and struct
12844         stat.
12845         [AT_SYMLINK_NOFOLLOW]: Define.
12846         (fdopendir, fstatat): Add prototypes.
12847
12848 2005-01-21  Bruno Haible  <bruno@clisp.org>
12849
12850         * modules/classpath: New file.
12851         * MODULES.html.sh (Java): Add classpath.
12852
12853 2005-01-21  Bruno Haible  <bruno@clisp.org>
12854
12855         * lib/classpath.h: New file, from GNU gettext.
12856         * lib/classpath.c: New file, from GNU gettext.
12857
12858 2005-01-20  Simon Josefsson  <jas@extundo.com>
12859
12860         * modules/version-etc-fsf: New file.
12861
12862 2005-01-20  Simon Josefsson  <jas@extundo.com>
12863
12864         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
12865         * lib/version-etc.c: Remove version_etc_copyright.
12866         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
12867         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
12868
12869 2005-01-20  Simon Josefsson  <jas@extundo.com>
12870
12871         * lib/base64.h (isbase64): Add.
12872
12873         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
12874         using a unsigned prototype, don't inline.
12875         (base64_decode): Use it.
12876
12877 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12878
12879         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
12880         it.
12881
12882 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12883
12884         * lib/save-cwd.c (save_cwd): Remove code to support the case
12885         where fchdir is missing or flaky.
12886
12887 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12888
12889         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
12890
12891 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
12892
12893         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
12894         AC_LIBSOURCES now does this.
12895         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
12896         with new ullong_max module.
12897
12898 2005-01-19  Bruno Haible  <bruno@clisp.org>
12899
12900         * modules/sh-quote: New file.
12901         * MODULES.html.sh (Executing programs): Add sh-quote.
12902
12903 2005-01-19  Bruno Haible  <bruno@clisp.org>
12904
12905         * lib/sh-quote.h: New file, from GNU gettext.
12906         * lib/sh-quote.c: New file, from GNU gettext.
12907
12908 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12909
12910         Merge from coreutils.
12911         * m4/ullong_max.m4: New file.
12912         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
12913         (gl_MACROS): Assume localeconv exists.
12914
12915 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12916
12917         Merge changes from coreutils, as described below in several
12918         changelogs dated today.
12919
12920         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
12921         (O_DIRECTORY): Remove; not needed here, since "." must be
12922         a directory.  All uses removed.
12923         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
12924         universal on Suns, and we also need to test for IRIX.
12925         Revamp code to use 'if' rather than '#if'.
12926         Avoid unnecessary comparison of cwd->desc to 0.
12927
12928         * lib/utimens.c (futimens): Robustify the previous patch, by checking
12929         for known valid error numbers rather than observed invalid ones.
12930
12931 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12932
12933         * modules/ullong_max: New file.
12934
12935         * modules/chdir-long, modules/openat: New files.
12936         * modules/save-cwd (Depends-on): Depend on chdir-long.
12937         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
12938
12939 2005-01-18  Jim Meyering  <jim@meyering.net>
12940
12941         Merge from coreutils.
12942         * m4/chdir-long.m4, m4/openat.m4: New files.
12943         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
12944         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
12945         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
12946         is sane and DOES follow symlinks.  Besides, testing 20 different
12947         systems found no broken chown implementations.
12948         Prompted by a change in rsync's copy of this macro.
12949         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
12950
12951         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
12952
12953         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
12954         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
12955         NULL-means-set-to-current-time semantics.
12956         Remove temporary file immediately, rather than waiting
12957         for configure's at-exit trap code to do it.
12958
12959 2005-01-18  Jim Meyering  <jim@meyering.net>
12960
12961         * lib/version-etc.c (version_etc_copyright): Update copyright date.
12962
12963         * lib/utimens.c (futimens): Account for the fact that futimes
12964         can also fail with errno == ENOSYS or errno == ENOENT.
12965         Patch from Dmitry V. Levin.
12966
12967         Change the name of the robust chdir function from chdir to chdir_long.
12968         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
12969         (restore_cwd): Use chdir_long, not chdir.
12970         * lib/chdir-long.c: Renamed from chdir.c.
12971         * lib/chdir-long.h: Renamed from chdir.h.
12972         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
12973         Hurd.
12974
12975 2005-01-18  Bruno Haible  <bruno@clisp.org>
12976
12977         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
12978         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
12979         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
12980         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
12981         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
12982         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
12983         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
12984         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
12985         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
12986         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
12987         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
12988         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
12989         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
12990         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
12991         Use an all-permissive copyright notice, recommended by RMS.
12992
12993 2005-01-18  Bob Proulx  <bob@proulx.com>
12994
12995         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
12996         simplify offsetof() macro construct to avoid compile failure with
12997         native HP-UX 11.0 ANSI C compiler.
12998
12999 2005-01-17  Bruno Haible  <bruno@clisp.org>
13000
13001         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
13002         redundant because stpncpy.m4 takes care of it.
13003
13004 2005-01-17  Bruno Haible  <bruno@clisp.org>
13005
13006         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
13007
13008 2005-01-17  Bruno Haible  <bruno@clisp.org>
13009
13010         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
13011         used.
13012
13013 2005-01-17  Bruno Haible  <bruno@clisp.org>
13014
13015         * lib/fwriteerror.h (fwriteerror): Change specification to include
13016         fclose.
13017         * lib/fwriteerror.c: Include <stdbool.h>.
13018         (fwriteerror): At the end, close the file stream. Record whether
13019         stdout was already closed.
13020
13021 2005-01-17  Bruno Haible  <bruno@clisp.org>
13022
13023         * lib/execute.c (environ): Declare if needed.
13024         * lib/pipe.c (environ): Likewise.
13025         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
13026
13027 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13028
13029         * modules/argp: Depend on vsnprintf
13030
13031 2005-01-10  Jim Meyering  <jim@meyering.net>
13032
13033         * modules/closeout (Depends-on): Add atexit.
13034
13035 2005-01-06  Bruno Haible  <bruno@clisp.org>
13036
13037         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
13038
13039 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13040
13041         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
13042         definitions to be after all include files, to avoid collisions.
13043         Problem reported by Bob Proulx.
13044
13045 2005-01-04  Jim Meyering  <jim@meyering.net>
13046
13047         Changes imported from coreutils.
13048         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
13049         as the mkstemp template, use a temporary directory and an
13050         8.3-friendly template to avoid trouble on systems like DJGPP.
13051         Reported by Juan M. Guerrero via Stepan Kasal.
13052         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
13053         close. Remove the temporary directory right away, rather than waiting
13054         for configure's at-exit trap code to do it.
13055         Suggestion from Stepan Kasal.
13056
13057 2005-01-01  Simon Josefsson  <jas@extundo.com>
13058
13059         * gnulib-tool: Print #include directives when --import'ing.
13060
13061 2004-12-28  Simon Josefsson  <jas@extundo.com>
13062
13063         * tests/test-base64.c: Include required header files.  Remove
13064         unused variables.
13065
13066 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13067
13068         * modules/error (Depends-on): Remove gettext.
13069
13070 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13071
13072         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
13073         not needed.  This removes a dependency on the gettext module.
13074         [defined _LIBC]: Do not include <libintl.h>; not needed.
13075
13076 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13077
13078         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
13079         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
13080
13081 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13082
13083         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
13084         HAVE_DECL_STRTOLD.
13085
13086 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13087
13088         * modules/getdate (Depends-on): Remove alloca-opt.
13089
13090 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13091
13092         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
13093
13094 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13095
13096         * lib/argp-parse.c: Include <stddef.h>.
13097         (alignof, alignto): New macros.
13098         (parser_init): Don't assume that void * is aligned sufficiently
13099         for struct option.
13100
13101         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
13102         need to extend the stack.
13103         (YYINITDEPTH): New macro, so that the initial stack isn't overly
13104         large.
13105
13106 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13107
13108         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
13109
13110 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
13111
13112         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
13113         (2004-10-24) change.  Apparently this was a false alarm.
13114
13115         * modules/getdate: Depend on alloca-opt, not alloca.
13116
13117 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
13118
13119         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
13120         Remove now-obsolete comment about AIX.
13121         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
13122         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
13123         (YYMAXDEPTH): New macro.
13124
13125 2004-12-18  Simon Josefsson  <jas@extundo.com>
13126
13127         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
13128
13129 2004-12-18  Bruno Haible  <bruno@clisp.org>
13130
13131         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
13132
13133 2004-12-18  Bruno Haible  <bruno@clisp.org>
13134
13135         * lib/fatal-signal.c (fatal_signals): Make non-const.
13136         (init_fatal_signals): New function.
13137         (uninstall_handlers, install_handlers): Ignore signals that were set to
13138         SIG_IGN.
13139         (at_fatal_signal): Call init_fatal_signals.
13140         (init_fatal_signal_set): Likewise. Ignore signals that were set to
13141         SIG_IGN.
13142         Reported by Paul Eggert.
13143
13144 2004-12-18  Bruno Haible  <bruno@clisp.org>
13145
13146         * doc/alloca.texi: New file.
13147         * doc/alloca-opt.texi: New file.
13148
13149 2004-12-17  Jim Meyering  <jim@meyering.net>
13150
13151         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
13152         Otherwise, install-sh could exit with improper exit status when
13153         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
13154
13155 2004-12-16  Simon Josefsson  <jas@extundo.com>
13156
13157         * tests/test-base64.c: Add license.
13158
13159 2004-12-15  Stepan Kasal  <address@hidden>
13160
13161         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
13162
13163 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
13164
13165         * modules/getcwd (Files): Add m4/d-ino.m4.
13166         Suggested by Mark D. Baushke.
13167
13168 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
13169
13170         * lib/getdate.y (textint): New member "negative".
13171         (time_zone_hhmm): New function.
13172         Expect 14 shift-reduce conflicts, not 13.
13173         (o_colon_minutes): New rule.
13174         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
13175         (yylex): Set the "negative" member of signed numbers.
13176
13177 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
13178
13179         * doc/getdate.texi (Time of day items, Time zone items):
13180         Describe new formats +00:00, UTC+00:00.
13181
13182 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13183
13184         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
13185         spurious "-l"s.  Problem reported by Stepan Kasal.
13186
13187 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
13188
13189         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
13190         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
13191
13192 2004-12-04  Simon Josefsson  <jas@extundo.com>
13193
13194         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
13195         Vandoorselaere <yoann@prelude-ids.org>.
13196
13197 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13198
13199         Changes imported from coreutils.
13200         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
13201         exist.
13202         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
13203
13204 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13205
13206         Changes imported from coreutils.
13207         * lib/hard-locale.c: Assume <locale.h> exists.
13208         Include "strdup.h".
13209         (GLIBC_VERSION): New macro.
13210         (hard_locale): Assume setlocale exists.
13211         Rewrite to avoid #ifdef.
13212         Use strdup rather than malloc + strcpy.
13213         * lib/human.c: Assume <locale.h> exists.
13214         (human_readable): Assume localeconv exists.
13215
13216 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13217
13218         * modules/hard-locale (Depends-on): Add strdup.
13219
13220 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
13221
13222         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
13223         convert T2, not T.  (Imported from libc.)
13224
13225 2004-11-30  Simon Josefsson  <jas@extundo.com>
13226
13227         * modules/restrict (License): Change to LGPL.
13228
13229 2004-11-30  Simon Josefsson  <jas@extundo.com>
13230
13231         * m4/restrict.m4: Add copyright and copying conditions.
13232
13233 2004-11-30  Simon Josefsson  <jas@extundo.com>
13234
13235         * m4/base64.m4: New file.
13236
13237 2004-11-30  Simon Josefsson  <jas@extundo.com>
13238
13239         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
13240         base64.
13241
13242         * tests/test-base64.c: New file.
13243
13244         * modules/base64: New file.
13245
13246 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
13247
13248         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
13249         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
13250
13251         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
13252
13253 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
13254
13255         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
13256         (__getcwd.c): Don't restore errno; glibc doesn't.
13257         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
13258         first, falling back to our code only if its results look suspicious.
13259         Ensure that the resulting buffer is only as large as necessary.
13260
13261         * lib/readutmp.c: Include readutmp.h first.
13262         Include <errno.h>, since readutmp.h no longer does that.
13263         * lib/readutmp.h: Don't include <errno.h>,
13264         <sys/param.h>, <time.h>; not needed to establish interface.
13265         (errno): Remove decl.
13266         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
13267         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
13268         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
13269
13270 2004-11-28  Simon Josefsson  <jas@extundo.com>
13271
13272         * lib/base64.h, base64.c: New file.
13273
13274 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
13275
13276         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
13277
13278 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
13279
13280         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
13281         (Depends-on): Remove pathmax, same.  Add mempcpy.
13282         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
13283         (Makefile.am): Append getcwd.h to lib_SOURCES.
13284         (Include): Add getcwd.h.
13285         (Maintainer): Change from Jim Meyering to "all, glibc",
13286         since getdate now uses intended-for-glibc code.
13287         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
13288         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
13289
13290 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13291
13292         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
13293         HP's ANSI C compiler.
13294         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
13295         Declaring int functions causes warnings on some modern systems and
13296         shouldn't be needed to compile on ancient ones.
13297         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
13298         defined.
13299
13300         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
13301         with the following changes.
13302         (__set_errno): Parenthesize properly.
13303         Include <stdbool.h>.
13304         (MIN, MAX, MATCHING_INO): New macros.
13305         (__getcwd): Define with prototype, not K&R form.
13306         Use heuristics to allocate default buffer on stack if possible.
13307         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
13308         behavior, and to avoid the PATH_MAX limit when computing
13309         ../../../../...
13310         Use MATCHING_INO to compare inode number to file.
13311         Check for arithmetic overflow in size calculations.
13312         Fix bug in reallocation of dot array that caused getcwd to fail
13313         on directories nested deeper than 75.
13314         Be more careful about saving errno on error.
13315         Do not use realloc; use only free+malloc, as this is a bit
13316         more flexible and avoids a needless copy operation.
13317         Do not inspect st_dev and st_ino for symbolic links; POSIX
13318         doesn't specify the latter.
13319         Check for closedir errors.
13320         Avoid needless casts.
13321         Use "#ifdef weak_alias" around weak_alias, to be like other
13322         glibc code.
13323         The following changes to getcwd.c have effect only when used in
13324         gnulib; they have no effect inside glibc proper.
13325         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
13326         as alloca isn't used.
13327         (alloca, __alloca): Likewise.
13328         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
13329         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
13330         unconditionally, as gnulib assumes C89 or better.
13331         Do not include <sys/param.h>.
13332         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
13333         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
13334         better.
13335         (NULL) [!defined NULL]: Remove; we assume C89 or better.
13336         Include <dirent.h> in a way that is compatible with modern Autoconf.
13337         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
13338         New macros, if not already defined.
13339         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
13340         Use "_LIBC", not "defined _LIBC", for consistency.
13341         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
13342         a mempcpy module.
13343         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
13344         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
13345         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
13346         credit only to Jim Meyering and adjust the copyright dates.
13347         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
13348         <stdlib.h>, <unistd.h>, "pathmax.h".
13349         Instead, include "xgetcwd.h" (first) and "getcwd.h".
13350         (INITIAL_BUFFER_SIZE): Remove.
13351         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
13352
13353 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13354
13355         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
13356         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
13357         Use the _ONCE methods, for efficiency.
13358         Check for fcntl.h.  In test program, include <errno.h>
13359         and <fcntl.h> if available.  Remove old K&R cruft from
13360         test program.  Check for common errors in GNU/Linux,
13361         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
13362         don't do AC_LIBOBJ, as that's getcwd.m4's job.
13363         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
13364         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
13365         name accordingly.
13366         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
13367         accommodate new getcwd.c.
13368         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
13369         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
13370         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
13371         that's all we need now.
13372
13373 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13374
13375         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
13376         argp-parse.c depends on getopt internals, that means we should
13377         always use our getopt, to be on the safe side.
13378         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
13379         order not to spoil the result of an eventual previous invocation
13380         of gl_GETOPT_SUBSTITUTE.
13381
13382 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13383
13384         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
13385         redefinition warnings. To avoid them, include the defines
13386         in `#if !defined __need_getopt ... #endif'. The only place
13387         where __getopt_argv_const is used is in definitions
13388         of getopt_long and getopt_long_only below, which are as well
13389         protected by `#ifndef __need_getopt'.
13390         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
13391         __need_getopt after including <stdio.h> and <unistd.h> These
13392         headers might have defined it.
13393
13394 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
13395
13396         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
13397
13398 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
13399
13400         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
13401         (futimens): New function, which uses futimes if available.
13402         (futimens, utimens): Support timespec==NULL, with same semantics
13403         as utime and utimens.
13404         * lib/utimens.h (futimens): New decl.
13405
13406 2004-11-23  Jim Meyering  <jim@meyering.net>
13407
13408         * lib/getopt_.h: Remove trailing blanks.
13409
13410 2004-11-23  Jim Meyering  <jim@meyering.net>
13411
13412         * lib/__fpending.c: Add comment.
13413
13414 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
13415
13416         * modules/canonicalize (Depends-on): Add xreadlink.
13417         Problem reported by James Youngman.
13418
13419 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
13420
13421         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
13422         New macros.
13423         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
13424         optopt): Use them instead of invoking ## directly; otherwise, the
13425         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
13426
13427 2004-11-19  Bruno Haible  <bruno@clisp.org>
13428
13429         * lib/strtok_r.c: Move comments from here...
13430         * lib/strtok_r.h: ... to here.
13431
13432 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
13433
13434         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
13435         implementations that mishandle size_t overflow.
13436
13437 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
13438
13439         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
13440         might fail.  Problem reported by Yoann Vandoorselaere.
13441         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
13442         implementations that mishandle size_t overflow.
13443
13444 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13445
13446         * modules/canon-host (Depends-on): Add strdup.
13447
13448 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13449
13450         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
13451
13452 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13453
13454         * lib/canon-host.c: Include "strdup.h".
13455         (canon_host): Use getaddrinfo if available, so that IPv6 works.
13456         Use strdup instead of malloc/strcpy to duplicate strings.
13457
13458         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
13459         (human_space_before_unit): New constant.
13460         * lib/human.c (human_readable): Support it.
13461
13462         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
13463         (xgetcwd): Set errno correctly when failing.
13464         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
13465         the failure is actually due to a PATH_MAX problem.
13466
13467         Further getopt changes to make it more likely that glibc will
13468         buy the changes back.
13469         * lib/getopt.c (POSIXLY_CORRECT): New constant.
13470         (getopt): Use it, so to preserve glibc semantic
13471         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
13472         when compiling for libc.
13473         * lib/getopt_.h (__getopt_argv_const): Bring it back.
13474         (getopt_long, getopt_long_only): Use it.
13475
13476         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
13477         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
13478         (getopt): Argv is now char * const *, as per standard.
13479         (_getopt_internal_r, _getopt_internal): Argv is now char **,
13480         not char *__getopt_argv_const *.
13481         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
13482         _getopt_long_only_r): Likewise.
13483         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
13484         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
13485         _getopt_long_r, _getopt_long_only_r): Likewise.
13486         * lib/getopt_.h (__getopt_argv_const): Remove.
13487         (getopt): Argv is now char * const *, as per standard.
13488
13489         * lib/getdate.y (tORDINAL): New token.
13490         (day, relunit): Allow it for relative times.
13491         (relative_time_table): Use tORDINAL for ordinals.
13492
13493 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13494
13495         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
13496         Document that "second" isn't allowed as an ordinal number.
13497
13498 2004-11-16  Jim Meyering  <jim@meyering.net>
13499
13500         * modules/closeout (Depends-on): Add fpending.
13501
13502 2004-11-15  Jim Meyering  <jim@meyering.net>
13503
13504         * lib/closeout.c: Include "__fpending.h" once again.
13505         Include <stdbool.h>.
13506         (close_stdout): Don't fail just because stdout was closed initially,
13507         since some programs don't write to stdout in the normal course of
13508         operation (other than --version and --help), and we don't want this
13509         function to make e.g. `touch file >&-' fail.
13510         But do fail if it was closed and someone has tried to write to it.
13511         E.g., `printf foo >&-' must fail.
13512
13513 2004-11-13  Jim Meyering  <jim@meyering.net>
13514
13515         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
13516
13517 2004-11-12  Simon Josefsson  <jas@extundo.com>
13518
13519         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
13520         small doc fix is still pending.
13521
13522 2004-11-11  Simon Josefsson  <jas@extundo.com>
13523
13524         * modules/strtok_r: New file.
13525
13526         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13527         strtok_r.
13528
13529 2004-11-11  Simon Josefsson  <jas@extundo.com>
13530
13531         * m4/strtok_r.m4: New file.
13532
13533         * m4/getopt.m4: Replace opterr.
13534
13535 2004-11-11  Simon Josefsson  <jas@extundo.com>
13536
13537         * lib/strtok_r.h, strtok_r.c: New file.
13538
13539 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
13540
13541         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
13542         of replacing opterr, getopt, etc.  This should handle the
13543         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
13544
13545 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
13546
13547         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
13548         we can stop lying to compilers about the constness of argv when we
13549         are compiled outside glibc.
13550         (getopt, getopt_long, getopt_long_only): Use it.
13551         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
13552         _getopt_internal, getopt): Likewise.
13553         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
13554         _getopt_long_only_r): Likewise.
13555         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
13556         _getopt_long_r, _getopt_long_only_r): Likewise.
13557
13558         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
13559         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
13560         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
13561         the other external symbols.
13562         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
13563         declaration, since the above renaming now works around collisions.
13564
13565 2004-11-11  Jim Meyering  <jim@meyering.net>
13566
13567         * lib/linebreak.c: Remove trailing blanks.
13568         * lib/alloca_.h: Likewise.
13569         * lib/acosl.c: Likewise.
13570         * lib/euidaccess.c: Likewise.
13571         * lib/allocsa.h: Likewise.
13572
13573 2004-11-10  Simon Josefsson  <jas@extundo.com>
13574
13575         * m4/getaddrinfo.m4: New file.
13576
13577 2004-11-10  Simon Josefsson  <jas@extundo.com>
13578
13579         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
13580
13581 2004-11-10  Simon Josefsson  <jas@extundo.com>
13582
13583         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13584         getaddrinfo.
13585
13586         * modules/getaddrinfo: New file.
13587
13588 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13589
13590         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
13591
13592 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13593
13594         * lib/mktime.c (SHR): New macro, which is a portable
13595         substitute for >> that should work even on Crays.
13596         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
13597         Problem reported by Mark D. Baushke in
13598         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
13599         * lib/getdate.y (SHR): Likewise.
13600         (tm_diff): Use it.
13601         * lib/strftime.c (SHR): Likewise.
13602         (tm_diff): Use it.
13603         * lib/quotearg.c (struct quoting_options): Use unsigned int for
13604         quote_these_too, so that right shifts are well defined.  All uses
13605         changed.
13606
13607 2004-11-10  Jim Meyering  <jim@meyering.net>
13608
13609         Ensure that no close failure goes unreported.
13610         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
13611         return early when it seems there's nothing to flush.
13612         Don't include __fpending.h.
13613
13614 2004-11-10  Jim Meyering  <jim@meyering.net>
13615
13616         * modules/closeout (Depends-on): Remove fpending.
13617
13618 2004-11-10  Jim Meyering  <jim@meyering.net>
13619
13620         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
13621
13622 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
13623
13624         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
13625         gl_FUNC_STRFTIME.
13626         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
13627         and AC_REQUIRE when possible, to avoid duplicate checks.
13628         Check for <wchar.h>.
13629
13630 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
13631
13632         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
13633
13634 2004-11-09  Bruno Haible  <bruno@clisp.org>
13635
13636         * m4/sockpfaf.m4: New file.
13637
13638 2004-11-05  Bruno Haible  <bruno@clisp.org>
13639
13640         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
13641         Reported by Mark D. Baushke <mdb@cvshome.org>.
13642
13643 2004-11-04  Bruno Haible  <bruno@clisp.org>
13644
13645         2004-09-11  Bruno Haible  <bruno@clisp.org>
13646                 * allocsa.valgrind: New file.
13647         2004-02-06  Bruno Haible  <bruno@clisp.org>
13648                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
13649                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
13650                 Reported by Christopher Seip <chris.seip@hp.com>.
13651
13652 2004-11-04  Bruno Haible  <bruno@clisp.org>
13653
13654         * modules/allocsa (Files): Add lib/allocsa.valgrind.
13655         (Makefile.am): Distribute it.
13656
13657 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
13658
13659         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
13660         with errno == ERANGE if the buffer is too small.
13661         Problem reported by Mark D. Baushke.
13662
13663 2004-11-03  Albert Chin  <china@thewrittenword.com>
13664             Paul Eggert  <eggert@cs.ucla.edu>
13665
13666         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
13667         equivalent, substitute $ac_type for equivalent type rather than
13668         blindly using uint32_t *always* which won't work if uint32_t is not
13669         available.  Define _UINT32_T to work around typedef of uint32_t if
13670         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
13671         2.5.1.
13672
13673 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13674
13675         * m4/jm-macros.m4: Sync from coreutils.
13676         (gl_MACROS): Check for mbrlen, for pathchk.
13677         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
13678
13679 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13680
13681         * lib/xreadlink.c (MAXSIZE): New macro.
13682         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
13683         size does not exceed MAXSIZE.  Avoid cast.
13684         As suggested by Mark D. Baushke in
13685         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
13686         if readlink fails with buffer size just under MAXSIZE, try again
13687         with MAXSIZE.
13688
13689 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13690
13691         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
13692
13693 2004-11-02  Derek R. Price  <derek@ximbiot.com>
13694         and  Paul Eggert  <eggert@cs.ucla.edu>
13695
13696         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
13697         (get_date): Overparenthesize to avoid GCC warning.
13698
13699 2004-11-02  Bruno Haible  <bruno@clisp.org>
13700
13701         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
13702         returns void.
13703
13704 2004-11-02  Bruno Haible  <bruno@clisp.org>
13705
13706         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
13707         function returns void.
13708
13709 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
13710
13711         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
13712         fflush_unlocked, flockfile, funlockfile, funlockfile,
13713         fputs_unlocked, putc_unlocked.
13714
13715 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
13716
13717         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
13718         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
13719         already declared.
13720
13721 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13722
13723         * modules/getdate (Files): Add doc/getdate.texi.
13724         (Depends-on): Add setenv, xalloc.
13725
13726 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13727
13728         * lib/getdate.y: Add support for TZ="foo" within a date string.
13729         Fix some bugs near time_t boundaries.  Reject dates with
13730         out-of-range components, e.g., "Sept 31".
13731         Include <stdlib.h>, "setenv.h", "xalloc.h".
13732         (ISDIGIT_LOCALE): Remove; unused.
13733         Note that the TZ and time functions used here are not reentrant.
13734         (mktime_ok, get_tz): New functions.
13735         (TZBUFSIZE): New constant.
13736         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
13737         This requires that we sometimes generate our own TZ="XXX..." setting.
13738
13739 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13740
13741         * doc/getdate.texi: New file, from coreutils with modifications for
13742         the new TZ parsing.
13743
13744 2004-10-27  Derek R. Price  <derek@ximbiot.com>
13745
13746         * lib/mktime.c (not_equal_tm): Remove redundant check.
13747
13748 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
13749
13750         * modules/regex (lib_SOURCES): Add regex.c.
13751         Reported by James Youngman in
13752         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
13753
13754 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
13755
13756         * lib/getdate.y: Use Bison 1.875 features, and some minor
13757         code cleanups.  This change does not affect semantics.
13758         Don't include <stdlib.h>; no longer needed.
13759         Don't include unlocked-io.h; only the "#if TEST" code uses
13760         stdio, and performance isn't crucial there.
13761         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
13762         Bison 1.875 features as described below.
13763         All uses of "PC." replaced by "pc->".
13764         (YYSTYPE): Add a forward declaration.
13765         (yylex, yyerror): Use full prototypes in forward decls.
13766         Use "%pure-parser" rather than obsolescent "%pure_parser".
13767         Use %parse-param and %lex-param instead of obsolescent
13768         YYPARSE_PARAM and YYLEX_PARAM.
13769         (meridian_table, month_and_day_table, time_units_table,
13770         relative_time_table, time_zone_table, military_table,
13771         lookup_zone, lookup_word, get_date):
13772         Use NULL instead of 0 where appropriate.
13773         (to_hour): Avoid abort (), to avoid a dependency on
13774         stdlib.h.
13775         (yyerror, yylex): Now accepts parser_control * arg.
13776         (main) [TEST]: Use '\0' rather than 0 for char.
13777
13778 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
13779
13780         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
13781
13782 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
13783
13784         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
13785         It's now the caller's responsibility to handle the case where
13786         !HAVE_GETPAGESIZE && !defined getpagesize.
13787
13788         * lib/mktime.c (leapyear): Arg is long int, not int.
13789
13790 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
13791
13792         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
13793
13794 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
13795
13796         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
13797         missing.  Problem reported by James Youngman.
13798
13799 2004-10-16  Simon Josefsson  <jas@extundo.com>
13800
13801         * gnulib-tool: Fix comments.  Fix parse problem.
13802         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
13803
13804 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
13805
13806         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
13807         implementation of getopt_long.  Problem reported by Alexander Taler in:
13808         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
13809
13810 2004-10-15  Bruno Haible  <bruno@clisp.org>
13811
13812         * gnulib-tool: Untabify. Initialize supplied_libname.
13813         (func_usage): More homogenous output.
13814         (func_modules_transitive_closure, func_modules_to_filelist,
13815         func_emit_lib_Makefile_am): New functions.
13816         (func_import): New function, extracted from big case statement. Use
13817         func_get_license, func_modules_transitive_closure,
13818         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
13819         opt_lgpl. Don't use test -a, as it's not portable.
13820         (func_create_testdir): Use func_modules_transitive_closure,
13821         func_modules_to_filelist, func_emit_lib_Makefile_am.
13822
13823 2004-10-15  Bruno Haible  <bruno@clisp.org>
13824
13825         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
13826
13827 2004-10-15  Bruno Haible  <bruno@clisp.org>
13828
13829         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
13830         the portions belonging to each module.
13831         Suggested by Derek Robert Price <derek@ximbiot.com>.
13832
13833 2004-10-12  Simon Josefsson  <jas@extundo.com>
13834
13835         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
13836         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
13837         to real functions.
13838
13839 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13840
13841         * modules/vsnprintf: New file.
13842
13843 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13844
13845         * m4/vsnprintf.m4: New file.
13846
13847 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13848
13849         * lib/vsnprintf.h: New file.
13850         * lib/vsnprintf.c: New file.
13851
13852 2004-10-11  Bruno Haible  <bruno@clisp.org>
13853
13854         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
13855         vsnprintf.
13856
13857 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
13858
13859         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
13860
13861 2004-10-07  Bruno Haible  <bruno@clisp.org>
13862
13863         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
13864         fits into the provided buffer.
13865
13866 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
13867
13868         * lib/diacrit.c, diacrit.h: Add GPL notice.
13869
13870         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
13871         notice.
13872         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
13873         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
13874         This avoids a potential constant-folding bug.
13875
13876 2004-10-05  Bruno Haible  <bruno@clisp.org>
13877
13878         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
13879         for the declaration of strsep.
13880
13881 2004-10-05  Bruno Haible  <bruno@clisp.org>
13882
13883         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
13884
13885 2004-10-04  Simon Josefsson  <jas@extundo.com>
13886
13887         * modules/memmem: New file.
13888         * tests/test-memmem.c: New file.
13889         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
13890
13891 2004-10-04  Simon Josefsson  <jas@extundo.com>
13892
13893         * m4/memmem.m4: New file.
13894
13895 2004-10-04  Simon Josefsson  <jas@extundo.com>
13896
13897         * lib/memmem.h: New file.
13898         * lib/memmem.c: New file, taken from glibc.
13899
13900 2004-10-04  Simon Josefsson  <jas@extundo.com>
13901
13902         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
13903         '#ifdef USE_UNLOCKED_IO'.
13904
13905 2004-10-04  Simon Josefsson  <jas@extundo.com>
13906
13907         * config/srclist.txt: Add memmem from glibc.
13908
13909 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13910
13911         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
13912
13913         * modules/argmatch, modules/argp, modules/closeout, modules/error,
13914         modules/exclude, modules/getdate, modules/getline,
13915         modules/getndelim2, modules/getpass, modules/getpass-gnu,
13916         modules/getusershell, modules/linebuffer, modules/md5,
13917         modules/mountlist, modules/posixtm, modules/readtokens,
13918         modules/readutmp, modules/regex, modules/sha1,
13919         modules/version-etc, modules/yesno:
13920         Remove dependency on unlocked-io.
13921
13922 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13923
13924         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
13925
13926         * m4/unlocked-io.m4: Add copyright notice.
13927         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
13928
13929 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13930
13931         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
13932         * lib/xmalloc.c (xmemdup): Likewise.
13933         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
13934         XFREE): Remove these long-obsolescent macros.
13935         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
13936         * lib/xstrdup.c: Remove.
13937
13938         * lib/regex.c (re_comp): Cast gettext return value to char *,
13939         Problem reported by Martin Neitzel via Mark D. Baushke.
13940
13941 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13942
13943         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
13944         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
13945         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
13946         regex.c, sha1.c, version-etc.c, yesno.c:
13947         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
13948         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
13949         the includer's responsibility.
13950
13951         Sync from coreutils.
13952
13953         * lib/modechange.c (mode_compile): Don't decrement a pointer that
13954         points to the start of a string, as the C Standard says the
13955         resulting behavior is undefined.
13956
13957         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
13958         simple -> simple_backups, numbered_existing ->
13959         numbered_existing_backups, numbered -> numbered_backups
13960         to avoid shadowing problems.  All uses changed.
13961         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
13962         * lib/backupfile.c (check_extension, numbered_backup):
13963         Rename locals to avoid shadowing 'basename'.
13964         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
13965         once.
13966
13967         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
13968         * lib/.cvsignore: Add getopt.h.
13969
13970 2004-10-04  Bruno Haible  <bruno@clisp.org>
13971
13972         * modules/README: New file.
13973         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
13974         not a module.
13975
13976 2004-10-02  Jim Meyering  <jim@meyering.net>
13977
13978         * lib/dirfd.h, getpagesize.h: Add copyright notice.
13979
13980 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13981
13982         * modules/strsep: New file.
13983
13984 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13985
13986         * m4/strsep.m4: New file.
13987
13988 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13989
13990         * lib/strsep.h: New file.
13991         * lib/strsep.c: New file.
13992
13993 2004-10-01  Simon Josefsson  <jas@extundo.com>
13994
13995         * lib/snprintf.c (snprintf): Handle size==0.
13996
13997 2004-10-01  Simon Josefsson  <jas@extundo.com>
13998             Bruno Haible  <bruno@clisp.org>
13999
14000         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
14001         (snprintf): Declare 'args'.
14002
14003 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
14004
14005         * lib/snprintf.c: Remove comments as to why each header is needed.
14006
14007 2004-10-01  Bruno Haible  <bruno@clisp.org>
14008
14009         * MODULES.html.sh: Add strsep.
14010
14011 2004-09-30  Simon Josefsson  <jas@extundo.com>
14012
14013         * modules/snprintf: New file.
14014
14015 2004-09-30  Simon Josefsson  <jas@extundo.com>
14016
14017         * m4/snprintf.m4: New file.
14018
14019 2004-09-30  Simon Josefsson  <jas@extundo.com>
14020
14021         * lib/snprintf.h, lib/snprintf.c: New files.
14022
14023 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14024
14025         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
14026         (hol_entry_help): Never translate an empty string.
14027         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
14028         * lib/argp.h (OPTION_NO_TRANS): New option.
14029
14030 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14031
14032         * modules/argp (Maintainer): Replace Simon Josefsson
14033         by Sergey Poznyakoff.
14034
14035 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14036
14037         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
14038         changes merged back into glibc.
14039
14040 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14041
14042         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
14043
14044 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
14045
14046         * lib/xvasprintf.c: Include xalloc.h.
14047         (xvasprintf): Use xalloc_die, not xmalloc_die.
14048
14049 2004-09-29  Bruno Haible  <bruno@clisp.org>
14050
14051         * modules/alloca-opt: New file, derived from modules/alloca.
14052         * modules/allocsa: Depend on alloca-opt instead of alloca.
14053         * modules/setenv: Likewise.
14054         * modules/vasnprintf: Likewise.
14055         * MODULES.html.sh: Add alloca-opt.
14056
14057 2004-09-28  Simon Josefsson  <jas@extundo.com>
14058
14059         * gnulib-tool: New parameter --lgpl, to asseert that modules are
14060         LGPL, and to replace license template from GPL to LGPL.
14061
14062 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14063
14064         * modules/dummy: Change license to LGPL.
14065
14066 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14067
14068         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
14069
14070 2004-09-24  Simon Josefsson  <jas@extundo.com>
14071
14072         * modules/minmax (License): Change from GPL to LGPL.
14073
14074 2004-09-23  Simon Josefsson  <jas@extundo.com>
14075
14076         * gnulib-tool (--import): Typo.
14077
14078 2004-09-23  Simon Josefsson  <jas@extundo.com>
14079
14080         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
14081
14082 2004-09-22  Bruno Haible  <bruno@clisp.org>
14083
14084         * modules/*: Add 'License' field.
14085         * gnulib-tool: Accept --extract-license option.
14086         (func_get_license): New function.
14087
14088 2004-09-21  Bruno Haible  <bruno@clisp.org>
14089
14090         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
14091         Reported by Simon Josefsson.
14092
14093 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14094
14095         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
14096         gl_AC_TYPE_LONG_LONG.
14097
14098 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14099
14100         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
14101
14102 2004-09-18  Simon Josefsson  <jas@extundo.com>
14103         and  Paul Eggert  <eggert@cs.ucla.edu>
14104
14105         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
14106         calls with autoreconf.  Define GL_LIB.
14107
14108 2004-09-14  Karl Berry  <karl@gnu.org>
14109
14110         * config/srclist.txt: unsync setenv.c, sigh.
14111
14112 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
14113
14114         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
14115         Problem reported by Bruno Haible in:
14116         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
14117
14118 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
14119
14120         * config/srclist.txt: Comment out argp-pvh.c.
14121
14122 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
14123
14124         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
14125         in case some system header has #define'd it.  Problem reported by
14126         Soeren D. Schulze in
14127         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
14128
14129 2004-09-09  Karl Berry  <karl@gnu.org>
14130
14131         * regex.[ch]: delete from the root.  These were supposed to be
14132                 synced with emacs cvs, but this has not happened for about
14133                 a year, and anyway nothing else uses emacs regex.[ch].
14134                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
14135                 lib/regex[.ch] is untouched.
14136
14137 2004-09-09  Bruno Haible  <bruno@clisp.org>
14138
14139         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
14140
14141 2004-09-09  Bruno Haible  <bruno@clisp.org>
14142
14143         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
14144         modifications.
14145         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
14146
14147 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
14148
14149         * modules/xvasprintf: New file.
14150         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
14151
14152 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
14153
14154         * lib/xvasprintf.h: New file.
14155         * lib/xvasprintf.c: New file.
14156         * lib/xasprintf.c: New file.
14157
14158 2004-09-08  Bruno Haible  <bruno@clisp.org>
14159
14160         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
14161
14162 2004-09-08  Bruno Haible  <bruno@clisp.org>
14163
14164         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
14165         length is > INT_MAX.
14166         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
14167         more.
14168
14169 2004-09-08  Bruno Haible  <bruno@clisp.org>
14170
14171         * lib/stdint_.h: New file, taken from GNU clisp.
14172
14173 2004-09-08  Bruno Haible  <bruno@clisp.org>
14174             Oskar Liljeblad  <oskar@osk.mine.nu>
14175
14176         * modules/stdint: New file.
14177         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
14178
14179 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14180
14181         Import from coreutils.
14182         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
14183         strings on unbounded length.  alloca's performance benefits aren't
14184         that important here.
14185         (V_STRDUP): Remove.
14186         (parse_with_separator): New function, with most of the internals
14187         of the old parse_user_spec.  Allow user to omit both user and group,
14188         for compatibility with FreeBSD.
14189         Clone only the user name, not the entire spec.
14190         Do not set *uid, *gid unless entirely successful.
14191         Avoid memory leak in some failing cases.
14192         Fix regression for USER.GROUP reported by Dmitry V. Levin in
14193         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
14194         (parse_user_spec): Rewrite to use parse_with_separator.
14195
14196 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14197
14198         * modules/userspec: Don't depend on alloca.
14199
14200 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14201
14202         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
14203
14204 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
14205
14206         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
14207         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
14208         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
14209
14210 2004-08-16  Simon Josefsson  <jas@extundo.com>
14211
14212         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
14213         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
14214         Add --dry-run for --import.
14215         Let user provided command line parameters override configure.ac
14216         settings.
14217
14218 2004-08-12  Simon Josefsson  <jas@extundo.com>
14219
14220         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
14221         as discussed with Paul Eggert in threads rooted at
14222         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
14223         and
14224         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
14225         Before, the test was empty, and relied on ELIDE_CODE in source
14226         code.)
14227         (gl_PREREQ_GETOPT): New macro.
14228         (gl_GETOPT): Use them.
14229
14230 2004-08-12  Simon Josefsson  <jas@extundo.com>
14231
14232         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
14233         * lib/getopt_.h: Renamed from getopt.h.
14234
14235 2004-08-12  Simon Josefsson  <jas@extundo.com>
14236
14237         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
14238         Change default library name from libfoo to libgnu.
14239         Now, if you have a configure.ac that says:
14240                 gl_SOURCE_BASE(gl)
14241                 gl_M4_BASE(gl/m4)
14242                 gl_MODULES(error getopt etcetera)
14243                 gl_INIT
14244         you can import all you need by running:
14245                 ../gnulib/gnulib-tool --import
14246
14247         * modules/getopt (Files): Rename getopt.h to getopt_.h.
14248         (Makefile.am): Rewrite, use logic from argz.
14249         (Include): Use <getopt.h> instead of "getopt.h".
14250
14251 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14252
14253         * modules/argp (Files): Add m4/unlocked-io.m4.
14254         (Depends-on): Add extensions.
14255
14256 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14257
14258         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
14259         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
14260         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
14261         Check for program_invocation_name, program_invocation_short_name,
14262         flockfile, funlockfile, features.h, _getopt_long_only_r.
14263
14264 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14265
14266         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
14267         its complicated substitute.
14268         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
14269         and program_invocation_name.
14270         (__argp_basename) [!_LIBC]: Remove; the only use was
14271         replaced by its body.
14272         (__argp_short_program_name): Change condition from
14273         !defined __argp_short_program_name to
14274         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
14275         to match argp-namefrob.h.
14276         (__argp_failure): Don't assume strerror_r returns char *.
14277         * lib/argp-parse.c (N_): Define unconditionally.
14278         (argp_default_options): Fill out initializers with 0 to avoid
14279         gcc warnings.
14280
14281 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14282
14283         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
14284         getopt1.c.
14285
14286 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14287
14288         Merge from coreutils.
14289
14290         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
14291
14292         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
14293         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
14294
14295 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14296
14297         Merge from coreutils.
14298
14299         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
14300         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
14301         for Reliant Unix 5.43.
14302
14303         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
14304         (union fooround): Use uintmax_t, not long int.
14305         The rest is a merge from libc:
14306         [defined _LIBC]: Include <shlib-compat.h>.
14307         (_obstack) [defined _LIBC]: Remove after 2.3.4.
14308
14309         * lib/settime.c (settime): Recode to avoid warning with
14310         Sun Forte C 6U2.
14311
14312         * lib/strverscmp.c: Convert to UTF-8.
14313
14314 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14315
14316         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
14317         m4/uintmax_t.m4.
14318
14319 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14320
14321         * modules/xalloc-die: New file.
14322         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
14323
14324         * modules/md5 (Files): Add m4/uint32_t.m4.
14325         * modules/sha1: Renamed from modules/sha.
14326         (Files):
14327         Rename lib/sha.h to lib/sha1.h.
14328         Rename lib/sha.c to lib/sha1.c.
14329         Rename m4/sha.m4 to m4/sha1.m4.
14330         (lib_SOURCES): Likewise.
14331         (configure.ac): Rename gl_SHA to gl_SHA1.
14332         (Include): sha.h -> sha1.h.
14333
14334 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14335
14336         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
14337         * m4/sha1.m4: Renamed from sha.m4.
14338         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
14339
14340 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14341
14342         * lib/obstack.h (obstack_empty_p):
14343         Don't assume that chunk->contents is suitably aligned.
14344         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
14345         Likewise. Problem reported by Benno in
14346         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
14347
14348         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
14349         readable.  This could be improved further but it'd take some work.
14350
14351 2004-08-08  Simon Josefsson  <jas@extundo.com>
14352
14353         * modules/xgethostname (Depends-on): Remove exit and error (not
14354         used).
14355
14356         * modules/getpass-gnu: Add getpass.h.
14357         (Depends-on): Add stdbool.
14358         * modules/getpass: Add getpass.h.
14359
14360 2004-08-08  Simon Josefsson  <jas@extundo.com>
14361
14362         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
14363         Check getpass declaration.
14364
14365 2004-08-08  Simon Josefsson  <jas@extundo.com>
14366
14367         * lib/xgethostname.c: Don't include error.h (not used).
14368
14369         * lib/getpass.h: Add.
14370         * lib/getpass.c: Include getpass.h first.
14371
14372 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
14373
14374         * lib/xalloc-die.c: New file.
14375         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
14376         All uses removed.
14377         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
14378         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
14379         xalloc-die.c.
14380         (_, N_, xalloc_die): Move to xalloc-die.c.
14381         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
14382         so that we needn't mess with xalloc_msg_memory_exhausted.
14383
14384         * lib/sha1.h: Renamed from sha.h.
14385         (SHA1_H): Renamed from _SHA_H.
14386         (sha1_ctx): Renamed from sha_ctx.
14387         (sha1_init_ctx): Renamed from sha_init_ctx.
14388         (sha1_process_block): Renamed from sha_process_block.
14389         (sha1_process_bytes): Renamed from sha_process_bytes.
14390         (sha1_finish_ctx): Renamed from sha_finish_ctx.
14391         (sha1_read_ctx): Renamed from sha_read_ctx.
14392         (sha1_stream): Renamed from sha_stream.
14393         (sha1_buffer): Renamed from sha_buffer.
14394         * lib/sha1.c: Likewise; renamed from sha.c.
14395         Do not include <sys/types.h>.
14396         Include <stddef.h> rather than <stdlib.h>.
14397
14398 2004-08-08  Bruno Haible  <bruno@clisp.org>
14399
14400         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
14401         FILESYSTEM_PREFIX_LEN.
14402         * lib/progreloc.c: Likewise.
14403         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
14404
14405 2004-08-06  Simon Josefsson  <jas@extundo.com>
14406
14407         * modules/progname (Depends-on): Don't depend on stdbool.
14408
14409 2004-08-06  Simon Josefsson  <jas@extundo.com>
14410
14411         * modules/getsubopt: New file.
14412         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14413         getsubopt.
14414
14415 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14416
14417         More merge from coreutils.
14418
14419         * m4/utimens.m4, m4/utimecmp.m4: New files.
14420         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
14421         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
14422         prereq.m4, sha.m4: Import changes from coreutils.
14423
14424 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14425
14426         More merge from coreutils.
14427         * modules/raise, modules/readtokens0, modules/utimens:
14428         * modules/utimecmp, module/xnanosleep: New files.
14429         * modules/strftime: Add lib/strftime.h.
14430         Change include from <time.h> to "strftime.h".
14431         * modules/yesno: Add lib/yesno.h.
14432         * modules/backupfile: Remove lib/addext.c.
14433         * modules/euidaccess: Add stat-macros.h.
14434         * modules/canonicalize, modules/euidaccess,
14435         modules/filemode, modules/lchown, modules/makepath,
14436         modules/rmdir, modules/stat: Likewise.
14437
14438 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14439
14440         Merge from tar.
14441         * lib/argp-help.c (make_hol, hol_append): Don't assume that
14442         SIZE_MAX is a valid preprocessor constant.
14443         (__argp_basename): Change from "#ifndef _LIBC"
14444         to "#ifndef __argp_short_program_name", so that
14445         we don't compile these functions for tar.
14446
14447         More merges from coreutils.
14448         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
14449         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
14450         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
14451         * lib/addext.c: Remove; no longer needed.
14452         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
14453         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
14454         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
14455         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
14456         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
14457         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
14458         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
14459         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
14460         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
14461         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14462         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
14463         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
14464         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
14465         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
14466         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
14467         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
14468         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
14469         Import changes from coreutils.
14470
14471 2004-08-05  Simon Josefsson  <jas@extundo.com>
14472
14473         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
14474
14475 2004-08-05  Simon Josefsson  <jas@extundo.com>
14476
14477         * m4/getsubopt.m4: New file.
14478
14479 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14480
14481         Merge from coreutils.
14482
14483         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
14484         * m4/getcwd-path-max.m4: New files.
14485
14486         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
14487         FILESYSTEM_PREFIX_LEN ->
14488         FILE_SYSTEM_PREFIX_LEN.
14489         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
14490         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
14491         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
14492         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
14493
14494         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
14495         prerequisite modules now handle the DOS stuff.
14496         Don't check for unistd.h.
14497
14498 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14499
14500         Merge from coreutils.
14501
14502         * lib/.gdb-history: Remove; this doesn't belong here.
14503
14504         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
14505         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
14506         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
14507         * lib/getcwd.c: New files.
14508
14509         * lib/dirname.h: Include <stdbool.h>.
14510         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
14511         for consistency with POSIX terminology.  All uses changed.
14512         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
14513         (strip_trailing_slashes): Use bool for booleans.
14514         * lib/stripslash.c (strip_trailing_slashes): Likewise.
14515
14516         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
14517         sometimes returns a positive errno value even when it succeeds.
14518         (print_errno_message) [!LIBC]: Fall back on strerror if
14519         __strerror_r fails.
14520
14521         * lib/path-concat.c (mempcpy): Don't define if a system header defines
14522         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
14523         (longest_relative_suffix): New function.
14524         (path_concat): Use it.  Assume first argument is not NULL.
14525         Port to DOS.  Omit redundant separators.
14526         Report an error instead of returning NULL.
14527         Use mempcpy instead of memcpy.
14528         (xpath_concat): Remove: not declared or used.
14529
14530         * lib/same.h: Include <stdbool.h>
14531         (same_name): Return bool, not int.
14532         * lib/same.c (same_name): Likewise.
14533         (errno): Don't declare; we assume C89 or better now.
14534
14535         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
14536         if not already defined.
14537
14538         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
14539         * lib/dup-safer.c (errno): Likewise.
14540
14541 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14542
14543         Merge from coreutils.
14544         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
14545         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
14546         * modules/path-concat: Don't depend on strdup.
14547
14548 2004-08-03  Simon Josefsson  <jas@extundo.com>
14549
14550         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
14551         * lib/progname.h: Don't include stdbool.h.
14552
14553 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14554
14555         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
14556         * MODULES.html.sh (func_all_modules): Remove fatal.
14557
14558 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14559
14560         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
14561
14562 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14563
14564         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
14565         working.
14566
14567 2004-08-02  Simon Josefsson  <jas@extundo.com>
14568
14569         * lib/getsubopt.h: New file, with comments from Bruno Haible.
14570         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
14571         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
14572
14573 2004-08-01  Simon Josefsson  <jas@extundo.com>
14574
14575         * lib/xgetdomainname.c: Include stdlib.h, for free().
14576
14577 2004-07-19  Bruno Haible  <bruno@clisp.org>
14578
14579         * MODULES.html.sh (func_all_modules): Add dummy.
14580
14581 2004-07-16  Simon Josefsson  <jas@extundo.com>
14582
14583         * modules/dummy: New file.
14584
14585 2004-07-16  Simon Josefsson  <jas@extundo.com>
14586
14587         * lib/dummy.c: New file.
14588
14589 2004-07-16  Bruno Haible  <bruno@clisp.org>
14590
14591         * lib/backupfile.h: Add extern "C" for C++.
14592         * lib/closeout.h: Likewise.
14593         * lib/copy-file.h: Likewise.
14594         * lib/findprog.h: Likewise.
14595         * lib/full-write.h: Likewise.
14596         * lib/pathname.h: Likewise.
14597         * lib/progname.h: Likewise.
14598         * lib/stpcpy.h: Likewise.
14599         * lib/stpncpy.h: Likewise.
14600         * lib/strcase.h: Likewise.
14601         * lib/strstr.h: Likewise.
14602         * lib/xalloc.h: Likewise.
14603
14604         * lib/mbswidth.h: Add extern "C" for C++.
14605         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
14606
14607 2004-07-13  Robert Millan  <robertmh@gnu.org>
14608
14609         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
14610
14611 2004-07-09  Simon Josefsson  <jas@extundo.com>
14612
14613         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
14614         failed without this.)
14615
14616 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14617
14618         * modules/chown (Files): Add lib/fchown-stub.c, since
14619         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
14620
14621 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14622
14623         * lib/fchown-stub.c: New file.
14624
14625 2004-06-24  Jim Meyering  <jim@meyering.net>
14626
14627         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
14628
14629 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14630
14631         * modules/argz: Omit "#include".
14632
14633         * MODULES.html.sh (func_all_modules): Add calloc, to match
14634         2004-06-01 addition of calloc module.
14635
14636 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14637
14638         * m4/argz.m4: New file, which is autoupdated from libtool.
14639
14640 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14641
14642         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
14643         libtool.
14644
14645 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14646
14647         * config/srclist-update: Don't insist on "USA." before the
14648         close-comment, as libtool omits the period and puts the */ on a
14649         separate line.
14650         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
14651         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
14652
14653 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
14654
14655         * modules/argz: New file.
14656         * MODULES.html.sh (func_all_modules): Add argz.
14657
14658 2004-06-12  Jim Meyering  <jim@meyering.net>
14659         and  Paul Eggert  <eggert@cs.ucla.edu>
14660
14661         * modules/hash (Files): Add lib/xalloc.h.
14662         * modules/pipe (Depends-on): Add wait-process.
14663         * modules/stat (Depends-on): Add xalloc.
14664         * modules/userspec (Files): Add lib/userspec.h.
14665         * modules/xstrto
14666
14667         Upgrade from gettext-0.13.
14668         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
14669         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
14670         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
14671
14672 2004-06-10  Jim Meyering  <jim@meyering.net>
14673
14674         * lib/calloc.c: New file.
14675
14676 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
14677
14678         * lib/getdate.y (yylex): Allow space between sign and number.
14679         Problem reported by Dan Jacobson.
14680
14681 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
14682
14683         Merge from coreutils CVS.
14684
14685         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
14686         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
14687         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
14688         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
14689         xstrtol.m4: Fix copyright date and/or serial number.
14690
14691         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
14692         See if we need an fchown replacement.
14693         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
14694         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
14695         and use the replacement function if we detect either defect.
14696
14697         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
14698         gl_UTIMECMP.
14699
14700 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
14701         and  Jim Meyering  <jim@meyering.net>
14702
14703         Merge from coreutils CVS.
14704
14705         * lib/stat-macros.h: New file, with contents from file-type.h
14706         and coreutils' system.h.
14707         * lib/file-type.c: Include "stat-macros.h".
14708         * lib/file-type.h (file_type): Move all macro definitions to new file,
14709         stat-macros.h.
14710
14711         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
14712         Wrap old code with this conditional.
14713         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
14714         function that does not dereference symlinks.
14715         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
14716
14717         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
14718         dependency problems.
14719         (xreadlink): Accept new arg SIZE, for efficiency.
14720         All decls and uses changed.
14721         * lib/xreadlink.h: Include <stddef.h>, for size_t.
14722
14723         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
14724         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
14725
14726         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
14727         sysexits.h.
14728
14729 2004-06-01  Jim Meyering  <jim@meyering.net>
14730
14731         * m4/calloc.m4: New file.
14732
14733 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
14734
14735         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
14736         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
14737         Also, fix a typo in a diagnostic.
14738
14739 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
14740
14741         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
14742         or AC_FUNC_REALLOC.
14743
14744 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
14745
14746         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
14747         macros to be defined.
14748         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
14749         the allocator returns NULL because the requested size is zero.
14750
14751 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14752
14753         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
14754         var.  Add comment explaining why libc still defines it.  This
14755         merges the following patch from glibc:
14756         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
14757
14758 2004-05-20  Andreas Schwab  <schwab@suse.de>
14759
14760         * m4/free.m4: Replace free if it not known to work, not the other
14761         way round.
14762
14763 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14764
14765         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
14766         present in glibc since revision 1.1 of this file.
14767         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
14768         obstack_alignment_mask, obstack_alloc, obstack_base,
14769         obstack_blank, obstack_blank_fast, obstack_chunk_size,
14770         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
14771         obstack_grow0, obstack_init, obstack_int_grow,
14772         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
14773         obstack_next_free, obstack_object_size, obstack_ptr_grow,
14774         obstack_ptr_grow_fast, obstack_room): Remove declarations of
14775         nonexistent functions.
14776
14777 2004-05-18  Karl Berry  <karl@gnu.org>
14778
14779         * config/srclist.txt: break link for vasnprintf.c.
14780
14781 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
14782
14783         Port obstack to the AS/400, where pointers are 16 bytes wide and
14784         you cannot cast an integer to a valid pointer.  This patch is
14785         currently waiting to be integrated into glibc; see
14786         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
14787
14788         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
14789         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
14790         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
14791         (struct obstack): temp member is now a union of a pointer and
14792         an integer, instead of an integer.  All integer uses changed.
14793         This does not affect the physical layout of struct obstack,
14794         except on hosts (like the AS/400) where the size or alignment of
14795         void * is greater than that of ptrdiff_t.
14796         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
14797         __STDC__)]: Store temporary in pointer member of union, not
14798         integer member.
14799         * lib/obstack.c: Include <stddef.h>, for offsetof.
14800         (struct fooalign): Remove; it doesn't need a name.
14801         (union fooround): Change double to long double, and add void *.
14802         (DEFAULT_ALIGNMENT): Use offsetof to compute.
14803         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
14804         not a macro.  Hence the values are always int; so remove all
14805         casts-to-int in uses.
14806
14807 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
14808
14809         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
14810         we can get this patch merged into glibc.
14811
14812 2004-05-17  Derek R. Price  <derek@ximbiot.com>
14813             Paul Eggert  <eggert@cs.ucla.edu>
14814
14815         * m4/argp: Depend on alloca.
14816
14817 2004-05-17  Derek R. Price  <derek@ximbiot.com>
14818             Paul Eggert  <eggert@cs.ucla.edu>
14819
14820         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
14821         freecoding.
14822
14823 2004-05-17  Bruno Haible  <bruno@clisp.org>
14824
14825         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
14826         precision that consists of a '.' followed by an empty digit string.
14827         Patch by Tor Lillqvist <tml@iki.fi>.
14828
14829 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
14830
14831         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
14832         for backward compatibility with older code.  We need our own
14833         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
14834         it under some other name, and our alloca.h will define it.
14835
14836 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
14837             Derek Price  <derek@ximbiot.com>
14838
14839         * lib/alloca.c: Include <alloca.h>, to get our interface.
14840         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
14841         include <alloca.h> first.  Use C89 prototype for alloca; this
14842         requires including <stddef.h> for size_t.  Use extern "C" if C++.
14843         Use #elif for simplicity, since we can assume C89 now.
14844         Don't try to source the system alloca.h since it will not be found
14845         and to prevent recursively including its replacement.
14846         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
14847         * lib/regex.c: Likewise.
14848
14849 2004-05-16  Derek Price  <derek@ximbiot.com>
14850             Paul Eggert  <eggert@cs.ucla.edu>
14851
14852         getline cleanup.  This changes the getndelim2 API: both order of
14853         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
14854         no delimiter).
14855
14856         * lib/getline.c: Don't include stddef.h or stdio.h, since our
14857         interface does that.
14858         (getline): Always use getdelim, so that we don't have two
14859         copies of this code.
14860         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
14861         if available.
14862         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
14863         (GETNDELIM2_MAXIMUM): New macro.
14864         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
14865         instead of the old practice of delim2==0.  All callers changed.
14866         Return -1 on overflow, instead of returning junk.
14867         Do not set *linesize unless allocation succeeds.
14868         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
14869         that we include sys/types.h.
14870         * lib/getnline.h: Likewise.
14871         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
14872         (getndelim2): Reorder arguments.
14873         * lib/getnline.c (getnline, getndelim):
14874         Don't discard the NMAX argument.
14875         (getnline): Invoke getndelim, to avoid code duplication.
14876         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
14877         of (size_t) -1 by callers of the getnline family.
14878
14879 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14880
14881         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
14882         Check for gettimeofday.
14883         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
14884         Check for settimeofday, stime.
14885
14886 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14887
14888         * lib/nanosleep.c (suspended): Change its type from int to
14889         sig_atomic_t volatile.
14890         (first_call): Make it private to rpl_nanosleep, and have it
14891         be zero initially as that's a bit faster.
14892         (my_usleep): Round up fractional times instead of truncating them,
14893         as this is the usual meaning for 'sleep'.
14894
14895         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
14896         doesn't work.
14897         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
14898         (ENOSYS): Define if not defined.
14899         (settime): Fall back on stime if it exists and settimeofday fails.
14900         But don't bother with fallbacks if a method fails with errno == EPERM.
14901
14902 2004-05-11  Jim Meyering  <jim@meyering.net>
14903
14904         Prior to this change, the save_cwd caller required read access to the
14905         current directory on most systems (ones with the fchdir function).
14906
14907         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
14908         fails, try write-only, and finally, resort to using xgetcwd.
14909
14910 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14911
14912         * lib/obstack.c, obstack.h: Import changes from libc.
14913
14914 2004-04-28  Bruno Haible  <bruno@clisp.org>
14915
14916         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
14917         also implicitly appends .exe to executables.
14918         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
14919         accepts Windows pathnames.
14920         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14921         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14922         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14923         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14924         Reported by Derek Robert Price <derek@ximbiot.com>.
14925
14926 2004-04-21  Karl Berry  <karl@gnu.org>
14927
14928         * config/srclist.txt (localcharset.c): break sync.
14929
14930 2004-04-20  Paul Eggert  <eggert@twinsun.com>
14931
14932         * m4/host-os.m4: Add a copyright notice.
14933
14934 2004-04-20  Jim Meyering  <jim@meyering.net>
14935
14936         Change UTILS_ to gl_ in AC_DEFINE'd names.
14937         Change utils_- and jm_-prefixed variables, too.
14938         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
14939         UTILS_FUNC_MKDIR_TRAILING_SLASH.
14940         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
14941
14942         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
14943         Don't emit trailing blanks.
14944         Also rename jm_-prefixed variables to have gl_ prefix.
14945
14946         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
14947         Also rename jm_-prefixed variables to have gl_ prefix.
14948
14949         * m4/jm-macros.m4: Reflect the renamings.
14950         * m4/prereq.m4: Likewise.
14951
14952 2004-04-20  Jim Meyering  <jim@meyering.net>
14953
14954         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
14955         memory.
14956
14957 2004-04-20  Jim Meyering  <jim@meyering.net>
14958             Bruno Haible  <bruno@clisp.org>
14959
14960         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
14961         memory when realloc fails.
14962
14963 2004-04-19  Jim Meyering  <jim@meyering.net>
14964
14965         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
14966         now that readutmp.c may call `free (0)'.
14967
14968 2004-04-19  Bruno Haible  <bruno@clisp.org>
14969
14970         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
14971         * m4/inttypes_h.m4: Likewise.
14972         * m4/stdint_h.m4: Likewise.
14973         * m4/intmax_t.m4: Likewise.
14974         * m4/uintmax_t.m4: Likewise.
14975
14976 2004-04-18  Jim Meyering  <jim@meyering.net>
14977
14978         * m4/prereq.m4: Don't forbid jm_ prefix.
14979
14980         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
14981         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
14982         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
14983         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
14984         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
14985         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
14986         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
14987         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
14988         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
14989         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
14990         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
14991         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
14992         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
14993         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
14994         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
14995         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
14996         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
14997         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
14998         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
14999
15000 2004-04-18  Jim Meyering  <jim@meyering.net>
15001
15002         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
15003         failure, don't leak memory and do call END_UTMP_ENT.
15004
15005 2004-04-16  Jim Meyering  <jim@meyering.net>
15006
15007         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
15008         coreutils' stat program.
15009         (gl_PREREQ): Don't require jm_PREREQ_STAT.
15010
15011 2004-04-11  Paul Eggert  <eggert@twinsun.com>
15012
15013         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
15014         C89.
15015         (CHAR_BIT): Remove, since we assume C89.
15016         Include <stdint.h> if available, as per current Autoconf CVS advice.
15017
15018 2004-03-31  Jim Meyering  <jim@meyering.net>
15019
15020         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
15021         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
15022         * m4/xalloc.m4: Likewise.
15023
15024 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15025
15026         Merge from coreutils.
15027
15028         * m4/inttostr.m4: New file.
15029         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
15030         Require AM_STDBOOL_H and gl_TIMESPEC instead.
15031         Require gl_CLOCK_TIME.
15032         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
15033
15034 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15035
15036         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
15037         not bool, to be more consistent with Unix conventions.
15038         Suggested by Bruno Haible.
15039
15040         Merge from coreutils.
15041
15042         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
15043         * lib/umaxtostr.c: New files.
15044
15045         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
15046         the usual <time.h> dance.
15047         (get_date): Change signature to support fractional time stamps.
15048         All callers changed.
15049         * lib/getdate.y: Include "getdate.h" first, as we can now
15050         assume C89 and don't need to worry about 'const'.
15051         Similarly, include "unlocked-io.h" near start, not in middle.
15052         Include <limits.h>.
15053         (textint.value): Use long int rather than int.
15054         (textint.digits): Use size_t rather than int.
15055         (BILLION, LOG10_BILLION): New constants.
15056         (parser_control): New member rel_ns.  Members day_ordinal,
15057         time_zone, month, day, hour, minutes, rel_year, rel_month,
15058         rel_day, rel_hour, rel_minutes, rel_seconds
15059         are now long int, not int.  Member seconds is now struct timespec,
15060         not int.  New member timespec_seen.  Members dates_seen, days_seen,
15061         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
15062         not int.
15063         (%union.intval): Now long int, not int.
15064         New member timespec.
15065         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
15066         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
15067         (spec): Now is a timespec or an item list.
15068         (timespec, items): New nonterminals.
15069         (time, rel, relunit, number, get_date):
15070         Add support for fractional seconds.
15071         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
15072         (gmtime, localtime, mktime): Remove decls; not needed with C89.
15073         (to_hour): First arg is now long int, not int.
15074         (to_year): Returns long int, not int.
15075         Don't treat year -70 like 70.
15076         (tm_diff): Returns long int, not int.
15077         (lookup_word): Use bool instead of int when appropriate.
15078         (yylex): Use size_t for count, not int.
15079         Detect overflow when parsing large integer constants.
15080         Add support for fractions.
15081         (get_date): Make pointers 'const' if possible.
15082         Use more-portable code to detect integer overflow.
15083         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
15084         Don't use ctime; it's not reliable if the year has >4 digits.
15085
15086         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
15087         This is for compatibility with BSD.
15088
15089         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
15090         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
15091         From coreutils' system.h.
15092
15093         * lib/userspec.c: Don't include "posixver.h".
15094         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
15095         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
15096         compatible extension.  Simplify code by removing a boolean int
15097         that was always nonzero if a string was nonnull.
15098
15099 2004-03-30  Jim Meyering  <jim@meyering.net>
15100
15101         Merge from coreutils.
15102
15103         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
15104         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
15105         on some systems one must include <grp.h> before it.
15106         Reported by Christian Krackowizer.
15107
15108 2004-03-30  Jim Meyering  <jim@meyering.net>
15109
15110         Merge from coreutils.
15111
15112         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
15113
15114         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
15115         an empty input stream.
15116
15117         * lib/readtokens.c: Include <stdbool.h>.
15118         (readtoken): Use `size_t' rather than int/long.
15119         All callers adjusted.
15120         Use `bool' rather than `int' where appropriate.
15121         Use memset rather than an explicit loop.
15122         Use x2nrealloc rather than xrealloc.
15123         Allow the use of `\0' as a delimiter.
15124         (readtokens): Likewise.
15125         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
15126
15127 2004-03-30  Jim Meyering  <jim@meyering.net>
15128
15129         * m4/realloc.m4: Remove file, since now it does no more than
15130         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
15131         the `configure.ac' section of module/realloc.
15132         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
15133
15134 2004-03-30  Bruno Haible  <bruno@clisp.org>
15135
15136         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
15137         nonnull.
15138
15139 2004-03-29  Paul Eggert  <eggert@twinsun.com>
15140
15141         Merge changes to getloadavg.c from coreutils and Emacs.
15142
15143         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
15144         Define to an expression, not to the empty string.
15145         Include cloexec.h and xalloc.h.
15146         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
15147         Use set_cloexec_flag rather than rolling our own.
15148         * lib/cloexec.c, lib/cloexec.h: New files.
15149
15150 2004-03-29  Paul Eggert  <eggert@twinsun.com>
15151
15152         * m4/cloexec.m4: New file.
15153
15154 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15155
15156         * lib/getopt.h: Sync with libc CVS.
15157
15158 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15159             Bruno Haible  <bruno@clisp.org>
15160
15161         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
15162         mbswidth.
15163
15164 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15165             Bruno Haible  <bruno@clisp.org>
15166
15167         * lib/mbswidth.h: Include <wchar.h> only if
15168         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
15169         <wchar.h>.
15170         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
15171
15172 2004-03-09  Paul Eggert  <eggert@twinsun.com>
15173
15174         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
15175         Sync with libc CVS.
15176         * lib/getopt_int.h: New file, also synced from libc.
15177
15178 2004-03-09  Paul Eggert  <eggert@twinsun.com>
15179
15180         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
15181         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
15182         Bring back getopt.c, getopt.h, getopt1.c.
15183
15184 2004-03-07  Paul Eggert  <eggert@twinsun.com>
15185
15186         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
15187         All uses changed.  Check for sa_sigaction member; this fixes
15188         a bug first reported by Jason Andrade in
15189         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
15190
15191 2004-03-07  Paul Eggert  <eggert@twinsun.com>
15192
15193         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
15194         '#if' expressions.  Unlike the code it replaces, it does not
15195         depend on (defined _SC_PAGESIZE).  However, it does depend on
15196         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
15197         first reported by Jason Andrade in
15198         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
15199
15200 2004-02-25  Simon Josefsson  <jas@extundo.com>
15201
15202         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
15203
15204 2004-02-25  Simon Josefsson  <jas@extundo.com>
15205
15206         * lib/strdup.h: New file.
15207         * lib/strdup.c: Include it.
15208         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
15209         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
15210
15211 2004-02-23  Karl Berry  <karl@gnu.org>
15212
15213         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
15214         (from fencepost.gnu.org:/gd/gnuorg).
15215
15216 2004-02-23  Karl Berry  <karl@gnu.org>
15217
15218         * config/srclistvars.sh (GNUORG) [karl]: redefine.
15219         * config/srclist.txt: add maintain/standards documents.
15220
15221 2004-02-18  Bruno Haible  <bruno@clisp.org>
15222
15223         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
15224         Reported by Derek Robert Price <derek@ximbiot.com>.
15225
15226 2004-02-16  Karl Berry  <karl@gnu.org>
15227
15228         * config/mkinstalldirs, install-sh: update from automake.
15229
15230 2004-02-06  Karl Berry  <karl@gnu.org>
15231
15232         * m4/po.m4: update from gettext 0.14.1.
15233
15234 2004-02-06  Karl Berry  <karl@gnu.org>
15235
15236         * lib/config.charset: update from gettext 0.14.1.
15237
15238 2004-02-05  Paul Eggert  <eggert@twinsun.com>
15239
15240         Add comments and code, prompted by suggestions from Bruno Haible
15241         for sh-quote.
15242         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
15243         describing the enum quoting_style values.
15244         * lib/quotearg.c (quotearg_alloc): New function.
15245         (quotearg_buffer_restyled): Treat lone { and } as special.
15246         Treat = as special.  Work around bug with older shells
15247         that "see" a '\' that is really the 2nd byte of a multibyte char.
15248         Quote empty string with shell_quoting_style.
15249
15250 2004-02-03  Bruno Haible  <bruno@clisp.org>
15251
15252         * m4/pipe.m4: New file, from GNU gettext.
15253
15254 2004-02-03  Bruno Haible  <bruno@clisp.org>
15255
15256         * lib/pipe.h: New file, from GNU gettext.
15257         * lib/pipe.c: New file, from GNU gettext.
15258
15259 2004-01-27  Bruno Haible  <bruno@clisp.org>
15260
15261         * m4/execute.m4: New file, from GNU gettext.
15262
15263 2004-01-27  Bruno Haible  <bruno@clisp.org>
15264
15265         * lib/execute.h: New file, from GNU gettext.
15266         * lib/execute.c: New file, from GNU gettext.
15267         * lib/w32spawn.h: New file, from GNU gettext.
15268
15269 2004-01-24  Paul Eggert  <eggert@twinsun.com>
15270
15271         Merge from diffutils.
15272
15273         * lib/file-type.c (file_type): Add typed memory objects.
15274         * lib/file-type.h (S_TYPEISTMO): New macro.
15275
15276         * lib/c-stack.h (c_stack_action): Remove argv argument.
15277         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
15278         (die): Don't calculate message unless segv_action returns.
15279         (get_stack_location, min_address_from_argv, max_address_from_argv,
15280         volatile stack_base, volatile_stack_size): Remove.
15281         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
15282         that every segmentation violation is a stack overflow.  (Ouch!)
15283         See Debian bug 136249 (still outstanding) for more info about why
15284         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
15285
15286 2004-01-24  Paul Eggert  <eggert@twinsun.com>
15287
15288         Exit-status fix from coreutils.
15289
15290         Use exit_failure consistently in place of EXIT_FAILURE,
15291         so that program exit statuses are consistent on failure.
15292
15293         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
15294         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
15295         * lib/argmatch.h: Comment fix to match the above.
15296         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
15297         Now a macro referring to exit_failure, instead of a separate
15298         variable.  Include "exitfail.h" to get it.
15299         * lib/xstrtol.h: Include "exitfail.h".
15300         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
15301
15302         * lib/long-options.c (parse_long_options): Use prototype
15303         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
15304         for clarity.
15305
15306 2004-01-21  Jim Meyering  <jim@meyering.net>
15307
15308         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
15309         so as not to conflict with a different-sized __mktime_internal
15310         function in GNU libc.
15311         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
15312         Problem building statically-linked `ls' reported by Michael Brunnbauer.
15313
15314 2004-01-20  Karl Berry  <karl@gnu.org>
15315
15316         * config/config.guess: update from config.
15317
15318         * config/srclistvars.sh: GNUWWWLICENSES for karl.
15319
15320 2004-01-20  Bruno Haible  <bruno@clisp.org>
15321
15322         Safer stack allocation.
15323         * lib/setenv.c: Include allocsa.h.
15324         (alloca): Remove fallback definition.
15325         (freea): Remove macro.
15326         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
15327         instead of freea.
15328
15329 2004-01-20  Bruno Haible  <bruno@clisp.org>
15330
15331         * m4/eealloc.m4: New file, from GNU gettext.
15332
15333 2004-01-20  Bruno Haible  <bruno@clisp.org>
15334
15335         * m4/allocsa.m4: New file, from GNU gettext.
15336
15337 2004-01-20  Bruno Haible  <bruno@clisp.org>
15338
15339         * lib/xallocsa.h: New file, from GNU gettext.
15340         * lib/xallocsa.c: New file, from GNU gettext.
15341
15342 2004-01-20  Bruno Haible  <bruno@clisp.org>
15343
15344         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
15345
15346 2004-01-20  Bruno Haible  <bruno@clisp.org>
15347
15348         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
15349         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
15350         specially.
15351
15352 2004-01-20  Bruno Haible  <bruno@clisp.org>
15353
15354         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
15355         patch.
15356
15357 2004-01-20  Bruno Haible  <bruno@clisp.org>
15358
15359         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
15360
15361 2004-01-20  Bruno Haible  <bruno@clisp.org>
15362
15363         * lib/eealloc.h: New file.
15364
15365 2004-01-20  Bruno Haible  <bruno@clisp.org>
15366
15367         * lib/binary-io.h: Avoid warnings on Cygwin.
15368
15369 2004-01-20  Bruno Haible  <bruno@clisp.org>
15370
15371         * lib/allocsa.h: New file, from GNU gettext.
15372         * lib/allocsa.c: New file, from GNU gettext.
15373
15374 2004-01-18  Karl Berry  <karl@gnu.org>
15375
15376         * doc/gpl.texi, doc/lgpl.texi: new files.
15377
15378 2004-01-18  Karl Berry  <karl@gnu.org>
15379
15380         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
15381         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
15382
15383 2004-01-15  Paul Eggert  <eggert@twinsun.com>
15384
15385         Merge from coreutils.
15386
15387         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
15388         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
15389         (gl_DEFAULT_POSIX2_VERSION): Move
15390         the documentation from 'configure' into 'config.hin',
15391         so that 'configure --help' isn't burdened by it and
15392         we don't have to worry about its formatting there.
15393         Reword the documentation so that it's more succinct
15394         and can be run together into a single paragraph.
15395         * m4/same.m4 (gl_SAME): Check for pathconf.
15396
15397 2004-01-15  Paul Eggert  <eggert@twinsun.com>
15398
15399         Merge from coreutils.
15400
15401         * lib/posixver.c: Include posixver.h.
15402
15403         * lib/same.c: Include <stdbool.h>, <limits.h>.
15404         (_POSIX_NAME_MAX): Define if not defined.
15405         (MIN): New macro.
15406         (same_name): If file names are silently truncated, report
15407         that the file names are the same if they are the same after
15408         the silent truncation.
15409
15410         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
15411         conversion function.
15412         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
15413         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
15414         longer needed.
15415
15416 2004-01-15  Jim Meyering  <jim@meyering.net>
15417
15418         Merge from coreutils.
15419
15420         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
15421         if no library is required.
15422         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
15423         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
15424         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
15425         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
15426         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
15427         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
15428         value, $ac_cv_search_crypt, if it's "none required".
15429         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
15430         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
15431         not gl_FUNC_GETLOADAVG.
15432         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
15433         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
15434
15435 2004-01-15  Jim Meyering  <jim@meyering.net>
15436
15437         Merge from coreutils.
15438
15439         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
15440         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
15441         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
15442
15443         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
15444         optional configure-time default.
15445
15446         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15447
15448         * lib/xreadlink.c (xreadlink): Correct outdated comment.
15449
15450 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
15451
15452         Merge from coreutils.
15453
15454         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
15455         value, $ac_cv_search_nanosleep, if it's "none required".
15456
15457 2004-01-14  Paul Eggert  <eggert@twinsun.com>
15458
15459         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
15460         with like-named macro in fnmatch.c.
15461         (EXT): Use an internal constant instead.
15462
15463         Merge fnmatch patches from glibc.
15464         * lib/fnmatch.c (mbsinit): Remove define.
15465         Add libc_hidden_ver (__fnmatch, fnmatch).
15466         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
15467         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
15468
15469 2004-01-14  Karl Berry  <karl@gnu.org>
15470
15471         * config/install-sh: update from automake.
15472
15473 2004-01-13  Karl Berry  <karl@gnu.org>
15474
15475         * config/install-sh: update from automake.
15476
15477 2004-01-09  Karl Berry  <karl@gnu.org>
15478
15479         * config/install-sh: update from automake.
15480
15481 2004-01-05  Karl Berry  <karl@gnu.org>
15482
15483         * config/config.{sub,guess}: update from config.
15484
15485 2003-12-31  Karl Berry  <karl@gnu.org>
15486
15487         * config/depcomp: update from automake.
15488
15489 2003-12-14  Karl Berry  <karl@gnu.org>
15490
15491         * lib/config.charset: update from gettext-runtime.
15492
15493 2003-12-03  Paul Eggert  <eggert@twinsun.com>
15494
15495         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
15496         Bug reported by Alfred M. Szmidt.
15497
15498 2003-12-03  Bruno Haible  <bruno@clisp.org>
15499
15500         * m4/gettext.m4: Upgrade from gettext-0.13.
15501         * m4/po.m4: Upgrade from gettext-0.13.
15502         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
15503         * m4/intmax.m4: New file, from gettext-0.13.
15504         * m4/printf-posix.m4: New file, from gettext-0.13.
15505
15506 2003-11-29  Karl Berry  <karl@gnu.org>
15507
15508         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
15509
15510 2003-11-25  Paul Eggert  <eggert@twinsun.com>
15511             Bruno Haible  <bruno@clisp.org>
15512
15513         * lib/printf-parse.h: Don't include sys/types.h.
15514         (ARG_NONE): New macro.
15515         (char_directive): Change type of *arg_index fields to size_t.
15516         * lib/printf-parse.c: Don't include sys/types.h.
15517         (SSIZE_MAX): Remove macro.
15518         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
15519         Remove unnecessary overflow check.
15520         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
15521         fields.
15522
15523 2003-11-25  Bruno Haible  <bruno@clisp.org>
15524
15525         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
15526
15527 2003-11-25  Bruno Haible  <bruno@clisp.org>
15528
15529         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
15530         gt_TYPE_SSIZE_T.
15531
15532 2003-11-24  Paul Eggert  <eggert@twinsun.com>
15533
15534         * modules/alloca: Remove dependency on xalloc.
15535
15536 2003-11-24  Paul Eggert  <eggert@twinsun.com>
15537
15538         * lib/alloca.c: Remove dependency on xalloc module.
15539         (xalloc_die): Remove.
15540         (memory_full) [!defined emacs]: New macro.
15541         [!defined emacs]: Don't include xalloc.h.
15542         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
15543         address arithmetic overflows.  Change datatypes a bit to avoid
15544         unnecessary casts.
15545
15546 2003-11-22  Jim Meyering  <jim@meyering.net>
15547
15548         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
15549         s/size/size_t/.
15550
15551 2003-11-21  Karl Berry  <karl@gnu.org>
15552
15553         * config/config.{sub,guess}: update from config.
15554
15555 2003-11-18  Karl Berry  <karl@gnu.org>
15556
15557         * config/config.{sub,guess}: update from config.
15558
15559         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
15560
15561 2003-11-17  Paul Eggert  <eggert@twinsun.com>
15562
15563         * README: Mention that S+T cannot overflow if S is the size of
15564         an existing object and T is sufficiently small.
15565
15566 2003-11-17  Jim Meyering  <jim@meyering.net>
15567
15568         On systems without utime and without a utimes function capable of
15569         dealing with a NULL struct utimbuf* argument, this utime replacement
15570         could -- in unusual circumstances -- leak a file descriptor.
15571         * lib/utime.c: Include <unistd.h> and <errno.h>.
15572         (utime_null): Be sure to close `fd' and to preserve errno.
15573         Reported by Geoff Collyer via Arnold Robbins.
15574
15575 2003-11-17  Bruno Haible  <bruno@clisp.org>
15576
15577         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
15578         (Depends-on): Add xsize.
15579
15580 2003-11-17  Bruno Haible  <bruno@clisp.org>
15581
15582         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
15583
15584 2003-11-17  Bruno Haible  <bruno@clisp.org>
15585
15586         * lib/vasnprintf.c (alloca): Remove fallback definition.
15587         (freea): Remove definition.
15588         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
15589         Reported by Paul Eggert.
15590
15591 2003-11-16  Paul Eggert  <eggert@twinsun.com>
15592             Bruno Haible  <bruno@clisp.org>
15593
15594         Protect against address arithmetic overflow.
15595         * lib/printf-args.h: Include stddef.h.
15596         (arguments): Change type of field 'count' to size_t.
15597         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
15598         'unsigned int' where appropriate.
15599         * lib/printf-parse.h: Include sys/types.h.
15600         (char_directive): Change type of *arg_index fields to ssize_t.
15601         (char_directives): Change type of fields 'count', max_*_length to
15602         size_t.
15603         * lib/printf-parse.c: Include sys/types.h and xsize.h.
15604         (SSIZE_MAX): Define fallback value.
15605         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
15606         instead of 'int' where appropriate. Check a_allocated, d_allocated
15607         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
15608         * lib/vasnprintf.c: Include xsize.h.
15609         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
15610         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
15611         overflow. Avoid wraparound when converting a width or precision from
15612         decimal to binary.
15613
15614 2003-11-16  Bruno Haible  <bruno@clisp.org>
15615
15616         Update from GNU gettext.
15617         * lib/printf-parse.c: Generalize to it can be compiled for wide
15618         strings.
15619         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
15620         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
15621         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
15622         SNPRINTF): New macros.
15623         Don't include <alloca.h> if the file is used inside libintl.
15624         (local_wcslen): New function, for Solaris 2.5.1.
15625         (VASNPRINTF): Use it instead of wcslen.
15626
15627 2003-11-16  Bruno Haible  <bruno@clisp.org>
15628
15629         * lib/xsize.h (xmax): New function.
15630         (xsum, xsum3, xsum4): Declare as "pure" functions.
15631
15632 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15633
15634         * modules/xalloc (Files): Undo latest change, since xalloc.h
15635         no longer needs SIZE_MAX or PTRDIFF_MAX.
15636
15637 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15638
15639         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
15640         gl_PTRDIFF_MAX.
15641
15642 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15643
15644         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
15645         "return", to pacify some unknown compiler.  Problem reported
15646         by Joerg Schilling.
15647
15648 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15649
15650         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
15651         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
15652         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
15653         heuristic is just as accurate as far as we know, and it removes a
15654         dependency on size_max.m4 and ptrdiff_max.m4.
15655
15656 2003-11-11  Bruno Haible  <bruno@clisp.org>
15657
15658         * modules/xsize (Files): Add m4/size_max.m4.
15659         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
15660
15661 2003-11-11  Bruno Haible  <bruno@clisp.org>
15662
15663         * m4/size_max.m4: New file.
15664         * m4/ptrdiff_max.m4: New file.
15665         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
15666         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
15667         (gl_XALLOC): Invoke it.
15668
15669 2003-11-11  Bruno Haible  <bruno@clisp.org>
15670
15671         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
15672         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
15673         defined.
15674
15675 2003-11-10  Paul Eggert  <eggert@twinsun.com>
15676
15677         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
15678         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
15679         rejected some allocations of exactly SIZE_MAX - 2 bytes.
15680         From Bruno Haible.
15681         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
15682         not (size_t) -1, since it's defined here.
15683
15684 2003-11-09  Karl Berry  <karl@gnu.org>
15685
15686         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
15687
15688 2003-11-06  Paul Eggert  <eggert@twinsun.com>
15689
15690         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
15691         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
15692         Reject sizes of exactly SIZE_MAX bytes.
15693         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
15694         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
15695
15696 2003-11-05  Bruno Haible  <bruno@clisp.org>
15697
15698         * lib/xsize.h: Include limits.h, to avoid a possible collision with
15699         SIZE_MAX defined in <limits.h> on Solaris.
15700
15701 2003-11-04  Jim Meyering  <jim@meyering.net>
15702
15703         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
15704         variable names, rather than @VAR@.
15705         * modules/poll: Likewise.
15706
15707 2003-11-04  Bruno Haible  <bruno@clisp.org>
15708
15709         * modules/xsize: New file.
15710         * modules/linebreak: Depend on xsize.
15711         * MODULES.html.sh (func_all_modules): Add xsize.
15712
15713 2003-11-04  Bruno Haible  <bruno@clisp.org>
15714
15715         * m4/xsize.m4: New file.
15716
15717 2003-11-04  Bruno Haible  <bruno@clisp.org>
15718
15719         * lib/xsize.h: New file.
15720         * lib/linebreak.c: Include xsize.h.
15721         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
15722         argument for overflow.
15723         Suggested by Paul Eggert.
15724
15725 2003-11-03  Karl Berry  <karl@gnu.org>
15726
15727         * config/config.{guess,sub}: update from config.
15728
15729 2003-11-03  Jim Meyering  <jim@meyering.net>
15730
15731         * modules/userspec (lib_SOURCES): Add userspec.h.
15732         (Include): Add "userspec.h".
15733         Improve description.
15734
15735 2003-11-03  Jim Meyering  <jim@meyering.net>
15736
15737         * lib/userspec.c: Include "userspec.h".
15738         * lib/userspec.h: New file.
15739
15740 2003-11-03  Bruno Haible  <bruno@clisp.org>
15741
15742         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
15743
15744 2003-11-03  Bruno Haible  <bruno@clisp.org>
15745
15746         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
15747         available, to avoid (extremely rare) race condition.
15748         Suggested by Paul Eggert.
15749
15750 2003-11-02  Karl Berry  <karl@gnu.org>
15751
15752         * config/srclist.txt (vasprintf.c): sync broken, sigh.
15753
15754 2003-10-31  Paul Eggert  <eggert@twinsun.com>
15755
15756         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
15757         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
15758         (read_filesystem_list): Set and use me_type_malloced.
15759         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
15760         whatever the type happens to be), for brevity and consistency.
15761         Check for size calculation overflow on Alphas running OSF/1.
15762
15763 2003-10-31  Jim Meyering  <jim@meyering.net>
15764
15765         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
15766
15767         * lib/linebuffer.c: Include <string.h> for declaration of memset.
15768
15769 2003-10-30  Paul Eggert  <eggert@twinsun.com>
15770             Bruno Haible  <bruno@clisp.org>
15771
15772         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
15773         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
15774
15775 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15776
15777         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
15778         netbsd*-gnu*.  Suggested by Robert Millan.
15779
15780 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15781
15782         * modules/group-member: Depend on stdbool.
15783
15784 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15785
15786         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
15787
15788 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15789
15790         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
15791         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
15792         after the 'gnu' in these cases.  This fixes some bugs in the
15793         previous change, and is based on suggestions by Robert Millan.
15794
15795 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15796
15797         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
15798         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
15799         no longer needed.
15800         * lib/quotearg.c (quotearg_n_options): Use it.
15801         * lib/group-member.c: Include <stdbool.h>.
15802         (free_group_info): Arg is now const *; don't free arg.
15803         (get_group_info): Now returns bool and accepts struct group_info *,
15804         rather than returning a malloc'ed struct group_info *.
15805         All uses changed.  Check for overflow in internal size calculation.
15806
15807         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
15808         rather than xmalloc/xrealloc.
15809         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
15810         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
15811         conformance bug: the old code used a pointer after freeing the
15812         storage that it addressed.
15813         * lib/hash.c (hash_initialize): Simplify the code by using
15814         xalloc_oversized rather than doing it by hand.
15815         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
15816         the buffer preserved.  Use free and xmalloc instead.
15817         * lib/quotearg.c (quotearg_n_options): Likewise.
15818         Use a simpler test for size overflow.  Don't use xalloc_oversized
15819         because unsigned int might be wider than size_t (!); this suggests
15820         that we should switch from unsigned int to size_t for slot numbers.
15821
15822 2003-10-28  Paul Eggert  <eggert@twinsun.com>
15823
15824         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
15825         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
15826         NetBSD kernels.  Requested by Richard Stallman.
15827
15828 2003-10-27  Paul Eggert  <eggert@twinsun.com>
15829
15830         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
15831         to allocate the returned structure.  Do not allocate a subarray,
15832         as x2nrealloc will do that.
15833         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
15834         instead of xnrealloc.
15835         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
15836
15837 2003-10-27  Bruno Haible  <bruno@clisp.org>
15838
15839         * lib/stdbool_.h: Better support for BeOS.
15840
15841 2003-10-26  Paul Eggert  <eggert@twinsun.com>
15842
15843         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
15844         now uses inline.
15845
15846 2003-10-26  Paul Eggert  <eggert@twinsun.com>
15847
15848         * lib/xalloc.h (xalloc_oversized): New static inline function, for
15849         callers that want to do their own size-overflow checking.  Include
15850         <stdbool.h>, since xalloc_oversized returns bool.
15851         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
15852         to use xalloc_oversized.
15853
15854         Add two functions x2realloc, x2nrealloc, for programs that grow
15855         arrays dynamically by doubling their sizes.
15856         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
15857         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
15858         New functions.
15859
15860         Port to C99 semantics for 'inline' of external functions.
15861         Bug reported by Bruno Haible.
15862         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
15863         with the old contents of xnmalloc.
15864         (xnmalloc, xmalloc): Use it.
15865         (xnrealloc_inline): New static inline function,
15866         with the old contents of xnrealloc.
15867         (xnrealloc, xrealloc): Use it.
15868
15869         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
15870         that.
15871
15872 2003-10-26  Karl Berry  <karl@gnu.org>
15873
15874         * config/srclist.txt (COPYING.DOC): no longer available from
15875         /gd/gnuorg; don't know where the ultimate source is.
15876
15877 2003-10-25  Paul Eggert  <eggert@twinsun.com>
15878
15879         Fix several address-calculation bugs in the hash modules,
15880         plus some minor code cleanup.
15881
15882         * lib/hash.h: Include <stdbool.h>, for bool.
15883         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
15884         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
15885         hash_get_n_entries, hash_get_max_bucket_length,
15886         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
15887         hash_rehash): Use size_t rather than unsigned.
15888         * lib/hash.c (struct hash_table, hash_get_n_buckets,
15889         hash_get_n_buckets_used, hash_get_n_entries,
15890         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
15891         hash_get_entries, hash_do_for_each, hash_string, is_prime,
15892         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
15893         Likewise.
15894         (SIZE_MAX): Define if not defined.
15895         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
15896         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
15897         hash_print):
15898         Use const * when possible.
15899         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
15900         (check_tuning): Fix bug: if tuning parameters were very close to
15901         0 or 1, rounding errors could have caused subscript violations.
15902         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
15903         (hash_initialize): Add 'fail:' label
15904         to free table and return NULL, and use it to simplify code.
15905         Use calloc rather than clearing the storage ourself.
15906         (hash_initialize, hash_rehash): Check for arithmetic overflow in
15907         buffer size calculations.
15908         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
15909         Include <stddef.h>, for size_t.
15910         * lib/hash-pjw.c (hash_pjw): Likewise.
15911         Switch to method described by Bruno Haible.
15912         Include <limits.h>, for CHAR_BIT.
15913         (SIZE_BITS): New macro.
15914
15915 2003-10-23  Paul Eggert  <eggert@twinsun.com>
15916
15917         * m4/getline.m4 (AM_FUNC_GETLINE):
15918         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
15919         hosts.  Problem reported by Derek Robert Price in
15920         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
15921         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
15922         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
15923
15924 2003-10-21  Paul Eggert  <eggert@twinsun.com>
15925
15926         * lib/getndelim2.c (getndelim2): When size calculation overflows,
15927         ceiling the allocation at NMAX bytes rather than silently
15928         discarding input bytes before NMAX is reached.  This makes
15929         a difference only if NMAX exceeds SIZE_MAX / 2.
15930
15931         * lib/obstack.c: Merge from glibc.
15932         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
15933         Add libc_hidden_def (_obstack_newchunk).
15934         (_obstack_free) [! defined _LIBC]: Remove.
15935         [defined _LIBC]: Make a strong alias from obstack_free, rather than
15936         a clone of the function body.
15937         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
15938         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
15939
15940         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
15941         glibc.
15942         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
15943         arg to memcpy.
15944
15945         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
15946         (obstack_ptr_grow_fast, obstack_int_grow_fast):
15947         Don't use lvalue casts, as GCC plans to remove support for them
15948         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
15949         was also present in the non-GCC version, indicating that this
15950         code had always been buggy and had never been widely used.
15951         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
15952         Use the fast variant of each macro, rather than copying the
15953         definiens of the fast variant; that way, we'll be more likely to
15954         catch future bugs in the fast variants.
15955
15956 2003-10-20  Bruno Haible  <bruno@clisp.org>
15957
15958         * modules/wait-process: New file.
15959         * MODULES.html.sh (func_all_modules): Add wait-process.
15960
15961 2003-10-20  Bruno Haible  <bruno@clisp.org>
15962
15963         * m4/wait-process.m4: New file.
15964
15965 2003-10-20  Bruno Haible  <bruno@clisp.org>
15966
15967         * lib/wait-process.h: New file, from GNU gettext.
15968         * lib/wait-process.c: New file, from GNU gettext.
15969
15970 2003-10-19  Jim Meyering  <jim@meyering.net>
15971
15972         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
15973         HPUX 10.20.
15974
15975 2003-10-18  Karl Berry  <karl@gnu.org>
15976
15977         * config/config.guess: update from config.
15978
15979 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15980
15981         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
15982         (getgroups): First arg is int, not size_t.
15983         Don't let 'free' mangle errno.
15984
15985 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15986
15987         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
15988
15989 2003-10-16  Karl Berry  <karl@gnu.org>
15990
15991         * config/config.{guess,sub}: update from config.
15992
15993 2003-10-16  Jim Meyering  <jim@meyering.net>
15994
15995         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
15996         memcpy.
15997
15998 2003-10-15  Paul Eggert  <eggert@twinsun.com>
15999
16000         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
16001         (SIZE_MAX): Remove.
16002         (new_exclude, add_exclude_file): Initial size no longer needs to
16003         be a power of 2.
16004         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
16005         our own address arithmetic overflow checking.
16006
16007         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
16008         (fnmatch): Do not alloca more than 2000 wide characters;
16009         instead, use malloc for large buffers.
16010         Check for address arithmetic overflow, and return -1
16011         with errno set to ENOMEM in that case.
16012         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
16013         (NEW_PATTERN): Do not alloca more than 8000 bytes;
16014         instead, return -1.  Check for address arithmetic overflow.
16015
16016 2003-10-14  Paul Eggert  <eggert@twinsun.com>
16017
16018         Handle invalid suffixes and overflow independently, so that
16019         callers can treat them independently as needed.  Fix some bugs in
16020         suffix handling, e.g., "100k@" was not diagnosed as an invalid
16021         suffix for a human-readable blocksize.  The major caller-visible
16022         change is the addition of a new
16023         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
16024         that both overflow and suffix chars were found.
16025
16026         * lib/human.c (humblock): Don't check separately for invalid suffix
16027         char; that is xstrtoumax's job (now that its bug is fixed).
16028         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
16029         INTMAX_MAX]: New macros.
16030         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
16031         TYPE_MAXIMUM): New macros.
16032         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
16033         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
16034         if overflow occurs, as it's what __strtol does and it's more useful
16035         in practice.
16036         (__xstrtol): If __strtol reports some error other than ERANGE,
16037         reflect it to the caller as LONGINT_INVALID.  If it reports
16038         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
16039         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
16040         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
16041         value.
16042         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
16043         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
16044         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
16045         [defined UINTMAX_MAX]: New macros.
16046
16047 2003-10-14  Bruno Haible  <bruno@clisp.org>
16048
16049         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
16050
16051 2003-10-14  Bruno Haible  <bruno@clisp.org>
16052
16053         * m4/sig_atomic_t: New file, from GNU gettext.
16054         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
16055
16056 2003-10-14  Bruno Haible  <bruno@clisp.org>
16057
16058         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
16059         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
16060         Also use volatile where needed.
16061
16062 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16063
16064         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
16065         Change maintainer from Bruno Haible to 'all'.
16066
16067 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16068
16069         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
16070
16071 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16072
16073         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
16074         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
16075         and define in terms of the other primitives.
16076         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
16077         (SIZE_MAX): Define if not already defined.
16078         (array_size_overflow): New function.
16079         (xalloc_die): Abort instead of exiting if 'error' returns.
16080         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
16081         (xmalloc, xrealloc): Use them.
16082         (xcalloc): Check for address arithmetic overflow.
16083         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
16084         a bit faster than strcpy.
16085
16086 2003-10-10  Simon Josefsson  <jas@extundo.com>
16087
16088         * modules/argp (Depends-on): Add restrict and strcase.
16089
16090 2003-10-10  Simon Josefsson  <jas@extundo.com>
16091
16092         * m4/argp.m4: Add AC_C_INLINE.
16093
16094 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16095
16096         Merge getpass from libc, plus a few fixes.
16097
16098         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
16099         Include <stdbool.h>.
16100         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
16101         __fsetlocking to empty.
16102         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
16103         do include <bits/libc-lock.h>.
16104         Do not include <fcntl.h>; not needed.
16105         [_LIBC]: Include <wchar.h>.
16106         (NOTCANCEL_MODE): New macro.
16107         (flockfile, funlockfile) [_LIBC]: New macros.
16108         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
16109         [!_LIBC]: New macros.
16110         (call_fclose): New function.
16111         (getpass): Use it.  Save tty stream separately; this simplifies the
16112         code and makes it more reliable if stdin happens to equal stdout.
16113         Invoke __fsetlocking on tty.
16114         Handle thread cancellation if needed.
16115         Namespace cleanup (use __tcgetattr, __getline).
16116         Use bool for Booleans.
16117         [USE_IN_LIBIO]: Handle wide streams.
16118         [!_LIBC]: Unconditionally do the fseek, since we don't know what
16119         stream might go where.
16120
16121         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
16122         doesn't have to include <stdio.h> before us.
16123         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
16124         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
16125         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
16126         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
16127         if not declared, so that we can use getpass.c code from libc without
16128         rewriting it.
16129         (flockfile, ftrylockfile, funlockfile): New macros.
16130
16131 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16132
16133         * modules/getpass: Depend on stdbool.
16134
16135 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16136
16137         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
16138
16139 2003-10-07  Karl Berry  <karl@gnu.org>
16140
16141         * config/config.{guess,sub}: update from config.
16142
16143 2003-10-06  Jim Meyering  <jim@meyering.net>
16144             Bruno Haible  <bruno@clisp.org>
16145
16146         This lets translators provide better translations for the
16147         "Written by ..." part of --version output.
16148         * lib/version-etc.h: Include stdarg.h.
16149         (version_etc_copyright): Declare as readonly.
16150         (version_etc): Make this function variadic with a NULL-terminated list
16151         of author name strings.
16152         (version_etc_va): New declaration.
16153         * lib/version-etc.c: Include stdarg.h, stdlib.h.
16154         (version_etc_copyright): Declare as readonly.
16155         (version_etc_va): New function. Provide a different translatable string
16156         for each possible number of authors < 10. Abbreviate when there are 10
16157         authors or more.
16158         (version_etc): Make this function variadic. Call version_etc_va.
16159         Suggestion from Gary V. Vaughan.
16160
16161         * lib/long-options.h (parse_long_options): Change prototype: the
16162         authors string is moved to the end and becomes variadic.
16163         * lib/long-options.c: Include stdarg.h.
16164         (parse_long_options): Make this function variadic, too.
16165         Call version_etc_va, not version_etc.
16166
16167 2003-10-06  Bruno Haible  <bruno@clisp.org>
16168
16169         * modules/version-etc-2: Remove file.
16170         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
16171
16172 2003-10-06  Bruno Haible  <bruno@clisp.org>
16173
16174         * modules/fatal-signal: New file.
16175         * MODULES.html.sh (func_all_modules): Add fatal-signal.
16176
16177 2003-10-06  Bruno Haible  <bruno@clisp.org>
16178
16179         * m4/fatal-signal.m4: New file.
16180         * m4/signalblocking.m4: New file, from GNU gettext.
16181
16182 2003-10-06  Bruno Haible  <bruno@clisp.org>
16183
16184         * lib/version-etc-2.h: Remove file.
16185         * lib/version-etc-2.c: Remove file.
16186
16187 2003-10-06  Bruno Haible  <bruno@clisp.org>
16188
16189         * lib/fatal-signal.h: New file, from GNU gettext.
16190         * lib/fatal-signal.c: New file, from GNU gettext.
16191
16192 2003-10-05  Paul Eggert  <eggert@twinsun.com>
16193
16194         * README: Rework advice for preventing empty .o files.
16195         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
16196         not <sys/types.h>.
16197
16198 2003-10-04  Karl Berry  <karl@gnu.org>
16199
16200         * lib/argp*: update from libc.
16201
16202 2003-10-04  Karl Berry  <karl@gnu.org>
16203
16204         * config/config.{guess,sub}: update from config.
16205
16206 2003-10-02  Bruno Haible  <bruno@clisp.org>
16207
16208         * modules/lchown (Include): Add lchown.h.
16209         * modules/time_r (Include): Use "..." syntax.
16210         * modules/xgetdomainname (Include): Add xgetdomainname.h.
16211
16212 2003-10-01  Simon Josefsson  <jas@extundo.com>
16213
16214         * MODULES.html.sh (func_all_modules): Move gethostname from section
16215         'based on' to section 'lacking' POSIX:2001.
16216
16217 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
16218
16219         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
16220         to output mode on the same stream.
16221
16222 2003-09-29  Paul Eggert  <eggert@twinsun.com>
16223
16224         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
16225         Fix arg typo in previous patch.
16226
16227 2003-09-28  Jim Meyering  <jim@meyering.net>
16228
16229         * lib/error.c: Correct cpp indentation.
16230
16231 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16232
16233         * modules/free: New file.
16234
16235 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16236
16237         * m4/free.m4: New file.
16238
16239 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16240
16241         * lib/minmax.h (MIN, MAX)
16242         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
16243         Omit the special code that used __typeof__, since we worry that
16244         it could be more trouble than it's worth.  See:
16245         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
16246         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
16247
16248         * lib/free.c: New file.
16249
16250 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
16251
16252         Trivial fixes to Makefile.am parts of module listings.
16253         * modules/strstr: Append strstr.h to lib_SOURCES.
16254         * modules/strcase: Likewise, for strcase.h.
16255
16256 2003-09-27  Karl Berry  <karl@gnu.org>
16257
16258         * config/mkinstalldirs: update from automake.
16259
16260 2003-09-26  Paul Eggert  <eggert@twinsun.com>
16261
16262         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
16263         (error_tail): Do not loop, reallocating temporary buffer, since
16264         the output cannot contain more wide characters than the input
16265         contains bytes, the size must be big enough already.  This avoids
16266         one potential size overflow calculation.  Check for size overflow
16267         when calculating temporary buffer size.  Free temporary buffer
16268         when done, if it was allocated with malloc; this plugs a memory
16269         leak.  Remove casts from void * to pointers, that are no longer
16270         needed now that we're assuming C89 or better.
16271
16272         Merge error changes from glibc.
16273
16274         * lib/error.c, error.h: Update copyright notice header to match glibc.
16275         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
16276         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
16277         Disable cancellation while printing error.
16278         * lib/error.h: Prepend __ to parameter names.
16279
16280 2003-09-26  Jim Meyering  <jim@meyering.net>
16281
16282         * lib/error.c (error_tail): Move some declarations
16283         into inner scope where the local variables are used.
16284
16285 2003-09-26  Bruno Haible  <bruno@clisp.org>
16286
16287         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
16288         stpncpy().
16289         Don't define stpncpy through config.h; it's now done through stpncpy.h.
16290
16291 2003-09-26  Bruno Haible  <bruno@clisp.org>
16292
16293         * lib/stpncpy.h (gnu_stpncpy): New declaration.
16294         (stpncpy): Define as alias for gnu_stpncpy.
16295         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
16296
16297 2003-09-25  Simon Josefsson  <jas@extundo.com>
16298
16299         * lib/xgetdomainname.h: New file.
16300         * lib/xgetdomainname.c: New file.
16301
16302 2003-09-25  Simon Josefsson  <jas@extundo.com>
16303             Bruno Haible  <bruno@clisp.org>
16304
16305         * modules/getdomainname: New file.
16306         * modules/xgetdomainname: New file.
16307         * MODULES.html.sh (func_all_modules): Add getdomainname,
16308         xgetdomainname.
16309
16310 2003-09-25  Simon Josefsson  <jas@extundo.com>
16311             Bruno Haible  <bruno@clisp.org>
16312
16313         * m4/getdomainname.m4: New file.
16314
16315 2003-09-25  Simon Josefsson  <jas@extundo.com>
16316             Bruno Haible  <bruno@clisp.org>
16317
16318         * lib/getdomainname.h: New file.
16319         * lib/getdomainname.c: New file.
16320
16321 2003-09-25  Karl Berry  <karl@gnu.org>
16322
16323         * lib/argp-fmtstream.c, argp-help.c: update from libc.
16324
16325 2003-09-25  Karl Berry  <karl@gnu.org>
16326
16327         * config/install-sh: update from automake.
16328
16329 2003-09-25  Bruno Haible  <bruno@clisp.org>
16330
16331         * modules/version-etc-2: New file, from modules/version-etc with
16332         modifications.
16333         * MODULES.html.sh (func_all_modules): Add version-etc-2.
16334
16335 2003-09-25  Bruno Haible  <bruno@clisp.org>
16336
16337         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
16338         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
16339
16340 2003-09-24  Simon Josefsson  <jas@extundo.com>
16341
16342         * modules/xgethostname: Add xgethostname.h.
16343
16344 2003-09-24  Paul Eggert  <eggert@twinsun.com>
16345
16346         * lib/linebuffer.c (freebuffer): Don't free the argument, just
16347         the buffer associated with the argument.  Bug reported by
16348         Simon Josefsson.
16349
16350 2003-09-24  Paul Eggert  <eggert@twinsun.com>
16351
16352         * README: Document assumptions that 'int' is at least 32 bits
16353         wide, that integer arithmetic is 2's complement without overflow,
16354         that there are no holes in integer values, that adding sizes of
16355         two nonoverlapping objects can't overflow, and that all-bits-zero
16356         yields scalar zero.  Fix spelling and capitalization typos.
16357
16358 2003-09-19  Karl Berry  <karl@gnu.org>
16359
16360         * lib/argp.h: update from libc.
16361
16362 2003-09-17  Paul Eggert  <eggert@twinsun.com>
16363
16364         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
16365         to avoid spurious warnings like "AC_RUN_IFELSE was called before
16366         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
16367
16368 2003-09-17  Paul Eggert  <eggert@twinsun.com>
16369
16370         * gnulib-tool: Use "test -h", not "test -L", for portability
16371         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
16372         (tags_regexp): Remove, since \| doesn't conform to POSIX.
16373         (sed_extract_prog): Issue s commands one-by-one, rather than
16374         using \| in one s command.
16375
16376 2003-09-16  Paul Eggert  <eggert@twinsun.com>
16377
16378         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
16379         input error, instead of returning NULL the next time we are called
16380         (and therefore losing track of errno).
16381
16382 2003-09-16  Bruno Haible  <bruno@clisp.org>
16383
16384         * gnulib-tool (func_create_testdir): Warn about duplicated
16385         dependencies.
16386
16387 2003-09-15  Paul Eggert  <eggert@twinsun.com>
16388
16389         * modules/argmatch, modules/fatal, modules/obstack,
16390         modules/xalloc, modules/xgethostname: Sort dependencies by
16391         importance, not alphabetically.
16392
16393 2003-09-15  Paul Eggert  <eggert@twinsun.com>
16394
16395         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
16396         fails, so that the caller gets the proper errno.
16397
16398         * lib/readutmp.c (read_utmp): Likewise.
16399         Check for fstat error.  Close stream and free storage
16400         when failing.
16401
16402 2003-09-14  Karl Berry  <karl@gnu.org>
16403
16404         * config/srclist.txt (strdup.c): disable for c89 changes.
16405
16406 2003-09-14  Jim Meyering  <jim@meyering.net>
16407
16408         * lib/getloadavg.c: Correct cpp indentation.
16409         * lib/strdup.c: Likewise.
16410         * lib/vasnprintf.c: Likewise.
16411
16412 2003-09-14  Bruno Haible  <bruno@clisp.org>
16413
16414         * modules/fwriteerror: New file.
16415         * MODULES.html.sh (func_all_modules): Add fwriteerror.
16416
16417 2003-09-14  Bruno Haible  <bruno@clisp.org>
16418
16419         * lib/fwriteerror.h: New file.
16420         * lib/fwriteerror.c: New file.
16421
16422 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16423
16424         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
16425         modules/xgethostname, modules/xalloc: Depend on exit.
16426
16427 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16428
16429         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
16430
16431         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
16432         and AC_MINIX, too, so that their extensions are available.
16433
16434         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
16435         This macro has been superseded by gl_BACKUPFILE.
16436
16437         More patches to assume C89 or better.
16438
16439         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
16440
16441         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
16442         unconditionally.
16443         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
16444         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
16445         Include <string.h>, <stdlib.h> unconditionally.
16446         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
16447         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
16448         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
16449         headers or for string.h.
16450         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
16451         or strtoul.
16452
16453         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
16454         headers.
16455         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
16456         * m4/userspec.m4 (gl_USERSPEC): Likewise.
16457         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
16458         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
16459         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
16460         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
16461         memcpy, memset.
16462         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
16463         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
16464         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
16465         strtol.
16466         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
16467         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
16468         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
16469         strtoul.
16470
16471 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16472
16473         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
16474         * lib/obstack.c [!defined _LIBC]: Likewise.
16475         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
16476         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
16477         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
16478
16479         More changes to assume C89 or better.
16480
16481         * lib/error.c (error_tail): Assume vprintf.
16482
16483         * lib/argmatch.c (getenv): Remove decl.
16484         * lib/progreloc.c (get_full_program_name): Define via prototype.
16485         * lib/setenv.c (clearenv): Likewise.
16486         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
16487         needed.
16488         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
16489         (malloc, memcpy): Remove decls.
16490         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
16491         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
16492         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
16493         (memcpy): Remove macro.
16494         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
16495         (__P): Remove.  All uses removed.
16496         (PTR): Remove.  All uses changed to void *.
16497         (CHAR_BIT, NULL): Remove.
16498         (spaces, zeros, memset_space, memset_zero)
16499         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
16500         Remove.
16501         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
16502         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
16503         Define with prototype.
16504         Remove now-unnecessary prototype decl.
16505         (extra_args_spec): Assume ANSI C.  All uses changed.
16506         (extra_args_spec_iso): Remove.
16507         (my_strftime, emacs_strftimeu): Define via prototype.
16508         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
16509         unconditionally.
16510         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
16511         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
16512         (strtoul, strtol): Remove decls.
16513         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
16514         LONG_MAX): Remove.
16515         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
16516         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
16517         (LOCALE_PARAM_PROTO): New macro.
16518         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
16519         (INTERNAL (strtol), strtol): Define with a prototype.
16520         (PARAMS): Remove.  All uses removed.
16521         * lib/tempname.c: Include <string.h> unconditionally.
16522         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
16523         * lib/xgethostname.c (main): Define with a prototype.
16524         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
16525         Include <stdlib.h> unconditionally.
16526         (calloc, malloc, realloc, free): Remove decls.
16527         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
16528         Include <stdlib.h> unconditionally.  Sort include file names.
16529         (strtod): Remove.
16530         (xstrtod): Define with a prototype.
16531         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
16532         (strtol, strtoul): Remove decls.
16533
16534 2003-09-11  Paul Eggert  <eggert@twinsun.com>
16535
16536         More patches to assume C89 or better.
16537         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
16538         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
16539         string.h, memchr, STDC_HEADERS.
16540
16541 2003-09-11  Paul Eggert  <eggert@twinsun.com>
16542
16543         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
16544         Include <stdlib.h>, <string.h> unconditionally.
16545         Remove now-unnecessary cast to char *.
16546         * lib/strnlen.c: Include <string.h> unconditionally.
16547         * lib/yesno.c (yesno): Define with a prototype.
16548
16549 2003-09-11  Bruno Haible  <bruno@clisp.org>
16550
16551         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
16552
16553 2003-09-10  Jim Meyering  <jim@meyering.net>
16554
16555         * lib/error.c: Correct indentation of cpp directives.
16556
16557 2003-09-10  Bruno Haible  <bruno@clisp.org>
16558
16559         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
16560         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
16561         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
16562         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
16563         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
16564         <stdlib.h> and <string.h> checks.
16565         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
16566         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
16567
16568 2003-09-10  Bruno Haible  <bruno@clisp.org>
16569
16570         * lib/strcspn.c: Include <string.h> unconditionally.
16571         * lib/strpbrk.c: Include <string.h> unconditionally.
16572         * lib/strstr.c: Include <string.h> unconditionally.
16573         * lib/unicodeio.c: Include <string.h> unconditionally.
16574         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
16575         * lib/unsetenv.c: Likewise.
16576         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
16577         * lib/yesno.c: Include <stdlib.h> unconditionally.
16578         (rpmatch): Add prototype.
16579
16580 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16581
16582         More patches to assume C89 or better.
16583         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
16584         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
16585         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
16586         or for string.h.
16587         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
16588         stdlib.h.
16589         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
16590         C headers.
16591         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
16592         string.h.
16593         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
16594         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
16595         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
16596         or for string.h.
16597         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
16598         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
16599         C headers.
16600         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
16601         memcpy.
16602         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
16603         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
16604         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
16605         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
16606         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
16607         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
16608         string.h, free.
16609         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
16610         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
16611         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
16612         C headers, or for string.h.
16613         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
16614         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
16615         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
16616         headers, memory.h, stdlib.h, string.h, strings.h.
16617         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
16618         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
16619         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
16620         strchr.
16621         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
16622         headers, memory.h, string.h.
16623         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
16624         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
16625         free.
16626         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
16627         headers.
16628         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
16629         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
16630         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
16631         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
16632         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
16633
16634 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16635
16636         More K&R removal.
16637
16638         * lib/acosl.c (main): Use a prototype.
16639         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
16640         tanl.c: Likewise.
16641
16642         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
16643
16644         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
16645         (getopt, etopt_long, getopt_long_only, _getopt_internal)
16646         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
16647         with a prototype.
16648         * lib/getopt.c (const): Remove macro.
16649         Include <string.h> unconditionally.
16650         (my_index): Remove; all uses changed to strchr.
16651         (strlen): Remove decl.
16652         (exchange): Remove forward decl; no longer needed.
16653         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
16654         Define with prototype.
16655         * lib/getopt1.c (const): Remove macro.
16656         (getopt_long, getopt_long_only, main): Define with prototype.
16657
16658         * lib/getugroups.c: Include <string.h> unconditionally.
16659
16660         * lib/getusershell.c: Include <stdlib.h> unconditionally.
16661         (getusershell, setusershell, endusershell, readname, main):
16662         Define with prototypes.
16663
16664         * lib/group-member.c: Include group-member.h first.
16665         Include <stdlib.h> unconditionally.
16666
16667         * lib/hard-locale.c: Include hard-locale.h first.
16668         Include <stdlib.h>, <string.h> unconditionally.
16669
16670         * lib/hash.c (free, malloc): Remove decls.
16671         Include <stdlib.h> unconditionally.
16672
16673         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
16674         (getenv): Do not declare.
16675
16676         * lib/idcache.c: Include <string.h> unconditionally.
16677
16678         * lib/long-options.c: Include long-options.h first, to test interface.
16679         Include <stdlib.h> unconditionally.
16680
16681         * lib/makepath.c: Include makepath.h first, to test interface.
16682         Include <stdlib.h> and <string.h> unconditionally.
16683
16684         * lib/linebuffer.c: Include <stdlib.h>.
16685         (free): Remove decl.
16686
16687         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
16688         stddef.h. rpl_malloc returns void *, not char *.
16689         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
16690         prototype.
16691
16692         * lib/md5.h: Include <limits.h> unconditionally.
16693         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
16694         (__P): Remove; all uses removed.
16695         * lib/md5.c: Include "md5.h" first.
16696         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
16697         md5_buffer, md5_process_bytes, md5_process_block):
16698         Define with prototypes.
16699         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
16700         * lib/sha.c: Include "sha.h" first.
16701         Include <stdlib.h>, <string.h> unconditionally.
16702
16703         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
16704         * lib/memcmp.c (__ptr_t): Likewise.
16705         * lib/memrchr.c (__ptr_t): Likewise.
16706         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
16707         Include <string.h> unconditionally.
16708         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
16709         * lib/memchr.c: Include <stdlib.h> unconditionally.
16710         * lib/memchr.c (LONG_MAX): Remove.
16711         * lib/memrchr.c (LONG_MAX): Likewise.
16712         * lib/memchr.c (__memchr): Define via a prototype.
16713         * lib/memrchr.c (__memrchr): Likewise.
16714         * lib/memcmp.c (__P): Remove, and remove all uses.
16715         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
16716         Remove forward decls; no longer needed.
16717         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
16718         Use types required by C89 in prototype.
16719
16720         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
16721         * lib/savedir.c: Likewise.
16722         * lib/mkdir.c (free): Remove decl.
16723         * lib/rmdir.c (rmdir): Define with a prototype.
16724         * lib/savedir.c: Include savedir.h first, to test interface.
16725
16726         * lib/mktime.c (STDC_HEADERS): Remove.
16727         Include <stdlib.h>, <string.h> unconditionally.
16728
16729         * lib/modechange.c: Include <stdlib.h> unconditionally.
16730         (malloc): Remove decl.
16731
16732         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
16733         (free): Remove decl.
16734
16735         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
16736         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
16737         (This type really should be intptr_t, but that's a C99ism.)
16738         (_obstack_memcpy): Remove: all uses changed to memcpy.
16739         Include <string.h> unconditionally.
16740         (struct obstack): Assume __STDC__ for types of members
16741         chunkfun, freefun, extra_arg.
16742         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
16743         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
16744         obstack_begin, obstack_specify_allocation,
16745         obstack_specify_allocation_with_arg, obstack_chunkfun,
16746         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
16747         Remove unprototyped decls and the macros that use them.
16748         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
16749         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
16750         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
16751         (defined __STDC__ && __STDC__)]:
16752         Remove nonprototyped code.
16753         Include <stdlib.h> unconditionally.
16754         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
16755         _obstack_allocated_p, _obstack_free, obstack_free,
16756         _obstack_memory_used, print_and_abort):
16757         Define using prototypes.
16758         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
16759         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
16760         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
16761         obstack_next_free, obstack_object_size, obstack_room) [0]:
16762         Remove unused, unprototyped code.
16763
16764         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
16765
16766         * lib/physmem.c (physmem_total, physmem_available, main): Define
16767         with prototypes.
16768
16769         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
16770         (main): Define with a prototype.
16771
16772         * lib/posixver.c (getenv): Remove decl.
16773
16774         * lib/putenv.c (malloc): Returns void *, not char *.
16775         Include <string.h> unconditionally.
16776         (strchr, memcpy, NULL): Do not define.
16777
16778         * lib/readtokens.c: Include readtokens.h first, to test interface.
16779         Include <stdlib.h>, <string.h> unconditionally.
16780         (init_tokenbuffer): Define with a prototype.
16781
16782         * lib/regex.c (PARAMS): Remove.  All uses removed.
16783         All uses of _RE_ARGS removed, too.
16784         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
16785         unconditionally.
16786         (bzero): Assume memset exists.
16787         (memcmp, memcpy, NULL): Remove.
16788         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
16789         char, or assignments to local vars of type signed char.
16790         (init_syntax_once, PREFIX(extract_number_and_incr),
16791         PREFIX(print_partial_compiled_pattern),
16792         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
16793         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
16794         PREFIX(regex_grow_registers), PREFIX(regex_compile),
16795         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
16796         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
16797         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
16798         wcs_compile_range, byte_compile_range, truncate_wchar,
16799         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
16800         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
16801         count_mbs_length, wcs_re_match_2_internal,
16802         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
16803         PREFIX(alt_match_null_string_p),
16804         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
16805         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
16806         regfree, PREFIX(extract_number)): Define with prototype.  Remove
16807         now-unnecessary declaration, if any.
16808         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
16809         regcomp, regexec):
16810         Remove now-unnecessary casts among pointer types.
16811         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
16812
16813         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
16814         (free): Remove decl.
16815
16816         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
16817
16818         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
16819         (free): Remove decl.
16820
16821         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
16822         * lib/xgetcwd.c: Likewise.
16823
16824         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
16825         (free): Remove decl.
16826
16827         * lib/strchrnul.c (strchrnul): Define with a prototype.
16828         Fix bug: c_in was not converted to char before searching.
16829
16830         The following changes are not K&R related:
16831
16832         * lib/group-member.h: Include <sys/types.h>, so that this file is
16833         self-contained.
16834         * lib/makepath.h: Likewise.
16835
16836         * lib/getusershell.c (readname, default_index, line_size, readname):
16837         Use size_t, not int, for sizes.
16838         (readname): If the size overflows, report an error instead of
16839         looping forever.
16840
16841 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16842
16843         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
16844         libc.
16845
16846 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16847
16848         * README: New section: portability guidelines.
16849
16850 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
16851
16852         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
16853         C89 spec.
16854
16855 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
16856
16857         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
16858
16859 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16860
16861         Assume C89 or better; remove K&R cruft.
16862         A few of these changes were first proposed by Derek Robert Price
16863         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
16864
16865         * lib/addext.c: Include <string.h> unconditionally.
16866         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
16867         Don't declare getenv or malloc.
16868
16869         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
16870         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
16871         (NULL): Remove.
16872         (find_stack_direction, alloca): Use prototypes.
16873
16874         * lib/atexit.c (atexit): Define using a prototype.
16875
16876         * lib/basename.c, dirname.c, stripslash.c:
16877         Include <string.h> unconditionally.
16878
16879         * lib/bcopy.c: Include <stddef.h>.
16880         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
16881
16882         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
16883
16884         * lib/error.h (error, error_at_line, error_print_progname)
16885         [! (defined (__STDC__) && __STDC__)]: Remove decls.
16886         * lib/error.c: Include error.h first, to check interface.
16887         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16888         (VA_START): Remove; all uses changeed to va_start.
16889         (exit, strerror): Remove decls.
16890         (error_print_progname): Prototype uncondionally.
16891         Don't include <errno.h>; no longer needed.
16892         (private_strerror): Remove.
16893         (error_tail): Always define.
16894         (error, error_at_line): Assume C89 or better; always use prototypes.
16895         * lib/fatal.c: Include "fatal.h" first, to test interface.
16896         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16897         (VA_START): Remove; all uses changed to va_start.
16898         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
16899         this case.
16900         (exit): Remove decl.
16901         (fatal): Prototype unconditionally.  Assume va_start works.
16902         Abort at end, to pacify gcc.
16903
16904         * lib/euidaccess.c (main): Define with a prototype.
16905
16906         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
16907
16908         * lib/exitfail.c: Include <stdlib.h> unconditionally.
16909
16910         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
16911         prototypes.
16912         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
16913         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
16914         (getenv): Remove decl.
16915         (fnmatch): Define using a prototype.
16916         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
16917         (FCT): Define using a prototype.
16918
16919         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
16920
16921         * lib/gethostname.c: Include <stddef.h>.
16922         (gethostname): Define with prototype.  Length is size_t, not int.
16923
16924 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16925
16926         Assume C89 or better; remove K&R cruft.
16927         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
16928         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
16929         string.h, getenv, malloc.
16930         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
16931         headers.
16932         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
16933         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
16934         do not check for strerror.
16935         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
16936         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
16937         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
16938         do not check for doprnt or vprintf.
16939         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
16940         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
16941
16942 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16943
16944         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
16945         getversion.c should have been removed then, but was accidentally
16946         preserved.
16947
16948         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
16949         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
16950
16951 2003-09-08  Karl Berry  <karl@gnu.org>
16952
16953         * config/config.sub, config.guess, srclistvars.sh: update from savannah
16954                 config, forget about prep.
16955
16956         * config/depcomp, missing: update from automake.
16957
16958 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16959
16960         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
16961         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16962
16963 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16964
16965         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
16966         copy_tm_result.  Bug reported by Simon Josefsson in
16967         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16968
16969 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16970
16971         * m4/time_r.m4: New file.
16972         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
16973         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
16974         is. Check for timegm declaration.
16975         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
16976         Do not check for gmtime_r.
16977         Replace mktime if __mktime_internal does not exist and if mktime
16978         hasn't been replaced already.
16979
16980 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16981
16982         * lib/time_r.c, lib/time_r.h: New files.
16983
16984         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
16985         __localtime_r.
16986         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
16987         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
16988
16989         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
16990         __gmtime_r.
16991         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
16992         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
16993         Include <time_r.h>.
16994
16995         * lib/timegm.c: Switch to glibc implementation, with the following
16996         changes:
16997         [defined HAVE_CONFIG_H]: Include <config.h>.
16998         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
16999         (__mktime_internal) [!defined _LIBC]: New decl.
17000         (__gmtime_r) [!defined _LIBC]: New macro and function.
17001         (timegm): Use a prototype, since gnulib assumes C89.
17002         Do not bother declaring tmp to be const, as it's not really usefu.
17003         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
17004         (timegm): Declare only if HAVE_DECL_TIMEGM.
17005
17006 2003-09-06  Paul Eggert  <eggert@twinsun.com>
17007
17008         * MODULES.html.sh (func_all_modules): Add time_r.
17009         * modules/time_r: New file.
17010         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
17011         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
17012
17013 2003-09-03  Paul Eggert  <eggert@twinsun.com>
17014
17015         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
17016         Bug reported by Lute Kamstra in
17017         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
17018
17019         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
17020         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
17021         course with correspondingly smaller numbers for tomorrow and
17022         yesterday.  From Tadayoshi Funaba.  Originally installed into
17023         sh-utils on 1999-08-07, but the patch got lost (I guess during the
17024         coreutils merge?).
17025
17026 2003-08-31  Simon Josefsson  <jas@extundo.com>
17027
17028         * modules/timegm: New file.
17029         * MODULES.html.sh (func_all_modules): Add timegm.
17030
17031 2003-08-31  Simon Josefsson  <jas@extundo.com>
17032
17033         * m4/timegm.m4: New file.
17034
17035 2003-08-31  Simon Josefsson  <jas@extundo.com>
17036
17037         * lib/timegm.h: New file.
17038         * lib/timegm.c: New file.  Based on
17039         wget-1.8.2/src/http.c:mktime_from_utc.
17040
17041 2003-08-31  Karl Berry  <karl@gnu.org>
17042
17043         * lib/argp.h: update from libc.
17044
17045 2003-08-28  Bruno Haible  <bruno@clisp.org>
17046
17047         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
17048         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
17049         followed by '#define fnmatch fnmatch_posix' gives an error.
17050
17051 2003-08-28  Bruno Haible  <bruno@clisp.org>
17052
17053         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
17054         warning on QNX, which defines O_BINARY to 000000.
17055
17056 2003-08-27  Jim Meyering  <jim@meyering.net>
17057
17058         * m4/mkstemp.m4: Require that the system mkstemp be able to create
17059         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
17060         would fail after 32.  Reported by Danny Levinson.  Details here:
17061         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
17062
17063 2003-08-24  Bruno Haible  <bruno@clisp.org>
17064
17065         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
17066         MSVC7 <stdio.h> is included later.
17067
17068 2003-08-22  Simon Josefsson  <jas@extundo.com>
17069
17070         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
17071
17072 2003-08-20  Karl Berry  <karl@gnu.org>
17073
17074         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
17075
17076 2003-08-20  Bruno Haible  <bruno@clisp.org>
17077
17078         * modules/progname: New file.
17079         * MODULES.html.sh (func_all_modules): Add progname.
17080
17081 2003-08-20  Bruno Haible  <bruno@clisp.org>
17082
17083         * lib/progname.h: New file, from GNU gettext.
17084         * lib/progname.c: New file, from GNU gettext.
17085         * lib/progreloc.c: New file, from GNU gettext.
17086
17087 2003-08-19  Jim Meyering  <jim@meyering.net>
17088
17089         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
17090         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
17091
17092 2003-08-19  Bruno Haible  <bruno@clisp.org>
17093
17094         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
17095         more.
17096
17097 2003-08-19  Bruno Haible  <bruno@clisp.org>
17098
17099         * lib/xstrdup.c: Assume <string.h> exists.
17100
17101 2003-08-18  Paul Eggert  <eggert@twinsun.com>
17102
17103         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
17104         in makefile rules.
17105
17106 2003-08-18  Jim Meyering  <jim@meyering.net>
17107
17108         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
17109         * m4/lib-ld.m4: Likewise.
17110
17111 2003-08-18  Jim Meyering  <jim@meyering.net>
17112
17113         * lib/setenv.h: Indent nested cpp directive.
17114         * lib/vasnprintf.c: Remove trailing blanks.
17115
17116 2003-08-17  Simon Josefsson  <jas@extundo.com>
17117
17118         * modules/xstrndup: New file.
17119         * MODULES.html.sh (func_all_modules): Add xstrndup.
17120
17121 2003-08-17  Simon Josefsson  <jas@extundo.com>
17122
17123         * modules/argp: Fix autoconf macro name. Add more dependencies.
17124
17125 2003-08-17  Simon Josefsson  <jas@extundo.com>
17126
17127         * m4/xstrndup.m4: New file.
17128
17129 2003-08-17  Simon Josefsson  <jas@extundo.com>
17130
17131         * m4/argp.m4: New file.
17132
17133 2003-08-17  Simon Josefsson  <jas@extundo.com>
17134             Bruno Haible  <bruno@clisp.org>
17135
17136         * lib/xstrndup.h: New file.
17137         * lib/xstrndup.c: New file.
17138
17139 2003-08-17  Bruno Haible  <bruno@clisp.org>
17140
17141         * modules/strndup (Files, Include): Add lib/strndup.h.
17142
17143 2003-08-17  Bruno Haible  <bruno@clisp.org>
17144
17145         * modules/euidaccess (Files): Add lib/euidaccess.h.
17146
17147 2003-08-17  Bruno Haible  <bruno@clisp.org>
17148
17149         * lib/strndup.h: New file.
17150
17151 2003-08-17  Bruno Haible  <bruno@clisp.org>
17152
17153         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
17154         like AC_GNU_SOURCE.
17155         * modules/extensions (configure.ac): Comment out the invocation of
17156         gl_USE_SYSTEM_EXTENSIONS.
17157
17158 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17159
17160         Merges from coreutils, etc.
17161         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
17162         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
17163         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
17164         fixing a typo.
17165         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
17166         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
17167
17168 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17169
17170         Document merge from coreutils.
17171         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
17172         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
17173         * modules/utime: Add m4/utimes-null.m4.
17174
17175 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17176
17177         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
17178         space, undoing this 2003-08-12 change:
17179         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
17180
17181 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17182
17183         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
17184         strtoul.c from libc, undoing this 2003-08-12 change:
17185         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
17186
17187 2003-08-16  Jim Meyering  <jim@meyering.net>
17188
17189         Merges from coreutils.
17190         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
17191         prefix.  Adjust cache variables similarly.  Create 500 rather than
17192         just 300 files, to exercise bug on Darwin6.5, too.
17193         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
17194         $missing_dir.
17195         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
17196         AM_SYS_POSIX_TERMIOS.
17197         Reported by mkc@mathdogs.com.
17198         Also change use of $am_cv_sys_posix_termios
17199         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
17200         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
17201         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
17202         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
17203         in /proc/mounts until it finds one with matching device number.  This
17204         is unnecessary when the FILE argument *is* a mount point.  No stat call
17205         is necessary in that case.  So, disable the statvfs-testing code on
17206         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
17207         as RedHat bug# 84846.
17208         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
17209         to 1MB, so as not to render systems with no stack size limit (e.g.,
17210         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
17211         Include <unistd.h>.  On some systems,
17212         it is required for the definition of _SC_PAGESIZE.
17213
17214 2003-08-16  Jim Meyering  <jim@meyering.net>
17215
17216         Merge from coreutils.
17217         * lib/xstrtoimax.c: #else #if -> #elif.
17218         * lib/xstrtoumax.c: Likewise.
17219
17220 2003-08-16  Jim Meyering  <jim@meyering.net>
17221
17222         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
17223         * m4/utimes.m4: Removed.
17224         * m4/utimes-null.m4: Renamed from utimes.m4.
17225
17226         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
17227         to 1MB, so as not to render systems with no stack size limit (e.g.,
17228         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
17229         Include <unistd.h>.  On some systems,
17230         it is required for the definition of _SC_PAGESIZE.
17231
17232 2003-08-16  Jim Meyering  <jim@meyering.net>
17233         and Paul Eggert  <eggert@cs.ucla.edu>
17234
17235         Merges from coreutils, etc.
17236
17237         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
17238         using the latest version from cvs.  This avoids problems with #line
17239         directives using a vendor (Sun) compiler.
17240         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
17241         Don't set GETGROUPS_LIB here; now it's
17242         done via getgroups.m4's wrapper function.
17243         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
17244         rather than just in sh-util/configure.in, so that the
17245         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
17246         same.
17247         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
17248         AC_FUNC_GETLOADAVG where to find getloadavg.c.
17249         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
17250         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
17251         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
17252         Remove code that is now done by the newly-required macros.
17253         Append $(EXEEXT) to DF_PROG.
17254         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
17255         Do not invoke or require the following here,
17256         since prereq.m4 or some gnulib .m4 now does this for us:
17257         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
17258         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
17259         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
17260         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
17261         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
17262         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
17263         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
17264         AC_FUNC_OBSTACK.
17265         Do not replace the following functions, as this is now the job
17266         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
17267         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
17268         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
17269         atexit getpass, strdup, getpagesize.
17270         Replace 'raise'.
17271         Do not check for the following functions, as this is now the job
17272         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
17273         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
17274         setregid.
17275         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
17276         Check for sys/sysctl.h.
17277         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
17278         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
17279         of checking for ssize_t ourselves.
17280
17281         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
17282         Require every macro that gnulib/modules/* suggests for us.
17283         (jm_PREREQ_ADDEXT): New macro.
17284         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
17285         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
17286
17287         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
17288         (gl_PHYSMEM): Use it.
17289         Also check for `table' function.
17290         Check for new headers and functions.
17291         Add check for sys/sysmp.h.
17292         With suggestions from Kaveh Ghazi.
17293         Ignore headers that are present but cannot be compiled.  This
17294         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
17295         C 5.4.
17296
17297 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17298
17299         Document merge from coreutils.
17300         * modules/userspec: Depend on posixver.
17301         * modules/strftime: Depend on tzset.
17302
17303 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17304
17305         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
17306         rather than tab, after '#' in shell-script copyright notices.
17307         Suggested by Bruno Haible.
17308
17309 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17310
17311         * config/srclist-update: Use three spaces, rather than tab, after '#'
17312         in shell-script copyright notices.  Suggested by Bruno Haible.
17313         Remove unnecessary parenthesization in regular expression.
17314
17315 2003-08-15  Jim Meyering  <jim@meyering.net>
17316
17317         Merge from coreutils.
17318         * lib/xgethostname.c: Include <stdlib.h>.
17319         (xghostname): Don't exit for anything other than memory-related
17320         failure; just return NULL.
17321         * lib/userspec.c: Include "posixver.h".
17322         (parse_user_spec): Accept `.' as a separator only
17323         in pre-POSIX-200112 mode.
17324         * lib/strtoimax.c: Use #elif rather than #else #if.
17325         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
17326         Remove function, now that we can rely on a working tzset function.
17327         [!_LIBC]: Ensure that the required autoconf test has been run.
17328         [!defined _NL_CURRENT && HAVE_STRFTIME]:
17329         Use underlying_strftime for %r.
17330         * lib/sha.c: Merge in some clean-up and optimization changes from
17331         glibc.
17332         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
17333         Ensure that it is a multiple of 64.
17334         Rearrange loop exit tests so as to avoid performing an
17335         additional fread after encountering an error or EOF.
17336         * lib/realloc.c: Update copyright date.
17337
17338 2003-08-15  Jim Meyering  <jim@meyering.net>
17339         and Paul Eggert  <eggert@twinsun.com>
17340
17341         Merge from coreutils.
17342         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
17343         member but strut utmpx does not.  Needed for AIX 4.3.3.
17344         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
17345
17346 2003-08-15  Jim Meyering  <jim@meyering.net>
17347         and Paul Eggert  <eggert@cs.ucla.edu>
17348
17349         Merges from coreutils, etc.
17350         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
17351         Require gl_FUNC_TZSET_CLOBBER.
17352         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
17353         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
17354         members.
17355
17356 2003-08-14  Paul Eggert  <eggert@twinsun.com>
17357
17358         Help the merge from coreutils.
17359         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
17360         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
17361         * m4/tzset.m4: Use it too.
17362
17363 2003-08-14  Paul Eggert  <eggert@twinsun.com>
17364
17365         * modules/tzset: New file.
17366
17367 2003-08-14  Jim Meyering  <jim@meyering.net>
17368
17369         Merges from coreutils.
17370         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
17371         variable names, rather than @FNMATCH_H@.
17372         * modules/alloca: Likewise for $(ALLOCA_H).
17373
17374         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
17375         the three copies of the literal target, `fnmatch.h'.
17376         * modules/alloca (alloca.h): Likewise.
17377
17378 2003-08-14  Jim Meyering  <jim@meyering.net>
17379
17380         Merge from coreutils.
17381         * m4/tzset.m4: New file.
17382         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
17383         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
17384         otherwise, AIX 5.1 systems would end up using the latter.
17385         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
17386         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
17387         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
17388         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
17389
17390 2003-08-14  Jim Meyering  <jim@meyering.net>
17391
17392         Merge from coreutils.
17393         * lib/obstack.h: Whitespace changes.
17394         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
17395         and xcalloc return values.
17396         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
17397         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
17398         hang on OSF/1 5.1 for DIR on both local and remote file systems.
17399         Reported by (and fix confirmed by) Nelson H. F. Beebe.
17400         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
17401         error from mntctl.
17402         Use mntctl's return value to drive the entry-processing loop, since
17403         we can't rely on the value of the vmt_length member in the last
17404         entry.  On some systems doing so could result in exhausting
17405         virtual memory.  Based in part on a patch from Mike Jetzer.
17406
17407 2003-08-14  Jim Meyering  <jim@meyering.net>
17408         and Paul Eggert  <eggert@twinsun.com>
17409
17410         Merges from coreutils, plus other fixes.
17411         * lib/physmem.c: Merge in portability changes from gcc/libiberty
17412         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
17413         for credits and details.  Thanks to Kaveh Ghazi for helping
17414         to keep these files in sync.
17415         (ARRAY_SIZE): Define it.
17416         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
17417         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
17418         (memcasecmp): Don't assume size_t fits in unsigned int.
17419         Remove casts and duplicate code.
17420         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
17421         (memcpy): Remove definition.
17422         Merge in some clean-up and optimization changes from glibc.
17423         [BLOCKSIZE]: Move definition to top of file.
17424         Ensure that it is a multiple of 64.
17425         Rearrange loop exit tests so as to avoid performing an
17426         additional fread after encountering an error or EOF.
17427         * lib/md5.h (md5_uintptr): Define.
17428         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
17429         return to the initial working directory.  Preserve errno
17430         for caller.
17431         * lib/idcache.c: Include "xalloc.h".
17432         (xmalloc, xrealloc): Remove decls.
17433         (getuser): Remove casts no longer required in C89.
17434         * lib/human.c: Include stdio.h, for sprintf.
17435         * lib/group-member.c: Include "xalloc.h".
17436         (xmalloc, xrealloc): Remove decls.
17437         (get_group_info): Remove casts no longer required in C89.
17438         * lib/getusershell.c (readname): Remove casts no longer required in
17439         C89.
17440         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
17441         * lib/getline.c: Whitespace fix, from coreutils.
17442
17443 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17444
17445         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
17446         Check for isascii.
17447
17448         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
17449         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
17450         Undo previous (whitespace-only) change.
17451
17452 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17453
17454         * lib/exclude.c: Include <ctype.h>
17455         (IN_CTYPE_DOMAIN): New macro.
17456         (is_space): New fn.
17457         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
17458         and empty lines.
17459
17460         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
17461         Undo previous (whitespace-only) change.
17462
17463 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17464
17465         * config/srclist-update: Change update back to the old behavior,
17466         leaving whitespace alone.  Use one 'sed' command rather than a
17467         pipeline.
17468         (fixlicense): Now a variable, not a function.
17469         (remove_trailing_blanks): Remove.
17470         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
17471         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
17472         Undo previous (whitespace-only) change.
17473
17474 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17475
17476         Merge from coreutils.
17477         * modules/euidaccess: Add lib_SOURCES, include for new
17478         file euidaccess.h
17479
17480 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17481
17482         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
17483         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
17484         Normalize leading white space and remove trailing white space.
17485
17486         Merge from coreutils
17487         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
17488
17489         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
17490         0.12.1.  These files are now being upgraded automatically by
17491         ../config/srclist-update.
17492
17493 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17494
17495         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
17496         Normalize leading white space and remove trailing white space.
17497         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
17498         notice, as per ../config/srclist-update.
17499
17500         Merge from coreutils.
17501         * lib/euidaccess.h: New file.
17502         * lib/euidaccess.c: Include it.
17503         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
17504         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
17505         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
17506
17507 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17508
17509         * config/srclist-update: Add copyright notice.
17510         (remove_id_lines, remove_trailing_blanks): New constants.
17511         (fixfile): Use them to normalize spacing a bit in copied files.
17512         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
17513         Normalize leading white space and remove trailing white space.
17514
17515         * config/texinfo.tex: Sync with texinfo.
17516
17517         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
17518         strtoul.c from libc, to merge coreutils whitespace changes.
17519
17520         * config/srclist.txt: Get the following m4 files from gettext:
17521         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
17522         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
17523         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
17524         wint_t.m4.
17525
17526 2003-08-12  Karl Berry  <karl@gnu.org>
17527
17528         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
17529         been made.
17530
17531 2003-08-11  Paul Eggert  <eggert@twinsun.com>
17532
17533         * modules/gnu-source, m4/gnu-source.m4:
17534         Remove; we're assuming Autoconf 2.54 or later now.
17535         Suggested by Bruno Haible.
17536         * MODULES.html.sh (func_all_modules): Remove gnu-source.
17537
17538 2003-08-11  Bruno Haible  <bruno@clisp.org>
17539
17540         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
17541
17542 2003-08-11  Bruno Haible  <bruno@clisp.org>
17543
17544         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
17545         (vasnprintf): Use it instead of wcslen.
17546
17547 2003-08-11  Bruno Haible  <bruno@clisp.org>
17548
17549         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
17550         value to ensure that _Bool promotes to int. Use #define for _Bool when
17551         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
17552
17553 2003-08-10  Karl Berry  <karl@gnu.org>
17554
17555         * lib/regex.h: update from libc (whitespace fix).
17556
17557 2003-08-09  Paul Eggert  <eggert@twinsun.com>
17558
17559         Merge some files from coreutils.  These changes were
17560         originally made by Jim Meyering.
17561         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
17562         many older Unixes require this.
17563         * lib/alloca.c (alloca): Remove cast to argument of free;
17564         no longer needed in C89.
17565         * lib/alloca_.h, regex.h: Fix white space to match
17566         what GNU indent does.
17567
17568 2003-08-09  Paul Eggert  <eggert@twinsun.com>
17569
17570         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
17571         apparently Emacs's Unicode mode got confused before my 2003-08-05
17572         checkin.
17573
17574 2003-08-08  Paul Eggert  <eggert@twinsun.com>
17575
17576         * m4/extensions.m4: New file.
17577         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
17578         Require gl_USE_SYSTEM_EXTENSIONS.
17579         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
17580         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
17581
17582 2003-08-08  Paul Eggert  <eggert@twinsun.com>
17583
17584         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
17585         * modules/extensions, modules/gnu-source: New files.
17586         * modules/timespec, modules/unlocked-io: Depend on extensions.
17587
17588 2003-08-07  Paul Eggert  <eggert@twinsun.com>
17589
17590         * modules/restrict: New file.
17591         * MODULES.html.sh (func_all_modules): Add restrict.
17592         * modules/regex: Depend on restrict.
17593
17594 2003-08-07  Paul Eggert  <eggert@twinsun.com>
17595
17596         * m4/restrict.m4: New file.
17597         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
17598
17599 2003-08-07  Bruno Haible  <bruno@clisp.org>
17600
17601         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
17602         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
17603
17604 2003-08-07  Bruno Haible  <bruno@clisp.org>
17605
17606         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
17607         makes the module 'getndelim2' compatible with the module 'getline'.
17608
17609 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17610
17611         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
17612         byte with "\201" to avoid glitches when editing that source file
17613         with multi-gnome-terminal.
17614
17615 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17616
17617         * lib/bumpalloc.h: Remove.
17618
17619 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17620
17621         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
17622         * modules/bumpalloc: Remove.
17623
17624 2003-08-04  Paul Eggert  <eggert@twinsun.com>
17625
17626         * lib/getloadavg.c: Change copyright notice and spacing to conform to
17627         GNU coding style.
17628
17629         Merge from coreutils.
17630         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
17631         1. From glibc.
17632         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
17633         from Karl Berry, implemented by Jim Meyering.
17634         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
17635         from Dmitry V. Levin.
17636         Remove anachronistic cast of xrealloc.
17637         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
17638         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
17639         type. Otherwise, it wouldn't compile with at least /bin/cc on
17640         ymp-cray-unicos9.0.2.X.
17641         Combine two mostly-identical uses of alloca into one.
17642         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
17643
17644 2003-08-04  Dave Love  <d.love@dl.ac.uk>
17645
17646         [From Emacs.]
17647
17648         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
17649         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
17650         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
17651         obsolete NLIST_NAME_UNION.
17652         [__GNU__]: Undef BSD and FSCALE.
17653         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
17654
17655 2003-08-03  Paul Eggert  <eggert@twinsun.com>
17656
17657         * lib/stdbool_.h (_Bool): Make it signed char, instead of
17658         an enum type, so that it's guaranteed to promote to int.  See:
17659         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
17660
17661 2003-08-03  Karl Berry  <karl@gnu.org>
17662
17663         * config/depcomp: update from automake.
17664
17665 2003-07-31  Paul Eggert  <eggert@twinsun.com>
17666
17667         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
17668         (strerror): Don't assume that a printable int fits in 14 bytes.
17669
17670 2003-07-31  Bruno Haible  <bruno@clisp.org>
17671
17672         * modules/getpass-gnu: New file.
17673         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
17674
17675 2003-07-31  Bruno Haible  <bruno@clisp.org>
17676
17677         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
17678
17679 2003-07-24  Karl Berry  <karl@gnu.org>
17680
17681         * config/missing: update from automake.
17682
17683 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
17684             Bruno Haible  <bruno@clisp.org>
17685
17686         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
17687         * lib/getline.c (getline, getdelim): Likewise.
17688         Remove _GNU_SOURCE define; now it's defined in config.h through
17689         m4/getline.m4.
17690
17691 2003-07-23  Karl Berry  <karl@gnu.org>
17692
17693         * config/config.sub: update from prep.
17694
17695 2003-07-22  Paul Eggert  <eggert@twinsun.com>
17696
17697         * modules/xalloc (Depends-on): Add exitfail.
17698         * modules/xmemcoll: Likewise.
17699
17700 2003-07-22  Paul Eggert  <eggert@twinsun.com>
17701
17702         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
17703         over-parenthesization in macros.
17704
17705         Sync with coreutils.
17706
17707         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
17708         required by C99.
17709
17710         Use `exit_failure' for xalloc and xmemcoll instead of their own
17711         private exit-failure variables.
17712         * lib/xalloc.h (xalloc_exit_failure): Remove.
17713         * lib/xmalloc.c: Likewise.  Include exitfail.h.
17714         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
17715         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
17716         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
17717         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
17718
17719 2003-07-20  Jim Meyering  <jim@meyering.net>
17720
17721         * modules/closeout (Depends-on): Add exitfail.
17722         Suggestion from Bruno Haible.
17723
17724 2003-07-19  Karl Berry  <karl@gnu.org>
17725
17726         * config/config.sub: update from prep.
17727
17728 2003-07-18  Paul Eggert  <eggert@twinsun.com>
17729
17730         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
17731         Remove.
17732         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
17733         to test that it can stand by itself.  Include "exitfail.h".
17734         Clients should set exit_failure instead.
17735         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
17736
17737 2003-07-18  Bruno Haible  <bruno@clisp.org>
17738
17739         * modules/getndelim2: New file.
17740         * modules/getline: Share files with module getndelim2.
17741         * modules/getnline: Depend on getndelim2 instead of sharing files with
17742         it. Add getnline.c to lib_SOURCES.
17743         * MODULES.html.sh (func_all_modules): Add getndelim2.
17744
17745 2003-07-18  Bruno Haible  <bruno@clisp.org>
17746
17747         * m4/getndelim2.m4: New file.
17748         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
17749         invoke gl_PREREQ_GETNDELIM2.
17750         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
17751         gl_PREREQ_GETNDELIM2.
17752         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
17753         gl_GETNDELIM2.
17754
17755 2003-07-18  Bruno Haible  <bruno@clisp.org>
17756
17757         * lib/getndelim2.h: New file.
17758         * lib/getndelim2.c: Make into a module of its own. Include config.h,
17759         getndelim2.h.
17760         (getndelim2): Make non-static. Change return type to ssize_t.
17761         * lib/getline.h: Change argument names.
17762         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
17763         * lib/getnline.c: Include getndelim2.h.
17764
17765 2003-07-18  Andreas Schwab  <schwab@suse.de>
17766
17767         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
17768
17769 2003-07-17  Karl Berry  <karl@gnu.org>
17770
17771         * config/config.sub: update from prep.
17772
17773 2003-07-17  Bruno Haible  <bruno@clisp.org>
17774
17775         * modules/getnline: New file.
17776         * modules/getline: Add lib/getndelim2.c to source file list.
17777         * MODULES.html.sh (func_all_modules): Add getnline.
17778
17779 2003-07-17  Bruno Haible  <bruno@clisp.org>
17780
17781         * m4/getnline.m4: New file.
17782
17783 2003-07-17  Bruno Haible  <bruno@clisp.org>
17784
17785         * m4/Makefile.am.in: Remove file.
17786         * m4/Makefile.am: Remove file.
17787         * m4/Makefile.in: Remove file.
17788
17789 2003-07-17  Bruno Haible  <bruno@clisp.org>
17790
17791         * lib/getnline.h: New file.
17792         * lib/getnline.c: New file.
17793         * lib/getndelim2.c: New file, extracted from getline.c.
17794         (getndelim2): Renamed from getdelim2, with added nmax argument.
17795         * lib/getline.c: Include getndelim2.c.
17796         (getdelim2): Moved out to getndelim2.c.
17797         (getline, getdelim): Update.
17798
17799 2003-07-17  Bruno Haible  <bruno@clisp.org>
17800
17801         * lib/Makefile.am: Remove file.
17802         * lib/Makefile.in: Remove file.
17803
17804 2003-07-17  Bruno Haible  <bruno@clisp.org>
17805
17806         * configure.in: Remove file.
17807         * Makefile.in: Remove file.
17808
17809 2003-07-17  Bruno Haible  <bruno@clisp.org>
17810
17811         * MODULES.html.sh: Put the </BODY> right before </HTML>.
17812
17813 2003-07-16  Karl Berry  <karl@gnu.org>
17814
17815         * config/srclist-update: was running fixlicense twice, which caused
17816                 texinfo.tex to be nullified for some reason.  Simplify,
17817                 $gplsrc is no longer needed as far as I can see?
17818
17819 2003-07-16  Jim Meyering  <jim@meyering.net>
17820
17821         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
17822
17823 2003-07-15  Paul Eggert  <eggert@twinsun.com>
17824
17825         * config/srclist.txt: Get the following files from gettext-runtime/intl
17826         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
17827         ref-del.sin.  From Bruno Haible.
17828         * config/srclist-update (fixfile): Change grep pattern again, since the
17829         previous fix didn't work (there was another trailing $).  Use
17830         '[$]' to escape the $s.
17831
17832 2003-07-15  Karl Berry  <karl@gnu.org>
17833
17834         * lib/vasnprintf.c: update from gettext.
17835
17836 2003-07-15  Karl Berry  <karl@gnu.org>
17837
17838         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
17839         gets expanded when surrounded by '$'.
17840
17841 2003-07-15  Jim Meyering  <jim@meyering.net>
17842
17843         * modules/save-cwd: Don't depend on error.  From Derek Price.
17844
17845 2003-07-15  Jim Meyering  <jim@meyering.net>
17846
17847         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
17848
17849 2003-07-14  Simon Josefsson  <jas@extundo.com>
17850
17851         * modules/mempcpy: New file.
17852         * MODULES.html.sh (func_all_modules): Add mempcpy.
17853
17854 2003-07-14  Simon Josefsson  <jas@extundo.com>
17855
17856         * m4/mempcpy.m4: New file.
17857
17858 2003-07-14  Simon Josefsson  <jas@extundo.com>
17859
17860         * lib/mempcpy.h: New file.
17861         * lib/mempcpy.c: New file.
17862
17863 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17864
17865         * modules/getdate, modules/posixtm: Depend on mktime.
17866
17867 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17868
17869         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
17870         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
17871         unicodeio.c, unicodeio.h, unlocked-io.h:
17872         Switch from LGPL to GPL.
17873
17874 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17875
17876         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
17877         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
17878         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
17879         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
17880         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
17881         updated automatically by ../config/srclist-update.  This changes
17882         their license from LPGL to GPL.
17883
17884 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17885
17886         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
17887         assumed to refer to the root of the most recent stable gettext version.
17888         * config/srclistvars.sh: Add defaults for eggert.
17889         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
17890         Match "This program" as well as "The program".  This is needed
17891         for gettext.
17892
17893 2003-07-14  Jim Meyering  <jim@meyering.net>
17894
17895         Don't emit diagnostics.  Let callers do that.
17896         * lib/save-cwd.c: Don't include "error.h".
17897         (save_cwd): Don't call error.  Ensure that errno is valid
17898         when returning nonzero.
17899
17900         * lib/save-cwd.h (restore_cwd): Update prototype.
17901         * lib/save-cwd.c (restore_cwd): Remove two parameters.
17902         Simplify.  Don't call error upon failure.  Let callers do that.
17903         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
17904         when auditing is enabled.  But don't bother updating the #if.
17905
17906 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
17907
17908         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
17909         it breaks C++ compilation.
17910         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
17911
17912 2003-07-10  Simon Josefsson  <jas@extundo.com>
17913
17914         * modules/strchrnul (Makefile.am): Add strchrnul.h.
17915
17916 2003-07-10  Jim Meyering  <jim@meyering.net>
17917
17918         * m4/clock_time.m4: Remove trailing blank.
17919         * m4/intmax_t.m4: Likewise.
17920
17921 2003-07-10  Jim Meyering  <jim@meyering.net>
17922
17923         * lib/vasnprintf.c: Remove trailing blanks.
17924         Make cpp indentation consistent.
17925
17926 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17927
17928         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
17929         posixver.c, strftime.c, strnlen.c, strverscmp.c:
17930         Switch from LGPL to GPL.
17931
17932 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17933
17934         * config/srclist.txt: Sort sublists.  Add
17935         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
17936         that differ from gnulib for one reason or another; we'd like this list
17937         to be smaller but for now let's document what we have.
17938
17939 2003-07-08  Paul Eggert  <eggert@twinsun.com>
17940
17941         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
17942         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
17943         and sweeter "eval x=$x".
17944         * config/srclist.txt: Get lib/argp* from glibc.
17945
17946 2003-07-07  Paul Eggert  <eggert@twinsun.com>
17947
17948         * lib/mktime.c: Fix some boundary cases and remove need for floating
17949         point.
17950
17951         Issue a compile-time diagnostic if time_t is floating point, or if
17952         two's complement arithmetic is not in effect, or if arithmetic
17953         right shift does not propagate the sign.  These assumptions were
17954         all in the original code but they weren't checked.
17955
17956         (TIME_T_MIDPOINT, verify): New macros.
17957         (__isleap): Remove; it has integer overflow problems.
17958         (leapyear): New function, without those problems.
17959         (ydhms_tm_diff): Remove; splitting into two parts.
17960         (ydhms_diff): New function, containing the arithmetic part of
17961         the old ydhms_tm_diff function.  Issue a compile-time
17962         diagnostic if we are not using C99 integer division.
17963         Avoid casts when possible.
17964         (guess_time_tm): New function, containing the checking part of
17965         the old ydhms_tm_diff function.  Return the new value, rather than
17966         the difference between it and the old.  Accept a new argument T
17967         so that *T specifies the old value.  Check for overflow in the result.
17968
17969         (__mktime_internal): Use a time_t offset, not a long int offset.
17970         This undoes the 2003-06-04 change, which is no longer needed now
17971         that we have better overflow checking.
17972         (localtime_offset): Likewise.
17973
17974         (__mktime_internal): Avoid harmful overflow on hosts where time_t
17975         and long are 64-bit but int is only 32-bit.
17976         (ydhms_diff): Use long int to store year1 and yday1.
17977         Issue a compile-time diagnostic if long int is not wide enough.
17978
17979         (__mktime_internal): Use long int to store adjusted year and yday.
17980         Use plain C rather than preprocessor commands, if that doesn't
17981         affect efficiency.
17982         Check for overflow (and try to repair) after each probe
17983         rather than checking only at the very end.  This avoids some bugs
17984         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
17985         does not equal GMT offset at maximum time).
17986         Use integer to check for overflow rather than floating point; this
17987         is more portable to non-IEEE hosts, and is a tad faster.
17988         When we detect that we are oscillating between two values,
17989         don't check whether tm_isdst has the requested value, since
17990         we already know the answer.  When tm_isdst has the wrong value,
17991         use a different heuristic to find the right one, based on the
17992         extreme values actually observed in practice in tz2003a,
17993         rather than the (overly optimistic) "previous 3 calendar quarters".
17994
17995         (not_equal_tm, print_tm, check_result): Use "const T" rather than
17996         "T const" to accommodate glibc style.
17997         (check_result): Use less-confusing report format.  "long" -> "long int.
17998         (main): Likewise.
17999         Don't loop if the iteration overflows time_t.
18000         Allow a negative step in the iteration.
18001
18002 2003-07-06  Karl Berry  <karl@gnu.org>
18003
18004         * config/depcomp: update from automake.
18005         * config/config.sub: update from prep.
18006
18007 2003-07-03  Karl Berry  <karl@gnu.org>
18008
18009         * config/config.guess: update from prep.
18010
18011 2003-07-01  Paul Eggert  <eggert@twinsun.com>
18012
18013         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
18014         xreadlink.c now includes it unconditionally.
18015
18016 2003-07-01  Paul Eggert  <eggert@twinsun.com>
18017
18018         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
18019         having it depend on HAVE_SYS_TYPES_H.
18020
18021 2003-07-01  Bruno Haible  <bruno@clisp.org>
18022
18023         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
18024         <sys/types.h> should be sufficient.
18025         Reported by Paul Eggert.
18026
18027 2003-06-26  Karl Berry  <karl@gnu.org>
18028
18029         * config/depcomp: update from automake.
18030
18031 2003-06-26  Bruno Haible  <bruno@clisp.org>
18032
18033         * modules/human: Depend on module stdbool.
18034
18035 2003-06-25  Bruno Haible  <bruno@clisp.org>
18036
18037         * modules/readlink: New file.
18038         * modules/xreadlink: Depend on it.
18039         * MODULES.html.sh (func_all_modules): Add readlink.
18040
18041 2003-06-25  Bruno Haible  <bruno@clisp.org>
18042
18043         * m4/readlink.m4: New file.
18044
18045 2003-06-25  Bruno Haible  <bruno@clisp.org>
18046
18047         * lib/readlink.c: New file.
18048
18049 2003-06-22  Karl Berry  <karl@gnu.org>
18050
18051         * config/srclist.txt: update mkinstalldirs from automake.
18052         * config/mkinstalldirs: update.
18053
18054 2003-06-22  Bruno Haible  <bruno@clisp.org>
18055
18056         Portability to mingw32.
18057         * m4/ssize_t.m4: New file, from GNU gettext.
18058         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
18059         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
18060
18061 2003-06-22  Bruno Haible  <bruno@clisp.org>
18062
18063         * modules/safe-read: Add m4/ssize_t.m4.
18064         * modules/xreadlink: Add m4/ssize_t.m4.
18065
18066 2003-06-20  Bruno Haible  <bruno@clisp.org>
18067
18068         Assume C89, so PARAMS isn't needed.
18069         * lib/unicodeio.h (PARAMS): Remove.
18070         * lib/unicodeio.c: Don't use PARAMS.
18071
18072 2003-06-18  Karl Berry  <karl@gnu.org>
18073
18074         * config/config.{guess,sub}: update from prep.
18075
18076 2003-06-18  Jim Meyering  <jim@meyering.net>
18077
18078         Merge changes from coreutils.
18079         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
18080         Remove explicit declarations of xmalloc and realloc.
18081         Include xalloc.h.
18082         (read_utmp): Remove anachronistic cast of xmalloc.
18083
18084 2003-06-17  Paul Eggert  <eggert@twinsun.com>
18085
18086         Assume C89, so PARAMS isn't needed.
18087         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
18088         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
18089         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
18090         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
18091         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
18092         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
18093         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
18094         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
18095         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
18096         lib/xstrtod.h, lib/xstrtol.h: Likewise.
18097         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
18098         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
18099         no longer needed. Anyway, config.h should always be included before any
18100         other file.
18101
18102 2003-06-11  Simon Josefsson  <jas@extundo.com>
18103
18104         * modules/sysexits: New file.
18105         * MODULES.html.sh (func_all_modules): Add sysexits.
18106
18107 2003-06-11  Simon Josefsson  <jas@extundo.com>
18108
18109         * lib/sysexit_.h: New file.
18110
18111 2003-06-11  Derek Price  <derek@ximbiot.com>
18112
18113         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
18114         necessary.
18115
18116 2003-06-11  Bruno Haible  <bruno@clisp.org>
18117
18118         * m4/sysexits.m4: New file.
18119
18120 2003-06-10  Simon Josefsson  <jas@extundo.com>
18121
18122         * lib/argp.h: New file, from glibc.
18123         * lib/argp-ba.c: New file, from glibc.
18124         * lib/argp-eexst.c: New file, from glibc.
18125         * lib/argp-fmtstream.c: New file, from glibc.
18126         * lib/argp-fmtstream.h: New file, from glibc.
18127         * lib/argp-fs-xinl.c: New file, from glibc.
18128         * lib/argp-help.c: New file, from glibc.
18129         * lib/argp-namefrob.h: New file, from glibc.
18130         * lib/argp-parse.c: New file, from glibc.
18131         * lib/argp-pv.c: New file, from glibc.
18132         * lib/argp-pvh.c: New file, from glibc.
18133         * lib/argp-xinl.c: New file, from glibc.
18134
18135 2003-06-10  Simon Josefsson  <jas@extundo.com>
18136
18137         * modules/strchrnul: New file.
18138
18139 2003-06-10  Simon Josefsson  <jas@extundo.com>
18140
18141         * modules/argp: New file.
18142
18143 2003-06-10  Simon Josefsson  <jas@extundo.com>
18144
18145         * m4/strchrnul.m4: New file.
18146
18147 2003-06-10  Simon Josefsson  <jas@extundo.com>
18148
18149         * lib/strchrnul.h: New file.
18150         * lib/strchrnul.c: New file.
18151
18152 2003-06-10  Bruno Haible  <bruno@clisp.org>
18153
18154         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
18155
18156 2003-06-07  Karl Berry  <karl@gnu.org>
18157
18158         * config/config.{guess,sub}: update from prep.
18159
18160 2003-06-07  Jim Meyering  <jim@meyering.net>
18161
18162         * modules/strtod: Use $(...) notation, not @...@ for
18163         AC_REPLACE'd variables.
18164         * modules/localcharset: Likewise.
18165
18166 2003-06-07  Jim Meyering  <jim@meyering.net>
18167
18168         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
18169         in place of my name in the copyright comment.
18170         Remove definition and uses of __P.
18171
18172         From coreutils.
18173         * lib/stat.c: Don't declare xmalloc explicitly.
18174         Instead, include "xalloc.h".
18175         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
18176         xrealloc, and xcalloc return values.
18177         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
18178         Improve comment.
18179         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
18180
18181 2003-06-07  Bruno Haible  <bruno@clisp.org>
18182
18183         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
18184         avoid AC_CONFIG_LINKS.
18185         * modules/fnmatch (Makefile.am): Use explicit creation rule for
18186         fnmatch.h, to avoid AC_CONFIG_LINKS.
18187         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
18188
18189 2003-06-07  Bruno Haible  <bruno@clisp.org>
18190
18191         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
18192         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
18193         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
18194         directory.
18195         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
18196         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
18197         directory.
18198
18199 2003-06-06  Jim Meyering  <jim@meyering.net>
18200
18201         Merge from coreutils.
18202         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
18203         Consolidate declarations and initializations of *_base* locals.
18204
18205         Merge from coreutils.
18206         This avoids a core dump on systems without GNU putenv,
18207         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
18208         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
18209         (unsetenv): New static function, from GNU libc.
18210         (rpl_putenv): Use it.
18211
18212         * lib/modechange.c: Remove trailing blanks.
18213
18214         Merge from coreutils.
18215         * lib/fsusage.c: Remove declaration of statfs.
18216         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
18217
18218         * lib/posixtm.c: Include <stdbool.h> unconditionally.
18219
18220 2003-06-06  Jim Meyering  <jim@meyering.net>
18221
18222         * lib/stdbool_.h: Renamed from stdbool.h.in.
18223
18224 2003-06-06  Jim Meyering  <jim@meyering.net>
18225             Bruno Haible  <bruno@clisp.org>
18226
18227         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
18228         Adjust Makefile.am snippet not to redirect directly to target.
18229         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
18230
18231 2003-06-05  Paul Eggert  <eggert@twinsun.com>
18232
18233         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
18234         mismatch, look in future quarters as well as past.  This fixes a
18235         bug when processing fall-backwards gaps immediately after a long
18236         period of daylight-saving time.
18237
18238         * lib/mktime.c: Assume freestanding C89 or better.
18239         (HAVE_LIMITS_H): Remove.  Assume it's 1.
18240         (__P): Remove; not used.
18241         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
18242         (mktime, not_equal_tm, print_tm, check_result,
18243         main): Use prototypes.  Use const * where appropriate.
18244         (main): Fix typo in testing code that uncovered by above changes.
18245         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
18246
18247 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18248
18249         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
18250         locale.h, localeconv.  This merges changes from coreutils.
18251
18252         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
18253         It can be removed after the next Autoconf is released.
18254         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
18255         needed.
18256
18257 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18258
18259         * lib/mktime.c: Fix Debian bug 177940
18260         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
18261         (localtime_offset): Now long int, not time_t, because we want it
18262         to be guaranteed to be signed.  All uses changed.
18263         (__mktime_internal): If overflow would occur when adding offset,
18264         don't add it.
18265
18266         Merge 'human' changes from coreutils.  Rewrite to support
18267         locale-specific notations like thousands separators.
18268         * lib/human.c: Simplify authorship notice.
18269         Include human.h immediately after config.h.
18270         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
18271         <limits.h>: Do not include, since human.h does.
18272         (SIZE_MAX, UINTMAX_MAX): New macros.
18273         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
18274         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
18275         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
18276         (power_letter): Renamed from suffixes.
18277         (generate_suffix_backwards): Remove.
18278         (adjust_value): Now takes int style (because of human.h changes)
18279         and long double value (for greater precision on some platforms).
18280         (group_number): New function.
18281         (human_readable): Use it.  Use integer options, not enum.
18282         Put the options before the sizes in the arg list.
18283         Support all the new options.
18284         The old human_readable function has been removed;
18285         use inttostr.h instead.
18286         (human_readable, default_block_size, humblock):
18287         Use uintmax_t, not int, for block sizes.
18288         (human_readable_inexact, block_size_types): Remove.
18289         (block_size_opts): New constant.
18290         (human_options): Renamed from human_block_size, with new signature
18291         that allows block sizes up to UINTMAX_MAX.  All callers changed.
18292         * lib/human.h: Add copyright and authorship notice.
18293         Include <limits.h> and <stdbool.h> unconditionally.
18294         (PARAMS): Remove.  All uses removed.
18295         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
18296         (enum human_inexact_style): Remove tag; now a nameless enum.
18297         (human_floor, human_ceiling, human_round_to_even): Now have
18298         values 2, 0, 1 rather than -1, 1, 0.
18299         (human_group_digits, human_suppress_point_zero, human_autoscale,
18300         human_base_1024, human_SI, human_B): New constants.
18301         (human_readable_inexact, human_block_size): Remove.
18302         (human_readable): Size args are now uintmax_t, not int.
18303         (human_options): New decl.
18304
18305         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
18306         unnecessary now that we assume C89 or better.  This change
18307         imported from coreutils.
18308
18309         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
18310         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
18311         in the 2003-05-30 sync from glibc.
18312
18313         .h files should stand alone, but we shouldn't include <sys/types.h>
18314         if we can get away with just <stddef.h>.
18315
18316         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
18317         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
18318         rather than <sys/types.h>, as we merely need size_t.
18319         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
18320         to get size_t.
18321         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
18322         Include <stdio.h>, to get FILE.
18323         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
18324         memcasecmp.h has included <stddef.h> and all we need is size_t.
18325         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
18326         our interface, instead of including <sys/types.h>
18327
18328 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18329
18330         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
18331         now, as glibc mktime is buggy on non-glibc systems.
18332
18333 2003-06-03  Karl Berry  <karl@gnu.org>
18334
18335         * config/config.sub: update from prep.
18336
18337 2003-06-02  Paul Eggert  <eggert@twinsun.com>
18338
18339         [from coreutils]
18340         Fix some minor time-related bugs with POSIX time arguments.
18341         Some valid time stamps were being rejected (notably -1, and
18342         time stamps before 1900 on 64-bit hosts).  And some invalid
18343         time stamps were being accepted, e.g. September 31.
18344
18345         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
18346         that we can return (time_t) -1 successfully.
18347         * lib/posixtm.c: Likewise.
18348         [HAVE_STDBOOL_H]: Include <stdbool.h>.
18349         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
18350         (t): Remove static var.
18351         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
18352         of static var.  All uses changed.
18353         (year): Do not reject years before 1900; they can occur with
18354         64-bit time_t.
18355         (posix_time_parse): Do not check for out-of-range components;
18356         that is now the caller's responsibility, since our checks were
18357         only approximations.
18358         (posixtime): Use mktime to check for out-of-range components,
18359         since it knows them exactly.
18360         If mktime returns (time_t) -1, check whether an error actually occurred
18361         by invoking localtime on -1.
18362         (main) [TEST_POSIXTIME]: Check for input data errors, and report
18363         posixtime failures better.
18364         Improve the test data (in comments only).
18365
18366 2003-06-02  Karl Berry  <karl@gnu.org>
18367
18368         * config/mkinstalldirs (version): new variable.
18369         (--version): new option.
18370         (usage): improve message.
18371
18372 2003-05-30  Karl Berry  <karl@gnu.org>
18373
18374         * lib/mktime.c: update from libc.
18375
18376 2003-05-30  Bruno Haible  <bruno@clisp.org>
18377
18378         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
18379         * config/config.rpath: Upgrade to gettext-0.12.1.
18380
18381 2003-05-30  Bruno Haible  <bruno@clisp.org>
18382
18383         * m4/gettext.m4: Upgrade to gettext-0.12.1.
18384         * m4/nls.m4: New file, from gettext-0.12.1.
18385         * m4/po.m4: New file, from gettext-0.12.1.
18386         * m4/progtest.m4: Upgrade to gettext-0.12.1.
18387
18388 2003-05-30  Bruno Haible  <bruno@clisp.org>
18389
18390         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
18391         * lib/localcharset.h: Likewise.
18392         * lib/localcharset.c: Likewise.
18393
18394 2003-05-29  Karl Berry  <karl@gnu.org>
18395
18396         * config/config.rpath: update from gettext.
18397
18398 2003-05-28  Paul Eggert  <eggert@twinsun.com>
18399
18400         Assume the headers required for C89 freestanding compilers.
18401         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
18402         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
18403         * m4/human.m4 (gl_HUMAN): Likewise.
18404         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
18405         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
18406         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18407         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
18408         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18409         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
18410
18411 2003-05-28  Paul Eggert  <eggert@twinsun.com>
18412
18413         Assume the headers required for C89 freestanding compilers.
18414         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
18415         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
18416         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
18417         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
18418         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
18419         define, since <limits.h> is guaranteed to do that.
18420         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
18421         * lib/exclude.c: Include <stdbool.h> unconditionally.
18422         * lib/tempname.c: Include <stddef.h> unconditionally.
18423         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
18424         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
18425         <stddef.h> does that.
18426         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
18427         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
18428         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
18429         needed.
18430         * lib/xstrtol.c: Likewise.
18431         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
18432         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
18433
18434         * lib/addext.c (addext): Use assignment rather than cast, to avoid
18435         warnings on some platforms.
18436
18437         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
18438         arbitrarily.
18439
18440 2003-05-26  Jim Meyering  <jim@meyering.net>
18441
18442         Merge in a change from coreutils:
18443         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
18444         that is guaranteed to be `no'.  Use `no_such_member' to indicate
18445         that condition, rather than `-1' which is slightly misleading.
18446         Change the name of the cache variable to have the gl_ prefix.
18447         Prompted by a patch from Richard Dawe for DJGPP.
18448
18449 2003-05-24  Karl Berry  <karl@gnu.org>
18450
18451         * config/config.guess: update from prep.
18452
18453 2003-05-22  Karl Berry  <karl@gnu.org>
18454
18455         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
18456
18457 2003-05-20  Karl Berry  <karl@gnu.org>
18458
18459         * config/config.guess: update from prep.
18460
18461 2003-05-18  Karl Berry  <karl@gnu.org>
18462
18463         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
18464         might actually be set by the user.
18465
18466         * config/depcomp, install-sh, mdate-sh: update from automake.
18467
18468 2003-05-17  Bruno Haible  <bruno@clisp.org>
18469
18470         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
18471         invalid expansion for AC_EGREP_CPP.
18472         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
18473         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
18474         Suggested by Akim Demaille <akim@epita.fr> in
18475         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
18476
18477 2003-05-12  Jim Meyering  <jim@meyering.net>
18478
18479         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
18480         the space-padded-by-default conversion specifiers, %e, %k, %l.
18481
18482 2003-05-12  Bruno Haible  <bruno@clisp.org>
18483
18484         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
18485         the string is longer than 4 KB.
18486
18487 2003-05-11  Karl Berry  <karl@gnu.org>
18488
18489         * config/config.{guess,sub}: update from prep.
18490
18491 2003-05-09  Bruno Haible  <bruno@clisp.org>
18492
18493         * modules/error: Add m4/strerror_r.m4 to file list.
18494
18495 2003-05-03  Bruno Haible  <bruno@clisp.org>
18496
18497         Upgrade to Unicode-4.0.
18498         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
18499         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
18500         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
18501         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
18502         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
18503         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
18504         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
18505         Change width of U+E0100..U+E01EF from 1 to 0.
18506
18507 2003-04-25  Jim Meyering  <jim@meyering.net>
18508
18509         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
18510         of type size_t, not int.
18511
18512 2003-04-25  Bruno Haible  <bruno@clisp.org>
18513
18514         * lib/copy-file.c: Include <stddef.h>, for size_t.
18515
18516 2003-04-21  Paul Eggert  <eggert@twinsun.com>
18517
18518         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
18519         code which expansion is under static control.  Patch imported from
18520         Akim Demaille's patch to Bison; see
18521         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
18522
18523 2003-04-14  Bruno Haible  <bruno@clisp.org>
18524
18525         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
18526
18527 2003-04-11  Jim Meyering  <jim@meyering.net>
18528
18529         Merge changes from Coreutils.
18530
18531         2003-03-22  Jim Meyering  <jim@meyering.net>
18532
18533         * lib/strftime.c (widen): Cast alloca return value to proper type.
18534
18535         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
18536
18537         From GNU libc.
18538         * lib/strftime.c (my_strftime): Handle very large width
18539         specifications for numeric values correctly.  Improve checks for
18540         overflow.
18541
18542         2003-01-19  Jim Meyering  <jim@meyering.net>
18543
18544         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
18545         definitions.
18546         (nl_get_alt_digit) [! defined my_strftime]: Define.
18547         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
18548         _nl_get_alt_digit and _nl_get_walt_digit.
18549
18550         * lib/strftime.c (my_strftime): Merge in locale-related changes from
18551         libc. These changes have no effect outside of _LIBC.
18552
18553 2003-04-10  Bruno Haible  <bruno@clisp.org>
18554
18555         * modules/findprog: New file.
18556         * MODULES.html.sh (func_all_modules): Add it.
18557
18558 2003-04-10  Bruno Haible  <bruno@clisp.org>
18559
18560         * m4/findprog.m4: New file.
18561         * m4/eaccess.m4: New file.
18562
18563 2003-04-10  Bruno Haible  <bruno@clisp.org>
18564
18565         * lib/findprog.h: New file, from GNU gettext.
18566         * lib/findprog.c: New file, from GNU gettext.
18567
18568 2003-04-05  Jim Meyering  <jim@meyering.net>
18569
18570         Merge changes from Coreutils.
18571
18572         * lib/exclude.h (PARAMS): Remove definition and uses.
18573         * lib/exclude.c: Remove uses of `PARAMS'.
18574
18575         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
18576         Add test-cases for DOS filenames. Declare program_name.
18577         (main): Set up program_name.  Patch by Rich Dawe.
18578
18579         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18580         error from mntctl.
18581         Use mntctl's return value to drive the entry-processing loop, since
18582         we can't rely on the value of the vmt_length member in the last
18583         entry.  On some systems doing so could result in exhausting
18584         virtual memory.  Based in part on a patch from Mike Jetzer.
18585
18586 2003-04-04  Bruno Haible  <bruno@clisp.org>
18587
18588         * modules/linebreak: New file.
18589         * MODULES.html.sh (func_all_modules): Add it.
18590
18591 2003-04-04  Bruno Haible  <bruno@clisp.org>
18592
18593         * m4/linebreak.m4: New file.
18594
18595 2003-04-04  Bruno Haible  <bruno@clisp.org>
18596
18597         * lib/linebreak.h: New file, from GNU gettext.
18598         * lib/linebreak.c: New file, from GNU gettext with slight
18599         modifications.
18600         * lib/lbrkprop.h: New file, from GNU gettext.
18601
18602 2003-04-03  Bruno Haible  <bruno@clisp.org>
18603
18604         * modules/utf8-ucs4: New file.
18605         * modules/utf16-ucs4: New file.
18606         * modules/ucs4-utf8: New file.
18607         * modules/ucs4-utf16: New file.
18608         * MODULES.html.sh (func_all_modules): Add them.
18609
18610 2003-04-03  Bruno Haible  <bruno@clisp.org>
18611
18612         * m4/utf-ucs4.m4: New file.
18613         * m4/ucs4-utf.m4: New file.
18614
18615 2003-04-03  Bruno Haible  <bruno@clisp.org>
18616
18617         * lib/utf8-ucs4.h: New file, from GNU gettext.
18618         * lib/utf16-ucs4.h: New file, from GNU gettext.
18619         * lib/ucs4-utf8.h: New file, from GNU gettext.
18620         * lib/ucs4-utf16.h: New file, from GNU gettext.
18621
18622 2003-04-02  Bruno Haible  <bruno@clisp.org>
18623
18624         * modules/binary-io: New file.
18625         * MODULES.html.sh (func_all_modules): Add it.
18626
18627 2003-04-02  Bruno Haible  <bruno@clisp.org>
18628
18629         * lib/binary-io.h: New file, from GNU gettext.
18630
18631 2003-04-01  Bruno Haible  <bruno@clisp.org>
18632
18633         * modules/pathname: New file.
18634         * MODULES.html.sh (func_all_modules): Add it.
18635
18636 2003-04-01  Bruno Haible  <bruno@clisp.org>
18637
18638         * lib/pathname.h: New file, from GNU gettext.
18639         * lib/concatpath.c: New file, from GNU gettext.
18640
18641 2003-03-30  Bruno Haible  <bruno@clisp.org>
18642
18643         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
18644
18645 2003-03-30  Bruno Haible  <bruno@clisp.org>
18646
18647         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
18648         function chown() doesn't exist.
18649
18650 2003-03-28  Bruno Haible  <bruno@clisp.org>
18651
18652         * modules/copy-file: New file.
18653         * MODULES.html.sh (func_all_modules): Add it.
18654
18655 2003-03-28  Bruno Haible  <bruno@clisp.org>
18656
18657         * m4/copy-file.m4: New file.
18658
18659 2003-03-28  Bruno Haible  <bruno@clisp.org>
18660
18661         * lib/copy-file.h: New file, from GNU gettext.
18662         * lib/copy-file.c: New file, from GNU gettext.
18663
18664 2003-03-18  Jim Meyering  <jim@meyering.net>
18665
18666         * lib/quote.c (quote_n): Fix typo in comment.
18667
18668 2003-03-18  Bruno Haible  <bruno@clisp.org>
18669
18670         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
18671         checking.
18672         * m4/onceonly_2_57.m4: Likewise.
18673
18674 2003-03-17  Bruno Haible  <bruno@clisp.org>
18675
18676         * m4/onceonly.m4: Require autoconf 2.54 or newer.
18677         (m4_quote): Remove macro.
18678         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
18679
18680 2003-03-14  Jim Meyering  <jim@meyering.net>
18681
18682         Merge changes from Coreutils.
18683         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
18684         to be const, in order to avoid warnings.
18685         (obstack_room): Likewise.
18686         (obstack_empty_p): Likewise.
18687
18688 2003-03-14  Bruno Haible  <bruno@clisp.org>
18689
18690         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
18691         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
18692
18693 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18694
18695         Merge changes from Bison.
18696         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
18697         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
18698         when compiling Bison 1.875's `bitset bset = obstack_alloc
18699         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
18700         * lib/hash.c: Include <stdbool.h> unconditionally.
18701
18702 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18703
18704         * m4/onceonly.m4 (m4_quote): New macro.
18705         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
18706         Quote AC_FOREACH variable-expansions properly.
18707
18708 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18709
18710         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
18711
18712 2003-03-09  Paul Eggert  <eggert@twinsun.com>
18713
18714         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
18715         Reported by Bruce Becker; see:
18716         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
18717
18718 2003-03-03  Paul Eggert  <eggert@twinsun.com>
18719             Bruno Haible  <bruno@clisp.org>
18720
18721         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
18722         Reported by John Hughes, see
18723         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
18724
18725 2003-02-20  Bruno Haible  <bruno@clisp.org>
18726
18727         * MODULES.html.sh (func_all_modules): Add poll.
18728
18729 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18730
18731         * modules/poll: New file.
18732
18733 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18734
18735         * lib/poll_.h: New file.
18736         * lib/poll.c: New file.
18737
18738 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18739
18740         * m4/poll.m4: New file.
18741
18742 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18743
18744         * modules/mathl: New file.
18745
18746 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18747
18748         * lib/mathl.h: New file.
18749         * lib/acosl.c: New file.
18750         * lib/asinl.c: New file.
18751         * lib/atanl.c: New file.
18752         * lib/ceill.c: New file.
18753         * lib/cosl.c: New file.
18754         * lib/expl.c: New file.
18755         * lib/floorl.c: New file.
18756         * lib/frexpl.c: New file.
18757         * lib/ldexpl.c: New file.
18758         * lib/logl.c: New file.
18759         * lib/sincosl.c: New file.
18760         * lib/sinl.c: New file.
18761         * lib/sqrtl.c: New file.
18762         * lib/tanl.c: New file.
18763         * lib/trigl.c: New file.
18764         * lib/trigl.h: New file.
18765
18766 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18767
18768         * m4/mathl.m4: New file.
18769
18770 2003-02-18  Bruno Haible  <bruno@clisp.org>
18771
18772         * MODULES.html.sh (func_all_modules): Add mathl.
18773
18774 2003-02-17  Bruno Haible  <bruno@clisp.org>
18775
18776         * modules/mkdtemp: New module.
18777         * MODULES.html.sh (func_all_modules): Add it.
18778
18779 2003-02-17  Bruno Haible  <bruno@clisp.org>
18780
18781         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
18782
18783 2003-02-17  Bruno Haible  <bruno@clisp.org>
18784
18785         * lib/mkdtemp.h: New file, from GNU gettext.
18786         * lib/mkdtemp.c: New file, from GNU gettext.
18787
18788 2003-02-02  Jim Meyering  <jim@meyering.net>
18789
18790         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
18791         e.g. glibc-2.2.93.
18792
18793 2003-01-31  Bruno Haible  <bruno@clisp.org>
18794
18795         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
18796         'rpl_rename'.
18797         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
18798         'rpl_strnlen'.
18799         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
18800         'rpl_strtod'.
18801         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
18802         'rpl_utime'.
18803
18804 2003-01-31  Bruno Haible  <bruno@clisp.org>
18805
18806         * lib/rename.c: #undef rename before defining rpl_rename.
18807         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
18808
18809 2003-01-30  Bruno Haible  <bruno@clisp.org>
18810
18811         * modules/vasnprintf, modules/vasprintf: New modules.
18812         * MODULES.html.sh (func_all_modules): Add them.
18813
18814 2003-01-30  Bruno Haible  <bruno@clisp.org>
18815
18816         * m4/signed.m4: New file, from GNU gettext.
18817         * m4/longdouble.m4: New file, from GNU gettext.
18818         * m4/wchar_t.m4: New file, from GNU gettext.
18819         * m4/wint_t.m4: New file, from GNU gettext.
18820         * m4/vasnprintf.m4: New file.
18821         * m4/vasprintf.m4: New file.
18822
18823 2003-01-30  Bruno Haible  <bruno@clisp.org>
18824
18825         * lib/printf-args.h: New file, from GNU gettext.
18826         * lib/printf-args.c: New file, from GNU gettext.
18827         * lib/printf-parse.h: New file, from GNU gettext.
18828         * lib/printf-parse.c: New file, from GNU gettext.
18829         * lib/vasnprintf.h: New file, from GNU gettext.
18830         * lib/vasnprintf.c: New file, from GNU gettext.
18831         * lib/asnprintf.c: New file, from GNU gettext.
18832         * lib/vasprintf.h: New file, from GNU gettext with modifications.
18833         * lib/vasprintf.c: New file, from GNU gettext.
18834         * lib/asprintf.c: New file, from GNU gettext.
18835
18836 2003-01-29  Bruno Haible  <bruno@clisp.org>
18837
18838         * modules/stpncpy: New module.
18839         * MODULES.html.sh (func_all_modules): Add it.
18840
18841 2003-01-29  Bruno Haible  <bruno@clisp.org>
18842
18843         * m4/stpncpy.m4: New file.
18844
18845 2003-01-29  Bruno Haible  <bruno@clisp.org>
18846
18847         * lib/stpncpy.h: New file, from GNU gettext with modifications.
18848         * lib/stpncpy.c: New file, from GNU gettext with modifications.
18849
18850 2003-01-28  Bruno Haible  <bruno@clisp.org>
18851
18852         * modules/c-ctype: New module.
18853         * MODULES.html.sh (func_all_modules): Add it.
18854
18855 2003-01-28  Bruno Haible  <bruno@clisp.org>
18856
18857         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
18858         Paul Eggert.
18859         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
18860         Paul Eggert.
18861
18862 2003-01-27  Bruno Haible  <bruno@clisp.org>
18863
18864         * modules/xsetenv: New module.
18865         * MODULES.html.sh (func_all_modules): Add it.
18866
18867 2003-01-27  Bruno Haible  <bruno@clisp.org>
18868
18869         * lib/xsetenv.h: New file, from GNU gettext.
18870         * lib/xsetenv.c: New file, from GNU gettext.
18871
18872 2003-01-23  Jim Meyering  <jim@meyering.net>
18873
18874         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
18875         from working on systems without dirfd (at least Irix and OSF1/Tru64).
18876
18877 2003-01-23  Bruno Haible  <bruno@clisp.org>
18878
18879         * modules/minmax: New module.
18880         * MODULES.html.sh (func_all_modules): Add it.
18881
18882 2003-01-23  Bruno Haible  <bruno@clisp.org>
18883
18884         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
18885         Eggert.
18886
18887 2003-01-22  Bruno Haible  <bruno@clisp.org>
18888
18889         * modules/exit: New module.
18890         * MODULES.html.sh (func_all_modules): Add it.
18891
18892 2003-01-22  Bruno Haible  <bruno@clisp.org>
18893
18894         * lib/exit.h: New file, from GNU gettext.
18895
18896 2003-01-19  Bruno Haible  <bruno@clisp.org>
18897
18898         * gnulib-tool: Recognize option --extract-maintainer.
18899         (func_get_maintainer): New function.
18900         * modules/*: Add Maintainer entry.
18901
18902 2003-01-16  Jim Meyering  <jim@meyering.net>
18903
18904         * m4/regex.m4: The `regex' struct is both input and output.
18905         Initialize it before each use.  Patch by Tim Waugh.
18906
18907 2003-01-16  Bruno Haible  <bruno@clisp.org>
18908
18909         * MODULES.html.sh: Add a table of contents. Add the module name as
18910         leftmost column. Add hyperlinks.
18911
18912 2003-01-15  Bruno Haible  <bruno@clisp.org>
18913
18914         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
18915
18916 2003-01-15  Bruno Haible  <bruno@clisp.org>
18917
18918         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
18919         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
18920         suffix.
18921
18922 2003-01-15  Bruno Haible  <bruno@clisp.org>
18923
18924         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
18925
18926 2003-01-15  Bruno Haible  <bruno@clisp.org>
18927
18928         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
18929         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
18930
18931 2003-01-14  Jim Meyering  <jim@meyering.net>
18932
18933         * lib/same.c (same_name): Tweak a comment.
18934
18935 2003-01-14  Bruno Haible  <bruno@clisp.org>
18936
18937         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
18938         when a string comparison is sufficient.
18939
18940 2003-01-14  Bruno Haible  <bruno@clisp.org>
18941
18942         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
18943         'unsigned int'.
18944
18945 2003-01-14  Bruno Haible  <bruno@clisp.org>
18946
18947         * lib/hash-pjw.c: Add comment about low quality of this function.
18948
18949 2003-01-13  Bruno Haible  <bruno@clisp.org>
18950
18951         * modules/stpcpy: Distribute lib/stpcpy.h.
18952         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
18953
18954 2003-01-13  Bruno Haible  <bruno@clisp.org>
18955
18956         * modules/*: Add a description.
18957         * modules/strpbrk: Fix Makefile.am snippet.
18958         * modules/strtoimax: Fix dependencies.
18959         * modules/strtoumax: Likewise.
18960
18961 2003-01-13  Bruno Haible  <bruno@clisp.org>
18962
18963         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
18964         * modules/alloca (Makefile.am): All object files depend on alloca.h.
18965         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
18966
18967 2003-01-13  Bruno Haible  <bruno@clisp.org>
18968
18969         * gnulib-tool (func_create_testdir): Store config/* files in the main
18970         directory.
18971         * config.rpath: Move to ...
18972         * config/config.rpath: ... here.
18973         * modules/gettext: Contains config/config.rpath, not config.rpath.
18974         * modules/iconv: Likewise.
18975
18976 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18977
18978         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18979         to avoid collisions with libcurses and libreadline.
18980
18981         * m4/getstr.m4: Remove.
18982         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
18983
18984 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18985
18986         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18987         to avoid collisions with libcurses and libreadline.
18988
18989         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
18990         * lib/getstr.h, getstr.c: Remove.
18991         * lib/getline.c: Include "getline.h", to check interface.
18992         Move body of old getstr.c here: this defines MIN_CHUNK and
18993         declares getdelim2, which is renamed from getstr.
18994         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
18995
18996         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
18997         All uses changed.
18998         * lib/linebuffer.h: Likewise.
18999         (readline): Remove backward-compatibility macro.
19000
19001 2003-01-12  Paul Eggert  <eggert@twinsun.com>
19002
19003         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
19004         to avoid collisions with libcurses and libreadline.
19005         * getstr: Remove.
19006         * MODULES.html.sh: Remove getstr.
19007         * modules/getline: Depend on unlocked-io, not getstr.
19008
19009 2003-01-12  Jim Meyering  <jim@meyering.net>
19010
19011         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
19012
19013 2003-01-10  Bruno Haible  <bruno@clisp.org>
19014
19015         * modules/alloca: Change Makefile.am requirements. Simplify Include
19016         requirements. Add lib/alloca_.h to file list.
19017
19018 2003-01-10  Bruno Haible  <bruno@clisp.org>
19019
19020         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
19021
19022 2003-01-10  Bruno Haible  <bruno@clisp.org>
19023
19024         * lib/alloca_.h: New file.
19025         * lib/getdate.y: Unconditionally include alloca.h.
19026         * lib/makepath.c: Likewise.
19027         * lib/setenv.c: Likewise.
19028         * lib/userspec.c: Likewise.
19029
19030 2003-01-09  Karl Berry  <karl@gnu.org>
19031
19032         * MODULES.html.sh: include `dirname $0` in PATH, to find
19033         gnulib-tool.
19034
19035 2003-01-09  Bruno Haible  <bruno@clisp.org>
19036
19037         * modules/stdbool: Change configure.ac, Makefile.am requirements.
19038         Simplify Include requirements. Add lib/stdbool.h.in to file list.
19039
19040 2003-01-09  Bruno Haible  <bruno@clisp.org>
19041
19042         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
19043
19044 2003-01-09  Bruno Haible  <bruno@clisp.org>
19045
19046         * lib/stdbool.h.in: New file.
19047
19048 2003-01-09  Bruno Haible  <bruno@clisp.org>
19049
19050         * gnulib-tool (func_all_modules): Ignore files ending in ~.
19051         * MODULES.html.sh: Likewise.
19052
19053 2003-01-08  Jim Meyering  <jim@meyering.net>
19054
19055         * lib/full-write.c: Undefine and define-away `const' after inclusion
19056         of errno.h, not before.  Suggestion from Bruno Haible.
19057
19058 2003-01-08  Bruno Haible  <bruno@clisp.org>
19059
19060         * modules/full-read: Depend on full-write.
19061
19062 2003-01-08  Bruno Haible  <bruno@clisp.org>
19063
19064         * lib/safe-read.c: Include specification header first, to ensure its
19065         selfcontainedness.
19066         * lib/full-write.c: Likewise.
19067
19068 2003-01-07  Jim Meyering  <jim@meyering.net>
19069
19070         * lib/full-write.c: Rework so that it may serve to define full_read,
19071         too.
19072         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
19073
19074 2003-01-07  Bruno Haible  <bruno@clisp.org>
19075
19076         * lib/strtoimax.c: Include <stdint.h> as an alternative to
19077         <inttypes.h>.
19078         * lib/xstrtol.h: Likewise.
19079         * lib/xstrtoimax.c: Likewise.
19080         * lib/xstrtoumax.c: Likewise.
19081         * lib/human.h: Likewise.
19082
19083         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
19084         on systems that have <inttypes.h> but not <stdint.h>.
19085
19086 2003-01-07  Bruno Haible  <bruno@clisp.org>
19087
19088         * MODULES.html.sh: Add copyright notice.
19089         (missed_files): Omit CVS directory entries.
19090         (func_module): Make it work with sed-3.02.
19091         * MODULES.txt: Remove file.
19092
19093 2003-01-06  Jim Meyering  <jim@meyering.net>
19094
19095         * lib/version-etc.c: Update year in translatable copyright string.
19096
19097 2003-01-03  Karl Berry  <karl@gnu.org>
19098
19099         * config/config.{guess,sub}: update from prep.
19100
19101 2003-01-02  Karl Berry  <karl@gnu.org>
19102
19103         * doc/COPYING.DOC: belatedly updated to 1.2.
19104
19105 2003-01-01  Karl Berry  <karl@gnu.org>
19106
19107         * gnulib-tool (func_verify_module): report module name $module in
19108         error message, not $1.
19109         * gnulib-tool (create-testdir): don't complain if destdir couldn't
19110         be created, only if it doesn't exist.
19111         * gnulib-tool (last_checkin_date): don't expand the $Date here.
19112
19113 2002-12-31  Paul Eggert  <eggert@twinsun.com>
19114
19115         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
19116
19117 2002-12-31  Paul Eggert  <eggert@twinsun.com>
19118
19119         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
19120         memcmp if strcoll doesn't work.
19121
19122 2002-12-31  Bruno Haible  <bruno@clisp.org>
19123
19124         * lib/utime.c (utime_null): No need to call ftruncate if the file was
19125         nonempty.
19126
19127 2002-12-31  Bruno Haible  <bruno@clisp.org>
19128
19129         * lib/memcoll.c (STRCOLL): New macro.
19130         (memcoll): Use it.
19131
19132 2002-12-31  Bruno Haible  <bruno@clisp.org>
19133
19134         * lib/localcharset.h: New file.
19135         * lib/localcharset.c: Include it.
19136         * lib/unicodeio.c: Likewise.
19137
19138 2002-12-31  Bruno Haible  <bruno@clisp.org>
19139
19140         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
19141         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
19142
19143 2002-12-31  Bruno Haible  <bruno@clisp.org>
19144
19145         * lib/getline.h: Include <stddef.h>, for size_t.
19146
19147         * lib/unicodeio.h: Include <stddef.h>, for size_t.
19148         * lib/unicodeio.c: Don't include <stddef.h>.
19149
19150 2002-12-31  Bruno Haible  <bruno@clisp.org>
19151
19152         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
19153         HAVE_TM_ZONE.
19154
19155 2002-12-24  Karl Berry  <karl@gnu.org>
19156
19157         * config/config.guess: update from prep.
19158
19159 2002-12-24  Bruno Haible  <bruno@clisp.org>
19160
19161         General infrasructure.
19162         * m4/README: Rewritten.
19163         * m4/onceonly.m4: New file.
19164         * m4/onceonly_2_57.m4: New file.
19165
19166         Module atexit.
19167         * m4/atexit.m4: New file.
19168
19169         Module strtod.
19170         * m4/strtod.m4: New file.
19171
19172         Module strtol.
19173         * m4/strtol.m4: New file.
19174
19175         Module strtoul.
19176         * m4/strtoul.m4: New file.
19177
19178         Module memchr.
19179         * m4/memchr.m4: New file.
19180
19181         Module memcmp.
19182         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
19183         (jm_FUNC_MEMCMP): Invoke it.
19184
19185         Module memcpy.
19186         * m4/memcpy.m4: New file.
19187
19188         Module memmove.
19189         * m4/memmove.m4: New file.
19190
19191         Module memset.
19192         * m4/memset.m4: New file.
19193
19194         Module strcspn.
19195         * m4/strcspn.m4: New file.
19196
19197         Module strpbrk.
19198         * m4/strpbrk.m4: New file.
19199
19200         Module strstr.
19201         * m4/strstr.m4: New file.
19202
19203         Module strerror.
19204         * m4/strerror.m4: New file.
19205
19206         Module mktime.
19207         * m4/mktime.m4: Renamed from jm-mktime.m4.
19208         (gl_PREREQ_MKTIME): New macro.
19209         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
19210
19211         Module malloc.
19212         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
19213         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
19214         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
19215
19216         Module realloc.
19217         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
19218         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
19219         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
19220
19221         Module strftime.
19222         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
19223         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
19224         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
19225         gl_TM_GMTOFF.
19226         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
19227
19228         Module xalloc.
19229         * m4/xalloc.m4: New file.
19230
19231         Module alloca.
19232         * m4/alloca.m4: New file.
19233
19234         Module putenv.
19235         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
19236         (jm_FUNC_PUTENV): Invoke it.
19237
19238         Module setenv.
19239         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
19240         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
19241         when invoked twice.
19242         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
19243         gt_FUNC_SETENV.
19244
19245         Module memrchr.
19246         * m4/memrchr.m4: New file.
19247
19248         Module stpcpy.
19249         * m4/stpcpy.m4: New file.
19250
19251         Module strcase.
19252         * m4/strcase.m4: New file.
19253
19254         Module strdup.
19255         * m4/strdup.m4: New file.
19256
19257         Module strnlen.
19258         * m4/strnlen.m4: New file.
19259
19260         Module strndup.
19261         * m4/strndup.m4: New file.
19262
19263         Module xstrtod.
19264         * m4/xstrtod.m4: New file.
19265
19266         Module xstrtol.
19267         * m4/xstrtol.m4: New file.
19268
19269         Module getdate.
19270         * m4/getdate.m4: New file.
19271
19272         Module unlocked-io.
19273         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
19274         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
19275         * m4/jm-glibc-io.m4n: Remove file.
19276
19277         Module long-options.
19278         * m4/long-options.m4: New file.
19279
19280         Module md5.
19281         * m4/md5.m4: New file.
19282
19283         Module sha.
19284         * m4/sha.m4: New file.
19285
19286         Module getstr.
19287         * m4/getstr.m4: New file.
19288
19289         Module getline.
19290         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
19291         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
19292         <sys/types.h>, for size_t. Use the function name gnu_getline, not
19293         simply getline. Infoke gl_PREREQ_GETLINE.
19294
19295         Module obstack.
19296         * m4/obstack.m4: New file.
19297
19298         Module hash.
19299         * m4/hash.m4: New file.
19300
19301         Module readtokens.
19302         * m4/readtokens.m4: New file.
19303
19304         Module strverscmp.
19305         * m4/strverscmp.m4: New file.
19306
19307         Module stdbool.
19308         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
19309         OSF/1.
19310
19311         Module strtoll.
19312         * m4/strtoll.m4: New file.
19313
19314         Module strtoull.
19315         * m4/strtoull.m4: New file.
19316
19317         Module strtoimax.
19318         * m4/strtoimax.m4: New file.
19319
19320         Module strtoumax.
19321         * m4/strtoumax.m4: New file.
19322
19323         Module xstrtoimax.
19324         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
19325         jm_AC_PREREQ_XSTRTOIMAX.
19326         Moved the strtol prerequisites to strtol.m4.
19327         Moved the strtoll prerequisites to strtoll.m4.
19328         Moved the strtoimax prerequisites to strtoimax.m4.
19329
19330         Module xstrtoumax.
19331         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
19332         jm_AC_PREREQ_XSTRTOUMAX.
19333         Moved the strtoul prerequisites to strtoul.m4.
19334         Moved the strtoull prerequisites to strtoull.m4.
19335         Moved the strtoumax prerequisites to strtoumax.m4.
19336
19337         Module chown.
19338         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
19339         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
19340
19341         Module dup2.
19342         * m4/dup2.m4: New file.
19343
19344         Module ftruncate.
19345         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
19346         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
19347
19348         Module getgroups.
19349         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
19350         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
19351
19352         Module gettimeofday.
19353         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
19354         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
19355         gl_PREREQ_GETTIMEOFDAY.
19356
19357         Module mkdir.
19358         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
19359         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
19360
19361         Module mkstemp.
19362         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
19363         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
19364         jm_AC_TYPE_UINTMAX_T.
19365         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
19366
19367         Module stat.
19368         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
19369         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
19370
19371         Module lstat.
19372         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
19373         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
19374
19375         Module timespec.
19376         * m4/timespec.m4 (gl_TIMESPEC): New macro.
19377         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
19378         * m4/st_mtim.m4: Indentation.
19379
19380         Module nanosleep.
19381         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
19382         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
19383         gl_PREREQ_NANOSLEEP.
19384
19385         Module regex.
19386         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
19387         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
19388         (gl_REGEX): New macro.
19389
19390         Module rename.
19391         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
19392         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
19393
19394         Module rmdir.
19395         * m4/rmdir.m4: New file.
19396
19397         Module utime.
19398         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
19399         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
19400         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
19401
19402         Module dirname.
19403         * m4/dirname.m4: New file.
19404
19405         Module getopt.
19406         * m4/getopt.m4: New file.
19407
19408         Module unistd-safer.
19409         * m4/unistd-safer.m4: New file.
19410
19411         Module fnmatch.
19412         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
19413         declaration.
19414         (gl_PREREQ_FNMATCH_EXTRA): New macro.
19415         (gl_FUNC_FNMATCH_POSIX): New macro.
19416         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
19417         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
19418         simply fnmatch.
19419
19420         Module exclude.
19421         * m4/exclude.m4: New file.
19422
19423         Module human.
19424         * m4/human.m4: New file.
19425
19426         Module acl.
19427         * m4/acl.m4: Nop.
19428
19429         Module backupfile.
19430         * m4/backupfile.m4: New file.
19431         * m4/d-ino.m4: Indentation.
19432
19433         Module fsusage.
19434         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
19435         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
19436         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
19437
19438         Module dirfd.
19439         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
19440         requirements.
19441
19442         Module euidaccess.
19443         * m4/euidaccess.m4: New file.
19444
19445         Module file-type.
19446         * m4/file-type.m4: New file.
19447
19448         Module fileblocks.
19449         * m4/fileblocks.m4: New file.
19450
19451         Module filemode.
19452         * m4/filemode.m4: New file.
19453
19454         Module isdir.
19455         * m4/isdir.m4: New file.
19456
19457         Module lchown.
19458         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
19459         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
19460
19461         Module makepath.
19462         * m4/makepath.m4: New file.
19463
19464         Module modechange.
19465         * m4/modechange.m4: New file.
19466
19467         Module mountlist.
19468         * m4/mountlist.m4: New file.
19469         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
19470         Indentation.
19471
19472         Module path-concat.
19473         * m4/path-concat.m4: New file.
19474
19475         Module pathmax.
19476         * m4/pathmax.m4: New file.
19477
19478         Module same.
19479         * m4/same.m4: New file.
19480
19481         Module save-cwd.
19482         * m4/save-cwd.m4: New file.
19483
19484         Module savedir.
19485         * m4/savedir.m4: New file.
19486
19487         Module xgetcwd.
19488         * m4/xgetcwd.m4: New file.
19489         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
19490
19491         Module xreadlink.
19492         * m4/xreadlink.m4: New file.
19493
19494         Module safe-read.
19495         * m4/safe-read.m4: New file.
19496
19497         Module safe-write.
19498         * m4/safe-write.m4: New file.
19499
19500         Module closeout.
19501         * m4/closeout.m4: New file.
19502
19503         Module stdio-safer.
19504         * m4/stdio-safer.m4: New file.
19505
19506         Module getpass.
19507         * m4/getpass.m4: New file.
19508
19509         Module getugroups.
19510         * m4/getugroups.m4: New file.
19511
19512         Module group-member.
19513         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
19514         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
19515
19516         Module idcache.
19517         * m4/idcache.m4: New file.
19518
19519         Module userspec.
19520         * m4/userspec.m4: New file.
19521
19522         Module gettime.
19523         * m4/clock_time.m4: New file.
19524         * m4/gettime.m4: New file.
19525
19526         Module settime.
19527         * m4/settime.m4: New file.
19528
19529         Module posixtm.
19530         * m4/posixtm.m4: New file.
19531
19532         Module gethostname.
19533         * m4/gethostname.m4: New file.
19534
19535         Module canon-host.
19536         * m4/canon-host.m4: New file.
19537
19538         Module gettext.
19539         * m4/codeset.m4: New file, from gettext-0.11.5.
19540         * m4/gettext.m4: New file, from gettext-0.11.5.
19541         * m4/glibc21.m4: New file, from gettext-0.11.5.
19542         * m4/iconv.m4: New file, from gettext-0.11.5.
19543         * m4/intdiv0.m4: New file, from gettext-0.11.5.
19544         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
19545         * m4/inttypes.m4: New file, from gettext-0.11.5.
19546         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
19547         * m4/isc-posix.m4: New file, from gettext-0.11.5.
19548         * m4/lcmessage.m4: New file, from gettext-0.11.5.
19549         * m4/lib-ld.m4: New file, from gettext-0.11.5.
19550         * m4/lib-link.m4: New file, from gettext-0.11.5.
19551         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
19552         * m4/progtest.m4: New file, from gettext-0.11.5.
19553         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
19554         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
19555         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
19556
19557         Module localcharset.
19558         * m4/localcharset.m4: New file.
19559
19560         Module hard-locale.
19561         * m4/hard-locale.m4: New file.
19562
19563         Module mbswidth.
19564         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
19565         onceonly macros.
19566         * m4/mbrtowc.m4: Add comment.
19567
19568         Module memcasecmp.
19569         * m4/memcasecmp.m4: New file.
19570
19571         Module memcoll.
19572         * m4/memcoll.m4: New file.
19573
19574         Module unicodeio.
19575         * m4/unicodeio.m4: New file.
19576
19577         Module rpmatch.
19578         * m4/rpmatch.m4: New file.
19579
19580         Module yesno.
19581         * m4/yesno.m4: New file.
19582
19583         Module exitfail.
19584         * m4/exitfail.m4: New file.
19585
19586         Module c-stack.
19587         * m4/c-stack.m4 (gl_C_STACK): New macro.
19588         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
19589
19590         Module error.
19591         * m4/error.m4 (gl_ERROR): New macro.
19592         (jm_PREREQ_ERROR): Use onceonly macros.
19593
19594         Module fatal.
19595         * m4/fatal.m4: New file.
19596
19597         Module getloadavg.
19598         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
19599         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
19600
19601         Module getpagesize.
19602         * m4/getpagesize.m4: New file.
19603
19604         Module getusershell.
19605         * m4/getusershell.m4: New file.
19606
19607         Module physmem.
19608         * m4/physmem.m4: New file.
19609
19610         Module posixver.
19611         * m4/posixver.m4: New file.
19612
19613         Module quotearg.
19614         * m4/quotearg.m4: New file.
19615
19616         Module quote.
19617         * m4/quote.m4: New file.
19618
19619         Module readutmp.
19620         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
19621
19622         Module sig2str.
19623         * m4/sig2str.m4: New file.
19624
19625         Other.
19626         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
19627         ulonglong.m4.
19628         * m4/intmax_t.m4: New file.
19629         * m4/d-type.m4: Indentation.
19630         * m4/jm-macros.m4: Update.
19631         * m4/prereq.m4 (jm_PREREQ): Update.
19632         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
19633         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
19634         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
19635         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
19636         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
19637         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
19638         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
19639         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
19640         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
19641         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
19642         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
19643         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
19644         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
19645         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
19646         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
19647         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
19648         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
19649         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
19650         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
19651
19652 2002-12-24  Bruno Haible  <bruno@clisp.org>
19653
19654         * MODULES.txt: Update according to m4/ changes.
19655
19656         Module gettext.
19657         * config.rpath: New file, from gettext-0.11.5.
19658
19659         * modules/*: New module descriptions.
19660         * gnulib-tool: New file.
19661         * MODULES.html.sh: New file.
19662
19663 2002-12-21  Karl Berry  <karl@gnu.org>
19664
19665         * doc/fdl.texi: update to version 1.2.
19666
19667 2002-12-19  Karl Berry  <karl@gnu.org>
19668
19669         * config/config.guess: update from prep.
19670
19671 2002-12-18  Bruno Haible  <bruno@clisp.org>
19672
19673         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
19674         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
19675
19676 2002-12-17  Bruno Haible  <bruno@clisp.org>
19677
19678         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
19679         stdlib.h, string.h.
19680
19681 2002-12-17  Bruno Haible  <bruno@clisp.org>
19682
19683         * lib/canon-host.c (strdup): Remove unused declaration.
19684
19685         * lib/fsusage.c: Include full_read.h.
19686         (get_fs_usage): Use full_read instead of safe_read.
19687
19688         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
19689
19690 2002-12-12  Karl Berry  <karl@gnu.org>
19691
19692         * config/config.guess: update from prep.
19693
19694 2002-12-11  Bruno Haible  <bruno@clisp.org>
19695
19696         * m4/setenv.m4: New file, from gettext-0.11.5.
19697
19698 2002-12-11  Bruno Haible  <bruno@clisp.org>
19699
19700         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
19701         not unsetenv().
19702         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
19703         modifications:
19704
19705         2002-12-11  Bruno Haible  <bruno@clisp.org>
19706
19707                 * setenv.c (alloca): Fall back to malloc.
19708                 (freea): New macro.
19709                 (setenv): Use freea() to free memory allocated with alloca().
19710
19711         2002-11-13  Bruno Haible  <bruno@clisp.org>
19712
19713                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
19714                 function declarations.
19715                 * unsetenv.c (unsetenv): Likewise.
19716
19717         2002-03-04  Bruno Haible  <bruno@clisp.org>
19718
19719                 Portability to AIX 4.3.3.
19720                 * unsetenv.c: New file, extracted from setenv.c.
19721                 * setenv.c: Move the unsetenv() function to unsetenv.c.
19722
19723         2001-12-20  Bruno Haible  <bruno@clisp.org>
19724
19725                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
19726                 use malloc instead. For SunOS 4.
19727
19728         2001-12-11  Bruno Haible  <bruno@clisp.org>
19729
19730                 * setenv.c: Declare alloca.
19731                 (compar_fn_t): New typedef.
19732                 (KNOWN_VALUE, STORE_VALUE): Use it.
19733
19734         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
19735         setenv.h.
19736
19737 2002-12-10  Paul Eggert  <eggert@twinsun.com>
19738
19739         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
19740         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
19741         Choose values that are less likely to collide with system fnmatch
19742         options.
19743         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
19744         defined (e.g., a pure POSIX system).
19745         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
19746         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
19747
19748 2002-12-06  Paul Eggert  <eggert@twinsun.com>
19749
19750         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
19751         a pain in practice to deal with generated m4 files.  This change
19752         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
19753
19754         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
19755         and jm-glibc-io.m4, as they are no longer a special case.
19756         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
19757         kludge and the auto-generation stuff.  Check only whether the
19758         functions are declared, not whether they exist, since older hosts
19759         that don't declare the functions can't use the optimization anyway.
19760
19761 2002-12-06  Jim Meyering  <jim@meyering.net>
19762
19763         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
19764
19765         Merge in changes from libc's misc/error.c, in preparation
19766         for the merge of gnulib's changes back into libc.
19767
19768         * lib/error.c (_): Define only if not already defined.
19769         Move definition to follow all #include directives.
19770         Include unlocked-io.h only if !_LIBC.
19771         [_LIBC]: Include <libio/libioP.h>.
19772         [USE_IN_LIBIO]: Include <libio/iolibio.h>
19773         (fflush): Tweak definition to use INTUSE.
19774         (putc): Define.
19775
19776 2002-12-05  Paul Eggert  <eggert@twinsun.com>
19777
19778         * lib/alloca.c [defined emacs]: Include "lisp.h".
19779         (xalloc_die) [defined emacs]: New macro.
19780         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
19781         [! defined emacs]: Include <xalloc.h>.
19782         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
19783         (pointer): Typedef to POINTER_TYPE *.
19784         (malloc): Remove decl; we now always use xmalloc.
19785         (alloca): Use old-style definition, since Emacs needs this.
19786         Check for arithmetic overflow when computing combined size.
19787
19788 2002-12-04  Paul Eggert  <eggert@twinsun.com>
19789
19790         Do not generate unlocked-io.h automatically, since it's easier to
19791         maintain it by hand.
19792
19793         * lib/unlocked-io.h: New file, from GNU diffutils,
19794         but with proper copyright notice and attribution.
19795         * lib/gen-uio: Remove.
19796         * lib/Makefile.am: Add copyright notice.
19797         (libfetish_a_SOURCES): Add unlocked-io.h.
19798         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
19799         (DISTCLEANFILES, io_functions): Remove macros.
19800         (EXTRA_DIST): Remove gen_uio.
19801         (unlocked-io.h): Remove rule.
19802
19803 2002-12-04  Jim Meyering  <jim@meyering.net>
19804
19805         Reflect the fact that stat.c and lstat.c are no longer generated.
19806         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
19807         (DISTCLEANFILES): Likewise.
19808         (EXTRA_DIST): Likewise.
19809         (all_local): Don't depend on stat.c or lstat.c.
19810         (stat.c, lstat.c): Remove rules.
19811         (EXTRA_DIST): Remove xstat.in.
19812
19813         * lib/xstat.in: Remove file.  Contents moved into stat.c.
19814         * lib/stat.c: New file.  Contents mostly from xstat.in.
19815         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
19816         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
19817
19818         * lib/safe-read.c: Rework so that it may serve to define safe_write,
19819         too.
19820         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
19821
19822 2002-12-03  Jim Meyering  <jim@meyering.net>
19823
19824         * lib/safe-read.c, safe-write.c: Change variable names and comments,
19825         but not semantics, to minimize the differences between these two files.
19826         (safe_read): Change comment to mention SAFE_READ_ERROR.
19827
19828         * lib/safe-read.c (IS_EINTR): Define.
19829         (safe_read): Use IS_EINTR in place of in-function cpp directives.
19830
19831 2002-12-02  Jim Meyering  <jim@meyering.net>
19832
19833         * lib/safe-read.c (EINTR): Define.
19834         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
19835         (INT_MAX): Provide fallback.
19836         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
19837
19838         * lib/safe-read.h (SAFE_READ_ERROR): Define.
19839
19840 2002-12-02  Bruno Haible  <bruno@clisp.org>
19841
19842         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
19843         Define, taken from safe-read.c.
19844         (INT_MAX): Provide fallback.
19845         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
19846         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
19847
19848         * lib/safe-read.c (EINTR): Remove definition.
19849         (safe_read): Don't use EINTR if it is absent.
19850
19851 2002-12-01  Jim Meyering  <jim@meyering.net>
19852
19853         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
19854         zero.
19855         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
19856
19857 2002-11-27  Paul Eggert  <eggert@twinsun.com>
19858
19859         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
19860         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
19861         with `if (! (value < limit)) abort ();', for readability.
19862
19863 2002-11-26  Karl Berry  <karl@gnu.org>
19864
19865         * lib/strdup.c: copy from libc again, with jim's ok.
19866         * lib/.cppi-disable: re-add strdup.c
19867
19868 2002-11-25  Karl Berry  <karl@gnu.org>
19869
19870         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
19871         instead of "strtol.c".
19872
19873 2002-11-25  Karl Berry  <karl@gnu.org>
19874
19875         * config/install-sh: update from automake for variable quoting, $0 in
19876         error msgs, etc.
19877
19878         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
19879         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
19880         entry.
19881
19882 2002-11-25  Jim Meyering  <jim@meyering.net>
19883
19884         * lib/mktime.c: Sync from libc, now that it has the latest fix.
19885
19886 2002-11-24  Karl Berry  <karl@gnu.org>
19887
19888         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
19889         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
19890
19891 2002-11-24  Jim Meyering  <jim@meyering.net>
19892
19893         Update from coreutils:
19894
19895         * lib/mktime.c: Merge in changes from libc.
19896
19897         Avoid a link-time failure on some Linux systems.
19898         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
19899         (otherwise).
19900         (__mon_yday): Declare with the STATIC attribute.
19901         (__mktime_internal): Likewise.
19902         Based on a report from Greg Schafer.
19903
19904 2002-11-23  Jim Meyering  <jim@meyering.net>
19905
19906         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
19907         Use `unsigned', not `int', as type of index.
19908
19909         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
19910
19911         * lib/fsusage.c: Remove unneeded parentheses around operands of
19912         `defined'.
19913
19914 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19915
19916         * lib/quotearg.h: Allow multiple inclusion by surrounding with
19917         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
19918         so that we can be included first.
19919         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
19920         * lib/quotearg.c: Include quotearg.h immediately after config.h.
19921         No need to include stddef.h or sys/types.h any more.
19922         Surround local include files with "", not "<>".
19923         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
19924         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
19925         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
19926         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19927         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19928         (ISPRINT): Remove; no longer needed now that we assume C89.
19929
19930         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
19931         Preserve errno.
19932
19933         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
19934         quotearg_char): Use SIZE_MAX rather than
19935         (size_t) -1 when we are talking about "infinity".
19936
19937         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
19938
19939 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19940
19941         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
19942         hint that one should use `if (! x) abort ();' rather than `assert
19943         (x);', and anyway it's one less thing to worry about configuring.
19944         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
19945         hash_rehash, hash_insert): Use abort rather than assert.
19946
19947 2002-11-22  Bruno Haible  <bruno@clisp.org>
19948
19949         * lib/safe-read.h: Assume C89. Add comments.
19950         (safe_read): Change return type to size_t.
19951         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
19952         byte counts > SSIZE_MAX correctly.
19953         * lib/safe-write.h: New file.
19954         * lib/safe-write.c: New file.
19955         * lib/full-read.h: New file.
19956         * lib/full-read.c: New file.
19957         * lib/full-write.h: Assume C89. Add comments.
19958         * lib/full-write.c: Include safe-write.h.
19959         (full_write): Rewritten to use safe_write.
19960         Suggested by Jim Meyering and Paul Eggert.
19961
19962 2002-11-21  Jim Meyering  <jim@meyering.net>
19963
19964         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
19965
19966         Merge in changes from the coreutils.
19967
19968         2002-09-25  Paul Eggert  <eggert@twinsun.com>
19969         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
19970         <stdint.h>.
19971         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
19972         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
19973         int.  Work more efficiently if X is the same width as uintmax_t.
19974         Do not compare X to -1, to avoid bogus compiler warning.
19975         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
19976         Don't assume that f_frsize and f_bsize are the same type.
19977
19978         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
19979         warning on FreeBSD.
19980
19981         * lib/makepath.c (make_path): Restore umask *before* creating the final
19982         component.
19983         (make_path): Minor reformatting.
19984
19985         * lib/xmalloc.c: Adjust to work with new autoconf macros,
19986         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
19987         HAVE_MALLOC/HAVE_REALLOC.
19988
19989         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
19990         dummy ones.  At least on GNU/Linux systems, `auto' means something
19991         else.
19992         From Michael Stone.
19993
19994 2002-11-21  Bruno Haible  <bruno@clisp.org>
19995
19996         Remove case insensitive option matching.
19997         * lib/argmatch.h (argcasematch): Remove declaration.
19998         (ARGCASEMATCH): Remove macro.
19999         (__xargmatch_internal): Remove case_sensitive argument.
20000         (XARGMATCH): Update.
20001         (XARGCASEMATCH): Remove macro.
20002         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
20003         case_sensitive argument.
20004         (argcasematch): Remove function.
20005         (__xargmatch_internal): Remove case_sensitive argument.
20006         (main): Use XARGMATCH instead of XARGCASEMATCH.
20007
20008         * lib/xmalloc.c: Change compile-time error message. Add comment about
20009         required autoconf version.
20010
20011 2002-11-20  Paul Eggert  <eggert@twinsun.com>
20012
20013         Merge argmatch cleanups from Bison.  Assume C89.
20014
20015         * lib/argmatch.c: Include config.h here, not in argmatch.h.
20016         Include stdlib.h, for EXIT_FAILURE.
20017         Always include <string.h>, since we assume C89.
20018         (EXIT_FAILURE): Remove pre-C89 bug workaround.
20019         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
20020         Include <stddef.h> instead, since it's all we need for size_t.
20021         (PARAMS): Remove.  All uses removed.
20022         (ARRAY_CARDINALITY): Do not bother to #undef.
20023         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
20024         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20025         Remove unnecessary parentheses.
20026         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20027         Insert necessary parentheses.
20028         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
20029         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
20030
20031 2002-11-19  Bruno Haible  <bruno@clisp.org>
20032
20033         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
20034         * lib/mbswidth.h: Include <stddef.h>, for size_t.
20035
20036         * lib/mbswidth.h (PARAMS): Remove macro.
20037         (mbswidth, mbsnwidth): Use ANSI C function declarations.
20038         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
20039
20040         * lib/gcd.h (PARAMS): Remove macro.
20041         (gcd): Use ANSI C function declarations.
20042         * lib/gcd.c (gcd): Likewise.
20043
20044 2002-11-15  Bruno Haible  <bruno@clisp.org>
20045
20046         * lib/strcspn.c: Include <stddef.h>.
20047         (strcspn): Use ANSI C function declaration. Change return type to
20048         size_t. Use NULL.
20049         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
20050         (strpbrk): Use NULL.
20051         * lib/strpbrk.h (PARAMS): Remove macro.
20052         (strpbrk): Use ANSI C function declaration.
20053         * lib/strstr.c: Don't include <sys/types.h>.
20054         * lib/strstr.h (PARAMS): Remove macro.
20055         (strstr): Use ANSI C function declarations.
20056
20057 2002-11-14  Karl Berry  <karl@gnu.org>
20058
20059         * config/mkinstalldirs: `do' on separate line, instead of
20060         `for var; do'.
20061
20062 2002-11-06  Bruno Haible  <bruno@clisp.org>
20063
20064         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
20065         * lib/gcd.c (gcd): Likewise.
20066
20067 2002-11-05  Bruno Haible  <bruno@clisp.org>
20068
20069         * lib/gcd.h: New file, from gettext-0.11.5.
20070         * lib/gcd.c: New file, from gettext-0.11.5.
20071
20072 2002-11-05  Bruno Haible  <bruno@clisp.org>
20073
20074         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20075         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20076         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20077         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20078
20079         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
20080         <libintl.h>.
20081         * lib/makepath.c: Include gettext.h instead of <locale.h> and
20082         <libintl.h>.
20083
20084         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
20085         * lib/human.c: Include gettext.h instead of <libintl.h>.
20086         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
20087         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
20088         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
20089         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
20090         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
20091         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
20092         (textdomain): Remove definition.
20093         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
20094
20095         * lib/long-options.c: Remove include of <libintl.h> and definition of
20096         _.
20097         * lib/same.c: Remove include of <libintl.h> and definition of _.
20098
20099 2002-11-04  Owen Taylor  <otaylor@redhat.com>
20100
20101         * lib/config.charset: A few additions for Solaris.
20102
20103 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20104
20105         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
20106         * lib/localcharset.c (locale_charset): Declare as extern "C".
20107
20108 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20109
20110         * lib/config.charset: msdos in uk_UA uses CP1125.
20111
20112 2002-11-04  Bruno Haible  <bruno@clisp.org>
20113
20114         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
20115         * lib/strcase.h: New file, from GNU gettext-0.11.5.
20116         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
20117         * lib/strstr.h: New file, from GNU gettext-0.11.5.
20118         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
20119
20120 2002-11-04  Bruno Haible  <bruno@clisp.org>
20121
20122         * lib/localcharset.c (locale_charset): Don't return an empty string.
20123
20124 2002-11-04  Bruno Haible  <bruno@clisp.org>
20125
20126         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
20127         aliases.
20128
20129 2002-11-04  Bruno Haible  <bruno@clisp.org>
20130
20131         * lib/config.charset: Update for newest glibc. Add canonical names
20132         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
20133
20134 2002-11-04  Bruno Haible  <bruno@clisp.org>
20135
20136         * lib/config.charset: Add support for NetBSD.
20137
20138 2002-11-04  Bruno Haible  <bruno@clisp.org>
20139
20140         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
20141
20142 2002-11-01  Bruno Haible  <bruno@clisp.org>
20143
20144         * configure.in: Add AC_CONFIG_AUX_DIR call.
20145         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
20146         test/Makefile.
20147         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
20148
20149 2002-09-28  Karl Berry  <karl@gnu.org>
20150
20151         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
20152         installed automake until the next release, since changes have been
20153         made.
20154
20155 2002-09-25  Karl Berry  <karl@gnu.org>
20156
20157         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
20158         * lib/getopt*: copy from libc/posix.
20159         * lib/gettext.h: copy from gettext.
20160         * lib/.cppi-disable: add strdup.c, gettext.h.
20161
20162 2002-09-25  Karl Berry  <karl@gnu.org>
20163
20164         * config/srclist.txt: enable gettext.h check.
20165         * config/config.{guess,sub}: update from prep.
20166         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
20167                 from automake 1.6.3.
20168         See srclist*.
20169
20170 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
20171
20172         * regex.c (PATFETCH): Remove the translating fetch.
20173         (PATFETCH_RAW): Rename to PATFETCH.
20174         (set_image_of_range): New fun.
20175         (SET_RANGE_TABLE_WORK_AREA): Use it.
20176         (regex_compile): Don't translate the pattern chars so eagerly.
20177         Only do it when inserting an `exactn' bytecode or when handling
20178         a char-range.
20179         (mutually_exclusive_p): Avoid empty statement.
20180
20181 2002-07-06  Jim Meyering  <meyering@lucent.com>
20182
20183         * m4/README: Don't mention Makefile.am.in.
20184         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
20185
20186 2002-07-01  Jim Meyering  <meyering@lucent.com>
20187
20188         * lib/c-stack.c: Include sys/time.h.
20189         From Volker Borchert.
20190
20191 2002-06-26  Paul Eggert  <eggert@twinsun.com>
20192
20193         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
20194
20195 2002-06-26  Paul Eggert  <eggert@twinsun.com>
20196
20197         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
20198         New macro.  Use it uniformly instead of
20199         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
20200         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
20201         reported by Vin Shelton.
20202
20203 2002-06-22  Paul Eggert  <eggert@twinsun.com>
20204
20205         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
20206         Do not assume SA_SIGINFO behavior.
20207         Bug reported by Jim Meyering on NetBSD 1.5.2.
20208
20209 2002-06-22  Jim Meyering  <meyering@lucent.com>
20210
20211         * m4/c-stack.m4: New file, from diffutils-2.8.2.
20212         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
20213
20214         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
20215         now that configure.ac uses AC_GNU_SOURCE.
20216         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
20217         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
20218
20219         Update to latest tools.  Suggestions from Paul Eggert.
20220         * m4/stdbool.m4: New file, from diffutils-2.8.2.
20221         * m4/gnu-source.m4: Update from diffutils-2.8.2.
20222         * m4/fnmatch.m4: Likewise.
20223         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
20224         to AC_HEADER_STDBOOL
20225
20226 2002-06-22  Jim Meyering  <meyering@lucent.com>
20227
20228         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
20229         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
20230
20231 2002-06-22  Jim Meyering  <meyering@lucent.com>
20232
20233         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
20234
20235         * lib/exitfail.c, exitfail.h: Likewise.
20236         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
20237
20238         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
20239         of fnmatch.h.
20240         (EXTRA_DIST): Add fnmatch_loop.c.
20241         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
20242
20243         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
20244         * lib/fnmatch.c: Update from diffutils-2.8.2.
20245         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
20246         * lib/fnmatch.h: Remove file.
20247
20248 2002-06-21  Jim Meyering  <meyering@lucent.com>
20249
20250         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
20251         * m4/mbrtowc.m4: Likewise.
20252
20253         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
20254         * m4/mbswidth.m4: Reflect name change:
20255         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
20256         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
20257
20258         * m4/lib-link.m4: Update from gettext-0.11.2.
20259         * m4/gettext.m4: Likewise.
20260
20261         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
20262         From Alfred M. Szmidt.
20263
20264 2002-06-18  Paul Eggert  <eggert@twinsun.com>
20265
20266         * lib/file-type.h: Report an error if neither S_ISREG nor
20267         S_IFREG is defined, instead of using a test specific to glibc
20268         2.2.  This should be safe, since POSIX requires S_ISREG and
20269         Unix Version 7 had S_IFREG.  We don't need to check for
20270         <sys/types.h> since we don't use any symbols that it defines.
20271
20272 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
20273
20274         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
20275         $@-t, so that each temporary file name is unique and valid in the first
20276         8 characters, for operation under DOS.
20277
20278 2002-06-15  Paul Eggert  <eggert@twinsun.com>
20279
20280         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
20281
20282 2002-06-15  Jim Meyering  <meyering@lucent.com>
20283
20284         Work even with DJGPP 2.03, which lacks support for symlinks.
20285         From Richard Dawe.
20286         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
20287         is defined.
20288         * lib/lchown.c (S_ISLNK): Likewise.
20289
20290 2002-06-15  Jim Meyering  <meyering@lucent.com>
20291
20292         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
20293         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
20294         have been included before this file.
20295
20296 2002-06-14  Jim Meyering  <meyering@lucent.com>
20297
20298         * lib/file-type.h: Use the version from diffutils-2.8.2.
20299         * lib/file-type.c: Likewise.
20300
20301 2002-06-07  Jim Meyering  <meyering@lucent.com>
20302
20303         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
20304         They're needed at least for NetBSD 1.5.2.
20305         ($statxfs_includes): Include those same headers.
20306         ($statxfs_includes): Include sys/vfs.h if available.
20307         ($statxfs_includes): Likewise for sys/statvfs.h.
20308         Check for the following members in both structs statfs and statvfs:
20309         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
20310
20311 2002-06-01  Jim Meyering  <meyering@lucent.com>
20312
20313         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
20314         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
20315
20316 2002-05-28  Jim Meyering  <meyering@lucent.com>
20317
20318         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
20319         Reported by Volker Borchert.
20320
20321 2002-05-27  Jim Meyering  <meyering@lucent.com>
20322
20323         Fix a problem seen only on nonconforming systems whereby ls.c's
20324         use of localtime, and then of gettimeofday would cause trouble:
20325         the localtime call used to initialize rpl_gettimeofday's save
20326         mechanism would clobber ls's current local time information so
20327         that in any long listing the first file would always be listed
20328         with date 1970-01-01.  Analysis by Volker Borchert.
20329
20330         * lib/gettimeofday.c (localtime): Undefine.
20331         (rpl_localtime): New function.
20332
20333 2002-05-27  Jim Meyering  <meyering@lucent.com>
20334
20335         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
20336         localtime.
20337
20338         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
20339         use the replacement function; it wouldn't resolve at link time.
20340         Reported by Volker Borchert.
20341
20342 2002-05-22  Jim Meyering  <meyering@lucent.com>
20343
20344         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
20345         file-type.h.
20346         * lib/file-type.h: New file.
20347         * lib/file-type.c (file_type): New file/function.  Extracted from
20348         diffutils.
20349
20350 2002-04-30  Jim Meyering  <meyering@lucent.com>
20351
20352         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
20353
20354 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20355
20356         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
20357
20358 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20359
20360         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
20361         Do not check for alloca.h (no longer used) or stdbool.h (was never
20362         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
20363
20364 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20365
20366         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
20367
20368 2002-04-29  Jim Meyering  <meyering@lucent.com>
20369
20370         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
20371         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
20372         Use AC_FUNC_STRNLEN here instead.
20373
20374         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
20375         With autoconf-2.53a, it's part of AC_PROG_CC.
20376
20377 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20378
20379         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
20380         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
20381
20382 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20383
20384         * lib/sig2str.h, lib/sig2str.c: New files.
20385         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
20386
20387 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20388
20389         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
20390         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
20391         of 127, since 64 is the largest conceivable number for ancient
20392         nonstandard hosts.
20393         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
20394
20395 2002-04-28  Jim Meyering  <meyering@lucent.com>
20396
20397         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
20398
20399 2002-04-24  Jim Meyering  <meyering@lucent.com>
20400
20401         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
20402         (jm_PREREQ): Use it.
20403
20404         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
20405         mach/mach.h fcntl.h.
20406         Check for this function: setlocale.
20407
20408 2002-04-24  Jim Meyering  <meyering@lucent.com>
20409
20410         * lib/gettext.h: New file, from Gettext.
20411         * lib/Makefile.am (INCLUDES): Remove -I../intl.
20412         (libfetish_a_SOURCES): Add gettext.h.
20413
20414 2002-04-16  Jim Meyering  <meyering@lucent.com>
20415
20416         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
20417         ut_pid, ut_id, ut_exit.
20418
20419 2002-04-16  Jim Meyering  <meyering@lucent.com>
20420
20421         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
20422         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
20423         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
20424
20425 2002-04-12  Jim Meyering  <meyering@lucent.com>
20426
20427         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
20428         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
20429         existence of the getmntinfo function.  Needed for Darwin 5.3.
20430
20431         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
20432         This is necessary at least on Darwin 5.3.
20433
20434         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
20435         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
20436         strnlen.o in the library, and that makes some versions of ranlib
20437         object.
20438
20439 2002-04-12  Jim Meyering  <meyering@lucent.com>
20440
20441         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
20442
20443 2002-04-09  Jim Meyering  <meyering@lucent.com>
20444
20445         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
20446         to be more precise.  Rather than saying we're checking whether the
20447         function `works', say what we're testing.
20448         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
20449         Reported by Bruno Haible.
20450
20451 2002-03-10  Jim Meyering  <meyering@lucent.com>
20452
20453         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
20454         Suggestion from Santiago Vila.
20455
20456 2002-03-08  Jim Meyering  <meyering@lucent.com>
20457
20458         * lib/rename.c: Mention that this wrapper is needed also on
20459         mips-dec-ultrix4.4 systems.
20460
20461 2002-03-02  Jim Meyering  <meyering@lucent.com>
20462
20463         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
20464         not HAVE_CLOCK_SETTIME.
20465
20466 2002-02-27  Paul Eggert  <eggert@twinsun.com>
20467
20468         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
20469         Check for clock_settime.
20470
20471 2002-02-27  Paul Eggert  <eggert@twinsun.com>
20472
20473         * lib/nanosleep.h: Rename to....
20474         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
20475
20476         * lib/gettime.c: New file.
20477         * lib/settime.c: New file.
20478         * lib/stime.c: Remove.
20479
20480         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
20481         timespec.h.  Remove nanosleep.h.
20482
20483 2002-02-25  Paul Eggert  <eggert@twinsun.com>
20484
20485         * m4/acl.m4: New file.
20486         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
20487         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
20488
20489 2002-02-25  Paul Eggert  <eggert@twinsun.com>
20490
20491         * lib/acl.c, lib/acl.h: New files.
20492         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
20493
20494 2002-02-24  Jim Meyering  <meyering@lucent.com>
20495
20496         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
20497         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
20498         cause trouble.  Reported by Nelson Beebe.
20499
20500 2002-02-23  Paul Eggert  <eggert@twinsun.com>
20501
20502         * lib/path-concat.c (xpath_concat): Reorder code to pacify
20503         compilers that don't know that xalloc_die never returns.
20504
20505 2002-02-20  Jim Meyering  <meyering@lucent.com>
20506
20507         * lib/getdate.c: Regenerate using bison-1.33.
20508
20509 2002-02-17  Jim Meyering  <meyering@lucent.com>
20510
20511         * config/config.guess (main): Don't use `head -1'; it's no longer
20512         portable. Use `sed 1q' instead.
20513
20514 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
20515
20516         * m4/codeset.m4: Upgrade to gettext-0.11.
20517         * m4/gettext.m4: Upgrade to gettext-0.11.
20518         * m4/glibc21.m4: Upgrade to gettext-0.11.
20519         * m4/iconv.m4: Upgrade to gettext-0.11.
20520         * m4/isc-posix.m4: Upgrade to gettext-0.11.
20521         * m4/lcmessage.m4: Upgrade to gettext-0.11.
20522         * m4/lib-ld.m4: New file, from gettext-0.11.
20523         * m4/lib-link.m4: New file, from gettext-0.11.
20524         * m4/lib-prefix.m4: New file, from gettext-0.11.
20525         * m4/progtest.m4: Upgrade to gettext-0.11.
20526
20527 2002-02-15  Paul Eggert  <eggert@twinsun.com>
20528
20529         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
20530         (jm_PREREQ): Use it.
20531
20532 2002-02-15  Paul Eggert  <eggert@twinsun.com>
20533
20534         * lib/posixver.c, lib/posixver.h: New files.
20535         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
20536
20537 2002-02-02  Paul Eggert  <eggert@twinsun.com>
20538             Bruno Haible  <bruno@clisp.org>
20539
20540         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
20541         (fwrite_success_callback): New declaration.
20542         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
20543         print_unicode_char. Call failure callback instead of error.
20544         (fwrite_success_callback): New function.
20545         (exit_failure_callback): New function.
20546         (fallback_failure_callback): New function.
20547         (print_unicode_char): Call unicode_to_mb.
20548
20549 2002-01-26  Jim Meyering  <meyering@lucent.com>
20550
20551         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
20552         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
20553
20554 2002-01-26  Jim Meyering  <meyering@lucent.com>
20555
20556         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
20557
20558 2002-01-22  Paul Eggert  <eggert@twinsun.com>
20559
20560         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
20561
20562 2002-01-22  Jim Meyering  <meyering@lucent.com>
20563
20564         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
20565         Otherwise, some versions of automake would omit the rule that makes
20566         Makefile from Makefile.in.
20567
20568 2002-01-21  Paul Eggert  <eggert@twinsun.com>
20569
20570         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
20571         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
20572         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
20573         (memcoll): Set errno to zero if there is no error.
20574
20575         * lib/quotearg.c (quotearg_buffer_restyled):
20576         Fix bug with quoting buffers containing NUL when backslashing escapes.
20577         This bug was exposed by the other changes in this patch.
20578         (quotearg_n_options): New arg ARGSIZE.
20579         All callers changed.
20580         (quoting_options_from_style): New function.
20581         (quotearg_n_style): Use it.
20582         (quotearg_n_style_mem): New function.
20583
20584         * lib/quotearg.h (quotearg_n_style_mem): New function.
20585
20586 2002-01-19  Jim Meyering  <meyering@lucent.com>
20587
20588         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
20589         Remove useless quotes: DF_PROG="df".
20590         * m4/strnlen.m4: New file.
20591
20592 2002-01-16  Paul Eggert  <eggert@twinsun.com>
20593
20594         * lib/backupfile.c (ISDIGIT): Comment fix.
20595         * lib/getdate.y (ISDIGIT): Likewise.
20596         * lib/posixtm.c (ISDIGIT, year): Likewise.
20597         * lib/strverscmp.c (ISDIGIT): Likewise.
20598         * lib/userspec.c (ISDIGIT): Likewise.
20599
20600 2002-01-16  Jim Meyering  <meyering@lucent.com>
20601
20602         * lib/getdate.y: Add three semicolons, each just before a closing
20603         brace. Bison (as of version 1.31) no longer papers over that mistake.
20604
20605 2002-01-05  Jim Meyering  <meyering@lucent.com>
20606
20607         * lib/version-etc.c (version_etc_copyright): Update copyright year.
20608
20609 2001-12-19  Paul Eggert  <eggert@twinsun.com>
20610
20611         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
20612         not silently exit merely because the output buffer happens to
20613         have nothing pending.
20614
20615 2001-12-18  Paul Eggert  <eggert@twinsun.com>
20616
20617         See the big note in ../ChangeLog.
20618         * lib/human.c (suffixes): Prefer K to k for 1024.
20619         (generate_suffix_backwards): New function.
20620         (human_readable_inexact): Use it.
20621         * lib/xstrtol.c (__xstrtol): If there is no number but there
20622         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
20623         Accept 'K' as well as 'k'.
20624
20625 2001-12-15  Jim Meyering  <meyering@lucent.com>
20626
20627         * lib/regex.h (__restrict_arr): Update from libc.
20628
20629         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
20630         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
20631         (STREQ): Define.
20632
20633 2001-12-14  Jim Meyering  <meyering@lucent.com>
20634
20635         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
20636         Suggestion from Bruno Haible.
20637
20638 2001-12-10  Jim Meyering  <meyering@lucent.com>
20639
20640         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
20641         xrealloc, Instead, include "xalloc.h".
20642         (initbuffer): Don't cast xmalloc return value to char*.
20643         (readline): Reword comment.
20644         Don't cast xrealloc return value to char*
20645         Return NULL, not 0.
20646
20647 2001-12-09  Jim Meyering  <meyering@lucent.com>
20648
20649         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
20650         about `signed and unsigned type in conditional expression'.
20651         * lib/posixtm.c (posix_time_parse): Likewise.
20652
20653         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
20654
20655         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
20656         to avoid a pedantic warning.
20657
20658         * lib/getstr.c: Don't include assert.h.
20659         (getstr): Remove warning-evoking assertions.
20660         Return -1 if offset parameter is out of bounds.
20661         Change the type of a local from int to size_t.
20662
20663         * lib/strftime.c (my_strftime_localtime_r): Include this function
20664         definition in the `#if ! HAVE_TM_GMTOFF' block.
20665
20666         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
20667         Include xalloc.h instead.
20668
20669 2001-12-02  Jim Meyering  <meyering@lucent.com>
20670
20671         * lib/tempname.c: Don't declare getenv, thus reverting the change of
20672         2001-11-18.  It's no longer necessary, now that stdlib.h is always
20673         included.
20674
20675         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
20676         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
20677
20678 2001-11-30  Akim Demaille  <akim@epita.fr>
20679
20680         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
20681         before being defined.
20682
20683 2001-11-27  Paul Eggert  <eggert@twinsun.com>
20684
20685         * lib/quotearg.h (quotearg_n, quotearg_n_style):
20686         First arg is int, not unsigned.
20687         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20688         (SIZE_MAX, UINT_MAX): New macros.
20689         (quotearg_n_options): Abort if N is negative.
20690         Avoid overflow check on hosts where size_t is 64 bits and int
20691         is 32 bits, as overflow is impossible there.
20692         Fix off-by-one typo that caused unnecessary reallocation.
20693
20694 2001-11-27  Jim Meyering  <meyering@lucent.com>
20695
20696         * lib/tempname.c: Merge with version from libc.
20697         * lib/regex.c: Likewise.
20698
20699         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
20700         systems for which STDC_HEADERS is 0, it was not included, resulting in
20701         a warning about an integer-to-pointer conversion problem with getenv.
20702         Reported by Volker Borchert.
20703
20704 2001-11-26  Jim Meyering  <meyering@lucent.com>
20705
20706         * lib/gtod.h: Remove file.
20707         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
20708         * lib/gettimeofday.c: Don't include gtod.h.
20709         (GTOD_init): Remove function.
20710         (rpl_gettimeofday): Do its job here instead, rather than aborting.
20711         Suggestion from Volker Borchert.
20712
20713 2001-11-23  Jim Meyering  <meyering@lucent.com>
20714
20715         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
20716         it.
20717         * lib/hash.c (struct hash_table): Define it here instead.
20718
20719 2001-11-22  Jim Meyering  <meyering@lucent.com>
20720
20721         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
20722
20723 2001-11-20  Jim Meyering  <meyering@lucent.com>
20724
20725         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
20726         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
20727
20728 2001-11-19  Jim Meyering  <meyering@lucent.com>
20729
20730         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
20731         directory.  Use "conftestXXXXXX" as the template.
20732         Suggestion from Paul Eggert.
20733
20734         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
20735         immediately, so the test doesn't mistakenly hit the max-open-files
20736         limit.
20737
20738 2001-11-18  Paul Eggert  <eggert@twinsun.com>
20739
20740         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
20741         (TEMPORARIES): New macro.
20742         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
20743         removes an artificial limitation (e.g. HP-UX 10.20, where
20744         TMP_MAX is 17576).
20745
20746 2001-11-18  Jim Meyering  <meyering@lucent.com>
20747
20748         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
20749
20750 2001-11-18  Jim Meyering  <meyering@lucent.com>
20751
20752         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
20753         on SunOS 4.
20754
20755         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
20756         files will be created before anything else.
20757
20758 2001-11-17  Paul Eggert  <eggert@twinsun.com>
20759
20760         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
20761         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
20762
20763 2001-11-17  Jim Meyering  <meyering@lucent.com>
20764
20765         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
20766         Prompted by a report from Bob Proulx.
20767
20768         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
20769         Instead, require UTILS_FUNC_MKSTEMP.
20770
20771 2001-11-17  Jim Meyering  <meyering@lucent.com>
20772
20773         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
20774         Now, that's done as part of AC_FUNC_STRTOD.
20775
20776 2001-11-17  Jim Meyering  <meyering@lucent.com>
20777
20778         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
20779         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
20780         rather than group writable.  Patch by Juan F. Codagnone.
20781
20782         * lib/readtokens.c: Remove explicit declarations of xmalloc and
20783         xrealloc, Instead, include "xalloc.h".
20784
20785         * lib/mountlist.c: Include unlocked-io.h after all system headers.
20786         Remove explicit declarations of xmalloc, xrealloc,
20787         and xstrdup.  Instead, include "xalloc.h".
20788
20789         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
20790         unlocked-io.h.
20791         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
20792         Likewise.
20793         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
20794
20795         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
20796         Reported by Padraig Brady.
20797
20798         * lib/mkstemp.c: #undef mkstemp.
20799         Include config.h.
20800         (rpl_mkstemp): Rename from mkstemp.
20801         Protoize.
20802
20803 2001-11-16  Jim Meyering  <meyering@lucent.com>
20804
20805         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
20806         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
20807         determine the amount of total physical memory, use pstat_getstatic.
20808         HPUX-11 doesn't define _SC_PHYS_PAGES.
20809         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
20810         If sysconf couldn't be used to determine the amount of available
20811         physical memory, use both pstat_getstatic and pstat_getdynamic.
20812         Based on a patch from Bob Proulx.
20813
20814 2001-11-10  Jim Meyering  <meyering@lucent.com>
20815
20816         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
20817         (jm_PREREQ): Use it.
20818
20819 2001-11-09  Jim Meyering  <meyering@lucent.com>
20820
20821         * m4/jm-macros.m4: Require autoconf-2.52f.
20822         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
20823         Use these AC_-prefixed names, not the AM_-prefixed ones.
20824
20825         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
20826
20827 2001-11-05  Jim Meyering  <meyering@lucent.com>
20828
20829         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
20830
20831 2001-11-04  Jim Meyering  <meyering@lucent.com>
20832
20833         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
20834         $DEFS.
20835
20836 2001-11-03  Jim Meyering  <meyering@lucent.com>
20837
20838         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
20839         of AC_DEFUN.
20840
20841         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
20842         know the name of the variable in the macro definition.
20843
20844 2001-11-03  Jim Meyering  <meyering@lucent.com>
20845
20846         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
20847         in argmatch_to_argument call.
20848
20849         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
20850         argument.
20851
20852         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
20853         e.g., a fault due to an attempt to free a NULL pointer.
20854
20855 2001-11-01  Jim Meyering  <meyering@lucent.com>
20856
20857         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
20858         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
20859
20860 2001-11-01  Jim Meyering  <meyering@lucent.com>
20861
20862         * lib/dirfd.c, lib/dirfd.h: New files.
20863         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
20864
20865         * lib/hash.c (hash_print) [TESTING]: Clean up.
20866
20867 2001-10-22  Paul Eggert  <eggert@twinsun.com>
20868
20869         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
20870         to avoid a warning if -Wall.
20871
20872 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
20873
20874         * README: New file
20875         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
20876         (per RMS's instructions, this is now the canonical source)
20877         * lgpl/, gpl/: New directories.
20878
20879 2001-10-21  Paul Eggert  <eggert@twinsun.com>
20880
20881         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
20882
20883 2001-10-21  Jim Meyering  <meyering@lucent.com>
20884
20885         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
20886         this code would end up calling gettext even in packages built
20887         with --disable-nls.
20888         * lib/getopt.c (_): Likewise.
20889         * lib/regex.c (_): Likewise.
20890
20891 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20892
20893         * m4/error.m4 (jm_PREREQ_ERROR):
20894         Do not invoke AC_CHECK_FUNCS with strerror_r, as
20895         AC_FUNC_STRERROR_R does that.
20896         Check for strerror declaration.
20897
20898         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
20899         are supposed to have them these days.
20900         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
20901         Merge changes from latest Autoconf CVS.
20902         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
20903         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
20904         POSIX decided to standardize on the int flavor of strerror_r.
20905
20906 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20907
20908         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
20909         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
20910         Use strerror_r that is only a macro, even if it is not a function.
20911         (strerror): Check for HAVE_DECL_STRERROR before declaring.
20912         (private_strerror): Use prototypes, not old-style function definition.
20913         (print_errno_message): New function.
20914         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
20915         char*-flavored one.
20916         (error_tail, error, error_at_line): Use it.
20917
20918 2001-10-11  Jim Meyering  <meyering@lucent.com>
20919
20920         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
20921         and quote_n (1, ... to avoid clobbering a buffer.
20922
20923 2001-10-05  Jim Meyering  <meyering@lucent.com>
20924
20925         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
20926         hash-pjw.h.
20927         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
20928         * lib/hash-pjw.h: New file.
20929
20930 2001-09-30  Jim Meyering  <meyering@lucent.com>
20931
20932         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
20933         `struct fsstat' has the `f_fstypename' member.
20934         Use that to define FS_TYPE, which is now used to make
20935         the getfsstat link test tighter.
20936
20937 2001-09-30  Jim Meyering  <meyering@lucent.com>
20938
20939         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
20940         Include <sys/ucred.h>, for Apple Darwin.
20941         Include sys/mount.h and sys/fs_types.h only if available.
20942         (FS_TYPE): Define.
20943         (read_filesystem_list): Use FS_TYPE.
20944
20945 2001-09-29  Paul Eggert  <eggert@twinsun.com>
20946
20947         * lib/exclude.c (excluded_filename): 0 -> false, since it's
20948         a boolean context.
20949
20950 2001-09-29  Jim Meyering  <meyering@lucent.com>
20951
20952         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20953         [one-argument getmntent function]): Include stdio.h before mntent.h.
20954         SunOS 4.1.x needs it for the declaration of `FILE'.
20955         Patch by Volker Borchert.
20956
20957         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20958         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
20959         sys/fs_types.h, and make the link-test for getfsstat guard #include
20960         directives with appropriate #if HAVE_*_H tests so that we can
20961         detect getfsstat on Apple Darwin1.3.7 systems.
20962         Reported by Nelson Beebe.
20963         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
20964
20965 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20966
20967         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20968         #defines strtoimax.  Also treat the other strto* functions
20969         like strtoimax.
20970
20971         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
20972         Check for strtoul and strtoumax,
20973         as those declarations are made even in the signed case.
20974         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
20975         Likewise, for strtol and strtoimax.
20976
20977 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20978
20979         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20980         #defines strtoimax.  Also treat the other strto* functions
20981         like strtoimax.
20982
20983         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
20984         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
20985         (strtoimax, strtoumax): Do not declare if already defined as a macro.
20986
20987 2001-09-26  Jim Meyering  <meyering@lucent.com>
20988
20989         Most macros in unlocked-io.h had the wrong number of arguments.
20990         * lib/gen-uio: New script.
20991         (USE_UNLOCKED_IO): Define to 1 if not already defined.
20992         * lib/unlocked-io.hin: Remove file.
20993         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
20994         rather than trying to embed it here.
20995         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
20996         Reported by Padraig Brady.
20997
20998 2001-09-25  Volker Borchert  <bt@teknon.de>
20999
21000         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
21001         `result'.
21002
21003 2001-09-24  Jim Meyering  <meyering@lucent.com>
21004
21005         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
21006
21007 2001-09-23  Jim Meyering  <meyering@lucent.com>
21008
21009         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
21010         instead of the mere test for existence of mntent.h.  The latter
21011         would get a false-positive on AIX 3.4 systems.
21012         In the outer getmntent if-block, don't die if neither of the getmntent
21013         tests succeeds.  Instead, just fall through and continue with the
21014         remaining tests.
21015
21016 2001-09-23  Jim Meyering  <meyering@lucent.com>
21017
21018         * lib/mountlist.c: Remove useless parentheses in #if directives.
21019         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
21020         the deprecated MOUNTED symbol is no longer defined in mntent.h.
21021
21022 2001-09-22  Jim Meyering  <meyering@lucent.com>
21023
21024         * m4/gettext.m4: New file.  From gettext.
21025         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
21026         * m4/progtest.m4: Likewise
21027         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
21028         * m4/glibc21.m4: Likewise.
21029
21030         * m4/libintl.m4: Remove.  No longer used.
21031
21032 2001-09-22  Jim Meyering  <meyering@lucent.com>
21033
21034         * lib/localcharset.c: Update from latest gettext.
21035         * lib/config.charset: Likewise.
21036
21037 2001-09-20  Jim Meyering  <meyering@lucent.com>
21038
21039         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
21040         strtoimax.
21041         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
21042         strtoumax.
21043
21044 2001-09-20  Jim Meyering  <meyering@lucent.com>
21045
21046         * lib/xstrtol.c (strtoimax): Guard declaration with
21047         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
21048         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
21049         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
21050         (strtoumax): Likewise, for completeness (it wasn't necessary).
21051
21052 2001-09-17  Paul Eggert  <eggert@twinsun.com>
21053
21054         * lib/strtoimax.c (HAVE_LONG_LONG):
21055         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
21056         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
21057         to work around bug in IBM C compiler.
21058
21059 2001-09-17  Jim Meyering  <meyering@lucent.com>
21060
21061         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
21062         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
21063         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
21064         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
21065         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
21066         whenever the right hand side need not be expanded by the shell.
21067
21068 2001-09-16  Paul Eggert  <eggert@twinsun.com>
21069
21070         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
21071         library.  It's not correct, as some older glibcs are buggy.
21072         fnmatch wasn't fixed until glibc 2.2.
21073
21074         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
21075         special shell magic here.
21076
21077 2001-09-16  Jim Meyering  <meyering@lucent.com>
21078
21079         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
21080         * m4/jm-macros.m4: Require it.
21081
21082 2001-09-16  Jim Meyering  <meyering@lucent.com>
21083
21084         * lib/mkdir.c: New file.
21085
21086 2001-09-15  Jim Meyering  <meyering@lucent.com>
21087
21088         * m4/jm-macros.m4: Check for help2man.
21089
21090 2001-09-11  Jim Meyering  <meyering@lucent.com>
21091
21092         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
21093         The body, by Paul Eggert, was moved here from configure.in.
21094         * m4/jm-macros.m4: Require UTILS_HOST_OS.
21095
21096 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21097
21098         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
21099         (jm_PREREQ): Use it.
21100
21101 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21102
21103         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
21104         Use ssize_t, not int, to store result of readlink.
21105         Check for ssize_t overflow as well as size_t overflow,
21106         as POSIX says the result of readlink is implementation-defined
21107         when ssize_t overflows.
21108         Remove unnecessary cast to char*.
21109         Use free+malloc instead of realloc, as the storage doesn't need
21110         to be preserved and it's clearer and can be more efficient that way.
21111         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
21112         * lib/xreadlink.h (xreadlink): Update prototype.
21113
21114 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21115
21116         * lib/xgetcwd.c: Revert some of the previous change; intead,
21117         fix the HAVE_GETCWD_NULL code to behave more like the
21118         !HAVE_GETCWD_NULL code used to.
21119
21120         Include "xalloc.h".
21121         (xgetcwd): Do not return NULL when memory is exhausted; instead,
21122         invoke xalloc_die.
21123
21124 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21125
21126         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
21127         sys/param.h, as pathmax.h includes them.
21128
21129 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21130
21131         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
21132         (jm_PREREQ_XGETCWD): New macro.
21133
21134         * m4/getcwd.m4: New file.
21135
21136 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21137
21138         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
21139         like the HAVE_GETCWD_NULL code.
21140         Include pathmax.h if not HAVE_GETCWD.
21141         Do not include xalloc.h.
21142         (INITIAL_BUFFER_SIZE): New symbol.
21143         Do not use xmalloc / xrealloc, since the caller is responsible for
21144         handling errors.  Preserve errno around `free' during failure.
21145         Do not overrun buffer when using getwd.
21146
21147 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21148
21149         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
21150         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
21151         getcwd (NULL, 0).
21152
21153 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21154
21155         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
21156         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
21157         spotted by Jim Meyering.
21158
21159 2001-09-03  Jim Meyering  <meyering@lucent.com>
21160
21161         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
21162         failure.
21163
21164 2001-09-02  Jim Meyering  <meyering@lucent.com>
21165
21166         * lib/error.c: Update from GNU libc.
21167
21168 2001-09-01  Jim Meyering  <meyering@lucent.com>
21169
21170         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
21171         Used by df.
21172
21173 2001-09-01  Jim Meyering  <meyering@lucent.com>
21174
21175         * lib/xreadlink.c: New file.
21176         * lib/xreadlink.h: New file.
21177         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
21178         xreadlink.h.
21179
21180         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
21181         doesn't conflict with sparc Solaris 7's definition in
21182         /usr/include/sys/int_types.h.
21183
21184         * lib/exclude.c: Use `""', not `<>' to #include non-system header
21185         files.
21186         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
21187         and strncasecmp as r-values.  Unixware didn't have declarations.
21188
21189 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21190
21191         * lib/xstrtol.h: Add copyright notice.
21192         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
21193         LONGINT_INVALID_SUFFIX_CHAR.
21194
21195 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21196
21197         * lib/xstrtol.c (strtoimax): New decl.
21198
21199 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21200
21201         * lib/xgetcwd.c: Don't include pathmax.h.
21202         Include stdlib.h and unistd.h if available.
21203         Include xalloc.h.
21204         (xmalloc, xstrdup, free): Remove decls.
21205         (xgetcwd): Don't assume sizes fit in unsigned.
21206         Check for overflow when computing sizes.
21207         Simplify reallocation code.
21208
21209 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21210
21211         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
21212         a directory's st_size can have an arbitrary value, so the old
21213         usage could waste an arbitrary amount of memory.  All uses
21214         changed.
21215         * lib/savedir.h: Update prototype.
21216
21217 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21218
21219         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
21220
21221         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
21222         old strtoimax.c.
21223
21224         Also, make the following further changes to make this file's
21225         configuration more similar to that of strtol.c:
21226         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
21227         (strtoumax, uintmax_t, strtoull, strtol): Remove.
21228         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
21229         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
21230         changed to signed values.
21231
21232         And make the following changes as well:
21233         Fix copyright notice, as 1999 was missing.
21234         (verify): New macro.
21235         (strtoimax): Check sizes at compile-time, not run-time.
21236         Prefer strtol to strtoll if both work.
21237         (main): Remove; it was not that useful and was a pain to maintain.
21238
21239         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
21240
21241 2001-08-31  Jim Meyering  <meyering@lucent.com>
21242
21243         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
21244         Use an initial, malloc'd, buffer of length 128 rather than
21245         a statically allocated one of length 1024.
21246
21247 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21248
21249         Simplify code, partly by assuming autoconf 2.52 semantics.
21250
21251         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
21252
21253         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
21254         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
21255         All uses removed.
21256         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
21257         Move AC_REQUIRE to next-to-top level, to avoid confusion.
21258         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
21259         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
21260         jm_AC_HEADER_INTTYPES_H.
21261         * m4/jm-macros.m4 (jm_MACROS): Likewise.
21262
21263         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
21264
21265         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
21266         Quote first arg of AC_DEFUN.
21267         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
21268         since they are needed to parse the include file even if we need
21269         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
21270         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
21271         but with opposite signedness.
21272
21273 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21274
21275         Merge 'exclude' changes from tar 1.13.22.
21276         This fixes one or two unlikely storage allocation overflow bugs,
21277         but doesn't change user-visible behavior otherwise.
21278
21279 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21280
21281         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
21282         (jm_PREREQ_EXCLUDE): New macro.
21283
21284 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21285
21286         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21287         tm to be declared.
21288
21289 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21290
21291         * lib/hash.c: Remove '2001' from copyright notice.
21292
21293 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21294
21295         * lib/full-write.h: New file.
21296         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
21297         * lib/full-write.c: Correct credits, as cccp.c no longer
21298         exists and anyway it was so heavily changed from the old cccp
21299         code as to be unrecognizable.  Include full-write.h.
21300         (full_write) Return size_t, with short writes meaning failure.
21301         All callers changed.  This fixes a bug with large buffers
21302         on 64-bit hosts.
21303         * lib/utime.c: Include full-write.h.
21304
21305 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21306
21307         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
21308         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
21309         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
21310         Include if available.
21311         (<xalloc.h>): Include
21312         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
21313         (verify): New macro.  Use it to verify that EXCLUDE macros do not
21314         collide with FNM macros.
21315         (struct patopts): New struct.
21316         (struct exclude): Use it, as exclude patterns now come with options.
21317         (new_exclude): Support above changes.
21318         (new_exclude, add_exclude_file):
21319         Initial size must now be a power of two to simplify overflow checking.
21320         (free_exclude, fnmatch_no_wildcards): New function.
21321         (excluded_filename): No longer requires options arg, as the options
21322         are determined by add_exclude.  Now returns bool, not int.
21323         (excluded_filename, add_exclude):
21324         Add support for the fancy new exclusion options.
21325         (add_exclude, add_exclude_file): Now takes int options arg.
21326         Check for arithmetic overflow when computing sizes.
21327         (add_exclude_file): xrealloc might modify errno, so don't
21328         realloc until after errno might be used.
21329
21330         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
21331         New macros.
21332         (free_exclude): New decl.
21333         (add_exclude, add_exclude_file): Now takes int options arg.
21334         (excluded_filename): No longer requires options arg, as the options
21335         are determined by add_exclude.  Now returns bool, not int.
21336
21337 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21338
21339         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
21340
21341 2001-08-27  Jim Meyering  <meyering@lucent.com>
21342
21343         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
21344
21345         * lib/version-etc.c (N_): Remove definition.
21346         Revert most of last change.
21347         Instead, simply don't mark the `Copyright...' string for translation.
21348         Based on advice from Paul Eggert.
21349
21350         * lib/strtoxmax.c: Tweak comment.
21351
21352 2001-08-26  Jim Meyering  <meyering@lucent.com>
21353
21354         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
21355
21356         * m4/xstrtoimax.m4: New file.
21357         * m4/xstrtoumax.m4: Add comments explaining why we
21358         AC_REPLACE_FUNCS(strtol).
21359
21360 2001-08-26  Jim Meyering  <meyering@lucent.com>
21361
21362         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
21363         of copyright with `%s' so translators don't get an untranslated
21364         message in 2002.
21365         (COPYRIGHT_YEAR): Define.
21366         (version_etc): Use fprintf rather than fputs.
21367         Suggestion from Ulrich Drepper.
21368
21369         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
21370
21371         * lib/strtoll.c: New file, from GNU libc.
21372         * lib/xstrtoimax.c: New file.
21373
21374         * lib/xstrtol.h: Add xstrtoimax.
21375         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
21376         * lib/strtoimax.c: New file.  Likewise, but first define
21377         STRTOUXMAX_SIGNED.
21378
21379         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
21380         ...
21381         * lib/strtoxmax.c: ... then renamed to this.
21382
21383 2001-08-18  Paul Eggert  <eggert@twinsun.com>
21384
21385         * m4/inttypes.m4: Add AC_PREREQ(2.13).
21386         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
21387         (jm_AC_TYPE_INTMAX_T): New macro.
21388         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
21389
21390         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
21391
21392         * m4/longlong.m4: Renamed from ulonglong.m4.
21393         * m4/inttypes.m4: Renamed from inttypes_h.m4.
21394         * m4/uintmax_t.m4: Removed.
21395
21396 2001-08-13  Paul Eggert  <eggert@twinsun.com>
21397
21398         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
21399         Port to Solaris 8, where 'sed' requires a space after the 'r'
21400         command, and where sh dislikes "$/".  Clean up the spacing a bit.
21401         Redirect output to $tmp just once.
21402
21403 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
21404
21405         * lib/addext.c (<errno.h>): Include.
21406         (errno): Declare if not defined.
21407         (addext): Work correctly when pathconf returns -1 and leaves
21408         errno alone because there is no limit.  Also, work even if
21409         pathconf returns a value greater than SIZE_MAX.
21410
21411 2001-08-12  Jim Meyering  <meyering@lucent.com>
21412
21413         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
21414         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
21415         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
21416         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
21417         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
21418         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
21419         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
21420         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
21421         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
21422         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
21423         utime.m4, utimes.m4, xstrtoumax.m4:
21424         Quote the first argument in each use of AC_DEFUN.
21425
21426 2001-08-12  Jim Meyering  <meyering@lucent.com>
21427
21428         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
21429         Simply `return getcwd (NULL, 0);'.
21430         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
21431         Use 1300 as initial value for length, not PATH_MAX.
21432
21433         * lib/pathmax.h: Clean up cpp syntax.
21434
21435 2001-08-12  Jim Meyering  <meyering@lucent.com>
21436
21437         * lib/gettimeofday.c: New file.
21438         * lib/gtod.h: New file.
21439         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
21440
21441 2001-08-05  Jim Meyering  <meyering@lucent.com>
21442
21443         * m4/jm-macros.m4: Require autoconf-2.52.
21444
21445 2001-08-04  Jim Meyering  <meyering@lucent.com>
21446
21447         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
21448         stmt, to get in sync with glibc.
21449
21450 2001-08-03  Paul Eggert  <eggert@twinsun.com>
21451
21452         The following changes are from gettext 0.10.39 as maintained by
21453         Bruno Haible.
21454
21455         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
21456         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
21457         with inverted sense.  All uses changed.
21458
21459         * lib/mbswidth.c: Don't include <limits.h>.
21460         Include <stdlib.h> and <string.h> unconditionally.
21461         (iswcntrl, mbsinit, ISCNTRL): New macros.
21462         (mbsnwidth): Use K&R style function declarations.
21463         Don't bother checking for MB_LEN_MAX == 1, since the compiler
21464         can optimize it when MB_CUR_MAX == 1.
21465         The width of control characters is zero, not 1.
21466
21467 2001-08-03  Paul Eggert  <eggert@twinsun.com>
21468
21469         The following changes are from gettext 0.10.39 as maintained by
21470         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
21471
21472         * m4/codeset.m4: Upgrade to serial AM1.
21473         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
21474         all uses changed.  Quote first arg of AC_DEFUN.
21475         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
21476
21477         * m4/iconv.m4: Upgrade to serial AM2.
21478         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
21479         Add --with-libconv-prefix.
21480         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
21481         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
21482         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
21483         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
21484         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
21485
21486         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
21487         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
21488         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
21489         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
21490         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
21491         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
21492         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
21493         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
21494         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
21495
21496         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
21497         string.h any more.
21498
21499         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
21500         not the default value.
21501
21502         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
21503         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
21504         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
21505         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
21506         Also check for iswcntrl, used for wcwidth fallback.
21507         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
21508         to Autoconf 2.13.
21509
21510 2001-08-03  Jim Meyering  <meyering@lucent.com>
21511
21512         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
21513         as it was in the original.  Reported by Paul Eggert.
21514
21515 2001-07-16  Jim Meyering  <meyering@lucent.com>
21516
21517         * m4/gettimeofday.m4: New file.
21518         Prompted by a report from Bernhard Baehr.
21519
21520 2001-07-15  Jim Meyering  <meyering@lucent.com>
21521
21522         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
21523         stuff. Now it's in ../Makefile.cfg.
21524
21525 2001-07-15  Jim Meyering  <meyering@lucent.com>
21526
21527         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
21528         (BUILT_SOURCES): Add unlocked-io.h.
21529         (io_functions): Define.
21530         (unlocked-io.h): New rule.
21531         (DISTCLEANFILES): Add unlocked-io.h.
21532         (all-local): Depend on unlocked-io.h, to ensure it is created.
21533
21534         * lib/unlocked-io.hin: New file
21535
21536         * lib/regex.c: Update from glibc.
21537
21538 2001-07-05  Jim Meyering  <meyering@lucent.com>
21539
21540         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
21541         recommendation.
21542         (libfetish_a_SOURCES): Put all .h files here instead.
21543         Remove a thus-exposed (better checks in automake) duplicate and
21544         two unnecessary .h files.
21545
21546 2001-07-04  Jim Meyering  <meyering@lucent.com>
21547
21548         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
21549         that generates jm-glibc-io.m4 so that it doesn't trigger any make
21550         distcheck failure.
21551
21552 2001-07-02  Jim Meyering  <meyering@lucent.com>
21553
21554         The following changes were prompted by suggestions from Bruno Haible.
21555
21556         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
21557         is now generated.
21558         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
21559         definition of EXTRA_DIST.
21560         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
21561         ensure that the generated file is created/updated whenever the list
21562         of $(unlocked_functions) is changed.
21563         (jm-glibc-io.m4): New rule.
21564         (unlocked-io.h): New rule -- currently unused.
21565
21566 2001-06-24  Jim Meyering  <meyering@lucent.com>
21567
21568         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
21569         unmatched right bracket, rather than kludging it with an extra,
21570         falsely-matching quote in a comment.  Patch by Akim Demaille.
21571
21572 2001-06-11  Jim Meyering  <meyering@lucent.com>
21573
21574         * lib/regex.c: Update from GNU libc.
21575
21576 2001-05-27  Jim Meyering  <meyering@lucent.com>
21577
21578         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
21579         Check for ut_type in struct utmp.
21580
21581 2001-05-27  Jim Meyering  <meyering@lucent.com>
21582
21583         * lib/readutmp.h (UT_TYPE): Define.
21584
21585 2001-05-24  Jim Meyering  <meyering@lucent.com>
21586
21587         * lib/argmatch.c: Include "quote.h".
21588         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
21589         quote function.  Reported by Göran Uddeborg.
21590
21591 2001-05-22  Jim Meyering  <meyering@lucent.com>
21592
21593         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
21594         now that we use the package-supplied version unconditionally.
21595         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
21596
21597 2001-05-21  Jim Meyering  <meyering@lucent.com>
21598
21599         * m4/regex.m4: Change a couple backticks to single quotes to avoid
21600         shell syntax errors.
21601
21602 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
21603
21604         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
21605
21606 2001-05-20  Paul Eggert  <eggert@twinsun.com>
21607
21608         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
21609         Don't bother to check library strftime, since
21610         we'll be using our own my_strftime function anyway.
21611         Define my_strftime instead of strftime.
21612
21613 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
21614
21615         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
21616         which is not yet declared.
21617
21618 2001-05-15  Jim Meyering  <meyering@lucent.com>
21619
21620         * m4/regex.m4: Use proper quoting so brackets appear in the test
21621         program.
21622         Reported by, and with help from, Bruno Haible.
21623
21624 2001-05-13  Jim Meyering  <meyering@lucent.com>
21625
21626         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
21627         undefined.
21628
21629 2001-05-11  Paul Eggert  <eggert@twinsun.com>
21630
21631         dirname code cleanup.  base_name now behaves more compatibly
21632         with POSIX basename when given file names that have trailing
21633         slashes, and similarly for dir_name.  Add new primitives
21634         base_len and dir_len.  Put the directory-name-related decls
21635         into dirname.h.
21636
21637         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
21638         * lib/backupfile.c (base_name): Likewise.
21639         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
21640         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
21641         * lib/makepath.c (strip_trailing_slashes): Likewise.
21642         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
21643         ISSLASH): Likewise.
21644         * lib/rename.c (strip_trailing_slashes): Likewise.
21645         * lib/same.c (base_name): Likewise.
21646         * lib/stripslash.c (ISSLASH): Likewise.
21647
21648         * lib/addext.c: Include <dirname.h> after size_t is defined.
21649         * lib/backupfile.c: Likewise.
21650
21651         * lib/addext.c (addext): Use base_len to trim redundant
21652         trailing slashes instead of doing it ourselves.
21653         But do not trim the last slash if it is not redundant.
21654
21655         * lib/backupfile.c (find_backup_file_name,
21656         max_backup_version): Use base_len instead of rolling it ourselves.
21657         Handle the case of "" and (on DOS) "C:" correctly.
21658
21659         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
21660         needed. Include <string.h>, <dirname.h>.
21661         (base_name): Allow file names ending in slashes, other than names
21662         that are all slashes.  In this case, return the basename followed
21663         by the slashes.  This is more general, and can be used in places
21664         where the original base_name purposely had an assertion failure.
21665         (base_len): New function.
21666
21667         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
21668         Do not include <assert.h>; no longer needed.
21669         Include xalloc.h.
21670         (memrchr): Remove decl.
21671         (dir_name_r): Remove.
21672         (dir_len): Renamed from dirlen.  All callers changed.
21673         Rewrite in terms of base_name, for simplicity and consistency.
21674         (dir_name): Never return NULL.  All callers changed.
21675         Do not include <stdlib.h> in test program; no longer needed.
21676         return 0; is fine for test program.
21677
21678         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
21679         New macros.
21680         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
21681
21682         * lib/path-concat.c (path_concat): Use base_len to compute
21683         base length, not strlen; this means we cannot rely on memcpy
21684         to null-terminate.
21685
21686         * lib/same.c (STREQ): Remove.
21687         (same_name): Handle the case where the basename ends in trailing '/'.
21688
21689         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
21690         a slash was stripped.  Do not strip the last slash after a
21691         file system prefix.
21692
21693 2001-05-11  Paul Eggert  <eggert@twinsun.com>
21694
21695         * lib/Makefile.am (libfetish_a_SOURCES):
21696         Add strftime.c, since we now compile it on all hosts.
21697
21698         * lib/strftime.c (my_strftime):
21699         Define to nstrftime if emacs, but only if my_strftime is not defined.
21700         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
21701         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
21702         Add one more extra argument: a nanoseconds value.
21703         All uses changed.
21704         (ns): New macro.
21705         (my_strftime function): Add %N format.
21706         (emacs_strftimeu): Renamed from emacs_strftime,
21707         with extra ut argument.
21708
21709 2001-05-09  Paul Eggert  <eggert@twinsun.com>
21710
21711         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
21712
21713 2001-04-21  Jim Meyering  <meyering@lucent.com>
21714
21715         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
21716         doesn't interfere.
21717
21718 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
21719
21720         * m4/ftruncate.m4: Check for chsize.
21721         Link with ftruncate.o unconditionally if ftruncate is missing.
21722         This was required when cross-compiling to i586-mingw32msvc.
21723
21724 2001-04-08  Jim Meyering  <meyering@lucent.com>
21725
21726         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
21727         recomputed; that's necessary when the offset spans a DST transition.
21728         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
21729
21730 2001-04-02  Jim Meyering  <meyering@lucent.com>
21731
21732         * lib/regex.h, regex.c: Update from GNU libc.
21733
21734 2001-03-24  Jim Meyering  <meyering@lucent.com>
21735
21736         * m4/jm-macros.m4: Require autoconf-2.49d.
21737
21738 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
21739
21740         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
21741
21742 2001-03-19  Paul Eggert  <eggert@twinsun.com>
21743
21744         * lib/version-etc.c (version_etc_copyright): Update to 2001.
21745
21746 2001-03-17  Jim Meyering  <meyering@lucent.com>
21747
21748         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
21749         now that the version in autoconf is equivalent.
21750         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
21751
21752         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
21753         Suggestion from Akim Demaille.
21754
21755         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
21756         (jm_PREREQ_TEMPNAME): New function.
21757
21758 2001-03-16  Paul Eggert  <eggert@twinsun.com>
21759
21760         * lib/tempname.c (uint64_t): Define to uintmax_t if
21761         not defined, and if UINT64_MAX is not defined.
21762         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
21763         Reported by John David Anglin.
21764
21765 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
21766
21767         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
21768         resolve alias if codeset is empty.
21769         * lib/config.charset (BeOS): Use wildcard syntax.
21770
21771 2001-03-13  Jim Meyering  <meyering@lucent.com>
21772
21773         * lib/path-concat.c (path_concat)
21774         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
21775         concatenating e.g., `C:' and `foo'.
21776         From Bruno Haible.
21777
21778 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
21779
21780         * lib/localcharset.c (locale_charset): Don't use
21781         setlocale(LC_CTYPE,NULL). Don't return NULL.
21782         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
21783
21784 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
21785
21786         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
21787         support for DOS/DJGPP.
21788
21789 2001-03-01  Paul Eggert  <eggert@twinsun.com>
21790
21791         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
21792         lacks mkstemp.  Compile our own tempname.c if we compile our own
21793         mkstemp.c, as mkstemp relies on tempname.
21794
21795 2001-03-01  Jim Meyering  <meyering@lucent.com>
21796
21797         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
21798         AH_VERBATIM really does output its argument verbatim.
21799
21800 2001-02-28  Paul Eggert  <eggert@twinsun.com>
21801
21802         * lib/Makefile.am (libfetish_a_SOURCES):
21803         Add dup-safer.c, fopen-safer.c.
21804         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
21805
21806         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
21807         * lib/unistd-safer.h: New files.
21808
21809 2001-02-25  Paul Eggert  <eggert@twinsun.com>
21810
21811         The mkstemp replacement is taken from glibc 2.2.2, with some
21812         portability fixes for use outside glibc, as follows:
21813
21814         * lib/tempname.c (struct_stat64): New macro.
21815         (direxists, __gen_tempname): Use it.
21816         This avoids a portability problem with Solaris 8.
21817
21818         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
21819         (<stddef.h>, <stdint.h>, <string.h>):
21820         Include only if STDC_HEADERS || _LIBC.
21821         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
21822         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
21823         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
21824         (__set_errno): Define this macro if <errno.h> doesn't.
21825         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
21826         Define these macros if <stdio.h> doesn't.
21827         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
21828         Define these macros if <sys/stat.h>
21829         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
21830         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
21831         __xstat64): Define if not _LIBC.
21832         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
21833         (__gen_tempname): Invoke gettimeofday only if
21834         HAVE_GETTIMEOFDAY || _LIBC;
21835         otherwise, fall back on plain "time".
21836         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
21837
21838         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
21839
21840         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
21841
21842 2001-02-18  Paul Eggert  <eggert@twinsun.com>
21843
21844         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
21845
21846 2001-02-17  Paul Eggert  <eggert@twinsun.com>
21847
21848         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
21849         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
21850         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
21851         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21852
21853 2001-02-17  Paul Eggert  <eggert@twinsun.com>
21854
21855         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
21856         Remove workaround macros for hosts that have mbrtowc but not
21857         mbstate_t, as we now insist on proper declarations for both
21858         before using mbrtowc.
21859
21860 2001-02-17  Jim Meyering  <meyering@lucent.com>
21861
21862         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
21863         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
21864         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
21865         UnixWare 7.1.1.
21866
21867         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
21868         rather than AC_CACHE_VAL.
21869
21870 2001-02-17  Jim Meyering  <meyering@lucent.com>
21871
21872         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
21873         around included file name.
21874
21875         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
21876
21877         * lib/strftime.c: Update from GNU libc (the only changes were to
21878         comments).
21879
21880 2001-02-17  Jim Meyering  <meyering@lucent.com>
21881
21882         * lib/regex.c: Update from libc.
21883
21884 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
21885
21886         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
21887         clash.
21888
21889 2001-02-16  Paul Eggert  <eggert@twinsun.com>
21890
21891         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
21892         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
21893         Reported by Mark Hounschell via Paul Eggert.
21894
21895 2001-02-07  Jim Meyering  <meyering@lucent.com>
21896
21897         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
21898
21899 2001-02-05  Jim Meyering  <meyering@lucent.com>
21900
21901         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
21902         it includes the patch required for `large file' support with at least
21903         HP-UX's 10.20 /bin/cc.
21904
21905 2001-02-03  Jim Meyering  <meyering@lucent.com>
21906
21907         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
21908         AS_IF, now that it works once again (mysteriously).
21909         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21910
21911 2001-01-30  Jim Meyering  <meyering@lucent.com>
21912
21913         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
21914         * m4/chown.m4: Rename conftestchown to conftest.chown.
21915         * m4/rename.m4: s/conftestdir/conftest.d1/ and
21916         s/conftestdir2/conftest.d2/.
21917         * m4/utimes.m4: s/conftestdata/conftest.data/
21918         Inspired by Pavel Roskin's change in autoconf.
21919
21920 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
21921
21922         * lib/config.charset: Update for FreeBSD 4.2.
21923
21924 2001-01-27  Jim Meyering  <meyering@lucent.com>
21925
21926         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
21927         a use of AS_IF.
21928         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21929
21930 2001-01-26  Jim Meyering  <meyering@lucent.com>
21931
21932         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
21933         quotearg.c includes it.
21934
21935 2001-01-26  Jim Meyering  <meyering@lucent.com>
21936
21937         * lib/quotearg.c: Include stddef.h.
21938         * lib/quote.c: Include stddef.h.
21939         Reported by Axel Kittenberger.
21940
21941         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
21942         line in double quotes so that it evokes a better diagnostic.
21943         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
21944         Reported by Axel Kittenberger.
21945
21946 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
21947
21948         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
21949         as if it was a `charset'.
21950
21951 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21952
21953         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
21954         has const.
21955
21956 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21957
21958         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
21959         to avoid a warning.  Add back 'const' to inptr.
21960
21961 2001-01-20  Jim Meyering  <meyering@lucent.com>
21962
21963         Be sure that headers are checked before used in code compiled
21964         for the type checks.
21965         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
21966         In place of that, invoke jm_CHECK_ALL_TYPES.
21967         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
21968         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
21969         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
21970         The check for ssize_t was mistakenly run before the test for unistd.h.
21971
21972         The configure-time check for stdbool.h was missing.
21973         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
21974         (jm_PREREQ_HASH): New function.
21975
21976 2001-01-17  Jim Meyering  <meyering@lucent.com>
21977
21978         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
21979         for autoconf-2.49c.
21980         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
21981
21982 2001-01-16  Jim Meyering  <meyering@lucent.com>
21983
21984         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
21985         From Bruno Haible.
21986
21987 2001-01-14  Jim Meyering  <meyering@lucent.com>
21988
21989         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
21990         foo and bar.  Create conftestdir/ in the script, not in the C code.
21991         Remove directories in the script, not in the C code.
21992         Remove conftestdir{,2} before trying to create the directory.
21993         Make the entire configure script fail if the mkdir fails.
21994
21995 2001-01-14  Jim Meyering  <meyering@lucent.com>
21996
21997         * lib/rename.c: New file.  From Volker Borchert.
21998         Include stdlib.h, string.h or strings.h, and xalloc.h.
21999         Use strip_trailing_slashes rather than open-coding it.
22000
22001 2001-01-03  Paul Eggert  <eggert@twinsun.com>
22002
22003         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
22004
22005 2001-01-03  Jim Meyering  <meyering@lucent.com>
22006
22007         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
22008         of local `inptr' to avoid warning with some system declarations of
22009         iconv.
22010
22011 2001-01-02  Volker Borchert  <bt@teknon.de>
22012
22013         * m4/rename.m4: New file.
22014         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
22015
22016 2001-01-01  Jim Meyering  <meyering@lucent.com>
22017
22018         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
22019         even on systems with utmpx.h.  It's necessary for the declaration of
22020         utmp's ut_user member.  Reported by Andreas Jaeger.
22021
22022         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
22023         available. They are required for the declarations of getgrgid and
22024         getpwuid resp.
22025         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
22026         Reported by Andreas Jaeger.
22027
22028 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
22029
22030         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
22031         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
22032         so `make install' also works in VPATH builds.
22033
22034 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
22035
22036         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
22037         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
22038         can be used in subdirectories.
22039
22040 2000-12-29  Paul Eggert  <eggert@twinsun.com>
22041
22042         * lib/modechange.c: Do not assume that mode_t uses the
22043         traditional octal encoding.  E.g. "chmod 1 FOO" should set
22044         the other-execute bit of FOO even if S_IXOTH != 1.
22045
22046         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
22047         WOTH, XOTH, ALLM): New macros.
22048         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
22049          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
22050         Use them.
22051         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
22052         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
22053         (mode_compile):
22054         No need to use uintmax_t; unsigned long is long enough.
22055         Don't bother to get suffix since we don't use it.
22056
22057 2000-12-26  Jim Meyering  <meyering@lucent.com>
22058
22059         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
22060         better with autoheader.
22061
22062 2000-12-24  Jim Meyering  <meyering@lucent.com>
22063
22064         * lib/hash.c (is_prime): Return explicit boolean values.
22065         (hash_get_first): Return NULL to appease Irix5.6's 89.
22066         Reported by Nelson Beebe.
22067
22068 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
22069
22070         * lib/localcharset.c (locale_charset): Add support for Win32.
22071
22072 2000-12-18  Paul Eggert  <eggert@twinsun.com>
22073
22074         * lib/physmem.h, lib/physmem.c: New files.
22075
22076         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
22077         (noinst_HEADERS): Add physmem.h.
22078
22079         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
22080         't' for compatibility with Solaris 8 sort.
22081
22082 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
22083
22084         * lib/config.charset: Add support for BeOS.
22085
22086 2000-12-17  Jim Meyering  <meyering@lucent.com>
22087
22088         * m4/dos.m4 (jm_AC_DOS): New file and macro.
22089         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
22090
22091 2000-12-16  Jim Meyering  <meyering@lucent.com>
22092
22093         This bug had a serious impact on chown: `chown N:M FILE' (for integer
22094         N and M) would have treated it like `chown N:N FILE'.
22095
22096         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
22097
22098 2000-12-16  Jim Meyering  <meyering@lucent.com>
22099
22100         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
22101         SHELLS_FILE to a file name that's useful on djgpp systems.
22102         Include stdlib.h.
22103         (ADDITIONAL_DEFAULT_SHELLS): Define.
22104         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
22105         Based mostly on a patch from Prashant TR.
22106
22107 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
22108
22109         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
22110         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
22111         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
22112
22113 2000-12-08  Andreas Schwab  <schwab@suse.de>
22114
22115         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
22116         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
22117
22118 2000-12-07  Jim Meyering  <meyering@lucent.com>
22119
22120         * lib/stripslash.c (ISSLASH): Define.
22121         (strip_trailing_slashes): Use ISSLASH rather than comparing against
22122         `/'.
22123         From Prashant TR.
22124
22125         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
22126         (dir_name_r): Declare this function as static.
22127         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
22128         manifest itself on a name containing a mix of slashes and
22129         backslashes.
22130         Make this function work with names starting with a DOS-style
22131         drive letter and colon prefix.
22132         (dir_name): Append `.' if necessary.
22133         Based mostly on patches from Prashant TR and Eli Zaretskii.
22134
22135         * lib/dirname.h (dir_name_r): Remove prototype.
22136
22137 2000-12-06  Paul Eggert  <eggert@twinsun.com>
22138
22139         * m4/off_t-format.m4: Remove this file.
22140         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
22141
22142 2000-12-06  Jim Meyering  <meyering@lucent.com>
22143
22144         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
22145         replacement strtoull, we may well need the replacement strtoul, too.
22146         Check for declarations of strtoul and strtoull.
22147         Check for strtol.  Mainly as a cue to cause automake to include
22148         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
22149         Check for limits.h -- strtol.c needs it.
22150
22151 2000-12-05  Jim Meyering  <meyering@lucent.com>
22152
22153         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
22154
22155 2000-12-04  Jim Meyering  <meyering@lucent.com>
22156
22157         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
22158         Also include memory.h, stdlib.h, unistd.h if appropriate.
22159         Reported by Andreas Jaeger (conflicting declaration of malloc).
22160
22161 2000-12-02  Jim Meyering  <meyering@lucent.com>
22162
22163         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
22164         * m4/jm-macros.m4 (jm_MACROS): require it.
22165
22166 2000-12-02  Jim Meyering  <meyering@lucent.com>
22167
22168         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
22169
22170 2000-12-01  Paul Eggert  <eggert@twinsun.com>
22171
22172         * lib/memrchr.c: Include <config.h> before any system include file.
22173
22174 2000-11-30  Jim Meyering  <meyering@lucent.com>
22175
22176         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
22177
22178 2000-11-30  Jim Meyering  <meyering@lucent.com>
22179
22180         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
22181
22182 2000-11-29  Paul Eggert  <eggert@twinsun.com>
22183
22184         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
22185
22186 2000-11-26  Jim Meyering  <meyering@lucent.com>
22187
22188         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
22189
22190 2000-11-22  Paul Eggert  <eggert@twinsun.com>
22191
22192         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
22193         size of (size_t) -1; it's not portable.
22194
22195 2000-11-17  Jim Meyering  <meyering@lucent.com>
22196
22197         * lib/strstr.c: Update from GNU libc.
22198
22199 2000-11-17  Akim Demaille  <akim@epita.fr>
22200
22201         * lib/obstack.h: Formatting changes.
22202         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
22203         prevent type checking.
22204         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22205         cast the value to (void *): assigning a `foo *' to a `void *'
22206         variable is valid.
22207         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22208
22209 2000-11-16  Jim Meyering  <meyering@lucent.com>
22210
22211         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
22212
22213 2000-11-11  Jim Meyering  <meyering@lucent.com>
22214
22215         * lib/error.c: Add a couple #includes, merging from GNU libc version.
22216
22217 2000-11-10  Jim Meyering  <meyering@lucent.com>
22218
22219         * lib/obstack.h: Update from GNU libc.
22220         * lib/obstack.c: Likewise.
22221
22222 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
22223
22224         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
22225
22226 2000-11-06  Paul Eggert  <eggert@twinsun.com>
22227
22228         * lib/getusershell.c (setusershell): Use rewind rather than
22229         fseek/fseeko, to avoid configuration hassles with fseeko.
22230         Don't bother opening SHELLS_FILE if shellstream is NULL;
22231         it's not necessary.
22232
22233 2000-11-05  Jim Meyering  <meyering@lucent.com>
22234
22235         * lib/makepath.h (make_dir): Declare.
22236         * lib/makepath.c (make_dir): Remove `static' attribute.
22237         Tweak a comment.
22238
22239 2000-11-04  Jim Meyering  <meyering@lucent.com>
22240
22241         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
22242
22243 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
22244
22245         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
22246         last one in a bucket, advance to the next bucket.
22247
22248 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
22249
22250         * lib/fnmatch.c: Do not comment out all the code if we are using
22251         the GNU C library, because in some cases we are replacing buggy
22252         code in the GNU C library itself.
22253
22254 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
22255
22256         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
22257         (regex_compile): Catch bogus \(\1\).
22258
22259 2000-10-30  Paul Eggert  <eggert@twinsun.com>
22260
22261         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
22262         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
22263         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
22264
22265 2000-10-30  Paul Eggert  <eggert@twinsun.com>
22266
22267         * lib/error.h, getline.h, modechange.h:
22268         Remove "2000" from Copyright line, as the file hasn't been
22269         changed this year other than in the copyright notice.
22270
22271         * lib/xalloc.h: Add "2000" to Copyright line, as this file
22272         was changed this year.
22273
22274 2000-10-29  Jim Meyering  <meyering@lucent.com>
22275
22276         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
22277         renaming.
22278         * m4/ls-mntd-fs.m4: Likewise
22279
22280 2000-10-29  Jim Meyering  <meyering@lucent.com>
22281
22282         * lib/xstat.in: Fix grammar in comment.
22283
22284 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
22285
22286         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
22287         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
22288         doesn't define __restrict_arr.
22289
22290 2000-10-28  Jim Meyering  <meyering@lucent.com>
22291
22292         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
22293         (jm_PREREQ_MEMCHR): New function.
22294
22295 2000-10-28  Jim Meyering  <meyering@lucent.com>
22296
22297         * lib/memchr.c: Update from libc.
22298         Adjust for portability:
22299         [HAVE_STDLIB_H]: Include stdlib.h.
22300         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
22301         Undef __memchr, too.
22302         [!weak_alias]: Define __memchr to memchr.
22303
22304         * lib/regex.c: Update from libc.
22305         * lib/regex.h: Likewise.
22306         * lib/getopt1.c: Likewise.
22307         * lib/memcmp.c: Likewise.
22308
22309         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
22310         Avoid using fseek, when possible -- it's broken by design.
22311         Patch by Ulrich Drepper.
22312
22313 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
22314
22315         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
22316         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
22317         Giving in to popular pressure to shut up the compiler with casts.
22318
22319 2000-10-26  Jim Meyering  <meyering@lucent.com>
22320
22321         * lib/strftime.c: Update from libc.
22322
22323 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
22324
22325         * regex.c: More `unsigned char' -> `re_char' changes.
22326         Also change several `int' into `re_wchar_t'.
22327         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
22328         (PUSH_FAILURE_POINTER): Don't cast any more.
22329         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
22330         We want GCC to complain, since this piece of code makes
22331         re_match non-reentrant, which *should* be fixed.
22332         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
22333         (EXTEND_BUFFER): Use RETALLOC.
22334         (SET_LIST_BIT): Don't cast.
22335         (re_wchar_t): New type.
22336         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
22337         that those two functions will always properly return.
22338         (IMMEDIATE_QUIT_CHECK): Cast to void.
22339         (analyse_first): Use recursion rather than an explicit stack.
22340         (re_compile_fastmap): Can't fail anymore.
22341         (re_search_2): Don't check re_compile_fastmap for failure.
22342         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
22343         Now also sets the new value (passed in a new argument).
22344         (re_match_2_internal): Use it.
22345         Also, use a new var `reg' of type size_t when looping through regs
22346         rather than reuse the inappropriate `mcnt'.
22347
22348 2000-10-25  Jim Meyering  <meyering@lucent.com>
22349
22350         * lib/obstack.c: Update from libc.
22351
22352 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
22353
22354         * regex.c (regex_compile): Change the way of handling a range from
22355         a char less than 256 to a char not less than 256.
22356
22357 2000-10-24  Andrew Innes  <andrewi@gnu.org>
22358
22359         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
22360         NT-Emacs only.
22361         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
22362         so that re_search functions only quit when callers expect them to.
22363
22364 2000-10-23  Jim Meyering  <meyering@lucent.com>
22365
22366         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
22367         wrong.  That set_locale call must not have any side effects.
22368         From Paul Eggert.
22369
22370 2000-10-22  Jim Meyering  <meyering@lucent.com>
22371
22372         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
22373         [CYCLIC]: Remove now-unused definition.
22374
22375         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
22376         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
22377         Suggestion from Ulrich Drepper.
22378
22379 2000-10-21  Jim Meyering  <meyering@lucent.com>
22380
22381         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
22382         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
22383         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
22384
22385 2000-10-21  Jim Meyering  <meyering@lucent.com>
22386
22387         * lib/dirname.c (memrchr): Declare if necessary.
22388         (dir_name): Remove the restriction that there be no
22389         trailing slashes.  Now, this code skips past them, effectively
22390         ignoring them.
22391         [TEST_DIRNAME] (main): New unit tests.
22392
22393         * lib/memrchr.c: New file from GNU libc.
22394         Undef __memrchr, too.
22395         [!weak_alias]: Define __memrchr to memrchr.
22396         Guard weak_alias use with `#ifdef weak_alias'.
22397
22398 2000-10-21  Jim Meyering  <meyering@lucent.com>
22399
22400         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
22401         (dir_name): Use dir_name_r.
22402         * lib/dirname.h (dir_name_r): Declare it.
22403
22404 2000-10-17  Jim Meyering  <meyering@lucent.com>
22405
22406         * lib/quote.h (PARAMS): Define and use.
22407         Reported by Akim Demaille.
22408
22409         * lib/getopt.c: Update from libc.
22410
22411 2000-10-16  Jim Meyering  <meyering@lucent.com>
22412
22413         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
22414         setlocale.
22415         From Jan Fedak.
22416
22417 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
22418
22419         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
22420
22421 2000-09-25  Jim Meyering  <meyering@lucent.com>
22422
22423         * lib/md5.h (rol): Define (from GnuPG).
22424
22425         * lib/sha.c: Give credit (GnuPG) where due.
22426         (M): Use rol rather than open-coding it.
22427         Add a FIXME comment.
22428
22429 2000-09-21  Jim Meyering  <meyering@lucent.com>
22430
22431         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
22432         Reported by Michael Stone.
22433
22434 2000-09-20  Jim Meyering  <meyering@lucent.com>
22435
22436         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
22437         (noinst_HEADERS): Add sha.h.
22438         Based on code from Scott G. Miller and from GnuPG.
22439
22440 2000-09-18  Jim Meyering  <meyering@lucent.com>
22441
22442         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
22443         LIBS. Otherwise, everyone ends up linking with -lelf for some
22444         configurations.
22445         Reported by Mike Stone.
22446
22447 2000-09-15  Jim Meyering  <meyering@lucent.com>
22448
22449         * lib/regex.c: Update from libc.
22450
22451 2000-09-10  Jim Meyering  <meyering@lucent.com>
22452
22453         * lib/getopt.c (_getopt_internal): Update from glibc.
22454
22455 2000-09-09  Jim Meyering  <meyering@lucent.com>
22456
22457         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
22458         think it should be used as a general replacement for isascii.
22459         * lib/fnmatch.c: Likewise.
22460         * lib/mbswidth.c: Likewise
22461         * lib/regex.c: Likewise.
22462
22463         Don't use atoi.
22464         * lib/userspec.c: Include sys/param.h and limits.h.
22465         Include xstrtol.h.
22466         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22467         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
22468         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
22469         UID, GID.  Check range.
22470
22471 2000-09-06  Jim Meyering  <meyering@lucent.com>
22472
22473         * lib/getopt.c (_getopt_internal): Update from glibc.
22474
22475 2000-08-30  Jim Meyering  <meyering@lucent.com>
22476
22477         * lib/strftime.c: Merge in changes from GNU libc.
22478
22479 2000-08-26  Jim Meyering  <meyering@lucent.com>
22480
22481         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
22482         * m4/fpending.m4: New file.
22483
22484 2000-08-26  Jim Meyering  <meyering@lucent.com>
22485
22486         * lib/closeout.c: Include "__fpending.h".
22487         (close_stdout_status): Return right away if there's nothing to flush.
22488
22489         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
22490         * lib/__fpending.c: New file.
22491         * lib/__fpending.h: New file.
22492
22493 2000-08-20  Jim Meyering  <meyering@lucent.com>
22494
22495         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
22496         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
22497         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
22498
22499 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
22500
22501         Improve fileutils installation on systems where running
22502         programs (like install) can't be unlinked.
22503         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
22504         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
22505
22506 2000-08-07  Paul Eggert  <eggert@twinsun.com>
22507
22508         Standardize on "memory exhausted" instead of "Memory exhausted"
22509         or "virtual memory exhausted".
22510         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
22511         "virtual memory exhausted".
22512         * lib/same.c (same_name): Invoke xalloc_die instead of printing
22513         our own message.
22514         * lib/userspec.c (parse_user_spec): Likewise.
22515         * lib/bumpalloc.h: comment fix
22516         * lib/same.c, userspec.c: Include xalloc.h.
22517
22518         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
22519         not char *const and pointing to a constant array.
22520         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
22521         (xrealloc): Comment fix.
22522
22523         * lib/userspec.c (parse_user_spec):
22524         Don't translate a message until just before returning,
22525         to avoid unnecessary translation.
22526
22527 2000-08-07  Jim Meyering  <meyering@lucent.com>
22528
22529         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
22530         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
22531         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
22532         getgroups.c, gethostname.c, getopt.h, group-member.c,
22533         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
22534         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
22535         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
22536         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
22537         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
22538         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
22539         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
22540         yesno.c: Back out Copyright date changes for each file with no change
22541         this year.  This eases coordination with other programs using the same
22542         source code modules.  From Paul Eggert.
22543
22544 2000-08-06  Paul Eggert  <eggert@twinsun.com>
22545
22546         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
22547         not char, for compatibility with glibc 2.1.3 strftime.c.
22548
22549 2000-08-03  Greg McGary  <greg@mcgary.org>
22550
22551         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
22552         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
22553         (EXTEND_BUFFER): Use them.
22554
22555 2000-08-01  Jim Meyering  <meyering@lucent.com>
22556
22557         * lib/dirname.c (ISSLASH): Define.
22558         (BACKSLASH_IS_PATH_SEPARATOR): Define.
22559         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
22560         both `\' and `/' may be use as path separators.
22561         Based on a patch from Prashant TR.
22562
22563 2000-07-31  Paul Eggert  <eggert@twinsun.com>
22564
22565         * lib/quotearg.c (quotearg_n_options): Don't make the initial
22566         slot vector a constant, since it might get modified.
22567
22568 2000-07-31  Jim Meyering  <meyering@lucent.com>
22569
22570         * lib/xmalloc.c: Use `virtual memory exhausted', not
22571         `Memory exhausted'.
22572         * lib/obstack.c (print_and_abort): Likewise.
22573
22574 2000-07-30  Paul Eggert  <eggert@twinsun.com>
22575
22576         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
22577         buffer, so that the caller can always quote one small
22578         component of a "memory exhausted" message in slot 0.
22579         From a suggestion by Jim Meyering.
22580
22581 2000-07-30  Jim Meyering  <meyering@lucent.com>
22582
22583         * lib/makepath.c (make_path): Quote the other instance, too.
22584
22585         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
22586         (STATIC_BUF_SIZE): Define.
22587         (quotearg_n_options): Use only statically allocated storage when
22588         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
22589         than STATIC_BUF_SIZE.
22590
22591 2000-07-29  Jim Meyering  <meyering@lucent.com>
22592
22593         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
22594         * lib/dirname.c (dir_name): Likewise.
22595
22596         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
22597         `/'.
22598
22599         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
22600         (dir_name): Assert that there are no trailing slashes.
22601
22602 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
22603
22604         * lib/mbswidth.h (mbswidth): Add a flags argument.
22605         (mbswidth): New declaration.
22606         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
22607         * lib/mbswidth.c (mbswidth): Add a flags argument.
22608         (mbsnwidth): New function.
22609
22610 2000-07-24  Jim Meyering  <meyering@lucent.com>
22611
22612         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
22613
22614 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22615
22616         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
22617
22618 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22619
22620         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
22621         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
22622         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
22623         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
22624         invoke multibyte primitives.
22625
22626 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22627
22628         * lib/quotearg.c:
22629         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
22630         so that mbstate_t is always defined.
22631
22632         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
22633         be 1 in at least one GCC installation, and this configuration
22634         error is likely to be common.  Ignoring MB_LEN_MAX hurts
22635         performance on hosts that have mbrtowc but have only unibyte
22636         locales, but I assume these hosts are rare.
22637
22638 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22639
22640         * lib/mbswidth.c (_XOPEN_SOURCE):
22641         Don't define; this causes problems on Solaris 7.
22642         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
22643
22644 2000-07-23  Jim Meyering  <meyering@lucent.com>
22645
22646         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
22647         too: getgrgid, getpwuid, getuid.
22648
22649 2000-07-23  Jim Meyering  <meyering@lucent.com>
22650
22651         * lib/basename.c (base_name): Add an assertion.
22652
22653 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
22654
22655         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
22656         shadow its mbsinit function.
22657
22658 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
22659
22660         * lib/mbswidth.h: New file.
22661         * lib/mbswidth.c: New file.
22662         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
22663         (noinst_HEADERS): Add mbswidth.h.
22664
22665 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
22666
22667         * lib/config.charset: Add support for FreeBSD. Improve support for
22668         HP-UX and IRIX 6.
22669
22670 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
22671
22672         * m4/mbswidth.m4: New file.
22673         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
22674
22675 2000-07-15  Jim Meyering  <meyering@lucent.com>
22676
22677         * lib/makepath.c: Include quote.h.
22678         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
22679         corresponding argument in a `quote (...)' call.
22680         Give better diagnostics.
22681
22682         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
22683         (noinst_HEADERS): Add quote.h.
22684
22685         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
22686         from tar's src/misc.c.
22687         * lib/quote.h: New file.  Prototypes for same.
22688
22689 2000-07-14  Paul Eggert  <eggert@twinsun.com>
22690
22691         From a suggestion by Bruno Haible.
22692         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
22693         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
22694         to decide whether to define the BeOS workaround macro;
22695         this adjusts to the change to AC_MBSTATE_T.
22696
22697 2000-07-14  Jim Meyering  <meyering@lucent.com>
22698
22699         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
22700         jm_AC_TYPE_UINTMAX_T.
22701
22702 2000-07-13  Paul Eggert  <eggert@twinsun.com>
22703
22704         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
22705
22706         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
22707         quotearg_buffer_restyled): Add support for
22708         clocale_quoting_style.  Undo previous change to
22709         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
22710         and "{RIGHT QUOTATION MARK}" msgids.
22711
22712 2000-07-10  Paul Eggert  <eggert@twinsun.com>
22713
22714         From a suggestion by Bruno Haible.
22715         * m4/mbstate_t.m4 (AC_MBSTATE_T):
22716         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
22717         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
22718         and mbstate_t, to a single-part test that simply defines mbstate_t.
22719         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
22720         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
22721
22722 2000-07-10  Jim Meyering  <meyering@lucent.com>
22723
22724         * m4/strerror_r.m4: Mirror the correction made in autoconf.
22725
22726         * m4/gnu-source.m4: Output to confdefs.h directly.
22727         Suggestion from Akim Demaille.
22728
22729 2000-07-09  Paul Eggert  <eggert@twinsun.com>
22730
22731         The old behavior of quoting `like this' doesn't look good with
22732         newer, ISO-style fonts.  See:
22733         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
22734
22735         Instead, quote "like this" by default.  Let the translator
22736         tailor the locale-specific quoting behavior by providing
22737         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
22738
22739         * lib/quotearg.c (N_): New macro.
22740         (gettext_default): New function.
22741         (quotearg_buffer_restyled): Use
22742         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
22743         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
22744
22745 2000-07-09  Jim Meyering  <meyering@lucent.com>
22746
22747         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
22748         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
22749
22750         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
22751         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
22752
22753 2000-07-09  Jim Meyering  <meyering@lucent.com>
22754
22755         * lib/Most files: Update copyright dates to include 2000.
22756
22757 2000-07-08  Jim Meyering  <meyering@lucent.com>
22758
22759         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
22760         if not defined.
22761         (xgethostname): Remove now-unnecessary #ifdef.
22762         Move declaration of `err' into loop where it's used.
22763
22764 2000-07-05  Paul Eggert  <eggert@twinsun.com>
22765         and Bruno Haible  <haible@clisp.cons.org>
22766
22767         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
22768         only if the test for an object-type mbstate_t fails.  This
22769         prevents us from mistakenly reporting that mbstate_t is a
22770         system object type after we "#define mbstate_t int" to work
22771         around its lack.
22772
22773 2000-07-05  Paul Eggert  <eggert@twinsun.com>
22774         and Bruno Haible  <haible@clisp.cons.org>
22775
22776         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
22777
22778 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22779
22780         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
22781         to strerror_r.
22782         Include <ctype.h> for use of isalpha.
22783
22784 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22785
22786         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
22787         by allocating a larger buffer. Test the gethostname return value for
22788         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
22789         returns an error and ENAMETOOLONG isn't defined.
22790
22791 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22792
22793         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
22794         dimension.
22795
22796 2000-07-04  Jim Meyering  <meyering@lucent.com>
22797
22798         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
22799         of the deprecated AC_CHECKING.
22800
22801 2000-07-04  Jim Meyering  <meyering@lucent.com>
22802
22803         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
22804         Reported by Bruno Haible.
22805
22806 2000-07-04  Jim Meyering  <meyering@lucent.com>
22807
22808         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
22809         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
22810         lacks mbrtowc.
22811
22812 2000-07-03  Paul Eggert  <eggert@twinsun.com>
22813
22814         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
22815         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
22816
22817 2000-07-03  Paul Eggert  <eggert@twinsun.com>
22818         and Bruno Haible  <haible@clisp.cons.org>
22819
22820         * lib/quotearg.c (mbrtowc):
22821         Assign to *pwc, and return 1 only if result is nonzero.
22822         (iswprint): Use ISPRINT when substituting our own mbrtowc.
22823
22824 2000-07-03  Jim Meyering  <meyering@lucent.com>
22825
22826         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
22827
22828 2000-07-03  Jim Meyering  <meyering@lucent.com>
22829
22830         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
22831         This is necessary to get a definition of e.g., UTMP_FILE on
22832         HP-UX 10.20.
22833         From Bob Proulx.
22834
22835 2000-07-02  Jim Meyering  <meyering@lucent.com>
22836
22837         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
22838
22839         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
22840         AC_LIBOBJ(function_name).
22841         * m4/chown.m4: Likewise.
22842         * m4/fnmatch.m4: Likewise.
22843         * m4/ftruncate.m4: Likewise.
22844         * m4/getgroups.m4: Likewise.
22845         * m4/getline.m4: Likewise.
22846         * m4/group-member.m4: Likewise.
22847         * m4/jm-macros.m4: Likewise.
22848         * m4/lstat.m4: Likewise.
22849         * m4/malloc.m4: Likewise.
22850         * m4/memcmp.m4: Likewise.
22851         * m4/nanosleep.m4: Likewise.
22852         * m4/putenv.m4: Likewise.
22853         * m4/realloc.m4: Likewise.
22854         * m4/regex.m4: Likewise.
22855         * m4/stat.m4: Likewise.
22856         * m4/strftime.m4: Likewise.
22857
22858 2000-07-02  Jim Meyering  <meyering@lucent.com>
22859
22860         * lib/quotearg.c (mbstate_t): Don't define here.
22861
22862 2000-07-02  Jim Meyering  <meyering@lucent.com>
22863
22864         * lib/nanosleep.c (SIGCONT): Define if not already defined.
22865
22866 2000-07-01  Jim Meyering  <meyering@lucent.com>
22867
22868         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
22869
22870 2000-07-01  Jim Meyering  <meyering@lucent.com>
22871
22872         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
22873         problem.
22874
22875 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22876
22877         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
22878         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
22879
22880 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22881
22882         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
22883         per change in ../m4/ls-mntd-fs.m4.
22884         (read_filesystem_list): Ignore symbolic links.
22885
22886 2000-06-29  Jim Meyering  <meyering@lucent.com>
22887
22888         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
22889         for declaration of strcmp.
22890
22891         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
22892
22893         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
22894         Avoid warning by casting result to `char *' to remove `const'.
22895
22896 2000-06-28  Jim Meyering  <meyering@lucent.com>
22897
22898         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
22899         included by quotearg.c, for which we perform this test.  From
22900         Bruno Haible.
22901
22902 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22903
22904         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
22905         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
22906         <utmpx.h> exists, put readutmp.o into LIBOBJS.
22907
22908 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22909
22910         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
22911
22912 2000-06-26  Paul Eggert  <eggert@twinsun.com>
22913
22914         savedir now sets errno on failure and invokes xmalloc to get memory.
22915         Fix a couple of other minor bugs while we're at it.
22916
22917         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
22918         (NAMLEN): Remove macro.
22919         (malloc, realloc): Remove decls.
22920         (stpcpy): Likewise.
22921         ("xalloc.h"): Include.
22922         (NAME_SIZE_DEFAULT): New macro.
22923         (savedir): Use xmalloc / xrealloc to allocate memory.
22924         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
22925         Skip "" directory entries.
22926         Use strlen to calculate directory entry length, since the old method
22927         is rarely used these days and isn't worth supporting.
22928         Don't use a pointer after freeing it.
22929         Check for integer overflow when calculating allocation size.
22930         Use memcpy to copy entries, instead of stpcpy.
22931         Set errno properly when returning NULL.
22932         Check for readdir error.
22933
22934 2000-06-26  Jim Meyering  <meyering@lucent.com>
22935
22936         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
22937
22938 2000-06-25  Jim Meyering  <meyering@lucent.com>
22939
22940         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
22941         Linux header bug when _XOPEN_SOURCE is defined to 500.
22942
22943 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22944
22945         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
22946         deficiency.
22947
22948 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22949
22950         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
22951         Include xalloc.h.
22952         Don't include <stdlib.h>.  Don't declare malloc, realloc.
22953
22954 2000-06-24  Jim Meyering  <meyering@lucent.com>
22955
22956         * m4/strerror_r.m4: Revive this file -- to try out an experimental
22957         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
22958         for which strerror does return char*, but which lacks a conveniently
22959         accessible declaration of the function.  If the compile-test says
22960         strerror_r doesn't work, then resort to a `run'-test that works on
22961         BeOS and segfaults on DEC Unix.
22962
22963 2000-06-24  Jim Meyering  <meyering@lucent.com>
22964
22965         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
22966
22967 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22968
22969         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
22970         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
22971
22972 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22973
22974         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
22975         (mbrtowc, mbstate_t): Define substitutes if
22976         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
22977         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
22978         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
22979
22980 2000-06-23  Jim Meyering  <meyering@lucent.com>
22981
22982         * m4/afs.m4: Add missing AC_MSG_RESULT.
22983         Reported by Bruno Haible.
22984
22985         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
22986         Suggestion from Bruno Haible.
22987
22988 2000-06-23  Jim Meyering  <meyering@lucent.com>
22989
22990         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
22991
22992 2000-06-21  Jim Meyering  <meyering@lucent.com>
22993
22994         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
22995
22996 2000-06-21  Jim Meyering  <meyering@lucent.com>
22997
22998         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
22999         (noinst_HEADERS): Add getstr.h.
23000
23001         * lib/getline.c (getstr): Move into a separate file.
23002         * lib/getstr.c (getstr): New file, extracted from getline.c, with
23003         the following changes: new parameter, delim2; both delim[12]
23004         parameters have type `int', not `char'.  The latter would lose
23005         with 8-bit delimiters.
23006         * lib/getstr.h: New file.
23007
23008 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23009
23010         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
23011         than 1024, return a memory chunk of least possible size, instead
23012         of size PATH_MAX + 2. In the loop, increment the size proportionally.
23013         Use free/xmalloc instead of xrealloc to avoid copying for very long
23014         paths.
23015
23016 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23017
23018         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
23019         the empty string.
23020
23021 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
23022
23023         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
23024         address, not strdup.  Include <stdlib.h> and don't declare free().
23025
23026 2000-06-19  Jim Meyering  <meyering@lucent.com>
23027
23028         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
23029
23030 2000-06-18  Jim Meyering  <meyering@lucent.com>
23031
23032         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
23033
23034         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
23035         `checking whether...' message to be consistent with that of the
23036         lstat test.
23037
23038 2000-06-18  Jim Meyering  <meyering@lucent.com>
23039
23040         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
23041         Besides, these days every porting target provides a mkdir function.
23042
23043         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
23044         needed. (this snippet comes from src/system.h).
23045
23046 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
23047
23048         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
23049
23050 2000-06-15  Paul Eggert  <eggert@twinsun.com>
23051
23052         * lib/human.c (adjust_value): New function.
23053         (human_readable_inexact): Apply rounding style even when
23054         printing approximate values.
23055
23056 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23057
23058         * lib/human.c (human_readable_inexact): Allow an input block
23059         size that is not a multiple of the output block size, and vice versa.
23060         Reported by Piergiorgio Sartor.
23061
23062 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23063
23064         * lib/getdate.y (get_date): Apply relative times after time
23065         zone indicator, not before.  Reported by Todd A. Jacobs.
23066
23067 2000-06-13  Jim Meyering  <meyering@lucent.com>
23068
23069         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
23070
23071         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
23072
23073 2000-06-12  Paul Eggert  <eggert@twinsun.com>
23074
23075         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
23076
23077 2000-06-12  Jim Meyering  <meyering@lucent.com>
23078
23079         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
23080         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
23081         optional argument.
23082         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
23083         the optional argument, `lib'.
23084
23085 2000-06-08  Jim Meyering  <meyering@lucent.com>
23086
23087         * m4/largefile.m4: Remove file (now that it's part of autoconf).
23088
23089 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23090
23091         Rewrite largefile configuration so that we don't need to run
23092         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
23093         AC_CANONICAL_HOST in configure.in -- jmm]
23094
23095         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
23096         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
23097         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
23098         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
23099         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
23100         All uses changed.
23101         Instead of inspecting the output of getconf, try to compile the
23102         test program without and with the macro definition.
23103         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
23104         for getconf.  Instead, check for the needed flags by compiling
23105         test programs.
23106
23107 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23108
23109         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
23110
23111 2000-06-04  Jim Meyering  <meyering@lucent.com>
23112
23113         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
23114         SunOS 4.1.4 for which gid_t is an unsigned type.
23115
23116 2000-06-03  Jim Meyering  <meyering@lucent.com>
23117
23118         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
23119         now that autoconf requires that.
23120
23121         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
23122         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
23123         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
23124
23125 2000-06-03  Jim Meyering  <meyering@lucent.com>
23126
23127         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
23128
23129 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
23130
23131         * m4/glibc21.m4: New file.
23132         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
23133
23134 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
23135
23136         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
23137         newer, don't install charset.alias.
23138         * lib/config.charset: Change the Linux/glibc rules so they become empty
23139         on glibc-2.1 or newer.
23140
23141 2000-06-02  Jim Meyering  <meyering@lucent.com>
23142
23143         * lib/mountlist.c: Back out last change.  Instead, do this...
23144         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
23145         me_dummy member using the same `ignore'-testing code.
23146         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
23147         fs_type strings.
23148         From Mark D. Roth.
23149
23150 2000-05-29  Jim Meyering  <meyering@lucent.com>
23151
23152         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
23153         mounts with the `ignore' attribute.  Based on a patch from
23154         Mark D. Roth.
23155
23156 2000-05-28  Jim Meyering  <meyering@lucent.com>
23157
23158         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
23159         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23160         * m4/stat.m4: Likewise.
23161         * m4/lstat.m4: Likewise.
23162         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
23163
23164         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
23165         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
23166
23167 2000-05-26  Jim Meyering  <meyering@lucent.com>
23168
23169         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
23170
23171 2000-05-24  Jim Meyering  <meyering@lucent.com>
23172
23173         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
23174         autoconf requires that.
23175         * m4/lib-check.m4: Likewise.
23176         * m4/jm-macros.m4: Likewise.
23177         * m4/strftime.m4: Likewise.
23178
23179         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
23180         AC_CHECK_DECLS, now that autoconf requires that.
23181
23182 2000-05-22  Jim Meyering  <meyering@lucent.com>
23183
23184         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23185         * m4/lstat.m4: Likewise.
23186
23187 2000-05-22  Jim Meyering  <meyering@lucent.com>
23188
23189         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
23190
23191 2000-05-20  Jim Meyering  <meyering@lucent.com>
23192
23193         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
23194         (jm_PREREQ): Use it.
23195
23196 2000-05-18  Jim Meyering  <meyering@lucent.com>
23197
23198         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
23199         back, too, since it may have been modified by allocate_entry.
23200         (hash_delete): Rewrite to use neither the assignment operator
23201         nor the comma operator in an if-expression.
23202
23203 2000-05-15  Paul Eggert  <eggert@twinsun.com>
23204
23205         * lib/closeout.c:
23206         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
23207         Remove; no longer needed.
23208         "quotearg.h": Add include.
23209         (file_name): Do not bother to explicitly initialize to NULL; it's less
23210         efficient on some hosts.
23211         (close_stdout_status): Remove test as to whether stdout was already
23212         closed; it breaks for the case "echo x | sort >&-".
23213         Quote file name colons.
23214         Do not assume that _("write error") lacks format strings.
23215
23216 2000-05-15  Jim Meyering  <meyering@lucent.com>
23217
23218         * lib/version-etc.c (version_etc_copyright): Update the copyright
23219         string used in all --version output.
23220
23221 2000-05-14  Jim Meyering  <meyering@lucent.com>
23222
23223         * lib/closeout.c (close_stdout_set_file_name): New function.
23224         (close_stdout_status): Use new file-scoped global.
23225         Return right away if fstat says the stdout file descriptor is invalid.
23226         * lib/closeout.h (close_stdout_set_file_name): Declare.
23227
23228 2000-05-10  Jim Meyering  <meyering@lucent.com>
23229
23230         * lib/closeout.c [default_exit_status]: New file-scoped variable.
23231         (close_stdout_set_status): New function.
23232         * lib/closeout.h (close_stdout_set_status): Declare.
23233
23234 2000-05-09  Jim Meyering  <meyering@lucent.com>
23235
23236         * m4/gettext.m4: Rename this...
23237         * m4/libintl.m4: ...to this.
23238
23239 2000-05-08  Jim Meyering  <meyering@lucent.com>
23240
23241         * lib/long-options.c: Don't include closeout.h.
23242         (parse_long_options): Don't call close_stdout for --version.
23243
23244 2000-05-06  Paul Eggert  <eggert@twinsun.com>
23245
23246         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
23247         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
23248         2.1.3 bug.  This avoids a clash when files like regex.c define
23249         _GNU_SOURCE.
23250
23251 2000-05-06  Jim Meyering  <meyering@lucent.com>
23252
23253         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
23254         (AC_REPLACE_FUNCS): Add strnlen.
23255
23256         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
23257         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
23258
23259         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
23260         AC_SEARCH_LIBS call for nanosleep.
23261         (LIB_NANOSLEEP): Set and AC_SUBST.
23262
23263 2000-05-06  Jim Meyering  <meyering@lucent.com>
23264
23265         * lib/strnlen.c: Undefine __strnlen and strnlen.
23266         [!weak_alias]: Define __strnlen to strnlen.
23267
23268         * lib/atexit.c: New file, from libiberty.
23269
23270 2000-05-06  Jim Meyering  <meyering@lucent.com>
23271
23272         * lib/closeout.c (close_stdout_status): Also check for errors on the
23273         stderr stream.
23274
23275 2000-05-05  Jim Meyering  <meyering@lucent.com>
23276
23277         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
23278         AC_SEARCH_LIBS call for clock_gettime.
23279         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
23280
23281         * m4/search-libs.m4: Update from autoconf.
23282
23283         su doesn't work on Solaris 2.6.
23284         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
23285         <shadow.h>.  Reported by Dragos Harabor.
23286
23287 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
23288
23289         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
23290         memcpy instead of xmalloc, xrealloc, path_concat.
23291         (locale_charset): Treat empty environment variables as absent.
23292         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
23293
23294 2000-05-04  Jim Meyering  <meyering@lucent.com>
23295
23296         * lib/getopt.c: Update from glibc.
23297         * lib/obstack.c: Likewise.
23298         * lib/obstack.h: Likewise.
23299         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
23300         file
23301
23302         * lib/regex.h: Likewise.
23303         * lib/strndup.c: Likewise.
23304         * lib/strnlen.c: New file, from glibc.
23305
23306 2000-05-03  Jim Meyering  <meyering@lucent.com>
23307
23308         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
23309
23310 2000-05-02  Paul Eggert  <eggert@twinsun.com>
23311
23312         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
23313         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
23314         compile-time test, rather than inspecting host and OS, to
23315         decide whether to define _LARGEFILE_SOURCE.
23316
23317 2000-05-01  Jim Meyering  <meyering@lucent.com>
23318
23319         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
23320
23321         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
23322         Based on a patch from Bruno Haible.
23323
23324 2000-05-01  Jim Meyering  <meyering@lucent.com>
23325
23326         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
23327
23328 2000-04-29  Jim Meyering  <meyering@lucent.com>
23329
23330         * lib/path-concat.c: Declare strdup only if it's not defined.
23331         * lib/canon-host.c: Likewise.
23332
23333 2000-04-28  Jim Meyering  <meyering@lucent.com>
23334
23335         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
23336         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
23337         is included first, then limits.h is included by locale.h by libintl.h.
23338         From John David Anglin.
23339
23340 2000-04-25  Jim Meyering  <meyering@lucent.com>
23341
23342         * lib/makepath.c (S_IRWXUGO): Define.
23343         (make_path): Always perform explicit chmod if MODE specifies any
23344         of the `special' permission bits.  Prompted by a bug report against
23345         install from Mate Wierdl and Joost van Baal.
23346
23347 2000-04-18  Jim Meyering  <meyering@lucent.com>
23348
23349         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
23350         (jm_PREREQ): Use it.
23351
23352 2000-04-18  Jim Meyering  <meyering@lucent.com>
23353
23354         * lib/README: New file.
23355
23356         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
23357         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
23358
23359 2000-04-17  Jim Meyering  <meyering@lucent.com>
23360
23361         Get it right :-)
23362         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
23363         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
23364         Suggestion from Akim Demaille.
23365
23366 2000-04-17  Jim Meyering  <meyering@lucent.com>
23367
23368         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
23369         the definition of it to rpl_strftime also defined-away the system's
23370         declaration.
23371
23372 2000-04-15  Jim Meyering  <meyering@lucent.com>
23373
23374         Use `C' to denote so-called `contiguous' files, the same way
23375         that tar does.
23376         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
23377         (ftypelet): Use S_ISCTG.
23378         From Michael Deutschmann.
23379
23380 2000-04-14  Jim Meyering  <meyering@lucent.com>
23381
23382         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
23383         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
23384         clobbered.
23385
23386 2000-04-14  Jim Meyering  <meyering@lucent.com>
23387
23388         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
23389
23390 2000-04-13  Jim Meyering  <meyering@lucent.com>
23391
23392         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
23393         AH_VERBATIM to insert required #ifndef into config.h.in.
23394         Suggestion from Akim Demaille.
23395
23396 2000-04-12  Jim Meyering  <meyering@lucent.com>
23397
23398         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
23399         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
23400         Christian Krackowizer.
23401
23402         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
23403         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
23404         (AC_SYS_LARGEFILE): Require.
23405         (AM_C_PROTOTYPES): Require.
23406
23407 2000-04-08  Jim Meyering  <meyering@lucent.com>
23408
23409         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
23410         names don't conflict.  Reported by Eli Zaretskii.
23411
23412 2000-04-07  Jim Meyering  <meyering@lucent.com>
23413
23414         * lib/putenv.c: Move inclusion of errno.h so it follows that of
23415         sys/types.h, to work around system header problems on AIX 3.2.5.
23416         From Bruno Haible.
23417
23418 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
23419
23420         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
23421         bug.  Deal with the different error behavior of Irix iconv.
23422
23423 2000-04-05  Paul Eggert  <eggert@twinsun.com>
23424
23425         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
23426         IRIX if the installer said otherwise.
23427
23428 2000-04-05  Jim Meyering  <meyering@lucent.com>
23429
23430         Portability tweaks required for ultrix4.3.
23431         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
23432         (jm_CHECK_DECLS): Add getutent to the list of functions.
23433         (_jm_DECL_HEADERS): Add utmpx.h.
23434         From John David Anglin.
23435
23436         * m4/strftime.m4: Back out the 2000-04-02 change.
23437         Instead of that change, simply undefine putenv in the test program.
23438
23439 2000-04-05  Jim Meyering  <meyering@lucent.com>
23440
23441         Portability tweaks required for ultrix4.3.
23442         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
23443         getutent.
23444         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
23445         * lib/canon-host.c: Declare strdup.
23446         * lib/path-concat.c: Likewise.
23447         From John David Anglin.
23448
23449 2000-04-04  Jim Meyering  <meyering@lucent.com>
23450
23451         Be more DOS 8.3-friendly.
23452         * lib/ref-add.sin: Renamed from ref-add.sed.in.
23453         * lib/ref-del.sin: Renamed from ref-del.sed.in.
23454         * lib/Makefile.am: Reflect renaming.
23455         Reported by Eli Zaretskii.
23456
23457         Use a temporary file name that won't clash with `charset.alias'
23458         in the DOS 8.3 name space.
23459         * lib/Makefile.am (charset_tmp): Define.
23460         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
23461         (uninstall-local): Likewise.
23462         Reported by Eli Zaretskii.
23463
23464 2000-04-03  Jim Meyering  <meyering@lucent.com>
23465
23466         * m4/gettext.m4: Fix typo in comment.
23467
23468         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
23469         textutils/configure.in).  Suggestion from Paul Eggert.
23470         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
23471
23472 2000-04-02  Paul Eggert  <eggert@twinsun.com>
23473
23474         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
23475         variable in the shell rather than using putenv, which isn't
23476         portable.  This avoids the configure-time inter-test dependency
23477         on the potentially-renamed putenv function.
23478
23479 2000-03-30  Paul Eggert  <eggert@twinsun.com>
23480
23481         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
23482         before checking struct stat.st_blksize, so that
23483         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
23484
23485 2000-03-29  Paul Eggert  <eggert@twinsun.com>
23486
23487         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
23488         since strftime.c uses HAVE_STRFTIME to decide whether to use
23489         the underlying strftime.
23490
23491 2000-03-29  Paul Eggert  <eggert@twinsun.com>
23492
23493         * lib/time/strftime.c (my_strftime): Make sure we call the system
23494         strftime, not ourselves, when invoking the underlying strftime.
23495
23496 2000-03-24  Jim Meyering  <meyering@lucent.com>
23497
23498         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
23499         (charset_alias): Define.
23500         (install-exec-local): Factor out common code.
23501         (uninstall-local): Split lines longer than 80.
23502         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
23503         (SUFFIXES): Define.
23504         (.sed.in.sed): New rule.  Don't redirect directly to $@.
23505         (CLEANFILES): Add ref-add.sed and ref-del.sed.
23506
23507 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
23508
23509         * lib/config.charset: Output a line containing "Packages using this
23510         file".
23511         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
23512         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
23513         ref-del.sed): New rules.
23514
23515 2000-03-17  Jim Meyering  <meyering@lucent.com>
23516
23517         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
23518         Otherwise, include <strings.h>
23519
23520 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
23521
23522         * lib/unicodeio.c (utf8_wctomb): New function.
23523         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
23524         format instead of in UCS-4 with platform dependent endianness.
23525
23526 2000-03-10  Jim Meyering  <meyering@lucent.com>
23527
23528         * m4/lib-check.m4: Look for getspnam in -lgen, too.
23529         From Marco Franzen.
23530
23531 2000-03-07  Paul Eggert  <eggert@twinsun.com>
23532
23533         * lib/savedir.c (savedir): Work even if directory size is
23534         negative; this can happen with some screwy NFS configurations.
23535
23536 2000-03-06  Jim Meyering  <meyering@lucent.com>
23537
23538         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
23539         if it's NULL (because we ran out of memory).  From Bruno Haible.
23540
23541 2000-03-05  Jim Meyering  <meyering@lucent.com>
23542
23543         * lib/localcharset.c ("path-concat.h"): Include.
23544         (get_charset_aliases): Use path_concat instead of ANSI string
23545         concatenation.
23546
23547         * lib/unicodeio.h (PARAMS): Define.
23548         Use it to guard prototype.
23549
23550 2000-03-04  Jim Meyering  <meyering@lucent.com>
23551
23552         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
23553         for lib/localcharset.c.
23554
23555 2000-03-04  Jim Meyering  <meyering@lucent.com>
23556
23557         * lib/Makefile.am (install-exec-local): Create $(libdir) before
23558         installing into it.
23559         (uninstall-local): Uncomment this rule so `make distcheck' works
23560         once again.
23561
23562         * lib/unicodeio.c (<errno.h>): Include it.
23563         (errno): Declare if not defined.
23564
23565         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
23566
23567         * lib/config.charset: New version, incorporating remarks from a linux
23568         i18n mailing list.  From Bruno Haible.
23569
23570 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
23571
23572         * m4/codeset.m4: New file.
23573         * m4/iconv.m4: New file.
23574         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
23575
23576 2000-03-03  Jim Meyering  <meyering@lucent.com>
23577
23578         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
23579
23580 2000-03-02  Jim Meyering  <meyering@lucent.com>
23581
23582         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
23583         the messages come out on separate lines.
23584
23585         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
23586         rather than jm_CHECK_DECLARATIONS.
23587         * m4/decl.m4: Remove now-unused file.
23588
23589         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
23590         geteuid.
23591
23592 2000-03-02  Jim Meyering  <meyering@lucent.com>
23593
23594         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
23595
23596 2000-03-01  Jim Meyering  <meyering@lucent.com>
23597
23598         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
23599         * lib/unicodeio.c: Likewise.
23600
23601 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
23602
23603         * lib/config.charset: New file.
23604         * lib/localcharset.c: New file.
23605         * lib/unicodeio.h, lib/unicodeio.c: New files.
23606         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
23607         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
23608         (noinst_HEADERS): Add unicodeio.h.
23609         (all-local, install-exec-local, charset.alias): New targets.
23610
23611 2000-02-28  Paul Eggert  <eggert@twinsun.com>
23612
23613         * lib/quotearg.c (ALERT_CHAR): New macro.
23614         (quotearg_buffer_restyled): Use it.
23615
23616 2000-02-27  Jim Meyering  <meyering@lucent.com>
23617
23618         * m4/check-decl.m4: Add getenv to the list.
23619
23620 2000-02-27  Jim Meyering  <meyering@lucent.com>
23621
23622         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
23623         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
23624
23625         * lib/backupfile.c: Guard inclusion of stdlib.h with
23626         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
23627         Declare malloc if needed.
23628
23629         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
23630         `#ifndef HAVE_DECL..'
23631         now that autoconf always defines the HAVE_DECL_ symbols.
23632         * lib/human.c: Likewise.
23633         * lib/same.c: Likewise.
23634         * lib/strtoumax.c: Likewise.
23635
23636         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
23637         declaration check was not run.
23638         * lib/hash.c: Likewise.
23639         * lib/human.c: Likewise.
23640         * lib/same.c: Likewise.
23641         * lib/strtoumax.c: Likewise.
23642
23643         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
23644         `.', then first look up the entire `.'-containing string as a login
23645         name.
23646
23647 2000-02-23  Jim Meyering  <meyering@lucent.com>
23648
23649         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
23650         in place of my hack.
23651
23652 2000-02-18  Paul Eggert  <eggert@twinsun.com>
23653
23654         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
23655         (textint): New typedef.
23656         (parser_control): Member year changed from int to textint.
23657         All uses changed.
23658         (YYSTYPE): Removed; replaced by %union with int and textint members.
23659         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
23660         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
23661         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
23662         (tSNUMBER, tUNUMBER): Now of type <textintval>.
23663         (date, number, to_year): Use width of number in digits, not its value,
23664         to determine whether it's a 2-digit year, or a 2-digit time.
23665         (yylex): Store number of digits of numeric tokens.
23666         Reported by John Kendall.
23667
23668         (parser_control): Changed from struct parser_control to typedef (for
23669         consistency).  All uses changed.
23670
23671         (tID): Removed; not used.
23672         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
23673
23674 2000-02-14  Paul Eggert  <eggert@twinsun.com>
23675
23676         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
23677         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
23678
23679 2000-02-12  Jim Meyering  <meyering@lucent.com>
23680
23681         * lib/userspec.c (ISDIGIT): Define it.
23682         (isdigit): Remove definition.
23683         (is_number): Use ISDIGIT, not isdigit.
23684         <libintl.h>: Include.
23685         (_ and N_): Define.
23686         (parse_user_spec): Mark translatable strings.
23687
23688 2000-02-10  Jim Meyering  <meyering@lucent.com>
23689
23690         With these changes, nanosleep.[ch] are finally enough like the other
23691         lib/* replacement files to compile on a few more losing systems.
23692
23693         * lib/nanosleep.h: Don't include config.h.
23694         Remove prototype from declaration of nanosleep.
23695         (PARAMS): Remove now-unneeded definition.
23696         * lib/nanosleep.c: #undef nanosleep.
23697         (rpl_nanosleep): Rename from nanosleep.
23698
23699 2000-02-10  Jim Meyering  <meyering@lucent.com>
23700
23701         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
23702         gnu_nanosleep to rpl_nanosleep.
23703
23704 2000-02-09  Jim Meyering  <meyering@lucent.com>
23705
23706         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
23707         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
23708
23709 2000-02-08  Akim Demaille  <akim@epita.fr>
23710
23711         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
23712         `[' and `]' and remove uses of `changequote'.
23713         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
23714         (AC_SYS_LARGEFILE): Likewise.
23715         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
23716         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
23717         of changequote.
23718         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
23719         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
23720         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
23721         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
23722
23723 2000-02-05  Jim Meyering  <meyering@lucent.com>
23724
23725         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
23726         Remove explicit use of AC_HEADER_TIME.  It is required by
23727         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
23728         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
23729         in autoconf whereby the expansion of the latter ended up preceding
23730         the expansion of its prerequisite, AC_HEADER_TIME.
23731         Reported by Volker Borchert.
23732
23733 2000-02-03  Jim Meyering  <meyering@lucent.com>
23734
23735         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
23736
23737 2000-02-03  Jim Meyering  <meyering@lucent.com>
23738
23739         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
23740         rather than with `#if HAVE_UTMPNAME'.
23741
23742 2000-02-02  Jim Meyering  <meyering@lucent.com>
23743
23744         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
23745         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
23746         Reported by Eli Zaretskii.
23747
23748 2000-02-01  Jim Meyering  <meyering@lucent.com>
23749
23750         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
23751
23752 2000-01-31  Jim Meyering  <meyering@lucent.com>
23753
23754         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
23755         functions.  Add the time.h and sys/time.h headers along with the
23756         AC_REQUIRE'ment of AC_HEADER_TIME.
23757
23758 2000-01-31  Jim Meyering  <meyering@lucent.com>
23759
23760         * lib/nanosleep.h (nanosleep): Guard declaration with
23761         `#if ! HAVE_DECL_NANOSLEEP'.
23762         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
23763         the declaration in that vendor's sys/timers.h.
23764         Reported by Christian Krackowizer.
23765
23766         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
23767         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
23768         (ISPRINT): Likewise.
23769         Reported by Tom Tromey.
23770
23771 2000-01-30  Jim Meyering  <meyering@lucent.com>
23772
23773         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
23774
23775         * m4/prereq.m4 (utmp_includes): Define.
23776         Check for ut_user and ut_name members in both struct utmpx
23777         and struct utmp.
23778
23779 2000-01-30  Jim Meyering  <meyering@lucent.com>
23780
23781         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
23782         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
23783         header files where only utmpx.ut_user is declared.
23784
23785         * lib/readutmp.h (UT_USER): Define.
23786
23787 2000-01-29  Jim Meyering  <meyering@lucent.com>
23788
23789         * m4/lib-check.m4: New file containing library-related checks from
23790         fileutils and sh-utils (textutils had none).
23791
23792 2000-01-28  Jim Meyering  <meyering@lucent.com>
23793
23794         * m4/perl.m4: Change format of warning message to look more like that
23795         from the missing script.  Suggestion from François Pinard.
23796
23797 2000-01-25  Jim Meyering  <meyering@lucent.com>
23798
23799         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
23800         well as time.h in the compile check.
23801         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
23802         Fix typo in cross-compiling case: s/yes/no/.
23803
23804 2000-01-23  Jim Meyering  <meyering@lucent.com>
23805
23806         * m4/jm-macros.m4: Move df-related tests here from
23807         fileutils/configure.in
23808
23809         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
23810         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
23811
23812         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
23813         s/space/ac_fsusage_space/.
23814         (jm_FILE_SYSTEM_USAGE): Take two parameters.
23815
23816         * m4/ftruncate.m4: New file (derived from part of
23817         fileutils/configure.in).
23818         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
23819         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
23820
23821         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
23822         AC_SUBST these here, rather than just in sh-util/configure.in, so
23823         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
23824         all the same.
23825         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
23826         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
23827         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
23828         (AC_SUBST(POW_LIBM)): Likewise.
23829         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
23830
23831 2000-01-23  Jim Meyering  <meyering@lucent.com>
23832
23833         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
23834         obstack.c.
23835
23836 2000-01-22  Jim Meyering  <meyering@lucent.com>
23837
23838         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
23839
23840         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
23841
23842         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
23843         configure.in
23844         (AC_CHECK_HEADERS): Likewise for sh-utils.
23845         (AC_CHECK_HEADERS): Likewise for textutils.
23846         Merge the three lists of headers.
23847
23848         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
23849         from fileutils' configure.in.
23850
23851         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
23852         code. Moved tests into their own function (_jm_DECL_HEADERS) in
23853         check-decl.m4.
23854
23855         * m4/check-decl.m4: Use #if rather than #ifdef.
23856         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
23857         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
23858         (_jm_DECL_HEADERS): Define new function.
23859         (jm_CHECK_DECLARATIONS): Require it.
23860
23861 2000-01-22  Jim Meyering  <meyering@lucent.com>
23862
23863         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
23864         [! HAVE_DECL_STRTOULL]: Declare strtoull.
23865         Required for some AIX systems.  Reported by Christian Krackowizer.
23866         [TESTING] (main): New function.
23867
23868         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
23869         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
23870         letters.
23871
23872         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
23873         iswprint.
23874
23875         * lib/strverscmp.c (ISDIGIT): Define.
23876         (strverscmp): Use ISDIGIT, not isdigit.
23877
23878 2000-01-19  Jim Meyering  <meyering@lucent.com>
23879
23880         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
23881         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
23882         defines `struct timespec' in <sys/time.h>
23883
23884         * m4/c-bs-a.m4: Remove uses of changequote altogether.
23885         Thanks to Akim for explaining.
23886
23887 2000-01-17  Paul Eggert  <eggert@twinsun.com>
23888
23889         * lib/nanosleep.c (nanosleep):
23890         Don't use SA_INTERRUPT to decide whether to call sigaction, as
23891         POSIX.1 doesn't require SA_INTERRUPT and some systems
23892         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
23893         it's been part of POSIX.1 since day 1 (in 1988).
23894
23895 2000-01-17  Jim Meyering  <meyering@lucent.com>
23896
23897         * lib/interlock: Remove unused file.  Reported by François Pinard.
23898
23899 2000-01-16  Paul Eggert  <eggert@twinsun.com>
23900
23901         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
23902         alert, backslash, formfeed, and vertical tab unnecessarily in
23903         shell quoting style.
23904
23905 2000-01-16  Jim Meyering  <meyering@lucent.com>
23906
23907         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
23908         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
23909         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
23910         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
23911
23912 2000-01-16  Jim Meyering  <meyering@lucent.com>
23913
23914         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
23915         because the latter didn't work.
23916
23917 2000-01-15  Jim Meyering  <meyering@lucent.com>
23918
23919         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
23920         (AC_REPLACE_FUNCS): Add memcpy and memset.
23921         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
23922         Add strpbrk.
23923         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
23924
23925 2000-01-12  Jim Meyering  <meyering@lucent.com>
23926
23927         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
23928         (jm_PREREQ): Use it.
23929         (jm_PREREQ_READUTMP): New macro.
23930         (jm_PREREQ): Use it.
23931
23932 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23933
23934         Quote multibyte characters correctly.
23935         * m4/c-bs-a.m4: New file.
23936         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
23937         (jm_PREREQ): Use it.
23938
23939 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23940
23941         * m4/uintmax_t.m4: Port to autoconf 2.13.
23942
23943 2000-01-08  Jim Meyering  <meyering@ascend.com>
23944
23945         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
23946         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
23947
23948 2000-01-04  Jim Meyering  <meyering@ascend.com>
23949
23950         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
23951         jm_STRUCT_DIRENT_D_TYPE.
23952         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
23953         jm_STRUCT_DIRENT_D_INO.
23954         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
23955         jm_STRUCT_UTIMBUF.
23956         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
23957         renamings.
23958         * m4/utime.m4: Likewise.
23959
23960         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
23961         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
23962
23963 2000-01-03  Paul Eggert  <eggert@twinsun.com>
23964
23965         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
23966         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
23967
23968 2000-01-02  Jim Meyering  <meyering@ascend.com>
23969
23970         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
23971         remember if this is necessary.
23972
23973 1999-12-26  Jim Meyering  <meyering@ascend.com>
23974
23975         * m4/jm-macros.m4: Use it here.
23976         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
23977
23978 1999-12-23  Jim Meyering  <meyering@ascend.com>
23979
23980         * m4/jm-macros.m4: Check for clock_gettime (moved from
23981         fileutils/configure.in)
23982         Check for gettimeofday.
23983
23984 1999-12-20  Jim Meyering  <meyering@ascend.com>
23985
23986         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
23987         autoconf-2.14a-1999-12-20.
23988
23989 1999-12-19  Jim Meyering  <meyering@ascend.com>
23990
23991         * m4/lstat-slash.m4: New file.
23992         * m4/jm-macros.m4: Use the new macro:
23993         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23994
23995 1999-12-07  Jim Meyering  <meyering@ascend.com>
23996
23997         * m4/perl.m4: Require that File::Compare be available, too.
23998         Too many systems seem to lack it.
23999
24000         * m4/strftime.m4: Add checks for most of the cpp macros tested in
24001         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
24002
24003 1999-11-18  Paul Eggert  <eggert@twinsun.com>
24004
24005         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
24006         problem with the QNX 4.25 shell, which doesn't propagate exit
24007         status of failed commands inside shell assignments.
24008
24009 1999-11-17  Jim Meyering  <meyering@ascend.com>
24010
24011         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
24012
24013 1999-11-07  Jim Meyering  <meyering@ascend.com>
24014
24015         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
24016
24017 1999-11-06  Jim Meyering  <meyering@ascend.com>
24018
24019         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
24020         * m4/jm-macros.m4 (jm_MACROS): Use it here.
24021
24022 1999-11-05  Jim Meyering  <meyering@ascend.com>
24023
24024         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
24025         configure.in of textutils, fileutils, and sh-utils into this one
24026         (shared between those packages) file.
24027         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
24028         AC_STRUCT_ST_BLKSIZE.
24029
24030 1999-11-03  Jim Meyering  <meyering@ascend.com>
24031
24032         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
24033         of AC_CHECK_TYPE checks includes unistd.h.
24034         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
24035         Suggestion from Akim Demaille.
24036
24037 1999-10-30  Jim Meyering  <meyering@ascend.com>
24038
24039         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
24040         m4-quoted string.
24041         * m4/ls-mntd-fs.m4: Likewise.
24042         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
24043         * m4/jm-winsz1.m4: Likewise.
24044
24045         * m4/const.m4: Remove file, since the fix made it into the experimental
24046         version of autoconf.
24047         * m4/mktime.m4: Likewise.
24048
24049         * m4/check-type.m4: Remove file, now that the latest version of
24050         AC_CHECK_TYPE takes a third arg to specify additional #includes.
24051
24052         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
24053         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
24054         AC_CHECK_TYPE.
24055
24056 1999-10-04  Jim Meyering  <meyering@ascend.com>
24057
24058         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
24059
24060 1999-09-22  Paul Eggert  <eggert@twinsun.com>
24061
24062         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
24063         2.95.1 bug with HP-UX 10.20.
24064
24065 1999-09-17  Jim Meyering  <meyering@ascend.com>
24066
24067         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
24068         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
24069         due to missing strdup (against sh-utils-2.0).
24070
24071 1999-08-29  Jim Meyering  <meyering@ascend.com>
24072
24073         * m4/jm-macros.m4: Require jm_BISON.
24074         * m4/bison.m4: New file.
24075
24076 1999-08-17  Paul Eggert  <eggert@twinsun.com>
24077
24078         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
24079         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
24080
24081 1999-08-05  Jim Meyering  <meyering@ascend.com>
24082
24083         * m4/getline.m4: Rename test file from conftestdata to conftest.data
24084         to avoid conflicts with `conftest' on 8+3 filesystems.
24085         Suggestion from Eli Zaretskii.
24086
24087 1999-08-04  Jim Meyering  <meyering@ascend.com>
24088
24089         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
24090         fileutils and sh-utils (textutils's getline test was inadequate).
24091         (AM_FUNC_GETLINE): Run this test.
24092         (AC_CHECK_FUNCS): Check for getdelim.
24093         Reported by Bob Proulx.
24094
24095 1999-08-02  Jim Meyering  <meyering@ascend.com>
24096
24097         * m4/jm-macros.m4: Add a comment.
24098
24099 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24100
24101         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
24102         <inttypes.h> defines strtoumax as a macro (and not as a
24103         function).
24104
24105 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24106
24107         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
24108         that we can shift, multiply and divide unsigned long long
24109         values; Ultrix cc can't do it.
24110
24111 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24112
24113         * m4/mktime.m4: New file, which is a preview of what should appear
24114         in the next public autoconf release.
24115
24116 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24117
24118         * m4/lfs.m4: Remove this file.
24119         * m4/largefile.m4: New file.  It contains the old contents of
24120         lfs.m4, except that all names with prefix AC_LFS have been
24121         changed to use the prefix AC_SYS_LARGEFILE instead, to be
24122         compatible with future autoconf versions.  Also, some minor m4
24123         quoting problems have been fixed.
24124
24125 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24126
24127         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
24128         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
24129         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
24130         and simplify the shell code.
24131
24132 1999-08-01  Jim Meyering  <meyering@ascend.com>
24133
24134         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
24135         m4.
24136
24137 1999-07-20  Jim Meyering  <meyering@ascend.com>
24138
24139         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
24140
24141 1999-07-15  Jim Meyering  <meyering@ascend.com>
24142
24143         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
24144
24145 1999-05-22  Jim Meyering  <meyering@ascend.com>
24146
24147         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
24148
24149 1999-05-20  Jim Meyering  <meyering@ascend.com>
24150
24151         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
24152         Add a colon after each `then' in case $4 is empty.
24153
24154 1999-05-16  Jim Meyering  <meyering@ascend.com>
24155
24156         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
24157
24158 1999-05-10  Jim Meyering  <meyering@ascend.com>
24159
24160         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
24161
24162         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
24163         AC_FUNC_MKTIME.
24164
24165 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
24166
24167         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
24168
24169 1999-05-04  Paul Eggert  <eggert@twinsun.com>
24170
24171         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
24172         not CPPFLAGS, so that linking works correctly in IRIX.
24173
24174 1999-04-30  Paul Eggert  <eggert@twinsun.com>
24175
24176         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
24177
24178 1999-04-20  Paul Eggert  <eggert@twinsun.com>
24179
24180         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
24181         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
24182         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
24183         jm_AC_TYPE_UNSIGNED_LONG_LONG.
24184         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
24185
24186         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
24187
24188 1999-04-20  Jim Meyering  <meyering@ascend.com>
24189
24190         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
24191         AC_REPLACE xstroull if necessary.  From Paul Eggert.
24192         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
24193
24194 1999-04-18  Jim Meyering  <meyering@ascend.com>
24195
24196         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
24197         * m4/jm-macros.m4: Use it.
24198
24199 1999-04-06  Jim Meyering  <meyering@ascend.com>
24200
24201         * m4/strftime.m4: Remove test for %f.
24202
24203 1999-03-29  Jim Meyering  <meyering@ascend.com>
24204
24205         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
24206         superset of the AC_TYPE_* checks in the textutils, fileutils,
24207         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
24208         AC_TYPE_PID_T.
24209
24210 1999-03-28  Jim Meyering  <meyering@ascend.com>
24211
24212         * m4/jm-macros.m4: Define GNU_PACKAGE here.
24213         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
24214         replaced e.g., in the *.sh files of the sh-utils.
24215
24216 1999-03-20  Jim Meyering  <meyering@ascend.com>
24217
24218         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
24219         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
24220         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
24221
24222 1999-03-19  Jim Meyering  <meyering@ascend.com>
24223
24224         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
24225
24226 1999-03-12  Jim Meyering  <meyering@ascend.com>
24227
24228         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
24229
24230 1999-03-07  Jim Meyering  <meyering@ascend.com>
24231
24232         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
24233         declared.
24234
24235 1999-02-17  Jim Meyering  <meyering@ascend.com>
24236
24237         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
24238         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
24239
24240 1999-02-07  Jim Meyering  <meyering@ascend.com>
24241
24242         * m4/group-member.m4: New file -- extracted from sh-utils'
24243         configure.in.
24244
24245         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
24246         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
24247
24248 1999-02-06  Jim Meyering  <meyering@ascend.com>
24249
24250         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
24251         * m4/fnmatch.m4: Likewise.
24252         * m4/getgroups.m4: Likewise.
24253         * m4/lstat.m4: Likewise.
24254         * m4/malloc.m4: Likewise.
24255         * m4/putenv.m4: Likewise.
24256         * m4/realloc.m4: Likewise.
24257         * m4/regex.m4: Likewise.
24258         * m4/stat.m4: Likewise.
24259         * m4/strftime.m4: Likewise.
24260         Suggestion from Alain Magloire.
24261
24262         * m4/chown.m4: Use `.$ac_objext', not `.o'.
24263         * m4/fnmatch.m4: Likewise.
24264         * m4/getgroups.m4: Likewise.
24265         * m4/getline.m4: Likewise.
24266         * m4/lstat.m4: Likewise.
24267         * m4/malloc.m4: Likewise.
24268         * m4/memcmp.m4: Likewise.
24269         * m4/putenv.m4: Likewise.
24270         * m4/realloc.m4: Likewise.
24271         * m4/regex.m4: Likewise.
24272         * m4/stat.m4: Likewise.
24273         * m4/strftime.m4: Likewise.
24274         Suggestion from Alain Magloire.
24275
24276         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
24277         an argument.
24278
24279         * m4/regex.m4: Add a run-time Test for proper operation of
24280         re_compile_pattern.
24281
24282 1999-01-31  Jim Meyering  <meyering@ascend.com>
24283
24284         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
24285
24286 1999-01-30  Jim Meyering  <meyering@ascend.com>
24287
24288         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
24289
24290         * m4/jm-mktime.m4: Make this a wrapper around the official
24291         AM_FUNC_MKTIME rather than my private copy, now that the official one
24292         is up to date.
24293         * m4/mktime.m4: Remove file.
24294
24295         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
24296         * m4/uptime.m4: Likewise.
24297         * m4/uintmax_t.m4: Likewise.
24298
24299 1999-01-28  Jim Meyering  <meyering@ascend.com>
24300
24301         * m4/jm-macros.m4: Use jm_AFS.
24302         * m4/afs.m4: New file (from fileutils' configure.in).
24303
24304         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
24305         * m4/chown.m4: Likewise.
24306         * m4/d-ino.m4: Likewise.
24307         * m4/d-type.m4: Likewise.
24308         * m4/fnmatch.m4: Likewise.
24309         * m4/getgroups.m4: Likewise.
24310         * m4/gettext.m4: Likewise.
24311         * m4/jm-mktime.m4: Likewise.
24312         * m4/jm-winsz2.m4: Likewise.
24313         * m4/lcmessage.m4: Likewise.
24314         * m4/ls-mntd-fs.m4: Likewise.
24315         * m4/malloc.m4: Likewise.
24316         * m4/memcmp.m4: Likewise.
24317         * m4/putenv.m4: Likewise.
24318         * m4/realloc.m4: Likewise.
24319         * m4/st_mtim.m4: Likewise.
24320         * m4/strftime.m4: Likewise.
24321
24322 1999-01-16  Jim Meyering  <meyering@ascend.com>
24323
24324         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
24325         (ARGMATCH_DIE_DECL): Define.
24326
24327 1999-01-12  Jim Meyering  <meyering@ascend.com>
24328
24329         * m4/Makefile.am.in: Rewrite to avoid using fmt.
24330         Reported by Lars Hecking.
24331
24332 1999-01-10  Jim Meyering  <meyering@ascend.com>
24333
24334         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
24335         gross kludge.
24336         * m4/inttypes_h.m4: Likewise.
24337         * m4/lstat.m4: Likewise.
24338         * m4/malloc.m4: Likewise.
24339         * m4/readdir.m4: Likewise.
24340         * m4/realloc.m4: Likewise.
24341         * m4/st_dm_mode.m4: Likewise.
24342         * m4/stat.m4: Likewise.
24343         * m4/utimbuf.m4: Likewise.
24344         * m4/utimes.m4: Likewise.
24345
24346         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
24347         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
24348         comments in config.h.in are meaningful.
24349
24350         * m4/jm-macros.m4: Require autoconf-2.13 here.
24351
24352         * m4/regex.m4: By default, don't use the included regex.c on systems
24353         with glibc 2.  Suggestion from Uli Drepper.
24354
24355 1999-01-02  Jim Meyering  <meyering@ascend.com>
24356
24357         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
24358
24359 1998-12-18  Jim Meyering  <meyering@ascend.com>
24360
24361         * m4/Makefile.am.in (Makefile.am): Simplify rule.
24362         Based on a suggestion from Lars Hecking.
24363
24364 1998-11-16  Paul Eggert  <eggert@twinsun.com>
24365
24366         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
24367
24368 1998-11-16  Jim Meyering  <meyering@ascend.com>
24369
24370         * m4/lfs.m4: Double-quote the `uname...` expression.
24371
24372 1998-11-14  Jim Meyering  <meyering@ascend.com>
24373
24374         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
24375         * m4/stat.m4: Likewise.
24376
24377 1998-11-03  Jim Meyering  <meyering@ascend.com>
24378
24379         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
24380         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
24381
24382 1998-10-18  Jim Meyering  <meyering@ascend.com>
24383
24384         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
24385
24386 1998-10-17  Jim Meyering  <meyering@ascend.com>
24387
24388         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
24389         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
24390         calls for those previously hard-coded headers.  Instead, take a new
24391         parameter.
24392         (jm_CHECK_DECLARATIONS): Reflect interface change.
24393         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
24394         (jm_CHECK_DECL_LOCALTIME_R): New macro.
24395
24396         * m4/mktime.m4: Test for spring-forward gap before long-running test.
24397
24398 1998-10-14  Jim Meyering  <meyering@ascend.com>
24399
24400         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
24401         instead of "TZ=America/Vancouver".  From Paul Eggert.
24402
24403 1998-10-11  Jim Meyering  <meyering@ascend.com>
24404
24405         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
24406         This adds a test for a recently added compatibility fix for mktime.c.
24407         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
24408
24409 1998-09-27  Jim Meyering  <meyering@ascend.com>
24410
24411         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
24412
24413         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
24414         ../configure.in, including a change from Gordon Matzigkeit to allow
24415         cross-compiling for the Hurd.
24416
24417         * m4/glibc.m4: New file/macro to test for the GNU C Library
24418         versions 1 and 2.  From Gordon Matzigkeit.
24419         Indent.
24420
24421 1998-09-21  Jim Meyering  <meyering@ascend.com>
24422
24423         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
24424
24425 1998-08-18  Paul Eggert  <eggert@twinsun.com>
24426
24427         Port nanosecond-resolution times to UnixWare 2.1.2 and
24428         pedantic Solaris 2.6.
24429
24430         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
24431         AC_STRUCT_ST_MTIM.
24432         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
24433         Generate name of ns member, instead of just 1 or undef.
24434         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
24435
24436 1998-08-15  Jim Meyering  <meyering@ascend.com>
24437
24438         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
24439         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
24440         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
24441         instead of jm_TYPE_SSIZE_T.
24442
24443 1998-08-12  Jim Meyering  <meyering@ascend.com>
24444
24445         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
24446
24447 1998-08-02  Jim Meyering  <meyering@ascend.com>
24448
24449         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
24450         in acconfig.h manually.
24451
24452 1998-07-31  Paul Eggert  <eggert@twinsun.com>
24453
24454         * m4/st_mtim.m4: New file.
24455
24456 1998-07-28  Jim Meyering  <meyering@ascend.com>
24457
24458         * m4/utimes.m4: Undef stat.
24459
24460 1998-07-25  Jim Meyering  <meyering@ascend.com>
24461
24462         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
24463         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
24464
24465 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
24466
24467         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
24468         uid and gid actually remain unchanged.
24469
24470 1998-07-07  Jim Meyering  <meyering@ascend.com>
24471
24472         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
24473
24474 1998-07-04  Jim Meyering  <meyering@ascend.com>
24475
24476         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
24477         to prove that this macro can be used in packages without regex.c.
24478
24479 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
24480
24481         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
24482         is to be used.
24483
24484 1998-07-03  Jim Meyering  <meyering@ascend.com>
24485
24486         * m4/gettext.m4: Add -lintl if it's found to be necessary.
24487
24488         * m4/gettext.m4: New file -- from gettext-0.10.35.
24489         * m4/lcmessage.m4: Likewise.
24490         * m4/progtest.m4: Likewise.
24491
24492         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
24493         * m4/jm-macros.m4: Require the new macro.
24494
24495 1998-06-29  Jim Meyering  <meyering@ascend.com>
24496
24497         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
24498         for the definition of NGROUPS (used in a system header included
24499         by sys/mount.h).
24500
24501 1998-06-28  Jim Meyering  <meyering@ascend.com>
24502
24503         * m4/ls-mntd-fs.m4: New file.
24504         * m4/fstypename.m4: New file.
24505
24506         * m4/jm-macros.m4: Require the new macro.
24507         * m4/jm-glibc-io.m4: New file.
24508
24509 1998-05-19  Jim Meyering  <meyering@ascend.com>
24510
24511         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
24512         * m4/lchown.m4: New file.
24513
24514         * m4/Makefile.am.in: New file.
24515         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
24516
24517 1998-05-14  Jim Meyering  <meyering@ascend.com>
24518
24519         * m4/Makefile.am (EXTRA_DIST): Add them.
24520         * m4/jm-macros.m4: New file.
24521         * m4/utimbuf.m4: New file.
24522
24523 1998-05-12  Jim Meyering  <meyering@ascend.com>
24524
24525         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
24526
24527 1998-05-11  Jim Meyering  <meyering@ascend.com>
24528
24529         * m4/isc-posix.m4: New file.
24530
24531 1998-05-10  Jim Meyering  <meyering@ascend.com>
24532
24533         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
24534
24535 1998-05-09  Jim Meyering  <meyering@ascend.com>
24536
24537         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
24538         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
24539         with automake.
24540
24541         * m4/ssize_t.m4: New file.
24542         * m4/mktime.m4: Remove file -- the new automake has this now.
24543
24544 1998-04-26  Jim Meyering  <meyering@ascend.com>
24545
24546         * m4/assert.m4: New file.
24547         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
24548
24549 1998-04-05  Jim Meyering  <meyering@ascend.com>
24550
24551         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
24552         (jm_PREREQ): Use it here.
24553
24554 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
24555
24556         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
24557         in acconfig.h.
24558
24559 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
24560
24561         * m4/prereq.m4: New file.
24562         * m4/error.m4: New file.
24563         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
24564
24565 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
24566
24567         * m4/getline.m4: Don't set am_cv_func_working_getline before the
24568         cache-check for the same variable -- that defeated the purpose of
24569         the test; the test program was never run.  This was a problem only
24570         on systems with losing getline functions -- HP-UX 10.20 is one.
24571         Reported by Bjorn Helgaas.
24572
24573 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
24574
24575         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
24576
24577 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
24578
24579         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
24580
24581         * m4/const.m4: New file.  Use an initializer in this declaration
24582         typedef int charset[2]; const charset x;
24583         Reported by Bob Glickstein.
24584
24585 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
24586
24587         * m4/chown.m4: Fix reversed types on -1 args to chown.
24588         From Kaveh Ghazi.
24589
24590 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
24591
24592         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
24593         Add lseek and memchr.
24594
24595         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
24596         T.E.Dickey <dickey@clark.net> said that some older preprocessors
24597         have a 20-character limit on names.
24598
24599 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
24600
24601         * m4/inttypes_h.m4: New file.
24602         * m4/uintmax_t.m4: New file.
24603         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
24604
24605 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
24606   Free Software Foundation, Inc.
24607 Copying and distribution of this file, with or without modification,
24608 are permitted provided the copyright notice and this notice are preserved.