.
[gnulib.git] / ChangeLog
1 2006-12-24  Jim Meyering  <jim@meyering.net>
2
3         Work around an fchownat bug in glibc-2.4:
4         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
5         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
6         in spite of the -P option.
7         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
8         New macros.
9         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
10         * modules/openat (Files): Add lib/fchownat.c.
11         * lib/openat.c (fchownat): Don't define here.  Move to...
12         * lib/fchownat.c: ...this new file.
13
14 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15
16         Fix bug reported by Bruno Haible in
17         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
18         where quotearg.c didn't compile on Mac OS X 10.2 because it
19         lacks <wchar.h> and wint_t.
20         * lib/wctype_.h (__wctype_wint_t): New type.
21         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
22         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
23         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
24         Arg is now of type __wctype_wint_t, not wint_t.
25         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
26         substitute HAVE_WINT_T.
27         * modules/wctype (Files): Add m4/wint_t.m4.
28         (wctype.h): Substitute HAVE_WINT_T.
29
30 2006-12-23  Bruno Haible  <bruno@clisp.org>
31
32         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
33
34 2006-12-23  Bruno Haible  <bruno@clisp.org>
35
36         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
37         S_ISLNK.
38         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
39         mingw.
40
41 2006-12-22  Bruno Haible  <bruno@clisp.org>
42
43         * lib/copy-file.c: Include acl.h.
44         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
45         Close the file descriptors only after being done with copy_acl.
46         * modules/copy-file (Depends-on): Add acl.
47
48 2006-12-22  Bruno Haible  <bruno@clisp.org>
49
50         * gnulib-tool (SED): New variable.
51         Use $SED instead of sed everywhere.
52
53 2006-12-22  Bruno Haible  <bruno@clisp.org>
54
55         * modules/no-c++: New file.
56         * m4/no-c++.m4: New file.
57         * MODULES.html.sh (Support for building libraries and executables):
58         Add no-c++.
59
60 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
61
62         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
63         Include <limits.h>, and use its INT_MAX to rewrite the
64         j loop so that it does not overflow 'int'.  Problem reported by
65         Ralf Wildenhues in
66         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
67         Play it safe by shifting left by 1 rather than multiplying by 2,
68         as GCC is less likely to optimize this away when the value
69         is signed (when it assumes overflow leads to undefined behavior).
70         Also, don't assume time_t uses two's complement.
71
72 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
73
74         * MODULES.html.sh: New module wctype.
75         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
76         * lib/fnmatch.c: Don't bother to include <wchar.h> before
77         <wctype.h>, since the new wctype module should fix this.
78         * lib/quotearg.c: Include <wctype.h> unconditionally, since
79         the wctype module should arrange for it.
80         * lib/regex_internal.h: Likewise.
81         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
82         since the wctype module should handle this now.
83         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
84         * modules/fnmatch (Depends-on): Add wctype.
85         * modules/quotearg (Depends-on): Likewise.
86         * modules/regex (Depends-on): Likewise.
87
88 2006-12-19  Bruno Haible  <bruno@clisp.org>
89
90         * lib/strdup.h [C++]: Wrap definitions in extern "C".
91         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
92
93 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
94
95         * modules/savewd (Depends-on): Fix dependency on fcntl.
96
97 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
98
99         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
100         conforms to C99, rather than relying on the user's environment
101         setting of STDINT_H.
102
103 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
104         and Eric Blake  <ebb9@byu.net>
105
106         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
107         This is more consistent with the other defines here.
108         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
109         Port to z/OS.  Problem reported by Paul Gilmartin.
110         Change local vars to use gl_ prefix rather than ac_.
111         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
112         with other defines.
113         * modules/double-slash-root: New module.
114         * modules/dirname (Files): Remove m4/double-slash-root.m4.
115         (Depends-on): Add double-slash-root.
116         * MODULES.html.sh (File system functions): Mention new module.
117
118 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
119
120         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
121         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
122         This is for the benefit of gzip, which doesn't do i18n.
123
124 2006-12-12  Jim Meyering  <jim@meyering.net>
125
126         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
127         Reported by Andreas Schwab <schwab@suse.de>.
128
129 2006-12-12  Bruno Haible  <bruno@clisp.org>
130
131         Merge these changes.
132         2006-09-05  Bruno Haible  <bruno@clisp.org>
133         * lib/iconvme.c (iconv_string): No need to save and restore errno when
134         iconv_alloc succeeded.
135         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
136         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
137         test for " && dest " at the end - dest is always != NULL there. Call
138         iconv with 4xNULL arguments initially, to reset the state. Call iconv
139         with 2xNULL arguments, also to flush the state storage. Handle the
140         IRIX iconv behaviour. Realloc the final result, to throw away unused
141         memory.
142
143 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
144
145         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
146         and fchmodat unconditionally, since glibc 2.4 has them.
147         Problem reported by Arkadiusz Miskiewicz.
148
149 2006-12-10  Bruno Haible  <bruno@clisp.org>
150
151         * gnulib-tool (func_import): Show the include files only for those
152         modules that are copied and specified.
153         Reported by Karl Berry.
154
155 2006-12-08  Jim Meyering  <jim@meyering.net>
156
157         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
158         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
159
160         * build-aux/announce-gen: Add two new options, both optional:
161         --bootstrap-tools=TOOL_LIST
162               a comma-separated list of tools, e.g.,
163               autoconf,automake,bison,gnulib
164         --gnulib-snapshot-date=DATE
165               if gnulib is in the bootstrap tool list,
166               then report this as the snapshot date.
167               If not specified, use the current date/time.
168               If you specify a date here, be sure it's UTC.
169
170 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
171
172         * tests/test-argp-2.sh: Fix test to match actual output.
173         (func_compare): Fix sed script to be portable.
174
175 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
176
177         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
178         workaround for this case.  It is not autoconfigured now; offhand
179         it's hard to see how to autoconfigure it.
180
181 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
182
183         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
184         a directory that is about to be chowned.  Such a directory's
185         initial file permissions should permit the owner only and this
186         should not be changed until after the chown, since the group and
187         other bits would be incorrect if they granted permission before
188         the chown.
189
190         Fix porting problem for iswctype reported by Georg Schwarz in:
191         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
192         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
193         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
194         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
195         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
196
197 2006-12-03  Jim Meyering  <jim@meyering.net>
198
199         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
200         p->fts_statp may not yet be defined.
201         (fts_read): Instead, set it in the caller, once p->fts_statp is
202         sure to be defined, and corresponds to a top-level directory.
203         This bug made du -x fail.  Here's the coreutils test case:
204         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
205         Reported by Mike Frysinger.
206
207 2006-12-01  Jim Meyering  <jim@meyering.net>
208
209         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
210         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
211         Reported by Simon Josefsson.
212
213 2006-11-30  Jim Meyering  <jim@meyering.net>
214
215         * m4/warning.m4: Use the all-permissive copyright notice
216         recommended by RMS (rather than LGPL).
217         * m4/vararrays.m4: Likewise.
218         * m4/flexmember.m4: Likewise.
219
220 2006-11-29  Bruno Haible  <bruno@clisp.org>
221
222         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
223         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
224         using +=.
225         Reported by Simon Josefsson <simon@josefsson.org>.
226
227 2006-11-28  James Youngman <jay@gnu.org>
228
229         * README: Advise users that they might find the bug-gnulib@gnu.org
230         and autotools-announce@gnu.org mailing lists useful.
231
232 2006-11-28  Bruno Haible  <bruno@clisp.org>
233
234         * m4/ptrdiff_max.m4: Remove file.
235
236 2006-11-21  Bruno Haible  <bruno@clisp.org>
237
238         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
239         _AC_COMPUTE_INT.
240         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
241         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
242         _AC_COMPUTE_INT.
243         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
244         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
245         _AC_COMPUTE_INT.
246         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
247
248 2006-11-28  Jim Meyering  <jim@meyering.net>
249
250         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
251         warning from "gcc -Wshadow" about shadowing the builtin.
252
253 2006-11-27  Bruno Haible  <bruno@clisp.org>
254
255         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
256         _AC_COMPUTE_INT.
257         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
258
259 2006-11-27  Bruno Haible  <bruno@clisp.org>
260             Paul Eggert  <eggert@cs.ucla.edu>
261
262         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
263
264 2006-11-26  Bruno Haible  <bruno@clisp.org>
265
266         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
267         noinst_LTLIBRARIES.
268
269 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
270             Bruno Haible  <bruno@clisp.org>
271
272         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
273         if compiling with "gcc -ansi".
274
275 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
276
277         Fix some incompatibilities with gcc -ansi -pedantic.
278         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
279         if compiling pedantically with GCC, unless it's C99 or later.
280         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
281         it mishandles gcc -ansi -pedantic as well.
282         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
283         if gcc -pedantic.
284         * lib/regexec.c (check_node_accept_bytes): Don't use auto
285         initializers for struct if -pedantic, unless it's C99 or later.
286
287 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
288
289         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
290         Don't close an fd more than once. Identical atimes indicate
291         success, not failure.
292
293 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
294
295         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
296
297 2006-11-23  Jim Meyering  <jim@meyering.net>
298
299         * build-aux/announce-gen: New file.  From coreutils.
300
301 2006-11-22  Jim Meyering  <jim@meyering.net>
302
303         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
304         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
305         (fts_read): Use a temporary to narrow the overused st_size member
306         before using it in a switch statement.  Reported by Matthew Woehlke.
307
308         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
309         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
310
311 2006-11-20  Bruno Haible  <bruno@clisp.org>
312
313         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
314         changequote instead of pairs of brackets.
315         Reported by Andreas Schwab <schwab@suse.de>.
316
317 2006-11-21  Jim Meyering  <jim@meyering.net>
318
319         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
320         so as to remain compatible with older compilers.
321         Patch from Michael Deutschmann.
322
323 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
324
325         * MODULES.html.sh (File system functions): Add openat.
326
327         * lib/openat.h (rpl_fstatat): New macro, if
328         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
329         (fstatat): Define to rpl_fstatat under the same conditions,
330         unless COMPILING_FSTATAT.
331         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
332         seems to have the bug.
333         * lib/fstatat.c: New file.
334         * modules/openat (Files): Add it.
335
336 2006-11-20  Bruno Haible  <bruno@clisp.org>
337
338         * Makefile: New file.
339
340 2006-11-20  Jim Meyering  <jim@meyering.net>
341
342         The beginnings of syntax-related checks for gnulib.
343         * lib/Makefile: New file.
344         * lib/t-idcache: New script.  Ensure that the two halves of
345         idcache.c stay in sync.
346
347         * lib/idcache.c: Adjust comments in user- and group- portions to
348         be more accurate, and to be consistent with one another.
349
350 2006-11-20  Jim Meyering  <jim@meyering.net>
351
352         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
353         continue using the flexible array member (thus, this module performs
354         half as many malloc calls), with the addition that...
355         (getgroup, getuser): Consistently record a non-match via an empty
356         "name" string, and map an empty string match to a NULL return value.
357         * modules/idcache (Depends-on): Re-add flexmember.
358
359         * lib/idcache.c (getuser): Remove all uses of the register keyword.
360         (getuidbyname, getgroup, getgidbyname): Likewise.
361
362         Use cleaner syntax: NULL rather than 0.
363         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
364
365 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
366
367         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
368         It mishandled the case where the group was missing.
369         Problem reported by Greg Schafer.
370         * modules/idcache: Likewise.
371
372 2006-11-18  Jim Meyering  <jim@meyering.net>
373
374         * check-module (%exempt_header): Add exception for some
375         conditionally-included headers.
376
377         * modules/i-ring (Depends-on): Add verify.
378         (License): Change to LGPL.
379
380 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
381
382         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
383         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
384         and inttostr.h.  Use snprintf rather than uinttostr, so that
385         LGPLed code doesn't depend on GPLed.
386
387 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
388
389         * modules/inline (License): Change from GPL to LGPL.
390
391 2006-11-17  Jim Meyering  <jim@meyering.net>
392
393         * modules/d-type (License): Switch to LGPL.
394
395 2006-11-15  Bruno Haible  <bruno@clisp.org>
396
397         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
398
399 2006-11-15  Eric Blake  <ebb9@byu.net>
400
401         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
402         the module dependency.
403
404 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
405             Bruno Haible  <bruno@clisp.org>
406
407         * gnulib-tool (func_create_testdir): Add license consistency check.
408
409 2006-11-15  Eric Blake  <ebb9@byu.net>
410
411         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
412         random "(cached)" in configure output.
413
414 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
415
416         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
417         test for conforming inttypes.h is both announced and cached.
418
419         * MODULES.html.sh (seen_modules, seen_files): New variables.
420         (func_module): Rewrite to use a few less gnulib-tool and sed
421         invocations.  Avoid a couple of quadratic algorithms for ...
422         (missed_modules, missed_files): ... these, with ...
423         (func_append, func_tmpdir): ... these new functions, from
424         gnulib-tool.  Analogously, install traps for cleanup.
425
426         * tests/test-gc.c (main): Remove unused variables.
427         * tests/test-read-file.c: Include stdlib.h, for 'free'.
428
429 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
430
431         * modules/inttostr (License): Change to LGPL.
432
433 2006-11-14  Eric Blake  <ebb9@byu.net>
434
435         * modules/tempname (License): Change to LGPL.
436
437 2006-11-14  Eric Blake  <ebb9@byu.net>
438
439         * doc/functions.texi (Function Portability): *printf functions on
440         Cygwin now understand all POSIX size specifiers.
441
442 2006-11-14  Bruno Haible  <bruno@clisp.org>
443
444         * modules/c-ctype (License): Change to LGPL.
445
446 2006-11-12  Bruno Haible  <bruno@clisp.org>
447
448         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
449         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
450         for GNOME libraries, for which the include files are installed in
451         subdirectories of $prefix/include.
452
453 2006-11-12  Bruno Haible  <bruno@clisp.org>
454
455         * m4/lib-link.m4: Require at least autoconf-2.54.
456         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
457         name to underscores for the --with option.
458
459 2006-11-13  Bruno Haible  <bruno@clisp.org>
460
461         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
462         the tests directory.
463         Reported by Ralf Wildenhues.
464
465 2006-11-13  Bruno Haible  <bruno@clisp.org>
466
467         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
468         (func_emit_initmacro_end): Undo the override here.
469         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
470         Works around the famous automake error in coreutils.
471
472 2006-11-13  Eric Blake  <ebb9@byu.net>
473
474         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
475         element, not its node.
476
477 2006-11-12  Bruno Haible  <bruno@clisp.org>
478
479         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
480         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
481
482 2006-11-12  Bruno Haible  <bruno@clisp.org>
483
484         * gnulib-tool: New option --local-symlink.
485         (func_usage): Document it.
486         (lsymbolic): New variable.
487         (func_import, func_create_testdir): If --symlink was not specified,
488         test whether --local-symlink was specified and the file comes from
489         the local_gnulib_dir.
490
491 2006-11-12  Bruno Haible  <bruno@clisp.org>
492
493         * gnulib-tool (func_ln): New function.
494         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
495
496 2006-11-12  Bruno Haible  <bruno@clisp.org>
497
498         Finish support for source files in subdirectories.
499         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
500         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
501         AUTOMAKE_OPTIONS.
502         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
503
504 2006-11-12  Bruno Haible  <bruno@clisp.org>
505
506         * gnulib-tool (func_get_automake_snippet): Synthesize also an
507         EXTRA_lib_SOURCES augmentation.
508         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
509
510 2006-11-12  Jim Meyering  <jim@meyering.net>
511
512         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
513         file descriptors.  This also averts a failure on systems with
514         native openat support when a traversed directory lacks "x" access.
515         * lib/fts_.h: Include "i-ring.h"
516         (struct FTS) [fts_fd_ring]: New member.
517         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
518         (FCHDIR): Add parentheses.
519         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
520         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
521         When descending, rather than simply closing the previous
522         fts_cwd_fd value, push that file descriptor onto the ring.
523         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
524         (fts_open): Initialize the new fd_ring member.
525         (fts_close): Clear the ring.
526         (fts_safe_changedir): When possible, use our new fd_ring to skip
527         the diropen and fstat and dev/ino comparison that would normally
528         accompany a virtual `chdir ("..")'.
529
530         * modules/fts (Depends-on): Add i-ring.
531         * modules/i-ring: New module.
532         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
533         * m4/i-ring.m4: New file.
534
535 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
536
537         * gnulib-tool (func_create_testdir): Fix replacement of
538         `build-aux' in configure.ac.  Run autotools in gltests
539         subdirectory.
540         (func_create_testdir, func_create_megatestdir, test): There is
541         no need for '--force' in most autotool invocations in a new
542         tree.  Actually fail the whole test if any of the tools, or the
543         configure or make stages fail.
544
545         Sync from Automake.
546         * build-aux/gnupload: Revert last change.  Add pointer to upload
547         instructions of the GNU Maintenance Instructions.
548         Suggestion by Karl Berry.
549
550 2006-11-10  Jim Meyering  <jim@meyering.net>
551
552         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
553
554 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
555
556         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
557         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
558         (bind_textdomain_codeset) [! ENABLE_NLS]:
559         Evaluate all the arguments.  That way, callers get compatible behavior
560         if the arguments have side effects.  Also, it avoids some GCC
561         diagnostics in some cases; Joel E. Denny reported problems when Bison
562         was configured with --enable-gcc-warnigs.
563
564 2006-11-10  Jim Meyering  <jim@meyering.net>
565
566         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
567         relevant options in CFLAGS (like -O, -fno-inline) are taken into
568         account.
569
570 2006-11-10  Jim Meyering  <jim@meyering.net>
571
572         * modules/inline: New file/module.
573         * modules/xalloc (Files): Remove m4/inline.m4.
574         (Depends-on): Add inline, instead.
575         * modules/oset: Likewise.
576         * modules/list: Likewise.
577
578 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
579
580         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
581         Problem reported by Matthew Woehlke.
582
583 2006-11-09  Bruno Haible  <bruno@clisp.org>
584
585         * lib/tempname.c (gen_tempname): Remove variant that invokes
586         __gen_tempname.
587         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
588         __gen_tempname.
589
590 2006-11-08  Bruno Haible  <bruno@clisp.org>
591
592         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
593         to 'yes' instead of 'cross-compiling'.
594
595 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
596
597         * lib/quotearg.h (quotearg_free): New decl.
598         * lib/quotearg.c (quotearg_free): New function.
599         (slot0, nslots, slotvec0, slotvec):
600         Now file-scope so that quotearg_free can get at them.
601
602 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
603
604         Sync from Automake.
605         * build-aux/gnupload: Add missing 'gnu' to example URL.
606         Report by Karl Berry.
607
608 2006-11-08  Bruno Haible  <bruno@clisp.org>
609
610         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
611         Suggested by Paul Eggert.
612
613 2006-11-08  Jim Meyering  <jim@meyering.net>
614
615         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
616         It's already included if !_LIBC.
617         (fts_safe_changedir): Add a comment.
618
619 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
620
621         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
622         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
623         Matthew Woehlke.
624
625         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
626         definitions up, to avoid colliding with change below.
627         (static_inline) [HAVE_INLINE]: New macro.
628         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
629         Provide extern decls when !HAVE_INLINE.  Do not define unless
630         static_inline is defined, either by us or by xmalloc.c.  Use
631         static_inline rather than static inline.
632         (XCALLOC): Optimize sizeof(T) = 1 case.
633         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
634
635 2006-11-07  Bruno Haible  <bruno@clisp.org>
636
637         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
638         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
639         AC_C_INLINE.
640         * modules/xalloc (Files): Add m4/inline.m4.
641
642 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
643
644         * README: Fix typo.
645         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
646         (Miscellanous Notes): ...from this.
647
648 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
649
650         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
651         Mention that offsetof should be used instead of sizeof.
652         From Bruno Haible.
653
654 2006-11-07  Bruno Haible  <bruno@clisp.org>
655
656         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
657
658 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
659
660         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
661         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
662         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
663         (gl_tree_add_before, gl_tree_add_after):
664         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
665         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
666         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
667         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
668         (gl_linked_add_after, gl_linked_add_at): Likewise.
669         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
670         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
671         (gl_tree_add_before, gl_tree_add_after): Likewise.
672         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
673         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
674         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
675
676 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
677
678         * lib/gl_oset.h: Use C comment style, not C++ comment style.
679
680 2006-11-06  Bruno Haible  <bruno@clisp.org>
681
682         * m4/inline.m4: New file.
683         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
684         * modules/list (Files): Add m4/inline.m4.
685         * modules/oset (Files): Likewise.
686
687 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
688
689         * lib/idcache.c: Include <stddef.h>, for offsetof.
690         (struct userid.name): Change from char * to a flexible array member.
691         All uses changed.
692         * modules/idcache (Depends-on): Add flexmember.
693
694         * MODULES.html.sh (Core language properties): New module flexmember.
695         * modules/flexmember, m4/flexmember.m4: New files.
696
697         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
698         inline functions that are identical with the old xnmalloc_inline,
699         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
700         that we can avoid some unnecessary integer multiplications and
701         divisions in the common case where the element size is known at
702         compile time.
703         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
704         needed.
705         (xnboundedmalloc): Remove.
706         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
707         arguments, for consistency with rest of this header.
708         (xcharalloc): Rewrite using XNMALLOC.
709         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
710         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
711         versions have been moved to lib/xalloc.h and renamed to be the
712         non-*_inline versions.
713         (xmalloc, xrealloc): Implement without reference to the xnmalloc
714         and xnrealloc functions, since those functions are now inline and
715         now call us.
716         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
717         renaming described above.
718         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
719         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
720         captures the dependency in AC_C_INLINE.
721
722         New module canonicalize-lgpl, proposed by Charles Wilson in
723         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
724         with a few small changes afterwards.
725         * MODULES.html.sh (File system functions): New module
726         canonicalize-lgpl.
727         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
728         and canonicalize_file_name.
729         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
730         * modules/canonicalize-lgpl: New files.
731
732 2006-11-05  Bruno Haible  <bruno@clisp.org>
733
734         * gnulib-tool (func_import, func_create_testdir): Create directories
735         also for files in subdirectories of lib/.
736
737 2006-11-05  Bruno Haible  <bruno@clisp.org>
738
739         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
740         ANSI C compliant.
741
742 2006-11-03  Bruno Haible  <bruno@clisp.org>
743
744         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
745         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
746         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
747         (xnboundedmalloc): New inline function.
748         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
749         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
750         xmalloc.
751         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
752         xmalloc.
753         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
754         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
755         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
756         xmalloc.
757         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
758         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
759         xmalloc.
760         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
761         gl_tree_add_after): Use XMALLOC instead of xmalloc.
762         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
763         xmalloc.
764         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
765         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
766         gl_tree_add_after): Use XMALLOC instead of xmalloc.
767         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
768         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
769         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
770         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
771
772 2006-11-03  Bruno Haible  <bruno@clisp.org>
773
774         * lib/c-ctype.h [C++]: Define functions without name mangling.
775         * lib/fwriteerror.h [C++]: Likewise.
776         * lib/gcd.h [C++]: Likewise.
777         * lib/linebreak.h [C++]: Likewise.
778
779 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
780
781         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
782         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
783         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
784         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
785         Check for functions and headers just once.
786         Check for declaration of canonicalize_file_name.
787         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
788
789 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
790
791         * gnulib-tool (func_import): Fix typo in actioncmd.
792
793 2006-11-02  Bruno Haible  <bruno@clisp.org>
794
795         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
796         newline sequence in the Makefile.am snippet as a space, like "make"
797         does.
798         Reported by Roger Persson <perrog@gmail.com>.
799
800 2006-11-01  Bruno Haible  <bruno@clisp.org>
801
802         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
803         already declared in <string.h>.
804         * lib/strcase.h (strncasecmp): Don't declare it if yes.
805
806 2006-11-01  Bruno Haible  <bruno@clisp.org>
807
808         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
809         * lib/strcase.h: Include <string.h>.
810         (strcasecmp): Define to rpl_strcasecmp here.
811
812 2006-11-01  Bruno Haible  <bruno@clisp.org>
813
814         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
815
816 2006-11-01  Eric Blake  <ebb9@byu.net>
817
818         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
819
820         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
821
822 2006-10-29  Bruno Haible  <bruno@clisp.org>
823
824         Make it compile in C++ mode.
825         * lib/full-write.c (full_rw): Add a cast.
826
827 2006-11-01  Bruno Haible  <bruno@clisp.org>
828
829         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
830         be POSIX compliant.
831         Reported by Roger Persson <perrog@gmail.com>.
832
833 2006-11-01  Eric Blake  <ebb9@byu.net>
834
835         * lib/getopt_.h: Fix comments.
836
837 2006-10-31  Eric Blake  <ebb9@byu.net>
838
839         * modules/tmpdir (Depends-on): Add sys_stat.
840         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
841         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
842         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
843         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
844         tempname.
845
846 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
847
848         Avoid some C++ diagnostics reported by Bruno Haible.
849         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
850         xmalloc.
851         (quotearg_alloc): Use xcharalloc rather than xmalloc.
852         (struct slotvec): Move to top level.
853         (quotearg_n_options): Rewrite to avoid xmalloc.
854         * lib/xalloc.h (xcharalloc): New function.
855         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
856         [defined __cplusplus]: Add function template that provides result
857         type propagation.  This part of the change is from Bruno Haible.
858
859 2006-10-29  Bruno Haible  <bruno@clisp.org>
860
861         Make it compile in C++ mode.
862         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
863         * lib/strnlen1.c (strnlen1): Cast memchr result.
864         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
865         * lib/clean-temp.c (string_equals, string_hash): Add casts.
866         (create_temp_dir): Rename local variable 'template'.
867         (compile_csharp_using_sscli): Add cast.
868         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
869         * lib/findprog.c (find_in_path): Likewise.
870         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
871         * lib/wait-process.c (register_slave_subprocess): Likewise.
872
873 2006-10-22  Bruno Haible  <bruno@clisp.org>
874
875         * modules/tsearch: New file.
876         * lib/tsearch.h: New file.
877         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
878         * m4/tsearch.m4: New file.
879         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
880
881 2006-10-29  Eric Blake  <ebb9@byu.net>
882
883         * lib/arcfour.c: Assume config.h.
884         * lib/arctwo.c: Likewise.
885         * lib/base64.c: Likewise.
886         * lib/check-version.c: Likewise.
887         * lib/crc.c: Likewise.
888         * lib/des.c: Likewise.
889         * lib/gc-gnulib.c: Likewise.
890         * lib/gc-libgcrypt.c: Likewise.
891         * lib/gc-pbkdf2-sha1.c: Likewise.
892         * lib/getaddrinfo.c: Likewise.
893         * lib/getdelim.c: Likewise.
894         * lib/getline.c: Likewise.
895         * lib/hmac-md5.c: Likewise.
896         * lib/hmac-sha1.c: Likewise.
897         * lib/iconvme.c: Likewise.
898         * lib/md2.c: Likewise.
899         * lib/md4.c: Likewise.
900         * lib/memxor.c: Likewise.
901         * lib/read-file.c: Likewise.
902         * lib/readline.c: Likewise.
903         * lib/rijndael-alg-fst.c: Likewise.
904         * lib/rijndael-api-fst.c: Likewise.
905         * lib/xgetdomainname.c: Likewise.
906
907 2006-10-28  Eric Blake  <ebb9@byu.net>
908
909         * lib/xstrndup.c: Assume config.h.
910
911 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
912
913         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
914         stat-macros.h is now for our own macros, whereas stat_h is for
915         macros in the <sys/stat.h> name space.
916         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
917         (STAT_MACROS_H): Remove.
918         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
919         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
920         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
921         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
922         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
923         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
924         Move these macros to ...
925         * lib/stat_.h: here.  Don't include stat-macros.h.
926         * lib/canonicalize.c: Don't include stat-macros.h.
927         * lib/chown.c: Likewise.
928         * lib/euidaccess.c: Likewise.
929         * lib/file-type.c: Likewise.
930         * lib/filemode.c: Likewise.
931         * lib/glob.c: Likewise.
932         * lib/isapipe.c: Likewise.
933         * lib/lchown.c: Likewise.
934         * lib/lstat.c: Likewise.
935         * lib/mkdir-p.c: Likewise.
936         * lib/rmdir.c: Likewise.
937         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
938         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
939         unless mkdir isn't declared, to speed up 'configure'.
940         Always create sys/stat.h, since it's unlikely any real sys/stat.h
941         would define all the S_* symbols.
942         * modules/canonicalize (Depends-on):
943         Depend on sys_stat, not stat-macros.
944         * modules/chown: Likewise.
945         * modules/euidaccess: Likewise.
946         * modules/filemode: Likewise.
947         * modules/file-type: Likewise.
948         * modules/glob: Likewise.
949         * modules/isapipe: Likewise.
950         * modules/lchown: Likewise.
951         * modules/lstat: Likewise.
952         * modules/mkancesdirs: Likewise.
953         * modules/rmdir: Likewise.
954         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
955         * modules/modechange: Likewise.
956         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
957         (configure.ac): Remove gl_STAT_MACROS.
958         * modules/sys_stat (Depends-on): Remove stat-macros.
959
960 2006-10-27  Bruno Haible  <bruno@clisp.org>
961
962         * m4/signed.m4: Remove file.
963         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
964         invocation.
965         * modules/vasnprintf (Files): Remove m4/signed.m4.
966
967 2006-10-27  Bruno Haible  <bruno@clisp.org>
968
969         Update to GNU gettext 0.16.
970         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
971         m4/inttypes-h.m4, m4/signed.m4.
972         * m4/gettext.m4: Update to GNU gettext 0.16.
973         * m4/intl.m4: New file, from GNU gettext.
974         * m4/intldir.m4: New file, from GNU gettext.
975         * config/srclist.txt: Update
976
977 2006-10-27  Eric Blake  <ebb9@byu.net>
978
979         * MODULES.html.sh: Document tempname.
980         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
981         dependencies.
982         (Files): Move lib/tempname.c...
983         * modules/tempname: ...to this new module.
984         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
985         (gl_PREREQ_TEMPNAME): Move...
986         * m4/tempname.m4: ...to this new file.
987         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
988         * modules/sys_stat (Depends-on): Add stat-macros.
989         * lib/stat_.h (includes): Pick up stat macros.
990         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
991         if stat macros are broken.
992         * lib/tempname.c (includes): No need to include "stat-macros.h".
993         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
994         (direxists, __path_search) [!_LIBC]: Don't compile these in
995         gnulib; the tmpdir module covers that.
996         * lib/tempname.h: New file.
997
998 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
999
1000         * COPYING: Explain how gnulib-tool converts licence headers.
1001         Almost all wording by Eric Blake.
1002
1003 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
1004
1005         * lib/mbchar.h (is_basic_table): Make read-only.
1006         * lib/mbchar.c (is_basic_table): Likewise.
1007         Reported by John Darrington.
1008
1009 2006-10-25  Bruno Haible  <bruno@clisp.org>
1010
1011         * lib/progname.h (set_program_name): Undefine before defining.
1012
1013 2006-10-25  Bruno Haible  <bruno@clisp.org>
1014
1015         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
1016         false for non-gcc C++ compilers.
1017         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
1018
1019 2006-10-24  Bruno Haible  <bruno@clisp.org>
1020
1021         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
1022         iconv implementations like Irix iconv.
1023
1024 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1025
1026         * modules/vararrays: New file.
1027         * m4/vararrays.m4: New file, taken from diffutils.
1028         * MODULES.html.sh: New module vararrays.
1029
1030 2006-10-24  Karl Berry  <karl@gnu.org>
1031
1032         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
1033         Don't call GNU Unix.
1034
1035 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1036
1037         * users.txt: Add Libtool.
1038
1039         Sync from Libtool:
1040
1041         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1042
1043         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
1044         to gnulib's policy of including config.h unconditionally.
1045
1046 2006-10-24  Bruno Haible  <bruno@clisp.org>
1047
1048         * modules/wcwidth (Files): Add m4/wint_t.m4.
1049         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
1050         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
1051
1052 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1053
1054         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
1055         to pacify GCC with some -W flags enabled.  Problem reported by
1056         Bruno Haible.
1057
1058 2006-10-24  Jim Meyering  <jim@meyering.net>
1059
1060         * MODULES.html.sh: Remove uinttostr.  It's not a module.
1061         Reported by Karl Berry.
1062
1063 2006-10-23  Bruno Haible  <bruno@clisp.org>
1064
1065         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
1066
1067 2006-10-24  Bruno Haible  <bruno@clisp.org>
1068
1069         * lib/gl_list.h: Use C comment style, not C++ comment style.
1070
1071 2006-10-23  Eric Blake  <ebb9@byu.net>
1072
1073         * lib/getaddrinfo.c (includes): Add missing include.
1074
1075 2006-10-23  Bruno Haible  <bruno@clisp.org>
1076             Paul Eggert  <eggert@cs.ucla.edu>
1077
1078         Ability to rename obstack_free.
1079         * lib/obstack.h (__obstack_free): New macro. Declare instead of
1080         obstack_free.
1081         (obstack_free): Invoke the __obstack_free macro.
1082         * lib/obstack.c (obstack_free): Use __obstack_free macro.
1083
1084 2006-10-23  Bruno Haible  <bruno@clisp.org>
1085             Paul Eggert  <eggert@cs.ucla.edu>
1086
1087         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
1088         __argc, __argv from the declaration. (They are defined as macros on
1089         mingw.)
1090
1091 2006-10-22  Bruno Haible  <bruno@clisp.org>
1092
1093         * doc/gnulib-intro.texi: New file.
1094         * doc/gnulib.texi: Include it.
1095
1096 2006-10-21  Bruno Haible  <bruno@clisp.org>
1097
1098         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
1099         "Introduction", "Miscellanous Notes", "Particular Modules".
1100
1101 2006-10-21  Bruno Haible  <bruno@clisp.org>
1102
1103         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1104         Change mostlyclean-local rule to avoid sh syntax error from bash
1105         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
1106
1107 2006-10-23  Jim Meyering  <jim@meyering.net>
1108
1109         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
1110         in place of snprintf.
1111
1112         * modules/inttostr (Files): Add lib/uinttostr.c.
1113         * lib/uinttostr.c (inttostr): New file/function.
1114         * lib/inttostr.h (uinttostr): Declare.
1115         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
1116         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
1117         Add uinttostr.
1118         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
1119
1120 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
1121
1122         * lib/canonicalize.c (ELOOP): Define if not already defined.
1123         Problem reported by Bruno Haible in
1124         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
1125
1126 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
1127
1128         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
1129         Problem reported by Perry Smith and Ville Laurikari.
1130
1131         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
1132         uses.
1133
1134 2006-10-19  Bruno Haible  <bruno@clisp.org>
1135
1136         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
1137         for mingw.
1138
1139 2006-10-19  Bruno Haible  <bruno@clisp.org>
1140
1141         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
1142         Needed for mingw.
1143
1144 2006-10-19  Bruno Haible  <bruno@clisp.org>
1145
1146         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
1147
1148 2006-10-19  Bruno Haible  <bruno@clisp.org>
1149
1150         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
1151         it.
1152
1153 2006-10-19  Bruno Haible  <bruno@clisp.org>
1154
1155         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
1156         invocation.
1157
1158 2006-10-19  Bruno Haible  <bruno@clisp.org>
1159
1160         * gnulib-tool (func_create_testdir): Don't include ftruncate and
1161         mountlist by default.
1162
1163 2006-10-16  Bruno Haible  <bruno@clisp.org>
1164
1165         * lib/c-strstr.c: Include c-strstr.h.
1166
1167 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1168
1169         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
1170         in a slash.
1171
1172 2006-10-18  Bruno Haible  <bruno@clisp.org>
1173
1174         * lib/lock.h [C++]: Wrap definitions in extern "C".
1175
1176 2006-10-18  Bruno Haible  <bruno@clisp.org>
1177
1178         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
1179         gl_LIBOBJS list.
1180
1181 2006-10-18  Bruno Haible  <bruno@clisp.org>
1182
1183         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
1184
1185 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
1186
1187         * lib/xstrtol.h: Include gettext.h.
1188         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
1189         Problem reported by Eric Blake.
1190         * modules/xstrtol (Depends-on): Add gettext-h.
1191
1192 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
1193
1194         * lib/strftime.c (advance): New macro.
1195         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
1196         incomplete type, so you can't add 0 to it.  Problem and patch
1197         reported by Eelco Dolstra for dietlibc.
1198
1199 2006-10-18  Jim Meyering  <jim@meyering.net>
1200
1201         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
1202         type for a local, and rename it: s/up/user_proc/.
1203
1204 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
1205
1206         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
1207         READ_UTMP_USER_PROCESS.
1208         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
1209
1210 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
1211
1212         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
1213         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
1214
1215 2006-10-17  Eric Blake  <ebb9@byu.net>
1216
1217         * lib/sigprocmask.c (sigprocmask): Fix typo.
1218
1219         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
1220
1221         * modules/clean-temp (Makefile.am): Don't add to make output...
1222         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
1223         config.h.
1224
1225 2006-10-17  Bruno Haible  <bruno@clisp.org>
1226
1227         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
1228         differently if DEFAULT_TEXT_DOMAIN is set.
1229
1230 2006-10-16  Bruno Haible  <bruno@clisp.org>
1231
1232         * lib/clean-temp.c: Include fwriteerror.h.
1233
1234 2006-10-16  Bruno Haible  <bruno@clisp.org>
1235
1236         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
1237
1238 2006-10-16  Bruno Haible  <bruno@clisp.org>
1239
1240         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
1241         * lib/sigprocmask.h: Include <sys/types.h>.
1242         (sigset_t): Use the system's definition if present.
1243
1244 2006-10-17  Eric Blake  <ebb9@byu.net>
1245
1246         * lib/xvasprintf.c (includes): Assume config.h.
1247         * lib/xasprintf.c (includes): Likewise.
1248
1249 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
1250
1251         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
1252         at least as wide as intmax_t.
1253
1254 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
1255
1256         (Imported from Automake.)
1257         * build-aux/gnupload: Update to version 1.1 of directive file.
1258
1259 2006-10-16  Eric Blake  <ebb9@byu.net>
1260
1261         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
1262         match Automake 1.10a.
1263
1264 2006-10-14  Bruno Haible  <bruno@clisp.org>
1265
1266         * modules/sigprocmask: New file.
1267         * lib/sigprocmask.h: New file.
1268         * lib/sigprocmask.c: New file.
1269         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
1270         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
1271         request sigprocmask.o.
1272         (gl_PREREQ_SIGPROCMASK): New macro.
1273         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
1274         (Depends-on): Add sigprocmask.
1275         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
1276         gt_SIGNALBLOCKING. Test for 'raise' only once.
1277         * lib/fatal-signal.c: Include sigprocmask.h.
1278         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
1279         unblock_fatal_signals): Define always.
1280         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1281         sigprocmask.
1282
1283 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
1284
1285         Sync from Automake.
1286         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
1287         which incorrectly sets the mode of an existing destination
1288         directory.  In some cases the unpatched install-sh could do the
1289         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
1290         system.  We hope this is rare in practice, but it's clearly worth
1291         fixing.  Problem reported by Alex Unleashed in
1292         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
1293         Also, don't bother to check for -m bugs unless we're using -m;
1294         suggested by Stepan Kasal.
1295
1296 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1297
1298         Sync from Automake.
1299         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
1300         `-c' flag, so they appear at the same position as in %FASTDEP%
1301         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
1302         which ignores unknown options only after the first non-option.
1303         Bug report against M4 by Nelson H. F. Beebe.
1304
1305 2006-10-13  Jim Meyering  <jim@meyering.net>
1306
1307         Fix a bug in yesterday's change.
1308         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
1309         p->fts_statp->st_dev would be used uninitialized.
1310         Ensures that we always call fts_stat on the very first entry.
1311         Miklos Szeredi reported that find -xdev stopped working.
1312
1313 2006-10-12  Bruno Haible  <bruno@clisp.org>
1314
1315         * gnulib-tool (func_get_automake_snippet): Append an automatically
1316         computed EXTRA_DIST augmentation.
1317         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
1318         * modules/alloca-opt (Makefile.am): Likewise.
1319         * modules/allocsa (Makefile.am): Likewise.
1320         * modules/arcfour (Makefile.am): Likewise.
1321         * modules/arctwo (Makefile.am): Likewise.
1322         * modules/argmatch (Makefile.am): Likewise.
1323         * modules/argz (Makefile.am): Likewise.
1324         * modules/atexit (Makefile.am): Likewise.
1325         * modules/backupfile (Makefile.am): Likewise.
1326         * modules/byteswap (Makefile.am): Likewise.
1327         * modules/c-strtod (Makefile.am): Likewise.
1328         * modules/c-strtold (Makefile.am): Likewise.
1329         * modules/calloc (Makefile.am): Likewise.
1330         * modules/canon-host (Makefile.am): Likewise.
1331         * modules/canonicalize (Makefile.am): Likewise.
1332         * modules/chdir-long (Makefile.am): Likewise.
1333         * modules/chdir-safer (Makefile.am): Likewise.
1334         * modules/check-version (Makefile.am): Likewise.
1335         * modules/chown (Makefile.am): Likewise.
1336         * modules/cloexec (Makefile.am): Likewise.
1337         * modules/close-stream (Makefile.am): Likewise.
1338         * modules/closeout (Makefile.am): Likewise.
1339         * modules/crc (Makefile.am): Likewise.
1340         * modules/csharpexec (Makefile.am): Likewise.
1341         * modules/cycle-check (Makefile.am): Likewise.
1342         * modules/des (Makefile.am): Likewise.
1343         * modules/dev-ino (Makefile.am): Likewise.
1344         * modules/dirfd (Makefile.am): Likewise.
1345         * modules/dirname (Makefile.am): Likewise.
1346         * modules/dup2 (Makefile.am): Likewise.
1347         * modules/eealloc (Makefile.am): Likewise.
1348         * modules/error (Makefile.am): Likewise.
1349         * modules/euidaccess (Makefile.am): Likewise.
1350         * modules/exclude (Makefile.am): Likewise.
1351         * modules/exitfail (Makefile.am): Likewise.
1352         * modules/fcntl-safer (Makefile.am): Likewise.
1353         * modules/fcntl (Makefile.am): Likewise.
1354         * modules/file-type (Makefile.am): Likewise.
1355         * modules/fileblocks (Makefile.am): Likewise.
1356         * modules/filemode (Makefile.am): Likewise.
1357         * modules/filenamecat (Makefile.am): Likewise.
1358         * modules/fnmatch (Makefile.am): Likewise.
1359         * modules/fopen-safer (Makefile.am): Likewise.
1360         * modules/fpending (Makefile.am): Likewise.
1361         * modules/fprintftime (Makefile.am): Likewise.
1362         * modules/free (Makefile.am): Likewise.
1363         * modules/fsusage (Makefile.am): Likewise.
1364         * modules/ftruncate (Makefile.am): Likewise.
1365         * modules/fts (Makefile.am): Likewise.
1366         * modules/gc-arcfour (Makefile.am): Likewise.
1367         * modules/gc-des (Makefile.am): Likewise.
1368         * modules/gc-hmac-md5 (Makefile.am): Likewise.
1369         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
1370         * modules/gc-md4 (Makefile.am): Likewise.
1371         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
1372         * modules/gc-sha1 (Makefile.am): Likewise.
1373         * modules/gc (Makefile.am): Likewise.
1374         * modules/getaddrinfo (Makefile.am): Likewise.
1375         * modules/getcwd (Makefile.am): Likewise.
1376         * modules/getdelim (Makefile.am): Likewise.
1377         * modules/getdomainname (Makefile.am): Likewise.
1378         * modules/getgroups (Makefile.am): Likewise.
1379         * modules/gethostname (Makefile.am): Likewise.
1380         * modules/gethrxtime (Makefile.am): Likewise.
1381         * modules/getline (Makefile.am): Likewise.
1382         * modules/getloadavg (Makefile.am): Likewise.
1383         * modules/getlogin_r (Makefile.am): Likewise.
1384         * modules/getndelim2 (Makefile.am): Likewise.
1385         * modules/getopt (Makefile.am): Likewise.
1386         * modules/getpagesize (Makefile.am): Likewise.
1387         * modules/getpass-gnu (Makefile.am): Likewise.
1388         * modules/getpass (Makefile.am): Likewise.
1389         * modules/getsubopt (Makefile.am): Likewise.
1390         * modules/gettime (Makefile.am): Likewise.
1391         * modules/gettimeofday (Makefile.am): Likewise.
1392         * modules/getugroups (Makefile.am): Likewise.
1393         * modules/getusershell (Makefile.am): Likewise.
1394         * modules/glob (Makefile.am): Likewise.
1395         * modules/group-member (Makefile.am): Likewise.
1396         * modules/hard-locale (Makefile.am): Likewise.
1397         * modules/hash (Makefile.am): Likewise.
1398         * modules/hmac-md5 (Makefile.am): Likewise.
1399         * modules/hmac-sha1 (Makefile.am): Likewise.
1400         * modules/human (Makefile.am): Likewise.
1401         * modules/idcache (Makefile.am): Likewise.
1402         * modules/imaxabs (Makefile.am): Likewise.
1403         * modules/imaxdiv (Makefile.am): Likewise.
1404         * modules/inet_ntop (Makefile.am): Likewise.
1405         * modules/inet_pton (Makefile.am): Likewise.
1406         * modules/intprops (Makefile.am): Likewise.
1407         * modules/inttostr (Makefile.am): Likewise.
1408         * modules/inttypes (Makefile.am): Likewise.
1409         * modules/isapipe (Makefile.am): Likewise.
1410         * modules/javaversion (Makefile.am): Likewise.
1411         * modules/lchmod (Makefile.am): Likewise.
1412         * modules/lchown (Makefile.am): Likewise.
1413         * modules/localcharset (Makefile.am): Likewise.
1414         * modules/long-options (Makefile.am): Likewise.
1415         * modules/lstat (Makefile.am): Likewise.
1416         * modules/malloc (Makefile.am): Likewise.
1417         * modules/mathl (Makefile.am): Likewise.
1418         * modules/mbchar (Makefile.am): Likewise.
1419         * modules/md2 (Makefile.am): Likewise.
1420         * modules/md4 (Makefile.am): Likewise.
1421         * modules/md5 (Makefile.am): Likewise.
1422         * modules/memcasecmp (Makefile.am): Likewise.
1423         * modules/memchr (Makefile.am): Likewise.
1424         * modules/memcmp (Makefile.am): Likewise.
1425         * modules/memcoll (Makefile.am): Likewise.
1426         * modules/memcpy (Makefile.am): Likewise.
1427         * modules/memmem (Makefile.am): Likewise.
1428         * modules/memmove (Makefile.am): Likewise.
1429         * modules/mempcpy (Makefile.am): Likewise.
1430         * modules/memrchr (Makefile.am): Likewise.
1431         * modules/memset (Makefile.am): Likewise.
1432         * modules/memxor (Makefile.am): Likewise.
1433         * modules/mkancesdirs (Makefile.am): Likewise.
1434         * modules/mkdir-p (Makefile.am): Likewise.
1435         * modules/mkdir (Makefile.am): Likewise.
1436         * modules/mkdtemp (Makefile.am): Likewise.
1437         * modules/mkstemp (Makefile.am): Likewise.
1438         * modules/mktime (Makefile.am): Likewise.
1439         * modules/modechange (Makefile.am): Likewise.
1440         * modules/mountlist (Makefile.am): Likewise.
1441         * modules/nanosleep (Makefile.am): Likewise.
1442         * modules/obstack (Makefile.am): Likewise.
1443         * modules/openat (Makefile.am): Likewise.
1444         * modules/pagealign_alloc (Makefile.am): Likewise.
1445         * modules/pathmax (Makefile.am): Likewise.
1446         * modules/physmem (Makefile.am): Likewise.
1447         * modules/poll (Makefile.am): Likewise.
1448         * modules/posixtm (Makefile.am): Likewise.
1449         * modules/posixver (Makefile.am): Likewise.
1450         * modules/putenv (Makefile.am): Likewise.
1451         * modules/quote (Makefile.am): Likewise.
1452         * modules/quotearg (Makefile.am): Likewise.
1453         * modules/raise (Makefile.am): Likewise.
1454         * modules/read-file (Makefile.am): Likewise.
1455         * modules/readline (Makefile.am): Likewise.
1456         * modules/readlink (Makefile.am): Likewise.
1457         * modules/readtokens (Makefile.am): Likewise.
1458         * modules/readutmp (Makefile.am): Likewise.
1459         * modules/realloc (Makefile.am): Likewise.
1460         * modules/regex (Makefile.am): Likewise.
1461         * modules/rename-dest-slash (Makefile.am): Likewise.
1462         * modules/rename (Makefile.am): Likewise.
1463         * modules/rijndael (Makefile.am): Likewise.
1464         * modules/rmdir (Makefile.am): Likewise.
1465         * modules/rpmatch (Makefile.am): Likewise.
1466         * modules/safe-read (Makefile.am): Likewise.
1467         * modules/safe-write (Makefile.am): Likewise.
1468         * modules/same-inode (Makefile.am): Likewise.
1469         * modules/same (Makefile.am): Likewise.
1470         * modules/save-cwd (Makefile.am): Likewise.
1471         * modules/savedir (Makefile.am): Likewise.
1472         * modules/setenv (Makefile.am): Likewise.
1473         * modules/settime (Makefile.am): Likewise.
1474         * modules/sha1 (Makefile.am): Likewise.
1475         * modules/sig2str (Makefile.am): Likewise.
1476         * modules/snprintf (Makefile.am): Likewise.
1477         * modules/stat-macros (Makefile.am): Likewise.
1478         * modules/stat-time (Makefile.am): Likewise.
1479         * modules/stdbool (Makefile.am): Likewise.
1480         * modules/stdint (Makefile.am): Likewise.
1481         * modules/stdlib-safer (Makefile.am): Likewise.
1482         * modules/stpcpy (Makefile.am): Likewise.
1483         * modules/stpncpy (Makefile.am): Likewise.
1484         * modules/strcase (Makefile.am): Likewise.
1485         * modules/strcasestr (Makefile.am): Likewise.
1486         * modules/strchrnul (Makefile.am): Likewise.
1487         * modules/strcspn (Makefile.am): Likewise.
1488         * modules/strdup (Makefile.am): Likewise.
1489         * modules/strerror (Makefile.am): Likewise.
1490         * modules/strftime (Makefile.am): Likewise.
1491         * modules/strndup (Makefile.am): Likewise.
1492         * modules/strnlen (Makefile.am): Likewise.
1493         * modules/strpbrk (Makefile.am): Likewise.
1494         * modules/strsep (Makefile.am): Likewise.
1495         * modules/strstr (Makefile.am): Likewise.
1496         * modules/strtod (Makefile.am): Likewise.
1497         * modules/strtoimax (Makefile.am): Likewise.
1498         * modules/strtok_r (Makefile.am): Likewise.
1499         * modules/strtol (Makefile.am): Likewise.
1500         * modules/strtoll (Makefile.am): Likewise.
1501         * modules/strtoul (Makefile.am): Likewise.
1502         * modules/strtoull (Makefile.am): Likewise.
1503         * modules/strtoumax (Makefile.am): Likewise.
1504         * modules/strverscmp (Makefile.am): Likewise.
1505         * modules/sys_socket (Makefile.am): Likewise.
1506         * modules/sys_stat (Makefile.am): Likewise.
1507         * modules/sysexits (Makefile.am): Likewise.
1508         * modules/time_r (Makefile.am): Likewise.
1509         * modules/timegm (Makefile.am): Likewise.
1510         * modules/timespec (Makefile.am): Likewise.
1511         * modules/tmpfile-safer (Makefile.am): Likewise.
1512         * modules/trim (Makefile.am): Likewise.
1513         * modules/unistd-safer (Makefile.am): Likewise.
1514         * modules/unlinkdir (Makefile.am): Likewise.
1515         * modules/unlocked-io (Makefile.am): Likewise.
1516         * modules/userspec (Makefile.am): Likewise.
1517         * modules/utime (Makefile.am): Likewise.
1518         * modules/utimecmp (Makefile.am): Likewise.
1519         * modules/utimens (Makefile.am): Likewise.
1520         * modules/vasnprintf (Makefile.am): Likewise.
1521         * modules/vasprintf (Makefile.am): Likewise.
1522         * modules/vsnprintf (Makefile.am): Likewise.
1523         * modules/xalloc (Makefile.am): Likewise.
1524         * modules/xgetcwd (Makefile.am): Likewise.
1525         * modules/xnanosleep (Makefile.am): Likewise.
1526         * modules/xreadlink (Makefile.am): Likewise.
1527         * modules/xstrtod (Makefile.am): Likewise.
1528         * modules/xstrtol (Makefile.am): Likewise.
1529         * modules/xstrtold (Makefile.am): Likewise.
1530         * modules/yesno (Makefile.am): Likewise.
1531         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
1532
1533 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
1534
1535         * modules/error (Makefile.am): Distribute files through
1536         EXTRA_DIST, not lib_SOURCES.
1537
1538 2006-10-12  Eric Blake  <ebb9@byu.net>
1539
1540         * modules/error (Makefile.am): Distribute files in /lib.
1541         * modules/obstack (Makefile.am): Likewise.
1542
1543 2006-10-12  Bruno Haible  <bruno@clisp.org>
1544
1545         * modules/acl (Makefile.am): Distribute all files in lib/ through
1546         EXTRA_DIST.
1547         * modules/arcfour (Makefile.am): Likewise.
1548         * modules/arctwo (Makefile.am): Likewise.
1549         * modules/argmatch (Makefile.am): Likewise.
1550         * modules/argz (Makefile.am): Likewise.
1551         * modules/atexit (Makefile.am): Likewise.
1552         * modules/backupfile (Makefile.am): Likewise.
1553         * modules/c-strtod (Makefile.am): Likewise.
1554         * modules/c-strtold (Makefile.am): Likewise.
1555         * modules/calloc (Makefile.am): Likewise.
1556         * modules/canon-host (Makefile.am): Likewise.
1557         * modules/canonicalize (Makefile.am): Likewise.
1558         * modules/chdir-long (Makefile.am): Likewise.
1559         * modules/chdir-safer (Makefile.am): Likewise.
1560         * modules/check-version (Makefile.am): Likewise.
1561         * modules/chown (Makefile.am): Likewise.
1562         * modules/cloexec (Makefile.am): Likewise.
1563         * modules/close-stream (Makefile.am): Likewise.
1564         * modules/closeout (Makefile.am): Likewise.
1565         * modules/crc (Makefile.am): Likewise.
1566         * modules/cycle-check (Makefile.am): Likewise.
1567         * modules/des (Makefile.am): Likewise.
1568         * modules/dirfd (Makefile.am): Likewise.
1569         * modules/dirname (Makefile.am): Likewise.
1570         * modules/dup2 (Makefile.am): Likewise.
1571         * modules/euidaccess (Makefile.am): Likewise.
1572         * modules/exclude (Makefile.am): Likewise.
1573         * modules/exitfail (Makefile.am): Likewise.
1574         * modules/fcntl-safer (Makefile.am): Likewise.
1575         * modules/file-type (Makefile.am): Likewise.
1576         * modules/fileblocks (Makefile.am): Likewise.
1577         * modules/filemode (Makefile.am): Likewise.
1578         * modules/filenamecat (Makefile.am): Likewise.
1579         * modules/fnmatch (Makefile.am): Likewise.
1580         * modules/fopen-safer (Makefile.am): Likewise.
1581         * modules/fpending (Makefile.am): Likewise.
1582         * modules/fprintftime (Makefile.am): Likewise.
1583         * modules/free (Makefile.am): Likewise.
1584         * modules/fsusage (Makefile.am): Likewise.
1585         * modules/ftruncate (Makefile.am): Likewise.
1586         * modules/fts (Makefile.am): Likewise.
1587         * modules/gc (Makefile.am): Likewise.
1588         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
1589         * modules/getaddrinfo (Makefile.am): Likewise.
1590         * modules/getcwd (Makefile.am): Likewise.
1591         * modules/getdelim (Makefile.am): Likewise.
1592         * modules/getdomainname (Makefile.am): Likewise.
1593         * modules/getgroups (Makefile.am): Likewise.
1594         * modules/gethostname (Makefile.am): Likewise.
1595         * modules/gethrxtime (Makefile.am): Likewise.
1596         * modules/getline (Makefile.am): Likewise.
1597         * modules/getloadavg (Makefile.am): Likewise.
1598         * modules/getlogin_r (Makefile.am): Likewise.
1599         * modules/getopt (Makefile.am): Likewise.
1600         * modules/getpass (Makefile.am): Likewise.
1601         * modules/getpass-gnu (Makefile.am): Likewise.
1602         * modules/getsubopt (Makefile.am): Likewise.
1603         * modules/gettime (Makefile.am): Likewise.
1604         * modules/gettimeofday (Makefile.am): Likewise.
1605         * modules/getugroups (Makefile.am): Likewise.
1606         * modules/getusershell (Makefile.am): Likewise.
1607         * modules/glob (Makefile.am): Likewise.
1608         * modules/group-member (Makefile.am): Likewise.
1609         * modules/hard-locale (Makefile.am): Likewise.
1610         * modules/hash (Makefile.am): Likewise.
1611         * modules/hmac-md5 (Makefile.am): Likewise.
1612         * modules/hmac-sha1 (Makefile.am): Likewise.
1613         * modules/human (Makefile.am): Likewise.
1614         * modules/idcache (Makefile.am): Likewise.
1615         * modules/imaxabs (Makefile.am): Likewise.
1616         * modules/imaxdiv (Makefile.am): Likewise.
1617         * modules/inet_ntop (Makefile.am): Likewise.
1618         * modules/inet_pton (Makefile.am): Likewise.
1619         * modules/inttostr (Makefile.am): Likewise.
1620         * modules/isapipe (Makefile.am): Likewise.
1621         * modules/lchown (Makefile.am): Likewise.
1622         * modules/long-options (Makefile.am): Likewise.
1623         * modules/lstat (Makefile.am): Likewise.
1624         * modules/malloc (Makefile.am): Likewise.
1625         * modules/mathl (Makefile.am): Likewise.
1626         * modules/mbchar (Makefile.am): Likewise.
1627         * modules/md2 (Makefile.am): Likewise.
1628         * modules/md4 (Makefile.am): Likewise.
1629         * modules/md5 (Makefile.am): Likewise.
1630         * modules/memcasecmp (Makefile.am): Likewise.
1631         * modules/memchr (Makefile.am): Likewise.
1632         * modules/memcmp (Makefile.am): Likewise.
1633         * modules/memcoll (Makefile.am): Likewise.
1634         * modules/memcpy (Makefile.am): Likewise.
1635         * modules/memmem (Makefile.am): Likewise.
1636         * modules/memmove (Makefile.am): Likewise.
1637         * modules/mempcpy (Makefile.am): Likewise.
1638         * modules/memrchr (Makefile.am): Likewise.
1639         * modules/memset (Makefile.am): Likewise.
1640         * modules/memxor (Makefile.am): Likewise.
1641         * modules/mkancesdirs (Makefile.am): Likewise.
1642         * modules/mkdir (Makefile.am): Likewise.
1643         * modules/mkdir-p (Makefile.am): Likewise.
1644         * modules/mkdtemp (Makefile.am): Likewise.
1645         * modules/mkstemp (Makefile.am): Likewise.
1646         * modules/mktime (Makefile.am): Likewise.
1647         * modules/modechange (Makefile.am): Likewise.
1648         * modules/mountlist (Makefile.am): Likewise.
1649         * modules/nanosleep (Makefile.am): Likewise.
1650         * modules/openat (Makefile.am): Likewise.
1651         * modules/pagealign_alloc (Makefile.am): Likewise.
1652         * modules/physmem (Makefile.am): Likewise.
1653         * modules/poll (Makefile.am): Likewise.
1654         * modules/posixtm (Makefile.am): Likewise.
1655         * modules/posixver (Makefile.am): Likewise.
1656         * modules/putenv (Makefile.am): Likewise.
1657         * modules/quote (Makefile.am): Likewise.
1658         * modules/quotearg (Makefile.am): Likewise.
1659         * modules/raise (Makefile.am): Likewise.
1660         * modules/read-file (Makefile.am): Likewise.
1661         * modules/readline (Makefile.am): Likewise.
1662         * modules/readlink (Makefile.am): Likewise.
1663         * modules/readtokens (Makefile.am): Likewise.
1664         * modules/readutmp (Makefile.am): Likewise.
1665         * modules/realloc (Makefile.am): Likewise.
1666         * modules/regex (Makefile.am): Likewise.
1667         * modules/rename (Makefile.am): Likewise.
1668         * modules/rename-dest-slash (Makefile.am): Likewise.
1669         * modules/rijndael (Makefile.am): Likewise.
1670         * modules/rmdir (Makefile.am): Likewise.
1671         * modules/rpmatch (Makefile.am): Likewise.
1672         * modules/safe-read (Makefile.am): Likewise.
1673         * modules/safe-write (Makefile.am): Likewise.
1674         * modules/same (Makefile.am): Likewise.
1675         * modules/save-cwd (Makefile.am): Likewise.
1676         * modules/savedir (Makefile.am): Likewise.
1677         * modules/setenv (Makefile.am): Likewise.
1678         * modules/settime (Makefile.am): Likewise.
1679         * modules/sha1 (Makefile.am): Likewise.
1680         * modules/sig2str (Makefile.am): Likewise.
1681         * modules/snprintf (Makefile.am): Likewise.
1682         * modules/stdlib-safer (Makefile.am): Likewise.
1683         * modules/stpcpy (Makefile.am): Likewise.
1684         * modules/stpncpy (Makefile.am): Likewise.
1685         * modules/strcase (Makefile.am): Likewise.
1686         * modules/strcasestr (Makefile.am): Likewise.
1687         * modules/strchrnul (Makefile.am): Likewise.
1688         * modules/strcspn (Makefile.am): Likewise.
1689         * modules/strdup (Makefile.am): Likewise.
1690         * modules/strerror (Makefile.am): Likewise.
1691         * modules/strftime (Makefile.am): Likewise.
1692         * modules/strndup (Makefile.am): Likewise.
1693         * modules/strnlen (Makefile.am): Likewise.
1694         * modules/strpbrk (Makefile.am): Likewise.
1695         * modules/strsep (Makefile.am): Likewise.
1696         * modules/strstr (Makefile.am): Likewise.
1697         * modules/strtod (Makefile.am): Likewise.
1698         * modules/strtoimax (Makefile.am): Likewise.
1699         * modules/strtok_r (Makefile.am): Likewise.
1700         * modules/strtol (Makefile.am): Likewise.
1701         * modules/strtoll (Makefile.am): Likewise.
1702         * modules/strtoul (Makefile.am): Likewise.
1703         * modules/strtoull (Makefile.am): Likewise.
1704         * modules/strtoumax (Makefile.am): Likewise.
1705         * modules/strverscmp (Makefile.am): Likewise.
1706         * modules/time_r (Makefile.am): Likewise.
1707         * modules/timegm (Makefile.am): Likewise.
1708         * modules/tmpfile-safer (Makefile.am): Likewise.
1709         * modules/unistd-safer (Makefile.am): Likewise.
1710         * modules/unlinkdir (Makefile.am): Likewise.
1711         * modules/userspec (Makefile.am): Likewise.
1712         * modules/utime (Makefile.am): Likewise.
1713         * modules/utimecmp (Makefile.am): Likewise.
1714         * modules/utimens (Makefile.am): Likewise.
1715         * modules/vasnprintf (Makefile.am): Likewise.
1716         * modules/vasprintf (Makefile.am): Likewise.
1717         * modules/vsnprintf (Makefile.am): Likewise.
1718         * modules/xalloc (Makefile.am): Likewise.
1719         * modules/xgetcwd (Makefile.am): Likewise.
1720         * modules/xnanosleep (Makefile.am): Likewise.
1721         * modules/xreadlink (Makefile.am): Likewise.
1722         * modules/xstrtod (Makefile.am): Likewise.
1723         * modules/xstrtol (Makefile.am): Likewise.
1724         * modules/xstrtold (Makefile.am): Likewise.
1725         * modules/yesno (Makefile.am): Likewise.
1726
1727 2006-10-12  Jim Meyering  <jim@meyering.net>
1728
1729         * m4/getloadavg.m4: Revert the change below.
1730
1731         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
1732         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
1733         fail with a symlink, which is what coreutils' ./bootstrap now
1734         creates by default.
1735
1736 2006-10-12  Bruno Haible  <bruno@clisp.org>
1737
1738         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
1739         mingw.
1740         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
1741         MSVC and mingw explicitly.
1742
1743 2006-10-11  Simon Josefsson  <jas@extundo.com>
1744             Bruno Haible  <bruno@clisp.org>
1745
1746         Add support for multiple gnulib-tool invocations in the scope of a
1747         single configure.ac file.
1748         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
1749         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
1750         with the same contents as the _LIBADD variable.
1751         (func_emit_initmacro_start, func_emit_initmacro_end,
1752         func_emit_initmacro_done): New functions.
1753         (func_import, func_create_testdir): Invoke them. Allow the identifiers
1754         gl_LIBOBJS and gl_LTLIBOBJS.
1755
1756 2006-10-11  Bruno Haible  <bruno@clisp.org>
1757
1758         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
1759         (func_create_testdir): Don't create po/Makefile.am, don't invoke
1760         autoreconf. Instead, invoke autopoint explicitly but move back the
1761         *.m4 files from gnulib.
1762
1763 2006-10-11  Bruno Haible  <bruno@clisp.org>
1764
1765         * gnulib-tool (func_usage): Make module names after --create-testdir
1766         optional.
1767         (func_create_testdir): If no module was specified, use nearly all
1768         modules.
1769
1770 2006-10-12  Jim Meyering  <jim@meyering.net>
1771
1772         Big performance improvement for fts-based tools that use FTS_NOSTAT.
1773         Avoid spurious inode-mismatch problems on non-POSIX file systems.
1774         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
1775         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
1776         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
1777         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
1778         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
1779         (fts_set_stat_required): New function.
1780         (fts_open): Defer the calls to fts_stat, if possible or requested.
1781         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
1782         into fts_stat itself.
1783         (fts_read): Perform any required (deferred) fts_stat call.
1784         (fts_build): Likewise, for the directory we're about to open and read.
1785         In the readdir loop, carefully decide whether each entry will require
1786         an eventual call to fts_stat, using dirent.d_type info if available.
1787         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
1788         a command line argument into this function.  Update all callers.
1789         Map a return value of FTS_DOT to FTS_D for a command line argument.
1790         * modules/fts (Depends-on): Add d-type.  Alphabetize.
1791         Thanks to Miklos Szeredi for his tenacity and for the initial
1792         bug report about "find" failing on a FUSE-based file system.
1793
1794         * lib/fts.c (fts_open): Use consistent indentation.
1795
1796 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
1797
1798         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
1799         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
1800         reported by Jim Meyering.  All uses of cache variables renamed
1801         to match Autoconf's.
1802         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
1803         the other one.
1804
1805         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
1806         Fix misspelling in diagnostic.
1807
1808 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1809
1810         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
1811         defined.  Problem reported by Matthew Woehlke.
1812
1813         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
1814         Add support for Tandem NonStop R series.
1815         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
1816         Use new macro.
1817
1818         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
1819         (has_trailing_slash): Omit size arg; all callers changed.
1820         Omit 'inline', since it doesn't help performance and we'd
1821         need to configure it.
1822         Don't count //, ///, etc. as having a trailing slash.
1823         As a side effect, this removes a C99ism reported by Matthew Woehlke.
1824         (rpl_rename_dest_slash): On failure, use rename's errno rather
1825         than (in some cases) an incorrect or junk errno.
1826         Simplify code by removing need to compute length; this does
1827         cause it to make two passes instead of one over the file name,
1828         but it's worth it.
1829
1830         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
1831         change, since Autoconf's version may no longer be appropriate now
1832         that we are using CVS Autoconf's version.  Add support for Tandem.
1833
1834 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1835             Bruno Haible  <bruno@clisp.org>
1836
1837         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
1838         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
1839         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
1840         gl_AC_TYPE_LONG_LONG.
1841
1842         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
1843         instead of HAVE_LONG_LONG.
1844         * lib/printf-args.c (printf_fetchargs): Likewise.
1845         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
1846         * lib/vasnprintf.c (VASNPRINTF): Likewise.
1847         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
1848         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
1849         gl_AC_TYPE_LONG_LONG.
1850
1851 2006-10-11  Bruno Haible  <bruno@clisp.org>
1852
1853         * m4/longlong.m4: Add comments.
1854         * m4/ulonglong.m4: Likewise.
1855
1856 2006-10-10  Bruno Haible  <bruno@clisp.org>
1857
1858         Make it possible to #define stpcpy, strdup to aliases.
1859         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
1860         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
1861
1862 2006-10-10  Bruno Haible  <bruno@clisp.org>
1863
1864         Make it possible to #define gcd to an alias.
1865         * lib/gcd.c: Include config.h.
1866
1867 2006-10-10  Bruno Haible  <bruno@clisp.org>
1868
1869         Make it possible to #define c_isascii to an alias.
1870         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
1871         defined. Undefine the macros before defining them, to avoid gcc
1872         warnings.
1873         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
1874         define NO_C_CTYPE_MACROS early.
1875
1876 2006-10-10  Bruno Haible  <bruno@clisp.org>
1877
1878         Make it possible to #define set_program_name to an alias.
1879         * lib/progname.c: Don't undefine set_program_name; instead, undefine
1880         ENABLE_RELOCATABLE early.
1881
1882 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
1883
1884         Port to Tandem NSK OSS, which has 64-bit signed int but at most
1885         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
1886         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
1887         More generally, don't assume that 64-bit signed int is available
1888         if unsigned int is, and vice versa.
1889         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
1890         unsigned symbols, not on their signed counterparts.
1891         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
1892         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
1893         (UINT64_C, UINTMAX_C):
1894         Likewise.
1895         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
1896         unsigned counterparts.
1897         (Have_long_long, Unsigned): New macros.
1898         (Int): Renamed from INT.
1899         (strtoimax): Use the new macros.
1900         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
1901         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
1902         * modules/inttypes (inttypes.h): Substitute
1903         HAVE_UNSIGNED_LONG_LONG_INT.
1904         * modules/stdint (stdint.h): Likewise.
1905         (Files): Add m4/ulonglong.m4.
1906
1907 2006-10-10  Bruno Haible  <bruno@clisp.org>
1908
1909         Fix a gcc -Wshadow warning.
1910         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
1911         to 'bucket'.
1912         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
1913         gl_linked_indexof_from_to): Likewise.
1914         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
1915         Likewise.
1916         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
1917         Likewise.
1918         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
1919         Reported by Eric Blake.
1920
1921 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
1922
1923         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
1924         for NetBSD.  Problem reported by Bruno Haible.
1925
1926 2006-10-09  Jim Meyering  <jim@meyering.net>
1927
1928         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
1929         Patch from Bruno Haible.
1930
1931 2006-10-09  Jim Meyering  <jim@meyering.net>
1932
1933         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
1934         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
1935         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
1936
1937 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1938
1939         Don't include <config.h> twice; this doesn't work in some cases,
1940         e.g., when config.h has "#define intmax_t long long int" and
1941         we include <config.h>, <inttypes.h>, <config.h> in that order.
1942         Problem reported by Matthew Woehlke in:
1943         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
1944         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
1945         * lib/fts-cycle.c: Don't include config.h.
1946         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
1947         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
1948         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
1949         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
1950         inttypes.h.
1951         * lib/xstrtoumax.c: Likewise.
1952         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
1953         __strtol and the like, so that this module is more like its siblings.
1954         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
1955         Remove; no longer needed now that we assume gnulib inttypes.h.
1956
1957 2006-10-08  Bruno Haible  <bruno@clisp.org>
1958
1959         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
1960         option.
1961
1962 2006-10-07  Jim Meyering  <jim@meyering.net>
1963
1964         * modules/inttypes (inttypes.h): Revert what seems to have been
1965         an inadvertent part of today's change: use "|", not "/" in the
1966         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
1967
1968 2006-10-07  Bruno Haible  <bruno@clisp.org>
1969
1970         * modules/sublist: New file.
1971
1972 2006-10-07  Bruno Haible  <bruno@clisp.org>
1973
1974         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
1975         * modules/argz (argz.h): Likewise.
1976         * modules/arpa_inet (arpa/inet.h): Likewise.
1977         * modules/byteswap (byteswap.h): Likewise.
1978         * modules/configmake (configmake.h): Likewise.
1979         * modules/fcntl (fcntl.h): Likewise.
1980         * modules/fnmatch (fnmatch.h): Likewise.
1981         * modules/getopt (getopt.h): Likewise.
1982         * modules/glob (glob.h): Likewise.
1983         * modules/inttypes (inttypes.h): Likewise.
1984         * modules/netinet_in (netinet/in.h): Likewise.
1985         * modules/poll (poll.h): Likewise.
1986         * modules/stdbool (stdbool.h): Likewise.
1987         * modules/stdint (stdint.h): Likewise.
1988         * modules/sys_select (sys/select.h): Likewise.
1989         * modules/sys_socket (sys/socket.h): Likewise.
1990         * modules/sys_stat (sys/stat.h): Likewise.
1991         * modules/sysexits (sysexits.h): Likewise.
1992         * modules/unistd (unistd.h): Likewise.
1993         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1994         Add a "DO NOT EDIT" comment to the generated file.
1995         (func_import): Likewise for gnulib-comp.m4.
1996
1997 2006-10-07  Bruno Haible  <bruno@clisp.org>
1998
1999         * lib/gl_sublist.h: New file.
2000         * lib/gl_sublist.c: New file.
2001
2002 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
2003
2004         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
2005         name (relative to the original working directory) and the file
2006         name component (relative to the temporary working directory).  All
2007         callers changed.
2008         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
2009         * lib/mkdir-p.c (make_dir_parents): Likewise.
2010         * lib/mkdir-p.h (make_dir_parents): Likewise.
2011
2012 2006-10-06  Eric Blake  <ebb9@byu.net>
2013
2014         Define several macros for use by the clean-temp module.
2015         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
2016         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
2017         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
2018
2019         * lib/clean-temp.h (close_stream_temp): New declaration.
2020         * lib/clean-temp.c (includes): Pull in headers according to what
2021         other modules are in use.
2022         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
2023
2024 2006-10-06  Bruno Haible  <bruno@clisp.org>
2025
2026         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
2027         instead of fopen, fwriteerror.
2028
2029 2006-10-06  Bruno Haible  <bruno@clisp.org>
2030
2031         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
2032         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
2033         int.
2034         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
2035         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
2036         Return an error indicator.
2037         Suggested by Eric Blake.
2038
2039 2006-10-06  Bruno Haible  <bruno@clisp.org>
2040
2041         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
2042         Reported by Eric Blake.
2043
2044 2006-10-06  Bruno Haible  <bruno@clisp.org>
2045
2046         * modules/closeout (Description): Mention stderr too.
2047
2048 2006-10-06  Bruno Haible  <bruno@clisp.org>
2049         and Paul Eggert  <eggert@cs.ucla.edu>
2050
2051         * lib/closeout.c (close_stdout): Also close stderr.
2052         * lib/closeout.h: Update comment.
2053
2054 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
2055
2056         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
2057         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
2058         * lib/dirchownmod.c: Include lchown.h.
2059         * lib/lchown.c: Don't include files that lchown.h now includes.
2060         Don't declare chown, since lchown.h now does that.
2061         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
2062         (lchown): Define to rpl_chown if lchown is declared but
2063         does not exist.  Declare using a prototype if lchown is not
2064         declared.  Add a copyright notice.
2065         * lib/mkstemp.h: Include <unistd.h>.
2066         * lib/openat.c: Include lchown.h.
2067
2068         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
2069         we now test for that separately.
2070         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
2071         rather than O_NOFOLLOW, when testing whether it's possible to
2072         avoid a race condition reliably.
2073         * lib/savewd.c (savewd_chdir): Likewise.
2074
2075         Remove macros that are no longer needed now that stdint.h is
2076         reliable.
2077         * lib/fsusage.c (UINTMAX_MAX): Remove.
2078         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
2079         * lib/utimecmp.c (SIZE_MAX): Remove.
2080
2081         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
2082
2083         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
2084         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
2085         O_NOATIME works.
2086
2087 2006-10-05  Bruno Haible  <bruno@clisp.org>
2088
2089         * lib/gl_list.h (gl_sortedlist_search_from_to,
2090         gl_sortedlist_indexof_from_to): New declarations.
2091         (gl_list_implementation): New fields sortedlist_search_from_to,
2092         sortedlist_indexof_from_to.
2093         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
2094         inline functions.
2095         * lib/gl_list.c (gl_sortedlist_search_from_to,
2096         gl_sortedlist_indexof_from_to): New functions.
2097         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
2098         function.
2099         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
2100         (gl_array_sortedlist_search_from_to): New function.
2101         (gl_array_list_implementation): Update.
2102         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
2103         function.
2104         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
2105         (gl_carray_sortedlist_search_from_to): New function.
2106         (gl_carray_list_implementation): Update.
2107         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
2108         gl_linked_sortedlist_indexof_from_to): New functions.
2109         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
2110         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
2111         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
2112         gl_tree_sortedlist_indexof_from_to): New functions.
2113         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
2114         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
2115         Update.
2116         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
2117         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
2118         Update.
2119
2120 2006-10-05  Bruno Haible  <bruno@clisp.org>
2121
2122         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
2123         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
2124         (struct gl_list_implementation): Add fields search_from_to,
2125         indexof_from_to. Remove fields search, indexof.
2126         (gl_list_search): Use the search_from_to method.
2127         (gl_list_search_from, gl_list_search_from_to): New functions.
2128         (gl_list_indexof): Use the indexof_from_to method.
2129         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
2130         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
2131         (gl_list_search_from, gl_list_search_from_to): New functions.
2132         (gl_list_indexof): Use the indexof_from_to method.
2133         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
2134         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
2135         gl_array_indexof. Add start_index, end_index arguments.
2136         (gl_array_search_from_to): Renamed from gl_array_search. Add
2137         start_index, end_index arguments.
2138         (gl_array_remove, gl_array_list_implementation): Update.
2139         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
2140         gl_carray_indexof. Add start_index, end_index arguments.
2141         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
2142         start_index, end_index arguments.
2143         (gl_carray_remove, gl_carray_list_implementation): Update.
2144         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
2145         gl_linked_search. Add start_index, end_index arguments.
2146         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
2147         start_index, end_index arguments.
2148         (gl_linked_remove): Update.
2149         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
2150         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
2151         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
2152         field to 'size_t'.
2153         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
2154         gl_tree_search. Add start_index, end_index arguments.
2155         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
2156         start_index, end_index arguments.
2157         (gl_tree_remove): Update.
2158         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
2159         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
2160         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
2161         function.
2162         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
2163         gl_tree_search. Add start_index, end_index arguments.
2164         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
2165         start_index, end_index arguments.
2166         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
2167         Update.
2168         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
2169
2170 2006-10-05  Bruno Haible  <bruno@clisp.org>
2171
2172         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
2173
2174         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
2175         fwriteerror_temp): New declarations.
2176         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
2177         (descriptors): New variable.
2178         (cleanup): First, close the descriptors.
2179         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
2180         fclose_temp, fwriteerror_temp): New functions.
2181
2182 2006-10-04  Jim Meyering  <jim@meyering.net>
2183
2184         * lib/fts.c (fts_open): Tiny comment change.
2185
2186 2006-10-04  Bruno Haible  <bruno@clisp.org>
2187
2188         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
2189         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
2190         gl_LOCK_BODY.
2191         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
2192         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
2193         gl_LOCK_EARLY_BODY.
2194         (gl_LOCK): Require gl_LOCK_BODY.
2195
2196 2006-10-04  Bruno Haible  <bruno@clisp.org>
2197
2198         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
2199         (gl_oset_search_atleast): New declaration.
2200         (struct gl_oset_implementation): Add field 'search_atleast'.
2201         (gl_oset_search_atleast): New inline function.
2202         * lib/gl_oset.c (gl_oset_search_atleast): New function.
2203         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
2204         (gl_array_oset_implementation): Update.
2205         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
2206         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
2207         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
2208
2209 2006-10-04  Bruno Haible  <bruno@clisp.org>
2210
2211         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
2212
2213 2006-10-03  Bruno Haible  <bruno@clisp.org>
2214
2215         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
2216         from gl_avltreehash_list_implementation.
2217
2218 2006-10-03  Bruno Haible  <bruno@clisp.org>
2219
2220         * lib/gl_oset.c (gl_oset_add): Fix return type.
2221
2222 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
2223
2224         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
2225
2226 2006-10-02  Eric Blake  <ebb9@byu.net>
2227
2228         * modules/strnlen (Depends-on): Add extensions.
2229
2230 2006-10-02  Eric Blake  <ebb9@byu.net>
2231
2232         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
2233         definition in 2.60+.
2234
2235 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
2236
2237         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
2238         checks.
2239
2240 2006-10-02  Bruno Haible  <bruno@clisp.org>
2241
2242         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
2243         to the AUTOMAKE_OPTIONS.
2244         Reported by Jim Meyering.
2245
2246 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
2247
2248         Work around bug in Solaris 10 /proc file system:
2249         /proc/self/fd/NNN/.. isn't the parent directory of
2250         the directory whose file descriptor is NNN.  This needs to
2251         be worked around at run time, not compile time, since a
2252         program might be built on Solaris 8, where things work, and
2253         run on Solaris 10.
2254         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
2255         to use the following interface instead:
2256         (OPENAT_BUFFER_SIZE): New macro.
2257         (openat_proc_name): New function.
2258         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
2259         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
2260         Likewise.
2261         * lib/openat-proc.c: New file.
2262         * modules/openat (Files): Add lib/openat-proc.c.
2263         (Depends-on): Add same-inode, stdbool.
2264         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
2265
2266 2006-09-29  Bruno Haible  <bruno@clisp.org>
2267
2268         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
2269         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
2270         argument. Set stdout_closed before testing for ferror, not after.
2271         (fwriteerror, fwriteerror_no_ebadf): New functions.
2272
2273 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2274
2275         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
2276
2277 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
2278
2279         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
2280         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
2281
2282 2006-09-28  Jim Meyering  <jim@meyering.net>
2283
2284         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
2285         Include <unistd.h>.
2286
2287 2006-09-28  Bruno Haible  <bruno@clisp.org>
2288
2289         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
2290         * modules/linkedhash-list (Depends-on): Likewise.
2291         * modules/rbtreehash-list (Depends-on): Likewise.
2292
2293 2006-09-28  Bruno Haible  <bruno@clisp.org>
2294
2295         * lib/strndup.h: Simplify the redefinition of strndup.
2296         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
2297         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
2298
2299 2006-09-28  Bruno Haible  <bruno@clisp.org>
2300
2301         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
2302         * lib/gl_linkedhash_list.c: Likewise.
2303         * lib/gl_rbtreehash_list.c: Likewise.
2304
2305 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
2306
2307         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
2308         getaddrinfo.
2309
2310         * lib/__fpending.h: Don't include <stdio_ext.h> unless
2311         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
2312         it causes <stdio_ext.h> to cause a compile-time error.
2313         Problem reported by Nelson H. F. Beebe.
2314         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
2315         of HAVE_DECL___PENDING.
2316
2317         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
2318         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
2319         declaration.
2320
2321 2006-09-27  Jim Meyering  <jim@meyering.net>
2322
2323         This file could end up with a definition for a function
2324         named __strndup, rather than rpl_strndup on a system with
2325         incomplete weak_alias support.
2326         * lib/strndup.c (strndup): Rename from __strndup.
2327         Remove #defines that used to map __strndup to strndup.
2328         Don't use K&R prototypes.
2329         Remove LIBC-related code, since this file is not sync'd with glibc.
2330         * lib/strndup.h: Revamp, accordingly.
2331         * m4/strndup.m4: Modernize.
2332
2333 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
2334
2335         * modules/savewd (Depends-on): Add 'raise'.
2336         * lib/savewd.c: Include <signal.h>, for 'raise'.
2337
2338 2006-09-26  Jim Meyering  <jim@meyering.net>
2339
2340         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
2341         when we detect Darwin 8.7.0's acl_get_file bug.
2342         Rearrange to perform the new (below) run-test while $LIBS
2343         contains any acl-related library.  Set USE_ACL at the end.
2344         (gl_ACL_GET_FILE): New function.
2345
2346 2006-09-26  Eric Blake  <ebb9@byu.net>
2347
2348         * lib/verror.c: Include <config.h> unconditionally.
2349
2350 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
2351
2352         * modules/clock-time (Maintainer): Add self.
2353         * modules/getlogin_r (Depends-on): Add extensions.
2354
2355 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2356
2357         * modules/clock-time: New module.
2358         * modules/nanosleep (Depends-on): Add clock-time.
2359         * modules/gethrxtime (Depends-on): Likewise.
2360         * modules/gettime (Depends-on): Likewise.
2361         * modules/settime (Depends-on): Likewise.
2362
2363         * modules/fts-lgpl: Depend on openat.
2364         * modules/mkancesdirs: Depend on savewd.
2365         * modules/mkdir-p: Likewise.
2366
2367 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2368
2369         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
2370
2371         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
2372         `gl_have_arbitrary_file_name_length_limit' to
2373         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
2374         actually works between configure runs.
2375
2376 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2377             Bruno Haible  <bruno@clisp.org>
2378
2379         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
2380
2381 2006-09-25  Jim Meyering  <jim@meyering.net>
2382
2383         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
2384         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
2385
2386 2006-09-25  Eric Blake  <ebb9@byu.net>
2387
2388         * gnulib-tool (func_import, func_create_testdir): Fix typos in
2389         exec's in 2006-09-18 patch when shuffling fds.
2390
2391 2006-09-25  Bruno Haible  <bruno@clisp.org>
2392
2393         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
2394         Reported by Jim Meyering.
2395
2396 2006-09-24  Jim Meyering  <jim@meyering.net>
2397
2398         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
2399         compare a pointer against a literal "0".  That caused failures with
2400         at least HP-UX's hpcc.
2401
2402 2006-09-22  Simon Josefsson  <jas@extundo.com>
2403
2404         * modules/gc-sha1:
2405         * modules/gc-md4:
2406         * modules/gc-hmac-sha1:
2407         * modules/gc-hmac-md5:
2408         * modules/gc-des:
2409         * modules/gc-arcfour: Distribute more files.
2410
2411 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2412
2413         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
2414         (gl_linked_iterator_from_to): Initialize struct completely.
2415         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
2416         (gl_tree_iterator_from_to): Likewise
2417         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
2418         * lib/gl_array_list.c [lint] (gl_array_iterator)
2419         (gl_array_iterator_from_to): Likewise.
2420         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
2421         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
2422         (gl_carray_iterator_from_to): Likewise.
2423
2424         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
2425         * lib/md4.c (md4_process_block): Remove unused variable.
2426         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
2427         parentheses for clarity.
2428
2429 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2430
2431         * modules/bison-i18n (Depends-on): Add gettext.
2432
2433 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2434
2435         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
2436         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
2437         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
2438         also add missing comma that caused broken test.
2439         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
2440         stdlib.h, for `abort'.
2441         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
2442         variables.
2443         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
2444         include unistd.h if present, for `rmdir'.
2445         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
2446         variables.
2447         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
2448         in the process include standard headers for prototypes.
2449         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
2450         gets declared on GNU/Linux.
2451         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
2452         unistd.h, for `rmdir'.
2453         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
2454
2455         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
2456         always true.
2457         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
2458
2459         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
2460
2461 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2462
2463         * gnulib-tool (func_version): Create output all at once.  This
2464         may help avoid triggering unnecessary SIGPIPEs, and at any
2465         rate it doesn't hurt.
2466
2467 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2468             Bruno Haible  <bruno@clisp.org>
2469
2470         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
2471         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2472         * m4/signed.m4 (bh_C_SIGNED): Likewise.
2473
2474         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
2475         (gl_FUNC_VASPRINTF): Invoke it.
2476
2477 2006-09-22  Bruno Haible  <bruno@clisp.org>
2478
2479         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
2480         getloadavg.c as first argument.
2481
2482 2006-09-22  Bruno Haible  <bruno@clisp.org>
2483
2484         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
2485         at the beginning of the gl_INIT macro.
2486         * modules/getloadavg (configure.ac): Pass $gl_source_base to
2487         gl_GETLOADAVG.
2488
2489 2006-09-22  Bruno Haible  <bruno@clisp.org>
2490
2491         * gnulib-tool (func_create_megatestdir): Don't include the config-h
2492         module.
2493         Suggested by Ralf Wildenhues.
2494
2495 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
2496
2497         Import this patch from libc:
2498
2499         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
2500
2501         * lib/regex_internal.c (re_string_reconstruct): Handle
2502         offset < pstr->valid_raw_len && pstr->offsets_needed case.
2503         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
2504         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
2505         re_string_context_at.
2506
2507         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
2508         now requires it.
2509         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
2510         gl_REGEX now does it for us.
2511         (gl_REGEX): Add test taken from
2512         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
2513
2514         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
2515         Check that large offsets work.  Modernize Autoconf usages.
2516         Prefer "yes" to mean a good thing rather than a bad.
2517         Don't put "#define mkstemp" in config.h, as this might interfere
2518         with standard system headers that "#define mkstemp mkstemp64".
2519
2520         * modules/mkstemp (Depends-on): Add extensions, so that
2521         mkstemp is visible on some platforms.
2522         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
2523         (Include): Change to "mkstemp.h" from <stdlib.h>.
2524         (Files): Add mkstemp.h.
2525
2526         * lib/mkstemp.h: New file, since some standard headers
2527         #define mkstemp.
2528         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
2529         Include "mkstemp.h".
2530         Make the _LIBC code resemble glibc original more,
2531         e.g., use K&R style.
2532         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
2533         (mkstemp): Remove, since mkstemp.h does this for us.
2534         * lib/stdlib--.h: Include mkstemp.h.
2535
2536         Import this patch from libc:
2537
2538         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
2539
2540         * lib/tempname.c (__gen_tempname): Change attempts_min
2541         into a macro.  Use preprocessor to decide how to initialize
2542         attempts [Coverity CID 67].
2543
2544 2006-09-20  Bruno Haible  <bruno@clisp.org>
2545
2546         * lib/mkdtemp.c: Import from libc.
2547         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
2548                 * sysdeps/posix/tempname.c (__gen_tempname): Change
2549                 attempts_min into a macro.  Use preprocessor to decide how to
2550                 initialize attempts [Coverity CID 67].
2551         2001-11-27  Paul Eggert  <eggert@twinsun.com>
2552                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
2553                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
2554
2555 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2556
2557         * gnulib-tool (func_exit): New function, to allow to pass the
2558         exit status portably through the trap.  Use everywhere.
2559         (--help, --version): Signal a write error.
2560         (trap): catch SIGPIPE, for write errors.
2561         Exit at the end of the trap, with the correct exit status.
2562
2563 2006-09-19  Karl Berry  <karl@gnu.org>
2564
2565         * doc/gnulib.texi: note about the license texinfo files.
2566
2567 2006-09-19  Eric Blake  <ebb9@byu.net>
2568
2569         * gnulib-tool: Avoid space-tab.
2570
2571 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
2572
2573         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
2574         that prevented coreutils 6.1 from building.  Problem reported
2575         by Petter Reinholdtsen.
2576
2577 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
2578
2579         * gnulib-tool (avoidlist): Fix typo that broke options like
2580         --avoid=lock that are used by coreutils bootstrap.
2581
2582 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
2583
2584         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
2585         more systematically.
2586
2587 2006-09-18  Jim Meyering  <jim@meyering.net>
2588
2589         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
2590
2591 2006-09-18  Bruno Haible  <bruno@clisp.org>
2592
2593         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
2594
2595 2006-09-18  Bruno Haible  <bruno@clisp.org>
2596
2597         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
2598         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
2599         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
2600         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
2601         * m4/gettext.m4: Require autoconf >= 2.52.
2602         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
2603         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
2604         of gl_cv_header_inttypes_h.
2605
2606 2006-09-18  Bruno Haible  <bruno@clisp.org>
2607
2608         * lib/javaversion.c: Include configmake.h.
2609
2610 2006-09-18  Bruno Haible  <bruno@clisp.org>
2611
2612         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
2613         avoid that the while loops be executed in a subshell.
2614
2615 2006-09-18  Bruno Haible  <bruno@clisp.org>
2616
2617         * MODULES.html.sh (func_module): Break long lines.
2618         Suggested by Bruce Korb <bkorb@gnu.org>.
2619
2620 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2621
2622         Speed up by a factor of 1.12.
2623         * gnulib-tool (nl): New variable.
2624         (func_import): Rewrite include directive extraction to only read each
2625         directive once.
2626
2627 2006-09-17  Bruno Haible  <bruno@clisp.org>
2628
2629         * modules/javaversion (Makefile.am): Remove DEFS setting.
2630         (Depends-on): Add configmake, for PKGDATADIR definition.
2631
2632 2006-09-17  Bruno Haible  <bruno@clisp.org>
2633
2634         * gnulib-tool (func_create_testdir): Rewrite all files at once.
2635
2636 2006-09-17  Bruno Haible  <bruno@clisp.org>
2637
2638         * gnulib-tool (func_append): New function, stolen from libtool.m4.
2639         (func_modules_transitive_closure, func_modules_add_dummy,
2640         func_modules_to_filelist, func_import, func_create_testdir,
2641         func_create_megatestdir, ...): Use it wherever possible.
2642         Suggested by Ralf Wildenhues.
2643
2644 2006-09-16  Karl Berry  <karl@gnu.org>
2645
2646         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
2647         to avoid sectioning errors.
2648         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
2649         [ifinfo]: blank line after @center-ed titles.
2650         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
2651         Spell FSF address consistently with others.
2652         (These changes approved by rms.)
2653
2654 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2655
2656         Speed up by a factor of 1.61.
2657         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
2658         already checked module names again.
2659
2660 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2661
2662         Speed up by a factor of 1.13.
2663         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
2664         for new_files, and the input to func_add_or_update.
2665
2666 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2667
2668         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
2669         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
2670
2671 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2672
2673         * modules/mkancesdirs (Depends-on): Add fcntl.
2674         * modules/savewd: New file.
2675         * MODULES.html.sh (File system functions): Add savewd.
2676
2677         * modules/configmake (Makefile.am): Add support for the
2678         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
2679
2680 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2681
2682         * m4/savewd.m4: New file.
2683
2684 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2685
2686         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
2687         (dirchownmod): New arg FD.  All callers changed.
2688         Use FD rather than opening the directory ourself, as opening is
2689         now the caller's responsibility.
2690         * lib/dirchownmod.h: Likewise.
2691         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
2692         hosts that require <sys/types.h> before <sys/stat.h>.  Include
2693         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
2694         (test_dir): Remove.
2695         (mkancesdirs): Return length of prefix of FILE that has already
2696         been made, or -2 if there is a child doing the work.  Redo
2697         algorithm so that it is O(N) rather than O(N**2).  Optimize away
2698         ".", and treat ".." specially since it might stray back into
2699         already-created areas.  Use a subprocess if necessary.  New arg
2700         WD; all users changed.  MAKE_DIR function should now return 1
2701         if it creates a directory that is not readable.  Return -2 if
2702         a child process is spun off.
2703         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
2704         Adjust signature to match code.
2705         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
2706         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
2707         all users changed.
2708         * lib/savewd.c, lib/savewd.h: New files.
2709
2710 2006-09-15  Jim Meyering  <jim@meyering.net>
2711
2712         * modules/rename-dest-slash: New module.
2713         * MODULES.html.sh (posix_compat): Add it here.
2714
2715         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
2716
2717 2006-09-15  Jim Meyering  <jim@meyering.net>
2718
2719         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
2720         file.
2721
2722         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
2723
2724 2006-09-15  Jim Meyering  <jim@meyering.net>
2725
2726         * lib/rename-dest-slash.c (has_trailing_slash): Use
2727         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
2728         (rpl_rename_dest_slash): Perform the cheaper trailing slash
2729         test before testing whether SRC is a directory.
2730         Suggestions from Bruno Haible.
2731
2732         Avoid a warning about an unused variable.
2733         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
2734         into the #ifdef block where it's used.
2735
2736         * lib/rename-dest-slash.c: New file.
2737
2738 2006-09-14  Bruno Haible  <bruno@clisp.org>
2739
2740         * lib/allocsa.c: Include <config.h> unconditionally.
2741         * lib/asnprintf.c: Likewise.
2742         * lib/asprintf.c: Likewise.
2743         * lib/c-strcasecmp.c: Likewise.
2744         * lib/c-strcasestr.c: Likewise.
2745         * lib/c-strncasecmp.c: Likewise.
2746         * lib/c-strstr.c: Likewise.
2747         * lib/classpath.c: Likewise.
2748         * lib/clean-temp.c: Likewise.
2749         * lib/concatpath.c: Likewise.
2750         * lib/copy-file.c: Likewise.
2751         * lib/csharpcomp.c: Likewise.
2752         * lib/csharpexec.c: Likewise.
2753         * lib/execute.c: Likewise.
2754         * lib/fatal-signal.c: Likewise.
2755         * lib/findprog.c: Likewise.
2756         * lib/fwriteerror.c: Likewise.
2757         * lib/gl_array_list.c: Likewise.
2758         * lib/gl_array_oset.c: Likewise.
2759         * lib/gl_avltree_list.c: Likewise.
2760         * lib/gl_avltree_oset.c: Likewise.
2761         * lib/gl_avltreehash_list.c: Likewise.
2762         * lib/gl_carray_list.c: Likewise.
2763         * lib/gl_linked_list.c: Likewise.
2764         * lib/gl_linkedhash_list.c: Likewise.
2765         * lib/gl_list.c: Likewise.
2766         * lib/gl_oset.c: Likewise.
2767         * lib/gl_rbtree_list.c: Likewise.
2768         * lib/gl_rbtree_oset.c: Likewise.
2769         * lib/gl_rbtreehash_list.c: Likewise.
2770         * lib/imaxabs.c: Likewise.
2771         * lib/imaxdiv.c: Likewise.
2772         * lib/javacomp.c: Likewise.
2773         * lib/javaexec.c: Likewise.
2774         * lib/javaversion.c: Likewise.
2775         * lib/linebreak.c: Likewise.
2776         * lib/localcharset.c: Likewise.
2777         * lib/lock.c: Likewise.
2778         * lib/mbchar.c: Likewise.
2779         * lib/mbswidth.c: Likewise.
2780         * lib/mkdtemp.c: Likewise.
2781         * lib/pipe.c: Likewise.
2782         * lib/printf-args.c: Likewise.
2783         * lib/printf-parse.c: Likewise.
2784         * lib/progname.c: Likewise.
2785         * lib/progreloc.c: Likewise.
2786         * lib/readlink.c: Likewise.
2787         * lib/sh-quote.c: Likewise.
2788         * lib/stpcpy.c: Likewise.
2789         * lib/stpncpy.c: Likewise.
2790         * lib/strcasecmp.c: Likewise.
2791         * lib/strcasestr.c: Likewise.
2792         * lib/strcspn.c: Likewise.
2793         * lib/striconv.c: Likewise.
2794         * lib/strncasecmp.c: Likewise.
2795         * lib/strnlen1.c: Likewise.
2796         * lib/strstr.c: Likewise.
2797         * lib/strtok_r.c: Likewise.
2798         * lib/tls.c: Likewise.
2799         * lib/tmpdir.c: Likewise.
2800         * lib/unicodeio.c: Likewise.
2801         * lib/unsetenv.c: Likewise.
2802         * lib/vasnprintf.c: Likewise.
2803         * lib/vasprintf.c: Likewise.
2804         * lib/wait-process.c: Likewise.
2805         * lib/xallocsa.c: Likewise.
2806         * lib/xsetenv.c: Likewise.
2807         * lib/xstriconv.c: Likewise.
2808
2809 2006-09-13  Simon Josefsson  <jas@extundo.com>
2810
2811         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
2812         that internally, suggested by Ralf Wildenhues
2813         <Ralf.Wildenhues@gmx.de>.
2814
2815 2006-09-13  Simon Josefsson  <jas@extundo.com>
2816
2817         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
2818         @LIBOBJS@.
2819         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2820
2821 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
2822
2823         * lib/_fpending.c: Include <config.h> unconditionally, since we no
2824         longer worry about uses that don't define HAVE_CONFIG_H.
2825         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
2826         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
2827         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
2828         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
2829         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
2830         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
2831         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
2832         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
2833         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
2834         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
2835         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
2836         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
2837         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
2838         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
2839         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
2840         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
2841         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
2842         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
2843         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
2844         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
2845         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
2846         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
2847         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
2848         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
2849         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
2850         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
2851         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
2852         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
2853         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
2854         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
2855         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
2856         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
2857         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
2858         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
2859         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
2860         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
2861         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
2862         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
2863         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
2864         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
2865         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
2866         Likewise.
2867
2868 2006-09-13  Eric Blake  <ebb9@byu.net>
2869
2870         * lib/getopt.c: Fix typo in last commit.
2871
2872 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2873
2874         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
2875         dgettext.
2876
2877 2006-09-12  Jim Meyering  <jim@meyering.net>
2878
2879         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
2880         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
2881         Reported by Nelson H. F. Beebe.
2882
2883 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
2884
2885         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
2886         program_invocation_name and program_invocation_short_name are
2887         initialized.
2888         * lib/argp-namefrob.h: Move declarations of program_invocation_name
2889         and program_invocation_short_name to argp.h, so they are visible
2890         to user programs.
2891         * lib/argp.h: Likewise
2892
2893 2006-09-10  Bruno Haible  <bruno@clisp.org>
2894
2895         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
2896         m4/inttypes_h.m4, m4/uintmax_t.m4.
2897
2898 2006-09-10  Bruno Haible  <bruno@clisp.org>
2899
2900         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
2901         gl_AC_TYPE_UINTMAX_T.
2902
2903 2006-09-10  Bruno Haible  <bruno@clisp.org>
2904
2905         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
2906
2907 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
2908
2909         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
2910         convention.  Text proposed by Bruno Haible.
2911         (struct argp_option): Document the use of N_() wrappers.
2912
2913         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
2914         '\v', and translate the two parts separately, instead of feeding
2915         the whole string to gettext.  This allows to exclude
2916         '\v' from the strings visible to the translator by writing doc
2917         strings as N_("..") "\v" N_("..").
2918
2919 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
2920
2921         * config/srclist.txt: Undo latest change; the bug was fixed.
2922
2923 2006-09-09  Bruno Haible  <bruno@clisp.org>
2924
2925         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
2926         assignments if building a library without libtool.
2927         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
2928         in func_emit_lib_Makefile_am.
2929         (func_import): When building a static library libfoo.a, arrange to
2930         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
2931         (func_create_testdir): Likewise.
2932         * modules/gc (configure.ac, Makefile.am): If building statically,
2933         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
2934         * modules/iconvme (configure.ac, Makefile.am): Likewise.
2935         * modules/striconv (configure.ac, Makefile.am): Likewise.
2936         Based on a suggestion by Ralf Wildenhues.
2937
2938 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2939
2940         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2941         Check for unistd.h too, since Autoconf doesn't assume POSIX.
2942         Also:
2943
2944         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2945         Add year_2050_test to catch glibc bug 2821
2946         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
2947
2948         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
2949         Prefer #ifdef to #if.
2950
2951         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
2952         Return from 'main' instead of calling 'exit'.
2953
2954 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2955
2956         * lib/mktime.c (guess_time_tm): Fix bug where mktime
2957         returned the maximum time_t value rather than (time_t) -1.
2958         Problem originally reported by William Bardwell
2959         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
2960
2961         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
2962         Moved to here ...
2963         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
2964         ... from here.
2965
2966 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2967
2968         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
2969         2821 is fixed.
2970
2971 2006-09-08  Jim Meyering  <jim@meyering.net>
2972
2973         Don't make generated files read-only.  That would bother too many
2974         people.  However, do retain the ability to work when targets are
2975         read-only: remove the destination and temporary files before writing
2976         them (when generated via sed or echo), or by using the -f option for
2977         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
2978         * modules/alloca-opt, modules/argz, modules/arpa_inet:
2979         * modules/byteswap, modules/configmake, modules/fcntl:
2980         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
2981         * modules/localcharset, modules/netinet_in, modules/poll:
2982         * modules/stdbool, modules/stdint, modules/sys_select:
2983         * modules/sys_socket, modules/sys_stat, modules/sysexits:
2984
2985 2006-09-08  Jim Meyering  <jim@meyering.net>
2986
2987         Avoid new build failure on FreeBSD 6.0.
2988         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
2989         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
2990         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
2991
2992 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2993
2994         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
2995
2996 2006-09-07  Jim Meyering  <jim@meyering.net>
2997
2998         Fix global typo in last change: use chmod u-w, not chmod u-x.
2999         Spotted by Paul Eggert and Bruce Korb.
3000         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3001         * modules/byteswap, modules/configmake, modules/fcntl:
3002         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3003         * modules/localcharset, modules/netinet_in, modules/poll:
3004         * modules/stdbool, modules/stdint, modules/sys_select:
3005         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3006
3007 2006-09-06  Jim Meyering  <jim@meyering.net>
3008
3009         Make generated files be read-only.
3010         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
3011         Ensure that each generated file is now read-only.
3012         * modules/argz: Likewise.
3013         * modules/arpa_inet: Likewise.
3014         * modules/byteswap: Likewise.
3015         * modules/configmake: Likewise.
3016         * modules/fcntl: Likewise.
3017         * modules/fnmatch: Likewise.
3018         * modules/getopt: Likewise.
3019         * modules/glob: Likewise.
3020         * modules/inttypes: Likewise.
3021         * modules/netinet_in: Likewise.
3022         * modules/poll: Likewise.
3023         * modules/stdbool: Likewise.
3024         * modules/stdint: Likewise.
3025         * modules/sys_select: Likewise.
3026         * modules/sys_socket: Likewise.
3027         * modules/sys_stat: Likewise.
3028         * modules/sysexits: Likewise.
3029         * modules/localcharset: Same as above, but continue using temporary
3030         file named "t-$@" (why different?) rather than the "$@-t" used
3031         everywhere else.
3032
3033         * modules/sysexits (Makefile.am): Replace literal occurrences
3034         of "sysexit.h" more readable, and more consistent, "$@".
3035
3036 2006-09-06  Bruno Haible  <bruno@clisp.org>
3037
3038         * modules/striconv: New file.
3039         * modules/xstriconv: New file.
3040         * MODULES.html.sh (Internationalization functions): Add striconv,
3041         xstriconv.
3042
3043 2006-09-06  Bruno Haible  <bruno@clisp.org>
3044
3045         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
3046         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
3047         not using libtool correctly.
3048
3049 2006-09-06  Bruno Haible  <bruno@clisp.org>
3050
3051         * lib/striconv.h: New file.
3052         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
3053         iconvstring.c.
3054         * lib/xstriconv.h: New file.
3055         * lib/xstriconv.c: New file.
3056
3057 2006-09-06  Bruno Haible  <bruno@clisp.org>
3058
3059         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3060         lib_..._LDFLAGS.
3061
3062 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3063
3064         * lib/argz_.h: Sync from Libtool.
3065
3066         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
3067                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3068
3069         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
3070
3071 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
3072
3073         * modules/trim: New file.
3074
3075 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
3076
3077         * lib/trim.h: New file.
3078         * lib/trim.c: New file.
3079
3080 2006-09-05  Bruno Haible  <bruno@clisp.org>
3081
3082         * MODULES.html.sh (String handling): Add trim.
3083
3084 2006-09-04  Karl Berry  <karl@gnu.org>
3085
3086         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
3087         until next release.
3088
3089 2006-09-03  Bruno Haible  <bruno@clisp.org>
3090
3091         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
3092         correctly.
3093
3094 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3095
3096         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
3097         not gl_GETLOADAVG.  Omit unneeded semicolons.
3098         Problems reported by Ralf Wildenhues in
3099         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
3100         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
3101         at the end, which is the usual gnulib style.
3102
3103         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
3104         of doing all the work ourselves.
3105         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
3106         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
3107
3108 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3109
3110         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
3111         Problem reported by Ralf Wildenhues in
3112         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
3113
3114         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
3115         HAVE_STRUCT_STATFS_F_FSTYPENAME.
3116
3117 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3118
3119         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
3120         yesterday's patch by changing test -n to test -z.
3121
3122 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3123
3124         * modules/getloadavg (Files): Add m4/getloadavg.m4.
3125         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
3126         the former is now obsolescent.
3127
3128         * modules/chdir-long (Depends-on): Add fcntl.
3129
3130 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3131
3132         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
3133         obsolescent, and programs should use gnulib instead.
3134         * m4/getloadavg.m4: New file, with contents taken from Autoconf
3135         but with prefixes changed.
3136
3137 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3138
3139         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
3140         or stdbool.h, because they might not exist while configuring.
3141
3142         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
3143         Don't include unistd.h or limits.h; not needed, since chdir-long.h
3144         does that for us.
3145         (O_DIRECTORY): Remove.
3146
3147 2006-08-31  Eric Blake  <ebb9@byu.net>
3148
3149         * gnulib-tool: Don't let emacs change spaces to TAB.
3150
3151 2006-08-31  Bruno Haible  <bruno@clisp.org>
3152
3153         * gnulib-tool: When calling func_import more than once, do it in a
3154         subshell.
3155         Reported by Eric Blake <ebb9@byu.net>.
3156
3157 2006-08-31  Bruno Haible  <bruno@clisp.org>
3158
3159         * gnulib-tool (nl): Remove variable.
3160         (sed_transform_lib_file): Use more robust test for config-h module.
3161         (func_import): Fix typo in 2006-08-25 patch.
3162
3163 2006-08-31  Bruno Haible  <bruno@clisp.org>
3164
3165         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
3166         specified, augment Makefile.am variables instead of assigning them.
3167
3168 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3169
3170         Work around a bug in both the Linux and SunOS 64-bit kernels:
3171         nanosleep mishandles sleeps for longer than 2**31 seconds.
3172         Problem reported by Frank v Waveren in
3173         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
3174         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
3175         Check for nanosleep bug.
3176         (LIB_NANOSLEEP): Append clock_gettime library if needed.
3177
3178 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3179
3180         Work around a bug in both the Linux and SunOS 64-bit kernels:
3181         nanosleep mishandles sleeps for longer than 2**31 seconds.
3182         Problem reported by Frank v Waveren in
3183         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
3184         * lib/nanosleep.c (BILLION): New constant.
3185         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
3186         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
3187         implementation.
3188
3189 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3190
3191         * modules/nanosleep (Depends-on): Add gettime.
3192
3193 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3194         and Simon Josefsson  <jas@extundo.com>
3195         and Oskar Liljeblad  <oskar@osk.mine.nu>
3196
3197         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
3198         * gnulib-tool (func_import): New license type 'unmodifiable license
3199         text'.
3200         * modules/fdl: Use it.  Longer description.
3201         * module/gpl, module/lgpl: New files.
3202
3203 2006-08-30  Jim Meyering  <jim@meyering.net>
3204
3205         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
3206         shadowing the parameter.
3207
3208 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3209
3210         Sync from Libtool:
3211
3212         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3213
3214         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
3215         sharing with gnulib.  Report by Eric Blake.
3216
3217 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3218
3219         * modules/isapipe: New file.
3220         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
3221
3222 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3223
3224         * modules/configmake (Makefile.am): Add a comment, and omit
3225         the CONFIGMAKE_ prefix from generated macro names.  Suggested
3226         by Bruno Haible.
3227
3228 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3229
3230         * m4/isapipe.m4: New file.
3231
3232 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3233
3234         * lib/isapipe.c, lib/isapipe.h: New files.
3235
3236 2006-08-29  Jim Meyering  <jim@meyering.net>
3237
3238         * modules/configmake (Makefile.am): Make configmake.h depend on
3239         Makefile.  Otherwise, a stale configmake.h could hang around.
3240
3241 2006-08-29  Eric Blake  <ebb9@byu.net>
3242
3243         * lib/error.c (error_at_line, print_errno_message): Match libc, after
3244         resolution of upstream bug 3044.
3245
3246 2006-08-29  Bruno Haible  <bruno@clisp.org>
3247
3248         * modules/localcharset (Depends-on): Add configmake.
3249         (Makefile.am): Remove setting of LIBDIR through DEFS.
3250
3251 2006-08-29  Bruno Haible  <bruno@clisp.org>
3252
3253         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
3254         defined.
3255
3256 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3257
3258         * modules/fcntl: New file.
3259         * modules/chdir-safer (Depends-on): Add fcntl.
3260         * modules/fts: Likewise.
3261         * modules/mkdir-p: Likewise.
3262
3263         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
3264         This undoes the most recent change, since we're now addressing the
3265         problem in a different way.
3266
3267         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
3268         into output, since the output might be called Makefile.am even
3269         if $makefile_name is something different.
3270         (func_import): Use $makefile_am rather than
3271         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
3272         empty.
3273
3274         * modules/inttypes (Files): Add m4/inttypes-h.m4.
3275
3276 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3277
3278         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
3279         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
3280         recent change to stdint.m4, since we're now addressing the problem in a
3281         different way.
3282
3283 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3284
3285         * m4/fcntl_h.m4: New file.
3286
3287 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3288
3289         * lib/fcntl_.h: New file.
3290         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
3291         the fcntl module.
3292         * lib/dirchownmod.c: Likewise.
3293         * lib/fts.c: Likewise.
3294
3295         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
3296         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
3297         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
3298         just before including <inttypes.h>, to avoid circular inclusion.
3299
3300 2006-08-28  Jim Meyering  <jim@meyering.net>
3301
3302         * doc/visibility.texi: Actually read and correct the grammar of the
3303         sentence affected by yesterday's change.
3304
3305 2006-08-28  Eric Blake  <ebb9@byu.net>
3306
3307         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
3308         needs wrapper.
3309
3310 2006-08-28  Eric Blake  <ebb9@byu.net>
3311
3312         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
3313
3314 2006-08-28  Eric Blake  <ebb9@byu.net>
3315
3316         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
3317
3318 2006-08-28  Bruno Haible  <bruno@clisp.org>
3319
3320         * modules/c-strstr: New file, from GNU gettext.
3321         * MODULES.html.sh (String handling): Add c-strstr.
3322
3323 2006-08-28  Bruno Haible  <bruno@clisp.org>
3324
3325         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
3326         macros.
3327         Reported by Eric Blake.
3328
3329 2006-08-28  Bruno Haible  <bruno@clisp.org>
3330
3331         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
3332         (VASNPRINTF): Return a string of length > INT_MAX without failing.
3333         * lib/vasprintf.c: Include errno.h, limits.h.
3334         (EOVERFLOW): New fallback definition.
3335         (vasprintf): Test here whether the string length is > INT_MAX.
3336         * lib/vsnprintf.c: Include errno.h, limits.h.
3337         (EOVERFLOW): New fallback definition.
3338         (vsnprintf): Fix bug when generated string was too long for the buffer.
3339         Test here whether the string length is > INT_MAX.
3340
3341 2006-08-28  Bruno Haible  <bruno@clisp.org>
3342
3343         * lib/inttypes_.h (SCNX*): Remove definitions.
3344         Reported by Eric Blake.
3345
3346 2006-08-28  Bruno Haible  <bruno@clisp.org>
3347
3348         * lib/c-strstr.h: New file, from GNU gettext.
3349         * lib/c-strstr.c: New file, from GNU gettext.
3350
3351 2006-08-28  Bruno Haible  <bruno@clisp.org>
3352
3353         * gnulib-tool: Reorder some statements.
3354
3355 2006-08-28  Bruno Haible  <bruno@clisp.org>
3356
3357         * gnulib-tool: New option --makefile-name.
3358         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
3359         $makefile_name.
3360         (func_import): Write $makefile_name to the cache file, and read it from
3361         there unless explicitly specified. Use $makefile_name as file name
3362         instead of Makefile.am. Adjust the recommendations accordingly.
3363
3364 2006-08-28  Bruno Haible  <bruno@clisp.org>
3365
3366         * gnulib-tool (func_verify_module): Check against misapplying patch.
3367
3368 2006-08-28  Bruno Haible  <bruno@clisp.org>
3369
3370         * gnulib-tool (func_relativize, func_relconcat): New functions.
3371         Give an error if --local-dir is given with --update.
3372         Remove trailing slashes from $local_gnulib_dir.
3373         (func_import): Store the relativized $local_gnulib_dir in
3374         gnulib-cache.m4, and read it from there if not specified explicitly.
3375
3376 2006-08-28  Bruno Haible  <bruno@clisp.org>
3377
3378         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
3379         is the current directory. Respect also $local_gnulib_dir.
3380
3381 2006-08-28  Bruno Haible  <bruno@clisp.org>
3382             Simon Josefsson  <jas@extundo.com>
3383
3384         BeOS portability.
3385         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
3386
3387 2006-08-27  Jim Meyering  <jim@meyering.net>
3388
3389         * doc/visibility.texi: Remove duplicate word: "pointer".
3390
3391 2006-08-26  Bruno Haible  <bruno@clisp.org>
3392
3393         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
3394         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
3395         (Makefile.am): Create inttypes.h from inttypes_.h.
3396         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
3397
3398         * modules/imaxabs: New file.
3399
3400         * modules/imaxdiv: New file.
3401
3402 2006-08-26  Bruno Haible  <bruno@clisp.org>
3403
3404         * m4/inttypes.m4: New file.
3405         * m4/_inttypes_h.m4: Remove file.
3406         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
3407         PRI_MACROS_BROKEN.
3408         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
3409
3410         * m4/imaxabs.m4: New file.
3411
3412         * m4/imaxdiv.m4: New file.
3413
3414 2006-08-26  Bruno Haible  <bruno@clisp.org>
3415
3416         * lib/inttypes_.h: New file.
3417         * lib/inttypes.h: Remove file.
3418         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
3419
3420         * lib/imaxabs.c: New file.
3421
3422         * lib/imaxdiv.c: New file.
3423
3424 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
3425
3426         New config-h module, so that "make" output needn't be cluttered
3427         by -DHAVE_CONFIG_H.
3428         * MODULES.html.sh (Support for building libraries and executables):
3429         Add config-h.
3430         * modules/config-h: New file.
3431         * gnulib-tool (nl, sed_transform_lib_file): New vars.
3432         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
3433         the config-h module is used.
3434
3435         New configmake module, so that "make" output needn't be cluttered
3436         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
3437         * MODULES.html.sh (Support for building libraries and executables):
3438         Add configmake.
3439         * modules/configmake: New file.
3440
3441 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
3442
3443         * m4/config-h.m4: New file.
3444
3445 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
3446
3447         * config/srclist.txt: Add elisp-comp.
3448
3449 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
3450
3451         * MODULES.html.sh (Support for building libraries and executables):
3452         Add elisp-comp.
3453         * build-aux/elisp-comp: New file.
3454         * modules/elisp-comp: New file.
3455
3456 2006-08-24  Bruno Haible  <bruno@clisp.org>
3457
3458         * gnulib-tool (func_create_testdir): Use non-default values of
3459         sourcebase and m4base.
3460
3461 2006-08-24  Bruno Haible  <bruno@clisp.org>
3462
3463         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
3464         HTML structure.
3465
3466 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
3467
3468         * modules/openat (Depends-on): Add lchown.
3469
3470 2006-08-23  Bruno Haible  <bruno@clisp.org>
3471
3472         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
3473         of gl_LOCK_EARLY instead of gl_LOCK.
3474
3475 2006-08-23  Bruno Haible  <bruno@clisp.org>
3476
3477         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
3478         on OSF/1 to no.
3479         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
3480
3481 2006-08-23  Bruno Haible  <bruno@clisp.org>
3482
3483         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
3484         as unusable.
3485
3486         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
3487         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
3488         (gl_LOCK): New macro.
3489
3490 2006-08-22  Simon Josefsson  <jas@extundo.com>
3491
3492         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
3493         to md5 module.
3494
3495 2006-08-22  Simon Josefsson  <jas@extundo.com>
3496
3497         * MODULES.html.sh: Add "Support for maintaining and release
3498         projects".
3499
3500         * build-aux/gnupload: New file, from coreutils.
3501
3502 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3503
3504         Avoid the need for AC_LIBSOURCES in m4 macros.
3505         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
3506         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
3507         * modules/check-version (EXTRA_DIST): Add check-version.h.
3508         * modules/crc (EXTRA_DIST): Add crc.h.
3509         * modules/des (EXTRA_DIST): Add des.h.
3510         * modules/gc (EXTRA_DIST): Add gc.h.
3511         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
3512         * modules/getline (EXTRA_DIST): Add getline.h.
3513         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
3514         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
3515         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
3516         * modules/md2 (EXTRA_DIST): Add md2.h.
3517         * modules/md4 (EXTRA_DIST): Add md4.h.
3518         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
3519         * modules/read-file (EXTRA_DIST): Add read-file.h.
3520         * modules/readline (EXTRA_DIST): Add readline.h.
3521         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
3522         rijndael-api-fst.h.
3523
3524 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3525
3526         * m4/rijndael.m4 (gl_ARCFOUR):
3527         * m4/arctwo.m4 (gl_ARCTWO):
3528         * m4/check-version.m4 (gl_CHECK_VERSION):
3529         * m4/crc.m4 (gl_CRC):
3530         * m4/des.m4 (gl_DES):
3531         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
3532         * m4/gc.m4 (gl_GC):
3533         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
3534         * m4/getline.m4 (gl_FUNC_GETLINE):
3535         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
3536         * m4/hmac-md5.m4 (gl_HMAC_MD5):
3537         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
3538         * m4/md2.m4 (gl_MD2):
3539         * m4/md4.m4 (gl_MD4):
3540         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
3541         * m4/read-file.m4 (gl_FUNC_READ_FILE):
3542         * m4/readline.m4 (gl_FUNC_READLINE):
3543         * m4/rijndael.m4 (gl_RIJNDAEL):
3544         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
3545         to get the necessary .h files and whatnot.
3546
3547 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3548
3549         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
3550         gnulib rather than the other way around.
3551         * config/srclistvars.sh (COREUTILS): Remove.
3552
3553 2006-08-22  Jim Meyering  <jim@meyering.net>
3554
3555         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
3556
3557         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
3558
3559 2006-08-22  Eric Blake  <ebb9@byu.net>
3560
3561         * modules/regexprops-generic: New file.
3562         * MODULES.html.sh (Support for building documentation): List it.
3563
3564 2006-08-22  Eric Blake  <ebb9@byu.net>
3565
3566         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
3567         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
3568         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
3569         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
3570
3571 2006-08-22  Bruno Haible  <bruno@clisp.org>
3572
3573         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
3574         and lib_LTLIBRARIES like the other lib_* variables.
3575
3576 2006-08-22  Bruno Haible  <bruno@clisp.org>
3577
3578         * build-aux/x-to-1.in: New file, from GNU gettext.
3579
3580 2006-08-22  Bruno Haible  <bruno@clisp.org>
3581
3582         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
3583         <utmpx.h> exists.
3584
3585 2006-08-22  Bruno Haible  <bruno@clisp.org>
3586
3587         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
3588         <utmpx.h> exists.
3589
3590 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3591
3592         BeOS portability.
3593         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
3594         exist.
3595         Problem reported by Bruno Haible.
3596
3597 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3598
3599         Avoid the need for AC_LIBSOURCES in m4 macros.
3600         * modules/acl (EXTRA_DIST): Add acl.h.
3601         * modules/argmatch (Files): Add m4/argmatch.m4.
3602         (configure.ac): Add gl_ARGMATCH.
3603         (EXTRA_DIST): Renamed from lib_SOURCES, for
3604         consistency with the other modules.  Remove argmatch.c.
3605         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
3606         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
3607         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
3608         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
3609         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
3610         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
3611         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
3612         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
3613         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
3614         * modules/closeout (EXTRA_DIST): Add closeout.h.
3615         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
3616         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
3617         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
3618         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
3619         dirname.h; remove basename.c and stripslash.c.
3620         * modules/exclude (EXTRA_DIST): Add exclude.h.
3621         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
3622         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
3623         * modules/file-type (EXTRA_DIST): Add file-type.h.
3624         * modules/filemode (EXTRA_DIST): Add filemode.h.
3625         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
3626         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
3627         * modules/fpending (EXTRA_DIST): Add __fpending.h.
3628         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
3629         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
3630         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
3631         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
3632         * modules/getdate (EXTRA_DIST): Add getdate.c.
3633         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
3634         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
3635         * modules/getpass (EXTRA_DIST): Add getpass.h.
3636         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
3637         * modules/group-member (EXTRA_DIST): Add group-member.h.
3638         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
3639         * modules/hash (EXTRA_DIST): Add hash.h.
3640         * modules/human (EXTRA_DIST): Add human.h.
3641         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
3642         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
3643         * modules/lchown (EXTRA_DIST): Add lchown.h.
3644         * modules/long-options (EXTRA_DIST): Add long-options.h.
3645         * modules/lstat (EXTRA_DIST): Add lstat.h.
3646         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
3647         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
3648         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
3649         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
3650         * modules/memxor (EXTRA_DIST): Add memxor.h.
3651         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
3652         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
3653         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
3654         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
3655         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
3656         * modules/physmem (EXTRA_DIST): Add physmem.h.
3657         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
3658         * modules/posixver (EXTRA_DIST): Add posixver.h.
3659         * modules/quote (EXTRA_DIST): Add quote.h.
3660         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
3661         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
3662         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
3663         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
3664         regex_internal.h regexec.c.
3665         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
3666         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
3667         * modules/same (EXTRA_DIST): Add same.h.
3668         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
3669         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
3670         * modules/savedir (EXTRA_DIST): Add savedir.h.
3671         * modules/sha1 (EXTRA_DIST): Add sha1.h.
3672         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
3673         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
3674         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
3675         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
3676         * modules/strdup (EXTRA_DIST): Add strdup.h.
3677         * modules/strftime (EXTRA_DIST): Add strftime.h.
3678         * modules/strndup (EXTRA_DIST): Add strndup.h.
3679         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
3680         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
3681         * modules/time_r (EXTRA_DIST): Add time_r.h.
3682         * modules/timespec (EXTRA_DIST): Add timespec.h.
3683         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
3684         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
3685         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
3686         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
3687         * modules/userspec (EXTRA_DIST): Add userspec.h.
3688         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
3689         * modules/utimens (EXTRA_DIST): Add utimens.h.
3690         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
3691         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
3692         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
3693         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
3694         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
3695         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
3696         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
3697         * modules/yesno (EXTRA_DIST): Add yesno.h.
3698
3699 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3700
3701         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
3702
3703         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
3704         * m4/dev-ino.m4, same-inode.m4: Remove.
3705
3706         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
3707         * m4/acl.m4 (AC_FUNC_ACL):
3708         * m4/backupfile.m4 (gl_BACKUPFILE):
3709         * m4/c-strtod.m4 (gl_C99_STRTOLD):
3710         * m4/canon-host.m4 (gl_CANON_HOST):
3711         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3712         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
3713         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
3714         * m4/cloexec.m4 (gl_CLOEXEC):
3715         * m4/close-stream.m4 (gl_CLOSE_STREAM):
3716         * m4/closeout.m4 (gl_CLOSEOUT):
3717         * m4/dirfd.m4 (gl_FUNC_DIRFD):
3718         * m4/dirname.m4 (gl_DIRNAME):
3719         * m4/exclude.m4 (gl_EXCLUDE):
3720         * m4/exitfail.m4 (gl_EXITFAIL):
3721         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
3722         * m4/file-type.m4 (gl_FILE_TYPE):
3723         * m4/filemode.m4 (gl_FILEMODE):
3724         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
3725         * m4/fpending.m4 (gl_FUNC_FPENDING):
3726         * m4/fprintftime.m4 (gl_FPRINTFTIME):
3727         * m4/fts.m4 (gl_FUNC_FTS):
3728         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
3729         * m4/getdate.m4 (gl_GETDATE):
3730         * m4/gethrxtime.m4 (gl_GETHRXTIME):
3731         * m4/getpagesize.m4 (gl_GETPAGESIZE):
3732         * m4/getpass.m4 (gl_FUNC_GETPASS):
3733         * m4/gettime.m4 (gl_GETTIME):
3734         * m4/getugroups.m4 (gl_GETUGROUPS):
3735         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
3736         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
3737         * m4/hard-locale.m4 (gl_HARD_LOCALE):
3738         * m4/hash.m4 (gl_HASH):
3739         * m4/idcache.m4 (gl_IDCACHE):
3740         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
3741         * m4/lchown.m4 (gl_FUNC_LCHOWN):
3742         * m4/long-options.m4 (gl_LONG_OPTIONS):
3743         * m4/lstat.m4 (gl_FUNC_LSTAT):
3744         * m4/md5.m4 (gl_MD5):
3745         * m4/memcasecmp.m4 (gl_MEMCASECMP):
3746         * m4/memcoll.m4 (gl_MEMCOLL):
3747         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
3748         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
3749         * m4/memxor.m4 (gl_MEMXOR):
3750         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
3751         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
3752         * m4/modechange.m4 (gl_MODECHANGE):
3753         * m4/mountlist.m4 (gl_MOUNTLIST):
3754         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
3755         * m4/openat.m4 (gl_FUNC_OPENAT):
3756         * m4/pathmax.m4 (gl_PATHMAX):
3757         * m4/physmem.m4 (gl_PHYSMEM):
3758         * m4/posixtm.m4 (gl_POSIXTM):
3759         * m4/posixver.m4 (gl_POSIXVER):
3760         * m4/quote.m4 (gl_QUOTE):
3761         * m4/quotearg.m4 (gl_QUOTEARG):
3762         * m4/readtokens.m4 (gl_READTOKENS):
3763         * m4/readutmp.m4 (gl_READUTMP):
3764         * m4/regex.m4 (gl_REGEX):
3765         * m4/safe-read.m4 (gl_SAFE_READ):
3766         * m4/safe-write.m4 (gl_SAFE_WRITE):
3767         * m4/same.m4 (gl_SAME):
3768         * m4/save-cwd.m4 (gl_SAVE_CWD):
3769         * m4/savedir.m4 (gl_SAVEDIR):
3770         * m4/settime.m4 (gl_SETTIME):
3771         * m4/sha1.m4 (gl_SHA1):
3772         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
3773         * m4/stat-macros.m4 (gl_STAT_MACROS):
3774         * m4/stat-time.m4 (gl_STAT_TIME):
3775         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
3776         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
3777         * m4/strdup.m4 (gl_FUNC_STRDUP):
3778         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
3779         * m4/strndup.m4 (gl_FUNC_STRNDUP):
3780         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
3781         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
3782         * m4/time_r.m4 (gl_TIME_R):
3783         * m4/timespec.m4 (gl_TIMESPEC):
3784         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
3785         * m4/unlinkdir.m4 (gl_UNLINKDIR):
3786         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
3787         * m4/userspec.m4 (gl_USERSPEC):
3788         * m4/utimecmp.m4 (gl_UTIMECMP):
3789         * m4/utimens.m4 (gl_UTIMENS):
3790         * m4/xalloc.m4 (gl_XALLOC):
3791         * m4/xgetcwd.m4 (gl_XGETCWD):
3792         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
3793         * m4/xreadlink.m4 (gl_XREADLINK):
3794         * m4/xstrtod.m4 (gl_XSTRTOD):
3795         * m4/yesno.m4 (gl_YESNO):
3796         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
3797         to get the necessary .h files and whatnot.
3798
3799 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
3800             Bruno Haible  <bruno@clisp.org>
3801
3802         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
3803         /bin/sh understanding of '!' conditional negation.
3804
3805 2006-08-21  Jim Meyering  <jim@meyering.net>
3806
3807         * modules/openat (Depends-on): Really alphabetize.
3808
3809         * modules/acl (Depends-on): Add error and quote.
3810
3811         * check-module (find_included_lib_files): Add at-func.c to the
3812         ok-to-include-more-than-once white list.
3813
3814         * modules/openat (Depends-on): Add lstat.  Alphabetize.
3815
3816 2006-08-21  Bruno Haible  <bruno@clisp.org>
3817
3818         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3819         Emit a pkgdata_DATA variable only if some snippets add contents to it.
3820         Reported by Martin Lambers <marlam@marlam.de>.
3821
3822 2006-08-21  Bruno Haible  <bruno@clisp.org>
3823
3824         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
3825         specify an installation location, don't emit a noinst_LIBRARIES or
3826         noinst_LTLIBRARIES assignment.
3827
3828 2006-08-21  Bruno Haible  <bruno@clisp.org>
3829
3830         BeOS portability.
3831         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
3832         BeOS has mbrtowc() but no <wctype.h>.
3833
3834 2006-08-21  Bruno Haible  <bruno@clisp.org>
3835
3836         BeOS portability.
3837         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
3838         exist.
3839
3840 2006-08-21  Bruno Haible  <bruno@clisp.org>
3841
3842         BeOS portability.
3843         * lib/mbchar.h: Include <wctype.h> only if it exists.
3844
3845 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3846
3847         Remove files that are no longer needed by their respective modules.
3848         * m4/obstack.m4: Remove.
3849         * m4/strerror_r.m4: Remove.
3850         * m4/uint32_t.m4: Remove.
3851         * m4/uintptr_t.m4: Remove.
3852         * m4/ullong_max.m4: Remove.
3853         * m4/xstrtoimax.m4: Remove.
3854         * m4/xstrtoumax.m4: Remove.
3855
3856         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
3857         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
3858         dependencies now capture this.
3859
3860         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
3861         Do not use AC_LIBSOURCES, since gnulib modules now do this.
3862         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
3863         * m4/human.m4 (gl_HUMAN): Likewise.
3864         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
3865         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
3866
3867         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
3868
3869         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
3870         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
3871         stdint.
3872         * m4/human.m4 (gl_HUMAN): Likewise.
3873         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
3874         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
3875         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3876         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3877         * m4/xstrtol (gl_XSTRTOL): Likewise.
3878
3879         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
3880         AC_TYPE_LONG_LONG_INT.
3881         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3882         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
3883         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
3884         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3885
3886         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
3887         on stdbool.
3888
3889         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
3890         (gl_PREREQ_XSTRTOUL): Remove.
3891
3892         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
3893
3894         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
3895         mode.
3896
3897 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3898
3899         Add and change modules to make it easier for coreutils to use
3900         gnulib-tool.
3901         * modules/backupfile (Files): Remove m4/d-ino.m4.
3902         (Depends-on): Add d-ino.
3903         * modules/cycle-check (Depends-on): Add stdint.
3904         (lib_SOURCES): Add cycle-check.h.
3905         * modules/d-ino: New module.
3906         * modules/d-type: New module.
3907         * modules/error (Files): Remove m4/strerror_r.m4.
3908         * modules/filemode (Files): Add m4/st_dm_mode.m4.
3909         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
3910         m4/inttypes_h.m4, m4/uintmax_t.m4.
3911         (Depends-on): Add stdint.
3912         (lib_SOURCES): Add fsusage.h.
3913         * modules/getcwd (Files): Remove d-ino.m4.
3914         (Depends-on): Add d-ino.
3915         * modules/getndelim2 (Depends-on): Add stdint.
3916         * modules/glob (Files): Remove m4/d-type.m4.
3917         (Depends-on): Add d-type.
3918         * modules/host-os: New module.
3919         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
3920         m4/inttypes_h.m4, m4/uintmax_t.m4.
3921         * Depends-on: Add stdint.
3922         (lib_SOURCES): Add human.h.
3923         * modules/inttostr (Files): Remove m4/intmax_t.m4,
3924         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
3925         m4/uintmax_t.m4, m4/ulonglong.m4.
3926         (Depends-on): Add stdint.
3927         (EXTRA_DIST): Add inttostr.h.
3928         * modules/lchmod: New module.
3929         * modules/link-follow: New module.
3930         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
3931         (Depends-on): Add lchmod.
3932         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
3933         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
3934         (Depends-on): Add stdint.
3935         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
3936         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3937         (Depends-on): Add stdint.
3938         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
3939         * modules/perl: New module.
3940         * modules/regex (Depends-on): Add stdint.
3941         * modules/rmdir-errno: New module.
3942         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
3943         m4/intmax_t.m4.
3944         (Depends-on): Add stdint.
3945         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
3946         m4/uintmax_t.m4.
3947         (Depends-on): Add stdint.
3948         * modules/unlink-busy: New module.
3949         * modules/utimecmp (Depends-on): Add stdint.
3950         * modules/uptime: New module.
3951         * modules/winsz-ioctl: New module.
3952         * modules/winsz-termios: New module.
3953         * modules/xnanosleep (Depends-on): Add nanosleep.
3954         * modules/ullong_max: Remove.
3955         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
3956         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
3957         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
3958         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
3959         (Depends-on): Add inttypes.
3960         (lib_SOURCES): Add xstrtol.h.
3961         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
3962         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
3963         * MODULES.html.sh: Move 'assert' into the assert section.
3964         Move 'dummy' into the linking section.
3965         Remove ullong_max.
3966         Add section for compatibility checks for POSIX:2001 functions,
3967         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
3968         winsz-ioctl, and winsz-termios into it.
3969         Add lchmod.
3970         Add top-level Misc section and put host-os, perl, and uptime
3971         into it.
3972
3973 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3974
3975         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
3976         now assume the stdint module.  Do not include inttypes.h.
3977         * lib/fsusage.h: Likewise.
3978         * lib/getndelim2.c: Likewise.
3979         * lib/human.h: Likewise.
3980         * lib/inttostr.h: Likewise.
3981         * lib/obstack.c: Likewise.
3982         * lib/regex_internal.h: Likewise.
3983         * lib/tempname.c: Likewise.
3984         * lib/utimecmp.c: Likewise.
3985         * lib/xstrtol.h: Likewise.
3986
3987         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
3988
3989         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
3990         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
3991         * lib/xtime.h: Likewise.
3992
3993 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
3994
3995         * modules/openat (Files): Add lib/fchmodat.c.
3996         Fixes problem reported by Jay Youngman.
3997
3998 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
3999
4000         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
4001         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
4002
4003 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
4004             Bruno Haible  <bruno@clisp.org>
4005
4006         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4007         and is a script that invokes bison. Tighten the code. Add comments.
4008
4009 2006-08-18  Jim Meyering  <jim@meyering.net>
4010
4011         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
4012         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
4013         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
4014         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
4015
4016 2006-08-18  Bruno Haible  <bruno@clisp.org>
4017
4018         * modules/bison-i18n: New file.
4019         * MODULES.html.sh (Internationalization functions): Add it.
4020
4021 2006-08-18  Bruno Haible  <bruno@clisp.org>
4022
4023         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
4024         sys/statvfs.h. When getmntinfo was found, check its declaration and
4025         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
4026
4027 2006-08-18  Bruno Haible  <bruno@clisp.org>
4028
4029         * m4/bison-i18n.m4: New file, from bison.
4030
4031 2006-08-18  Bruno Haible  <bruno@clisp.org>
4032
4033         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
4034         (ME_DUMMY): Treat "kernfs" as a dummy.
4035         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
4036
4037 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
4038
4039         Update from coreutils.
4040
4041         2006-08-15  Jim Meyering  <jim@meyering.net>
4042
4043         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
4044
4045         2006-01-17  Jim Meyering  <jim@meyering.net>
4046
4047         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
4048
4049         2006-01-11  Jim Meyering  <jim@meyering.net>
4050
4051         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
4052         Check for the lchmod function.
4053
4054 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
4055
4056         Update from coreutils.
4057
4058         * lib/__fpending.h: Add copyright notice.
4059         * lib/fprintftime.h: Likewise.
4060         * lib/savedir.c: Use (C) in copyright notice.
4061         * lib/savedir.h: Likewise.
4062
4063         2006-08-15  Jim Meyering  <jim@meyering.net>
4064
4065         * lib/at-func.c: New file, with the logic of all emulated at-functions.
4066         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
4067         in support of the EXPECTED_ERRNO macro.
4068         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
4069         definitions.  Instead, define the appropriate symbols and include
4070         "at-func.c".
4071         * lib/mkdirat.c (mkdirat): Likewise.
4072         * lib/fchmodat.c (fchmodat): Likewise.
4073         (ENOSYS): Remove definition.
4074         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
4075         it.  Don't include "unistd--.h" -- it wasn't ever used.
4076
4077         2006-01-17  Jim Meyering  <jim@meyering.net>
4078
4079         Rewrite fts.c not to change the current working directory,
4080         by using openat, fstatat, fdopendir, etc..
4081
4082         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
4083         (HAVE_OPENAT_SUPPORT): Define.
4084         [_LIBC] (fchdir): Don't undef or define; no longer used.
4085         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
4086         Now, this `function' always succeeds, and consumes its file descriptor
4087         parameter -- so callers must not close such FDs.  Update callers.
4088         (diropen_fd, opendirat, cwd_advance_fd): New functions.
4089         (diropen): Add parameter, SP.  Adjust all callers.
4090         Implement using diropen_fd, rather than open.
4091         (fts_open): Initialize new member, fts_cwd_fd.
4092         Remove fts_rft-setting code.
4093         (fts_close): Close fts_cwd_fd, if necessary.
4094         (__opendir2): Define in terms of opendir or opendirat,
4095         depending on whether the FST_NOCHDIR flag is set.
4096         (fts_build): Since fts_safe_changedir consumes its FD, and since
4097         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
4098         and close the dup'd file descriptor upon failure.
4099         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
4100         (fts_safe_changedir): Tweak semantics to reflect that this function
4101         now calls cwd_advance_fd and hence consumes its FD argument.
4102         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
4103         [struct FTS] (fts_rft): Remove now-unused member.
4104         [struct FTS] (fts_cycle.state): Improve comment.
4105
4106         * lib/openat.c (openat_needs_fchdir): New function.
4107         * lib/openat.h (openat_needs_fchdir): Declare it.
4108
4109 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
4110
4111         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
4112         Problem and fix reported by Pádraig Brady in
4113         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
4114
4115 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4116
4117         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
4118
4119 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4120
4121         * lib/memcoll.c (memcoll): Optimize for the common case where the
4122         arguments are bytewise equal.
4123
4124 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4125
4126         * doc/regexprops-generic.texi: Add a copyright notice.
4127
4128 2006-08-15  Bruno Haible  <bruno@clisp.org>
4129
4130         * modules/tmpdir (License): Change to LGPL.
4131
4132 2006-08-15  Bruno Haible  <bruno@clisp.org>
4133
4134         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
4135         module.
4136
4137 2006-08-14  Simon Josefsson  <jas@extundo.com>
4138
4139         * config/srclist.txt: Add gnupload.
4140
4141 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4142
4143         Change copyright notice from LGPL 2 to GPL 2, since that's the
4144         standard form used in the gnulib repository.
4145         * tests/test-lock.c: Likewise.
4146         * tests/test-stdint.c: Likewise.
4147         * tests/test-tls.c: Likewise.
4148
4149         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
4150         prelude-manager.  User shorter URLs for GNU projects, without '?'.
4151         Add copyright notice.
4152
4153         * check-module: Add copyright notice.  Output a copyright
4154         notice if "--version" is specified.
4155         * modules/COPYING: New file.
4156         * tests/test-getaddrinfo.c: Add copyright notice.
4157         * tests/test-verify.c: Likewise.
4158
4159 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4160
4161         Change copyright notice from LGPL 2 to GPL 2, since that's the
4162         standard form used in the gnulib repository.
4163         * lib/lock.c: LGPL -> GPL.
4164         * lib/lock.h: Likewise.
4165         * lib/strnlen1.c: Likewise.
4166         * lib/strnlen1.h: Likewise.
4167         * lib/tls.c: Likewise.
4168         * lib/tls.h: Likewise.
4169         * lib/tmpdir.c: Likewise.
4170
4171         * lib/TODO: Remove; this belongs only in coreutils.
4172
4173 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4174
4175         Add copyright notices to long-enough files that lack them, since
4176         otherwise the files aren't clearly free.  Use the same notice that
4177         getdate.texi already uses.
4178         * doc/alloca-opt.texi: Add copyright notice.
4179         * doc/alloca.texi: Likewise.
4180         * doc/ctime.texi: Likewise.
4181         * doc/functions.texi: Likewise.
4182         * doc/gcd.texi: Likewise.
4183         * doc/gnulib-tool.texi: Likewise.
4184         * doc/inet_ntoa.texi: Likewise.
4185         * doc/visibility.texi: Likewise.
4186
4187         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
4188         * doc/quote.texi: Add copyright notice.
4189
4190         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
4191         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
4192         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
4193         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
4194         is now obsolete, and give a pointer to the Sun list.
4195         Add copyright notice.
4196
4197 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4198
4199         * config/srclistvars.sh: Add copyright notice.
4200
4201 2006-08-14  Eric Blake  <ebb9@byu.net>
4202
4203         Import the following change from libc:
4204
4205         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4206
4207         Upstream bug 2997.
4208         * lib/misc/error.c: Add space between program name and message if file
4209         name is missing.
4210
4211 2006-08-12  Karl Berry  <karl@gnu.org>
4212
4213         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
4214         remove, these originate in gnulib now.
4215
4216 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4217
4218         * doc/Makefile (standards.info standards.html standards.dvi):
4219         Also depend on make-stds.texi.
4220
4221 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
4222
4223         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
4224         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
4225
4226         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
4227         in wchar_t.  Problem reported by Eric Blake.
4228
4229         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
4230         LEN is smaller than SIZE.  Suggested by Bruno Haible.
4231         Also, help the compiler to keep LEN in a register.
4232
4233 2006-08-11  Eric Blake  <ebb9@byu.net>
4234
4235         * users.txt: Sort.  Add tar.
4236
4237 2006-08-11  Bruno Haible  <bruno@clisp.org>
4238
4239         * users.txt: New file.
4240
4241 2006-08-11  Bruno Haible  <bruno@clisp.org>
4242
4243         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
4244         before <wchar.h>. Needed for OSF/1 and BSD/OS.
4245
4246 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
4247
4248         * modules/snprintf (Depends-on): Remove minmax.
4249         (Maintainer): Add self and Bruno.
4250
4251 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
4252
4253         * lib/.cppi-disable: Add snprintf.h, socket_.h.
4254         * lib/snprintf.c: Include <errno.h> and <limits.h>.
4255         (EOVERFLOW): Define if the system does not.
4256         Do not include "minmax.h"; it wasn't used.
4257         (snprintf): Don't assume size_t promotes to an unsigned type.
4258         Fix bug when generated string was too long for the buffer: the
4259         buffer's contents are supposed to be the initial prefix of the
4260         output.  Don't assume vasnprintf returns EOVERFLOW if the size
4261         exceeds INT_MAX; do the check ourselves.
4262
4263         Import the following changes from libc:
4264
4265         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
4266
4267         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
4268         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
4269         set wc to the byte which couldn't be converted.
4270         (re_string_reconstruct): Don't clear valid_raw_len before calling
4271         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
4272         tip_context using re_string_context_at.
4273
4274         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
4275
4276         * lib/posix/regex.h: g++ still cannot handled [restrict].
4277
4278         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
4279
4280         * lib/posix/regex.h: Remove special handling for VMS.
4281
4282 2006-08-10  Jim Meyering  <jim@meyering.net>
4283
4284         * modules/same-inode: New module.
4285         * modules/dev-ino: New module.
4286         * modules/cycle-check: Depend on these modules, rather than simply
4287         including their .h files.
4288         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
4289         required via m4/cycle-check.m4.
4290         * modules/same: Depend on new same-inode module, rather than
4291         including same-inode.h.
4292         * modules/chdir-safer: New file.
4293
4294         * modules/chown (Depends-on): Add stat-macros.
4295
4296 2006-08-10  Jim Meyering  <jim@meyering.net>
4297
4298         * m4/cycle-check.m4: New file.
4299         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
4300         * m4/dev-ino.m4, m4/same-inode.m4: New files.
4301
4302 2006-08-10  Eric Blake  <ebb9@byu.net>
4303
4304         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
4305         in from original proposal.
4306
4307 2006-08-10  Eric Blake  <ebb9@byu.net>
4308         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4309
4310         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
4311         namespace.
4312
4313 2006-08-10  Bruno Haible  <bruno@clisp.org>
4314
4315         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
4316         as well.
4317
4318 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4319
4320         Sync from coreutils.
4321
4322         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
4323
4324         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
4325         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
4326
4327 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4328
4329         * modules/restrict: Remove; no longer needed now that we assume
4330         Autoconf 2.59 or later.
4331         * MODULES.html.sh: Remove 'restrict'.
4332         * modules/argp (Depends-on): Remove 'restrict'.
4333         * modules/base64 (Depends-on): Likewise.
4334         * modules/gc (Depends-on): Likewise.
4335         * modules/getaddrinfo (Depends-on): Likewise.
4336         * modules/glob (Depends-on): Likewise.
4337         * modules/inet_ntop (Depends-on): Likewise.
4338         * modules/inet_pton (Depends-on): Likewise.
4339         * modules/memxor (Depends-on): Likewise.
4340         * modules/regex (Depends-on): Likewise.
4341         * modules/strtok_r (Depends-on): Likewise.
4342         * modules/time_r (Depends-on): Likewise.
4343
4344 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4345
4346         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
4347         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
4348         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
4349         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
4350         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
4351         * m4/memxor.m4 (gl_MEMXOR): Likewise.
4352         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
4353         gl_C_RESTRICT replaced by AC_C_RESTRICT.
4354
4355         Merge from coreutils.
4356         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
4357         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
4358         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
4359         * m4/time_r.m4 (gl_TIME_R): Likewise.
4360
4361 2006-08-09  Karl Berry  <karl@gnu.org>
4362
4363         * config/srclist.txt: no more gettext-tools, per Bruno.
4364
4365 2006-08-08  Eric Blake  <ebb9@byu.net>
4366
4367         * modules/verror: New module.
4368         * MODULES.html.sh: Document it.
4369
4370 2006-08-08  Eric Blake  <ebb9@byu.net>
4371
4372         * lib/verror.h, lib/verror.c: New files.
4373
4374 2006-08-08  Eric Blake  <ebb9@byu.net>
4375
4376         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
4377         verror_at_line output complies with GNU Coding Standards even when
4378         file is NULL.
4379
4380 2006-08-07  Bruno Haible  <bruno@clisp.org>
4381
4382         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
4383         versions of AIX.
4384         Reported by Ralf Wildenhues.
4385
4386 2006-08-07  Bruno Haible  <bruno@clisp.org>
4387
4388         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
4389         in an AC_DEFUN. Needed so that the autoconf snippets can use
4390         AC_REQUIRE.
4391
4392 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4393
4394         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4395         Initialize pkgdata_DATA.
4396         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
4397         overriding it.
4398
4399 2006-08-06  Eric Blake  <ebb9@byu.net>
4400
4401         * lib/error.h: Fold in some upstream changes from glibc.
4402         * lib/error.c: Likewise.
4403
4404 2006-08-04  Bruno Haible  <bruno@clisp.org>
4405
4406         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4407         Make the mostlyclean-local rule depend on mostlyclean-generic.
4408         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
4409
4410 2006-07-31  Bruno Haible  <bruno@clisp.org>
4411
4412         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
4413         <stdlib.h>, <string.h>.
4414
4415 2006-07-30  Bruno Haible  <bruno@clisp.org>
4416
4417         * modules/readlink (License): Change to LGPL.
4418
4419 2006-07-30  Bruno Haible  <bruno@clisp.org>
4420
4421         * modules/javaversion (Makefile.am): Distribute javaversion.java and
4422         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
4423         set PKGDATADIR to point to it.
4424
4425 2006-07-30  Bruno Haible  <bruno@clisp.org>
4426
4427         * modules/csharpexec (configure.ac): Comment out macro invocation.
4428         * modules/javaexec (configure.ac): Likewise.
4429         * modules/javacomp-script (configure.ac): Likewise.
4430
4431         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
4432
4433 2006-07-30  Bruno Haible  <bruno@clisp.org>
4434
4435         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
4436         linked-list.
4437
4438 2006-07-30  Bruno Haible  <bruno@clisp.org>
4439
4440         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
4441
4442 2006-07-30  Bruno Haible  <bruno@clisp.org>
4443
4444         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4445         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
4446         get removed.
4447
4448 2006-07-29  Bruno Haible  <bruno@clisp.org>
4449
4450         Make it possible for gnulib-tool to work with locally modified or
4451         augmented gnulib repositories.
4452         * gnulib-tool (func_usage): Document --local-dir option.
4453         (local_gnulib_dir): New variable.
4454         Handle --local-dir option.
4455         (func_lookup_file): New function.
4456         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
4457         (func_get_description, func_get_filelist, func_get_description,
4458         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
4459         func_get_automake_snippet, func_get_include_directive,
4460         func_get_license, func_get_maintainer): Use func_lookup_file.
4461         (func_import, func_create_testdir): Use func_lookup_file.
4462
4463 2006-07-29  Bruno Haible  <bruno@clisp.org>
4464
4465         * modules/setenv (Depends-on): Add unistd.
4466
4467 2006-07-29  Bruno Haible  <bruno@clisp.org>
4468
4469         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
4470
4471 2006-07-29  Bruno Haible  <bruno@clisp.org>
4472
4473         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
4474
4475 2006-07-29  Bruno Haible  <bruno@clisp.org>
4476
4477         * gnulib-tool (import, update): If there is no Makefile.am, look at
4478         aclocal.m4, instead of bailing out.
4479
4480 2006-07-29  Bruno Haible  <bruno@clisp.org>
4481
4482         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
4483         Categorize the options by when they are useful.
4484
4485 2006-07-29  Bruno Haible  <bruno@clisp.org>
4486
4487         * gnulib-tool (func_usage): Document option --no-libtool.
4488         Handle option --no-libtool.
4489         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
4490         for changed semantics of $libtool variable.
4491         (func_import): Likewise. If libtool is not used, show this through
4492         an option --no-libtool.
4493         (func_create_testdir): Update.
4494
4495 2006-07-29  Bruno Haible  <bruno@clisp.org>
4496
4497         * gnulib-tool (func_import): Extend error message about missing
4498         --doc-base.
4499
4500 2006-07-29  Bruno Haible  <bruno@clisp.org>
4501
4502         * gnulib-tool (func_import): Don't create the $docbase directory if
4503         there is no file to store there.
4504
4505 2006-07-29  Bruno Haible  <bruno@clisp.org>
4506
4507         * gnulib-tool (autoconf_minversion): If a --dir option is given and
4508         relevant, look for configure.ac there, not in the current directory.
4509         Also use a simple search for AC_PREREQ, not "autoconf --trace".
4510
4511 2006-07-29  Bruno Haible  <bruno@clisp.org>
4512
4513         * gnulib-tool (SORT): New variable.
4514         (func_usage): Undocument --assume-autoconf option.
4515         Remove --assume-autoconf option handling.
4516         (autoconf_minversion): Determine from the contents of configure.ac.
4517         (func_import): Remove autoconf_minversion handling.
4518         Suggested by Eric Blake.
4519
4520 2006-07-29  Bruno Haible  <bruno@clisp.org>
4521
4522         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
4523
4524 2006-07-29  Bruno Haible  <bruno@clisp.org>
4525
4526         * config/srclist.txt (*setenv.[ch]): Remove rules.
4527
4528 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4529
4530         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
4531
4532 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4533
4534         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
4535         arpa/inet.h.
4536
4537 2006-07-28  Simon Josefsson  <jas@extundo.com>
4538
4539         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
4540         * modules/inet_pton (Depends-on): Likewise.
4541
4542 2006-07-28  Simon Josefsson  <jas@extundo.com>
4543
4544         * m4/netinet_in_h.m4: New file.
4545
4546 2006-07-28  Simon Josefsson  <jas@extundo.com>
4547
4548         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
4549         #include's.
4550
4551 2006-07-28  Simon Josefsson  <jas@extundo.com>
4552
4553         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
4554         #include's.
4555
4556 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
4557
4558         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
4559         setgid on directories only if they set these bits.
4560         * lib/modechange.h: Remove obsolete comment about masks.
4561
4562 2006-07-28  Eric Blake  <ebb9@byu.net>
4563
4564         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
4565         macro expansion.
4566
4567 2006-07-28  Bruno Haible  <bruno@clisp.org>
4568
4569         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
4570
4571 2006-07-28  Bruno Haible  <bruno@clisp.org>
4572
4573         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
4574
4575 2006-07-28  Bruno Haible  <bruno@clisp.org>
4576
4577         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
4578         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
4579         Define fallbacks.
4580         Avoids link error on FreeBSD 4.x.
4581         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
4582
4583         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
4584         encoding.
4585         * lib/mbswidth.c (iswcntrl): Likewise.
4586
4587 2006-07-27  Bruno Haible  <bruno@clisp.org>
4588
4589         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
4590         test.
4591
4592 2006-07-27  Bruno Haible  <bruno@clisp.org>
4593
4594         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
4595         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
4596         defined.
4597
4598 2006-07-26  Eric Blake  <ebb9@byu.net>
4599
4600         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
4601
4602 2006-07-26  Eric Blake  <ebb9@byu.net>
4603
4604         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
4605         like mingw that lack mkstemp.
4606         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
4607         avoid compilation warning on mingw.
4608
4609 2006-07-26  Bruno Haible  <bruno@clisp.org>
4610
4611         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
4612         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
4613         INT_FAST*_MIN, INTPTR_MIN.
4614
4615 2006-07-25  Bruno Haible  <bruno@clisp.org>
4616
4617         * modules/version-etc (Depends-on): Add stdarg.
4618
4619 2006-07-25  Bruno Haible  <bruno@clisp.org>
4620
4621         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
4622         complex commands.
4623
4624 2006-07-25  Bruno Haible  <bruno@clisp.org>
4625
4626         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
4627         defined in <stdarg.h> or config.h.
4628
4629 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
4630
4631         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
4632         (gl_STDIO_SAFER): Remove.
4633
4634 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
4635
4636         * MODULES.html.sh (File stream based Input/Output):
4637         Add fopen-safer, tmpfile-safer; remove stdio-safer.
4638         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
4639         * modules/fopen-safer, modules/tmpfile-safer: New files.
4640         * modules/stdio-safer: Remove.
4641
4642 2006-07-24  Bruno Haible  <bruno@clisp.org>
4643
4644         * modules/tmpdir: New file.
4645         * MODULES.html.sh (File system functions): Add it.
4646
4647 2006-07-24  Bruno Haible  <bruno@clisp.org>
4648
4649         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
4650         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
4651
4652 2006-07-24  Bruno Haible  <bruno@clisp.org>
4653
4654         * modules/clean-temp: New file.
4655
4656 2006-07-24  Bruno Haible  <bruno@clisp.org>
4657
4658         * m4/tmpdir.m4: New file, from GNU gettext.
4659
4660 2006-07-24  Bruno Haible  <bruno@clisp.org>
4661
4662         * lib/tmpdir.h: New file, from GNU gettext.
4663         * lib/tmpdir.c: New file, from GNU gettext.
4664
4665 2006-07-24  Bruno Haible  <bruno@clisp.org>
4666
4667         * lib/clean-temp.h: New file, from GNU gettext.
4668         * lib/clean-temp.c: New file, from GNU gettext.
4669
4670 2006-07-23  Eric Blake  <ebb9@byu.net>
4671
4672         * modules/stdio-safer (Files): Add tmpfile-safer.c.
4673         (Depends-on): Add binary-io.
4674
4675 2006-07-23  Eric Blake  <ebb9@byu.net>
4676
4677         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
4678
4679 2006-07-23  Eric Blake  <ebb9@byu.net>
4680
4681         * lib/tmpfile-safer.c: New file.
4682         * lib/stdio-safer.h (fopen_safer): Add prototype.
4683         * lib/stdio--.h (tmpfile): Make safer.
4684
4685 2006-07-23  Bruno Haible  <bruno@clisp.org>
4686
4687         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
4688         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
4689         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
4690         gl_linked_remove_at): Use it.
4691
4692 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4693         and Simon Josefsson <jas@extundo.com>
4694
4695         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
4696
4697         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
4698
4699 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4700
4701         * modules/close-stream: New file.
4702         * modules/closeout (Description): Make it clear that it exits
4703         with a diagnostic on error.
4704         (Depends-on): Add close-stream.  Remove fpending, stdbool.
4705         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
4706
4707 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4708
4709         * m4/close-stream.m4: New file.
4710
4711 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4712
4713         * lib/close-stream.c, lib/close-stream.h: New files.
4714
4715 2006-07-22  Bruno Haible  <bruno@clisp.org>
4716
4717         Merge from GNU gettext 0.15.
4718
4719         2006-05-01  Bruno Haible  <bruno@clisp.org>
4720
4721                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
4722
4723         2006-07-22  Bruno Haible  <bruno@clisp.org>
4724
4725                 * modules/javaversion: New file.
4726                 * MODULES.html.sh (Java): Add javaversion.
4727
4728         2006-03-12  Bruno Haible  <bruno@clisp.org>
4729
4730                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
4731
4732         2005-12-04  Bruno Haible  <bruno@clisp.org>
4733
4734                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
4735                 (untested).
4736
4737         2006-06-21  Bruno Haible  <bruno@clisp.org>
4738
4739                 Avoid warnings from recent versions of mcs.
4740                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
4741                 -o, -L, -r any more. Use options documented since mcs-1.0
4742                 instead. Similarly for -g.
4743
4744         2005-12-04  Bruno Haible  <bruno@clisp.org>
4745
4746                 * build-aux/csharpcomp.sh.in: Suffix for resources is
4747                 .resources, not .resource.
4748
4749         2005-07-09  Bruno Haible  <bruno@clisp.org>
4750
4751                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
4752                 add a .dll suffix.
4753                 Reported by Mark Junker <mjscod@gmx.de>.
4754
4755         2006-07-22  Bruno Haible  <bruno@clisp.org>
4756
4757                 * modules/gettext: Upgrade to gettext-0.15.
4758                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
4759                 m4/visibility.m4.
4760                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
4761
4762 2006-07-22  Bruno Haible  <bruno@clisp.org>
4763
4764         Merge from GNU gettext 0.15.
4765
4766         2006-03-25  Bruno Haible  <bruno@clisp.org>
4767
4768                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
4769
4770         2006-07-21  Bruno Haible  <bruno@clisp.org>
4771
4772                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
4773                 "1.1".
4774
4775         2006-05-09  Bruno Haible  <bruno@clisp.org>
4776
4777                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
4778                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
4779                 for the conftestver execution.
4780
4781         2006-05-01  Bruno Haible  <bruno@clisp.org>
4782
4783                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
4784                 optional target-version argument. Verify that the compiler
4785                 groks source of the specified source-version, or add -source
4786                 option as necessary. Verify that the compiler produces
4787                 bytecode in the specified target-version, or add -target and
4788                 -source options as necessary. Make the result of the test
4789                 available as variable CONF_JAVAC. Also log error output in
4790                 config.log.
4791
4792         2006-03-11  Bruno Haible  <bruno@clisp.org>
4793
4794                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
4795
4796         2006-05-09  Bruno Haible  <bruno@clisp.org>
4797
4798                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
4799                 CLASSPATH_SEPARATOR to a semicolon.
4800
4801         2006-03-12  Bruno Haible  <bruno@clisp.org>
4802
4803                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
4804                 available as variable CONF_JAVA, for subsequent autoconf
4805                 tests. Also log error output in config.log.
4806
4807         2006-07-19  Bruno Haible  <bruno@clisp.org>
4808
4809                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
4810                 that getline works on glibc2 systems. Needed to avoid trouble
4811                 in relocatable.c.
4812                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
4813
4814         2005-12-04  Bruno Haible  <bruno@clisp.org>
4815
4816                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
4817                 launcher (untested).
4818
4819         2005-12-04  Bruno Haible  <bruno@clisp.org>
4820
4821                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
4822
4823         2006-07-22  Bruno Haible  <bruno@clisp.org>
4824
4825                 * gettext.m4: Update from GNU gettext-0.15.
4826                 * nls.m4: Likewise.
4827                 * po.m4: Likewise.
4828                 * inttypes-pri.m4: Likewise.
4829                 * inttypes-h.m4: Renamed from inttypes.m4.
4830                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
4831
4832 2006-07-22  Bruno Haible  <bruno@clisp.org>
4833
4834         Merge from GNU gettext 0.15.
4835
4836         2005-07-05  Bruno Haible  <bruno@clisp.org>
4837
4838                 * printf-args.c (printf_fetchargs): Work around broken
4839                 definition of wint_t on mingw.
4840
4841         2005-02-12  Bruno Haible  <bruno@clisp.org>
4842
4843                 * xallocsa.h: Add extern "C" for C++.
4844
4845         2006-05-17  Bruno Haible  <bruno@clisp.org>
4846
4847                 Cygwin portability.
4848                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
4849
4850         2006-04-30  Bruno Haible  <bruno@clisp.org>
4851
4852                 * progreloc.c: Include <mach-o/dyld.h> if available.
4853                 (find_executable): Use _NSGetExecutablePath when possible.
4854
4855         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4856
4857                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
4858                 function.
4859
4860         2005-12-29  Bruno Haible  <bruno@clisp.org>
4861
4862                 * progreloc.c (set_program_name_and_installdir): Fix
4863                 compilation error.
4864
4865         2005-12-04  Bruno Haible  <bruno@clisp.org>
4866
4867                 Cygwin portability.
4868                 * progreloc.c: Include <windows.h> also on Cygwin.
4869                 (find_executable): Add support for Cygwin.
4870                 (set_program_name_and_installdir): Handle also platforms with
4871                 nonempty EXEEXT.
4872
4873         2006-07-11  Bruno Haible  <bruno@clisp.org>
4874
4875                 * javacomp.c: Fix a comment.
4876                 Reported by Jim Meyering.
4877
4878         2006-04-30  Bruno Haible  <bruno@clisp.org>
4879
4880                 * javacomp.h (compile_java_class): Add source_version,
4881                 target_version arguments.
4882                 * javacomp.c: Rewritten to choose only a compiler that
4883                 respects the specified source_version and target_version.
4884
4885         2006-06-27  Bruno Haible  <bruno@clisp.org>
4886
4887                 Assume correct S_ISDIR macro.
4888                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
4889
4890         2006-07-22  Bruno Haible  <bruno@clisp.org>
4891
4892                 * javaversion.h: New file, from GNU gettext.
4893                 * javaversion.c: New file, from GNU gettext.
4894                 * javaversion.java: New file, from GNU gettext.
4895                 * javaversion.class: New file, from GNU gettext.
4896
4897         2006-05-17  Bruno Haible  <bruno@clisp.org>
4898
4899                 Cygwin portability.
4900                 * javaexec.c (execute_java_class): Test for jview program
4901                 also on Cygwin.
4902
4903         2006-04-09  Bruno Haible  <bruno@clisp.org>
4904
4905                 * fatal-signal.c: Don't include string.h.
4906                 (at_fatal_signal): Use a copying loop instead of memcpy.
4907
4908         2005-12-04  Bruno Haible  <bruno@clisp.org>
4909
4910                 * csharpexec.c: Add support for 'clix' launcher (untested).
4911                 (execute_csharp_using_sscli): New function.
4912                 (execute_csharp_program): Call it.
4913
4914         2006-06-21  Bruno Haible  <bruno@clisp.org>
4915
4916                 Avoid warnings from recent versions of mcs.
4917                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
4918                 -o, -L, -r any more. Use options documented since mcs-1.0
4919                 instead. Similarly for -g.
4920
4921         2005-07-09  Bruno Haible  <bruno@clisp.org>
4922
4923                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
4924                 add a .dll suffix.
4925                 Reported by Mark Junker <mjscod@gmx.de>.
4926
4927         2006-06-17  Bruno Haible  <bruno@clisp.org>
4928
4929                 * config.charset: Update for NetBSD 3.0.
4930
4931         2006-05-17  Bruno Haible  <bruno@clisp.org>
4932
4933                 Cygwin portability.
4934                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
4935
4936         2006-05-16  Bruno Haible  <bruno@clisp.org>
4937
4938                 * localcharset.c [CYGWIN]: Include <windows.h>.
4939                 (get_charset_aliases): For Cygwin, return the same CPxxx
4940                 aliases list as under WIN32.
4941                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
4942                 the environment variables. Fall back to GetACP().
4943
4944         2006-04-05  Bruno Haible  <bruno@clisp.org>
4945
4946                 * config.charset: Update Juan Manuel Guerrero's address.
4947
4948         2005-02-12  Bruno Haible  <bruno@clisp.org>
4949
4950                 * allocsa.h: Add extern "C" for C++.
4951
4952         2005-02-10  Bruno Haible  <bruno@clisp.org>
4953
4954                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
4955                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
4956
4957         2006-07-22  Bruno Haible  <bruno@clisp.org>
4958
4959                 * gettext.h: Update to GNU gettext-0.15.
4960
4961 2006-07-22  Bruno Haible  <bruno@clisp.org>
4962
4963         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
4964         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
4965         lib-prefix.m4, longdouble.m4, ssize_t.m4.
4966
4967 2006-07-21  Eric Blake  <ebb9@byu.net>
4968
4969         * modules/stdlib-safer: New file.
4970         * MODULES.html.sh (File stream based Input/Output): Add
4971         stdlib-safer.
4972
4973 2006-07-21  Eric Blake  <ebb9@byu.net>
4974
4975         * lib/stdlib-safer.h: New file from coreutils, required by
4976         stdlib--.h.
4977
4978 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
4979
4980         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
4981
4982 2006-07-20  Bruno Haible  <bruno@clisp.org>
4983
4984         * gnulib-tool: Recognize new option --assume-autoconf.
4985         (autoconf_minversion): New variable.
4986         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
4987
4988 2006-07-20  Bruno Haible  <bruno@clisp.org>
4989
4990         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
4991
4992 2006-07-19  Derek R. Price  <derek@ximbiot.com>
4993
4994         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
4995         Reindent and repaginate.
4996
4997 2006-07-19  Derek Price  <derek@ximbiot.com>
4998
4999         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
5000         Correct grammar.
5001
5002 2006-07-17  Bruno Haible  <bruno@clisp.org>
5003
5004         * modules/list: New file.
5005         * modules/array-list: New file.
5006         * modules/carray-list, modules/carray-list-tests: New files.
5007         * modules/linked-list, modules/linked-list-tests: New files.
5008         * modules/avltree-list, modules/avltree-list-tests: New files.
5009         * modules/rbtree-list, modules/rbtree-list-tests: New files.
5010         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
5011         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
5012         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
5013         * modules/oset: New file.
5014         * modules/array-oset: New file.
5015         * modules/avltree-oset, modules/avltree-oset-tests: New files.
5016         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
5017         * tests/test-carray_list.c: New file.
5018         * tests/test-linked_list.c: New file.
5019         * tests/test-avltree_list.c: New file.
5020         * tests/test-rbtree_list.c: New file.
5021         * tests/test-linkedhash_list.c: New file.
5022         * tests/test-avltreehash_list.c: New file.
5023         * tests/test-rbtreehash_list.c: New file.
5024         * tests/test-avltree_oset.c: New file.
5025         * tests/test-rbtree_oset.c: New file.
5026         * MODULES.html.sh (Container data structures): New section.
5027
5028 2006-07-17  Bruno Haible  <bruno@clisp.org>
5029
5030         * m4/gl_list.m4: New file.
5031
5032 2006-07-17  Bruno Haible  <bruno@clisp.org>
5033
5034         * lib/gl_list.h: New file.
5035         * lib/gl_list.c: New file.
5036         * lib/gl_array_list.h: New file.
5037         * lib/gl_array_list.c: New file.
5038         * lib/gl_carray_list.h: New file.
5039         * lib/gl_carray_list.c: New file.
5040         * lib/gl_linked_list.h: New file.
5041         * lib/gl_linked_list.c: New file.
5042         * lib/gl_anylinked_list1.h: New file.
5043         * lib/gl_anylinked_list2.h: New file.
5044         * lib/gl_avltree_list.h: New file.
5045         * lib/gl_avltree_list.c: New file.
5046         * lib/gl_anyavltree_list1.h: New file.
5047         * lib/gl_anyavltree_list2.h: New file.
5048         * lib/gl_rbtree_list.h: New file.
5049         * lib/gl_rbtree_list.c: New file.
5050         * lib/gl_anyrbtree_list1.h: New file.
5051         * lib/gl_anyrbtree_list2.h: New file.
5052         * lib/gl_anytree_list1.h: New file.
5053         * lib/gl_anytree_list2.h: New file.
5054         * lib/gl_linkedhash_list.h: New file.
5055         * lib/gl_linkedhash_list.c: New file.
5056         * lib/gl_anyhash_list1.h: New file.
5057         * lib/gl_anyhash_list2.h: New file.
5058         * lib/gl_avltreehash_list.h: New file.
5059         * lib/gl_avltreehash_list.c: New file.
5060         * lib/gl_rbtreehash_list.h: New file.
5061         * lib/gl_rbtreehash_list.c: New file.
5062         * lib/gl_anytreehash_list1.h: New file.
5063         * lib/gl_anytreehash_list2.h: New file.
5064
5065         * lib/gl_oset.h: New file.
5066         * lib/gl_oset.c: New file.
5067         * lib/gl_array_oset.h: New file.
5068         * lib/gl_array_oset.c: New file.
5069         * lib/gl_avltree_oset.h: New file.
5070         * lib/gl_avltree_oset.c: New file.
5071         * lib/gl_rbtree_oset.h: New file.
5072         * lib/gl_rbtree_oset.c: New file.
5073         * lib/gl_anytree_oset.h: New file.
5074
5075 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5076
5077         * m4/mkancesdirs.m4: New file.
5078         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
5079         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
5080         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
5081         it.
5082
5083 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5084
5085         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
5086         * lib/mkancesdirs.h: New files.
5087         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
5088         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
5089         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
5090         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
5091         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
5092         callers changed.  Revamp internals significantly, by not
5093         attempting to create directories that are temporarily more
5094         permissive than the final results.  Do not attempt to use
5095         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
5096         This removes some race conditions, fixes some bugs, and simplifies
5097         things.  Use new dirchownmod function to do owner and mode changes.
5098         * lib/mkdir-p.h: Likewise.
5099         * lib/modechange.c (octal_to_mode): New function.
5100         (struct mode_change): New member mentioned.
5101         (make_node_op_equals): New arg mentioned.  All callers changed.
5102         (mode_compile): Keep track of which mode bits the user has explicitly
5103         mentioned.
5104         (mode_adjust): New arg DIR, so that we implement the X op correctly.
5105         New arg PMODE_BITS, to keep track of which mode bits the user
5106         mentioned; it treats S_ISUID and S_ISGID speciall.
5107         All callers changed.
5108         * lib/modechange.h: Likewise.
5109
5110 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5111
5112         * MODULES.html.sh: Add mkancestors.
5113         * modules/mkancesdirs: New module.
5114         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
5115         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
5116         The chdir-safer and afs files are now orphans; I'll remove them
5117         unless someone speaks up.
5118         Add lib/dirchownmod.c, lib/dirchownmod.h.
5119         (Depends-on): Remove alloca, chown, save-cwd, dirname.
5120         Add lchown, mkancesdirs.
5121         (Maintainer): Add self.
5122
5123 2006-07-15  Karl Berry  <karl@gnu.org>
5124
5125         * gnulib-tool: help message wording/arrangement.
5126
5127 2006-07-14  Simon Josefsson  <jas@extundo.com>
5128
5129         * doc/gnulib.texi (Libtool and Windows): New section.
5130
5131 2006-07-12  Simon Josefsson  <jas@extundo.com>
5132
5133         * modules/gendocs (License): Fix license, approved by Karl.
5134
5135 2006-07-12  Eric Blake  <ebb9@byu.net>
5136
5137         * MODULES.html.sh: Add gendocs.
5138
5139 2006-07-11  Eric Blake  <ebb9@byu.net>
5140
5141         * modules/fdl: New module, to install doc/fdl.texi.
5142         * MODULES.html.sh: Add new section for documentation modules.
5143         * gnulib-tool: Avoid space-tab.
5144         (--doc-base): New option, to manage files from doc.
5145
5146 2006-07-11  Eric Blake  <ebb9@byu.net>
5147
5148         * m4/absolute-header.m4: Fix comments to match recent change.
5149
5150 2006-07-11  Eric Blake  <ebb9@byu.net>
5151
5152         * gnulib-tool: List --doc-base before --tests-base.
5153
5154 2006-07-11  Derek R. Price  <derek@ximbiot.com>
5155
5156         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
5157
5158 2006-07-11  Bruno Haible  <bruno@clisp.org>
5159
5160         * README: Mention where to put documentation.
5161
5162 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5163
5164         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
5165
5166 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
5167
5168         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
5169         to stdint.m4.
5170
5171 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
5172
5173         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
5174         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
5175         "no/such/file/stdint.h" when there is no such file, so that
5176         the resulting C code can be parsed by dodgy compilers.
5177         Problems reported by Bob Proulx.
5178
5179 2006-07-10  Derek R. Price  <derek@ximbiot.com>
5180
5181         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
5182         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
5183         macros into the GNU _D_EXACT_NAMLEN.
5184         * lib/savedir.c:  Likewise.
5185         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
5186
5187 2006-07-10  Derek R. Price  <derek@ximbiot.com>
5188         and Paul Eggert  <eggert@cs.ucla.edu>
5189
5190         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
5191         * m4/savedir.m4:
5192         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
5193         macros into the GNU _D_EXACT_NAMLEN.
5194
5195 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5196
5197         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
5198         around the absolute name, to work around a problem with the HP-UX
5199         11.23 native C compiler, reported by Bob Proulx.
5200
5201 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5202
5203         * doc/maintain.texi, make-stds.texi: Sync from
5204         <http://savannah.gnu.org/projects/gnustandards>.
5205
5206 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5207
5208         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
5209
5210 2006-07-09  Jim Meyering  <jim@meyering.net>
5211
5212         * m4/glob.m4: Remove a doubled word in a comment.
5213
5214 2006-07-09  Jim Meyering  <jim@meyering.net>
5215
5216         * lib/argp-pv.c: Remove a doubled word in a comment.
5217         * lib/check-version.c (check_version): Likewise.
5218         * lib/javacomp.c (compile_java_class): Likewise.
5219
5220 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
5221
5222         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
5223         for the benefit of people using Autoconf 2.60.  If you want to
5224         support older Autoconf versions you can copy m4/onceonly_2_57.m4
5225         (or m4/onceonly.m4, if pre-2.57) manually.
5226
5227 2006-07-08  Jim Meyering  <jim@meyering.net>
5228
5229         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
5230         comment.
5231         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
5232         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
5233         comment.
5234
5235 2006-07-08  Jim Meyering  <jim@meyering.net>
5236
5237         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
5238
5239 2006-07-07  Simon Josefsson  <jas@extundo.com>
5240
5241         * tests/test-crc.c: Change expected crc value, the test vector
5242         were probably computed using the old broken crc.c?
5243
5244 2006-07-06  Simon Josefsson  <jas@extundo.com>
5245
5246         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
5247         now the canonical place for the M4 file).
5248
5249         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
5250         from the sys_socket dependency now.
5251
5252         * modules/inet_pton (Files): Ditto.
5253
5254         * modules/inet_ntop (Files): Ditto.
5255
5256 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
5257
5258         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
5259         not gl_PREREQ_GETUSERSHELL.
5260
5261 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5262
5263         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
5264         with only one argument, for Autoconf 2.60.
5265         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
5266         expand to nothing, so add a shell command to avoid syntax error.
5267         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
5268
5269 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5270
5271         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
5272
5273 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5274
5275         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
5276         no longer needed.  Check for isblank decl.
5277         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
5278         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
5279         of existence.
5280
5281 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5282
5283         * lib/getloadavg.c: Use __VMS, not VMS.
5284         * lib/getopt.c: Likewise.
5285         * lib/getpagesize.h: Likewise.
5286         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
5287         and probably does not work.
5288
5289 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5290
5291         * lib/.cppi-disable: Add wcwidth.
5292         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
5293         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
5294         (ISGRAPH): Remove.  All uses changed to isgraph.
5295         (FOLD) [!defined _LIBC]: Remove special case.
5296         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
5297         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
5298         HAVE_ISBLANK.
5299         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
5300         case.
5301
5302 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
5303
5304         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
5305         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
5306         brackets.  Other minor changes to suppress some compiler
5307         warnings.
5308
5309 2006-07-06  Derek R. Price  <derek@ximbiot.com>
5310         and Paul Eggert  <eggert@cs.ucla.edu>
5311
5312         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
5313         of invoking obsolescent AC_HEADER_DIRENT macro.
5314         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
5315         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
5316         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
5317         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
5318         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
5319         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5320         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
5321         * m4/readdir.m4: Remove; no longer needed.
5322
5323 2006-07-06  Derek R. Price  <derek@ximbiot.com>
5324         and Paul Eggert  <eggert@cs.ucla.edu>
5325
5326         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
5327         Don't worry about this obsolete case any more.
5328         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
5329         directories.
5330         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
5331         worry about this obsolete case any more.
5332         * lib/fts.c: Likewise.
5333         * lib/getcwd.c: Likewise.
5334         * lib/glob.h: Likewise.
5335         * lib/savedir.c: Likewise.
5336
5337 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
5338
5339         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
5340         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
5341         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
5342         needed.
5343         All uses removed.
5344         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5345         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
5346         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
5347         needed.
5348         * m4/getdate.m4 (gl_GETDATE): Likewise.
5349         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
5350         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
5351         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
5352         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5353         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
5354         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
5355         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
5356         needed.
5357
5358 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
5359
5360         * lib/memcasecmp.c: Include <limits.h>.
5361         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
5362         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
5363         Don't assume isdigit succeeds only on '0' through '9'.
5364
5365 2006-07-05  Eric Blake  <ebb9@byu.net>
5366
5367         * modules/getaddrinfo (Depends-on): Add snprintf.
5368
5369 2006-07-05  Eric Blake  <ebb9@byu.net>
5370
5371         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
5372         to avoid 'header present but could not be compiled' on cygwin.
5373
5374 2006-07-05  Eric Blake  <ebb9@byu.net>
5375
5376         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
5377         missing from netdb.h.
5378         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
5379
5380 2006-07-05  Derek R. Price  <derek@ximbiot.com>
5381
5382         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
5383         no longer needed.
5384         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
5385         * m4/getdate.m4 (gl_GETDATE): Likewise.
5386         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
5387         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
5388         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
5389         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5390         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
5391
5392 2006-07-05  Derek R. Price  <derek@ximbiot.com>
5393
5394         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
5395         All uses of is_space replaced by isspace.
5396         * lib/exit.h: Don't talk about STDC_HEADERS.
5397         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
5398         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
5399         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
5400         replaced by isprint etc.
5401         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
5402         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
5403         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
5404         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
5405         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
5406         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
5407
5408 2006-07-05  Bruno Haible  <bruno@clisp.org>
5409
5410         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
5411         the function exists, before testing against AIX.
5412         Reported by Martin Lambers <marlam@marlam.de>.
5413
5414 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
5415
5416         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
5417         From Mark D. Baushke.
5418
5419 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
5420
5421         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
5422         to the absolute name, not just one, to bypass Sun C 5.8's
5423         "warning: #include of /usr/include/... may be non-portable".
5424
5425 2006-07-04  Eric Blake  <ebb9@byu.net>
5426
5427         * modules/dirname-tests: New test module.
5428         * tests/test-dirname.c: New file, replacing dirname.c
5429         TEST_DIRNAME section that was recently deleted.
5430
5431 2006-07-04  Bruno Haible  <bruno@clisp.org>
5432
5433         Assume ANSI C header files and <ctype.h> functions.
5434         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
5435         (mbsnwidth): Use isprint, iscntrl instead.
5436
5437 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5438
5439         Merge from coreutils.
5440         * MODULES.html.sh: Add xstrtold.
5441         * modules/xstrtold: New file.
5442         * modules/cycle-check (Files): Add lib/same-inode.h.
5443         * modules/dirname (Files): Add m4/double-slash-root.m4.
5444         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
5445         * modules/mkdir-p (Files): Add lib/same-inode.h.
5446         * modules/same (Files): Add lib/same-inode.h.
5447
5448 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5449
5450         * m4/absolute-header.m4: Renamed from full-header-path.m4.
5451         This is to keep the terminology clean; POSIX talks about
5452         "absolute pathnames", not "full pathnames", but the GNU
5453         Coding Standards say to use "path" for something else;
5454         so use "absolute" to keep both sides happy.
5455         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
5456         Set gl_absolute_header, not gl_full_header_path.
5457         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
5458         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
5459         All uses changed.
5460
5461         Merge from coreutils.
5462
5463         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
5464
5465         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
5466         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
5467         want to require the building of c-strtod.o.
5468         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
5469         needs -lm directly.
5470         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
5471
5472         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
5473
5474         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
5475         --as-needed option if available.  Problem reported by Albert Chin in
5476         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
5477         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
5478         cc merely issues a bunch of annoying warnings for --as-needed
5479         (this problem was reported by Bob Proulx).  Also, try linking with
5480         -lm to detect a bug in binutils 2.16 (this problem was reported
5481         by Ralf Wildenhues).
5482
5483         2006-06-18  Jim Meyering  <jim@meyering.net>
5484
5485         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
5486         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
5487         macro.
5488         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
5489         also check for glibc-2.4's abort-inducing bug.
5490
5491         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
5492         Low-probability clean-up should be to use rmdir to get rid of
5493         the just-created directory, not unlink.
5494
5495         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
5496         configure fail, and request a bug report to inform us about it.
5497         Add a comment that, barring reports to the contrary, in 2007 we'll
5498         assume ftruncate is universally available.
5499
5500         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
5501
5502         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
5503
5504         2006-03-12  Jim Meyering  <jim@meyering.net>
5505
5506         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
5507         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
5508         * m4/same.m4 (gl_SAME): Likewise.
5509         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
5510
5511         2006-03-11  Eric Blake  <ebb9@byu.net>
5512
5513         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
5514         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
5515         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
5516         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
5517
5518 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5519
5520         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
5521         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
5522         reported by Mark D. Baushke, one in
5523         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
5524
5525         Merge from coreutils.
5526
5527         * lib/.cppi-disable: Add stdint_.h.
5528         * lib/.cvsignore: Add stdint.h.
5529
5530         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
5531
5532         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
5533         both double and long double versions.
5534         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
5535         * lib/xstrtold.c: New file.
5536         * lib/xstrtod.h (xstrtold): New decl.
5537
5538         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
5539
5540         * lib/filemode.c (setst): Remove.
5541         (strmode): Rewrite to avoid setst.  This makes the code shorter,
5542         (arguably) clearer, and the generated code is a bit smaller on my
5543         Debian GNU/Linux stable x86 host.
5544
5545         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
5546
5547         * lib/filemode.c: Include "filemode.h" first, to test the interface.
5548         Assume that filemode.h includes sys/types.h and sys/stat.h.
5549         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
5550         (ftypelet): Reorder to put common cases first, for efficiency.
5551         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
5552         to do 'M'.
5553         (strmode): Renamed from mode_string, and now stores 12 bytes instead
5554         of 10, for compatibility with FreeBSD.  All callers changed.
5555         (filemodestring): Now stores 12 bytes instead of 10, and sets file
5556         types that can't be deduced solely from st_mode.  First arg is now a
5557         const pointer.
5558         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
5559         (strmode): Renamed from mode_string.
5560         (filemodestring): New decl.
5561         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
5562         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
5563         needed.
5564         (S_ISPORT, S_ISWHT): New macros, if not already defined.
5565
5566         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
5567
5568         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
5569         fsusage.h now does that.  Include fsusage.h first, to test interface.
5570         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
5571         at most one method (the old code could have generated decls that
5572         didn't conform to C89, not that this was ever exercised).
5573         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
5574
5575         2006-03-19  Jim Meyering  <jim@meyering.net>
5576
5577         Work even in a chroot where d_ino values for entries in "/"
5578         don't match the stat.st_ino values for the same names.
5579         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
5580         number, iterate through all entries again, using lstat instead.
5581         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
5582         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
5583
5584         * lib/getcwd.c (__getcwd): Clarify a comment.
5585         Use memcpy in place of a call to strcpy.
5586
5587         2006-03-12  Jim Meyering  <jim@meyering.net>
5588
5589         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
5590         matches that of the current directory (which we're about to chdir ".."
5591         out of), then save the dev-ino of the parent, instead.
5592
5593         * lib/same-inode.h (SAME_INODE): New file/macro.
5594         * lib/chdir-safer.c (SAME_INODE): Remove definition.
5595         Include "same-inode.h", instead.
5596         * lib/same.c: Likewise.
5597         * lib/cycle-check.h: Include "same-inode.h".
5598         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
5599         * lib/cycle-check.c (SAME_INODE): Remove definition.
5600         * lib/root-dev-ino.h: Include "same-inode.h".
5601
5602         2006-03-11  Eric Blake  <ebb9@byu.net>
5603
5604         * lib/same.c (same_name): s/base_name/last_component/
5605         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
5606         * lib/filenamecat.c (file_name_concat): Likewise.
5607
5608         2006-03-11  Eric Blake  <ebb9@byu.net>,
5609                     Paul Eggert  <eggert@cs.ucla.edu>
5610
5611         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
5612         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
5613         drive prefix.
5614         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
5615         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
5616         (last_component): New method.
5617         * lib/dirname.c (dir_len): Determine when drive letters need a
5618         subsequent slash.  Preserve // when it is special.
5619         (dir_name): Don't append dot when drive letter is absolute.
5620         [TEST_DIRNAME]: Move into a full-blown gnulib test.
5621         * lib/basename.c (base_name): New semantics - malloc the result.
5622         Preserve // when it is special.  Preserve relative files that look
5623         like drive letters.
5624         (base_len): Preserve // when it is special.
5625         (last_component): New method, similar to old base_name semantics.
5626         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
5627         base_name.  Strip redundant slashes from ///.
5628
5629 2006-07-03  Jim Meyering  <jim@meyering.net>
5630
5631         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
5632         macro is used before the first cycle_check call.
5633
5634 2006-07-03  Eric Blake  <ebb9@byu.net>
5635
5636         * modules/dirname (Depends-on): Add xstrndup.
5637
5638 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
5639
5640         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
5641         test cases, so that config.log is a bit easier to follow.
5642
5643 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
5644
5645         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
5646         both are 64 bits, since this seems to be the tradition, and this
5647         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
5648         we ever run into a host that prefers long long to long in this
5649         case, we'll need another configure-time test.  Problem reported by
5650         Jim Meyering.
5651
5652 2006-07-02  Eric Blake  <ebb9@byu.net>
5653
5654         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
5655
5656 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5657
5658         * modules/inttypes (Depends-on): No longer depends on stdint.
5659         * modules/stdint (Description): Say more about assumptions.
5660         Say that the fast types might differ.  Say macros are used.
5661         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
5662         (Makefile.am): Revise list of substituted symbols to match
5663         new stdint.m4.
5664         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
5665         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
5666         * tests/test-stdint.c (verify_same_types)
5667         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
5668         the code conforms to C99/C89.
5669         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
5670         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
5671
5672 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5673
5674         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
5675         but fix a bug, by requiring at least 64 bits.
5676         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
5677         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
5678         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
5679         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
5680
5681         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
5682         changes.  Make 2.59 a prerequisite.  Check and substitute for
5683         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
5684         inttypes.h.  Do not use special include files; just use the
5685         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
5686         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
5687         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
5688         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
5689         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
5690         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
5691         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
5692         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
5693         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
5694         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
5695         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
5696         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
5697         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
5698         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
5699         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
5700         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
5701         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
5702         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
5703         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
5704         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
5705         WINT_MAX.  Check for C99 conformance more strictly, by detecting
5706         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
5707         not check for things that C99 does not require, e.g., int8_t.  If
5708         a test isn't needed unless <stdint.h> isn't working, and is
5709         unlikely to be needed for any other reason, then don't do it
5710         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
5711         size_t, since we assume C89 freestanding at least.  Do not check
5712         for sig_atomic_t, wchar_t, or wint_t, since the code now does
5713         the right thing even if the types are not defined.  Instead use:
5714         (gl_STDINT_TYPE_PROPERTIES): New macro.
5715         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
5716         testing whether <sys/types.h> clashes, as Autoconf does this for
5717         us now.  All uses removed.
5718         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
5719         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
5720         (gl_CHECK_TYPE_SAME):
5721         Remove; no longer needed.
5722         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
5723         exists, since we'll return 0 anyway in that case.
5724         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
5725
5726 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5727
5728         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
5729         possible collision with system files.
5730         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
5731         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
5732         WCHAR_MIN and WCHAR_MAX in this case.
5733         (<stddef.h>): Do not include; no longer needed.
5734         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
5735         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
5736         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
5737         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
5738         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
5739         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
5740         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
5741         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
5742         !defined(__c99))]: Include in this case too, since it's harmless
5743         now.
5744         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
5745         dangerous to do so.
5746         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
5747         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
5748         (_STDINT_MIN, _STDINT_MAX): New macros.
5749         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
5750         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
5751         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
5752         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
5753         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
5754         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
5755         macros, not typedefs; this simplifies things quite a bit.
5756         Use long int for all types narrower than int64_t.
5757         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
5758         Define in terms of long long int or int64_t or long int,
5759         not int64_t or int32_t.  This saves some compile-time testing.
5760         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
5761         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
5762         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
5763         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
5764         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
5765         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
5766         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
5767         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
5768         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
5769         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
5770         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
5771         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
5772         undef any previous version and define our own version, for
5773         simplicity and consistency with the new macros for types.
5774         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
5775         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
5776         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
5777         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
5778         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
5779         @WINT_T_SUFFIX@ to keep things simple here.
5780         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
5781         Simplify by assuming typical 8/16/32/64 host, since we're
5782         already doing that elsewhere anyway.
5783         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
5784         and assume long long int is 64 bits if available.  This
5785         speeds up 'configure'.
5786
5787 2006-07-01  Eric Blake  <ebb9@byu.net>
5788
5789         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
5790         Reported by Andreas Buening.
5791
5792 2006-07-01  Eric Blake  <ebb9@byu.net>
5793
5794         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
5795
5796 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
5797
5798         * lib/getaddrinfo.c: fixed typo
5799
5800 2006-06-29  Jim Meyering  <jim@meyering.net>
5801
5802         * modules/strftime (Maintainer): Add my name, since with the
5803         FPRINTFTIME changes strftime.c has forked from glibc.
5804
5805 2006-06-29  Eric Blake  <ebb9@byu.net>
5806
5807         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
5808
5809 2006-06-29  Eric Blake  <ebb9@byu.net>
5810
5811         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
5812
5813 2006-06-29  Eric Blake  <ebb9@byu.net>
5814
5815         * lib/stat_.h: New file.
5816
5817 2006-06-29  Eric Blake  <ebb9@byu.net>
5818
5819         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
5820         unused static function.
5821
5822 2006-06-29  Eric Blake  <ebb9@byu.net>
5823
5824         * doc/functions.texi (Function Portability): Document missing lstat
5825         on mingw.
5826
5827 2006-06-29  Eric Blake  <ebb9@byu.net>
5828
5829         * MODULES.html.sh: Add sys_stat.
5830         * modules/sys_stat: New module.
5831         * modules/mkstemp (Depends-on): Add sys_stat.
5832
5833 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5834
5835         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
5836
5837 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5838
5839         * m4/c-bs-a.m4: Removed.
5840
5841 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5842
5843         * lib/strftime.c: Assume strftime() exists.
5844
5845 2006-06-29  Derek Price  <derek@ximbiot.com>
5846
5847         * modules/c-bs-a: Removed - \a is C89.
5848         * MODULES.html.sh: Remove c-bs-a.
5849
5850 2006-06-29  Bruno Haible  <bruno@clisp.org>
5851
5852         * modules/wcwidth (License): Change to LGPL.
5853
5854 2006-06-28  Simon Josefsson  <jas@extundo.com>
5855
5856         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
5857         on _WIN32.
5858
5859         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
5860         getnameinfo.
5861
5862 2006-06-28  Simon Josefsson  <jas@extundo.com>
5863
5864         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
5865
5866 2006-06-28  Simon Josefsson  <jas@extundo.com>
5867
5868         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
5869         functions there.  It will succeed on Windows XP, but on Windows
5870         2000 and (presumably) earlier, it will fail, and use the internal
5871         re-implementation.
5872         (use_win32_p): New function.
5873         (getaddrinfo): Use strtoul on servname, to support numeric ports.
5874         Support AI_NUMERICSERV to disable getservbyname.
5875         (getnameinfo): New function, only supports
5876         NI_NUMERICHOST|NI_NUMERICSERV for now.
5877
5878         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
5879         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
5880         getnameinfo.
5881
5882 2006-06-28  Eric Blake  <ebb9@byu.net>
5883
5884         * modules/wcwidth: New file.
5885         * modules/mbchar (Depends-on): Add wcwidth.
5886         * modules/mbswidth (Depends-on): Add wcwidth.
5887         * MODULES.html.sh: Add wcwidth.
5888
5889 2006-06-28  Eric Blake  <ebb9@byu.net>
5890
5891         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
5892         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
5893
5894 2006-06-28  Eric Blake  <ebb9@byu.net>
5895
5896         * lib/xvasprintf.h: Fix comments.
5897
5898 2006-06-28  Eric Blake  <ebb9@byu.net>
5899
5900         * lib/mbchar.h (wcwidth): Include wcwidth.h.
5901         * lib/mbswidth.c (wcwidth): Move from here...
5902         * lib/wcwidth.h: ...to this new file.
5903
5904 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5905
5906         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
5907
5908         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
5909         it's obsolete.
5910         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
5911
5912 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5913
5914         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
5915         Autoconf 2.60 says this stuff was obsolete.
5916
5917 2006-06-28  Bruno Haible  <bruno@clisp.org>
5918
5919         * modules/wcwidth (Files): Add m4/wchar_t.m4.
5920
5921 2006-06-28  Bruno Haible  <bruno@clisp.org>
5922
5923         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
5924         gt_TYPE_WCHAR_T.
5925
5926 2006-06-28  Bruno Haible  <bruno@clisp.org>
5927
5928         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
5929         declaration for wcwidth.
5930         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
5931
5932 2006-06-28  Bruno Haible  <bruno@clisp.org>
5933
5934         * lib/mkdtemp.c [MINGW]: Include <io.h>.
5935         (mkdir): Define using _mkdir.
5936
5937 2006-06-28  Bruno Haible  <bruno@clisp.org>
5938
5939         * lib/getaddrinfo.h: Fix POSIX URL.
5940         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
5941         _WIN32.
5942         (use_win32_p): Make static.
5943         (getaddrinfo): Reject service name if it is empty or does not consist
5944         solely of decimal digits, or if its value is > 65535.
5945         (getnameinfo): Remove useless casts.
5946
5947 2006-06-27  Simon Josefsson  <jas@extundo.com>
5948
5949         * modules/sys_select: New file, suggested by Bruno Haible, Paul
5950         Eggert and Martin Lambers.
5951
5952 2006-06-27  Simon Josefsson  <jas@extundo.com>
5953
5954         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
5955         Eggert and Martin Lambers.
5956
5957 2006-06-27  Bruno Haible  <bruno@clisp.org>
5958
5959         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
5960         result to 0, not to empty.
5961         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
5962
5963 2006-06-27  Bruno Haible  <bruno@clisp.org>
5964
5965         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
5966
5967 2006-06-26  Simon Josefsson  <jas@extundo.com>
5968
5969         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
5970         present.
5971
5972 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
5973
5974         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
5975         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
5976         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
5977
5978 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
5979
5980         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
5981
5982 2006-06-26  Bruno Haible  <bruno@clisp.org>
5983
5984         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
5985
5986 2006-06-26  Bruno Haible  <bruno@clisp.org>
5987
5988         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
5989
5990 2006-06-26  Bruno Haible  <bruno@clisp.org>
5991
5992         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
5993         SGI C compiler in pre-C99 mode.
5994         Suggested by Mark D. Baushke and Larry Jones.
5995
5996 2006-06-26  Bruno Haible  <bruno@clisp.org>
5997
5998         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
5999         WCHAR_MAX.
6000         Reported by Mark D. Baushke and Larry Jones.
6001
6002 2006-06-26  Bruno Haible  <bruno@clisp.org>
6003
6004         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
6005         in pre-C99 mode.
6006         Suggested by Mark D. Baushke and Larry Jones.
6007
6008 2006-06-23  Simon Josefsson  <jas@extundo.com>
6009             Bruno Haible  <bruno@clisp.org>
6010
6011         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
6012         Emit mostlyclean-local rule.
6013         (func_emit_tests_Makefile_am): Likewise.
6014         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
6015
6016 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
6017
6018         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
6019
6020 2006-06-23  Bruno Haible  <bruno@clisp.org>
6021
6022         * tests/test-stdint.c: Update to match ISO C 99 Technical
6023         Corrigendum 1.
6024
6025 2006-06-23  Bruno Haible  <bruno@clisp.org>
6026
6027         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
6028
6029 2006-06-23  Bruno Haible  <bruno@clisp.org>
6030
6031         * lib/stdint_.h: Treat IRIX like OpenBSD.
6032
6033 2006-06-23  Bruno Haible  <bruno@clisp.org>
6034
6035         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
6036         ISO C 99 Technical Corrigendum 1.
6037
6038 2006-06-22  Simon Josefsson  <jas@extundo.com>
6039
6040         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
6041         MinGW.
6042
6043 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
6044
6045         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
6046         needed.  Some compiler complained about some of them.  Problem reported
6047         by Larry Jones in
6048         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
6049
6050 2006-06-21  Simon Josefsson  <jas@extundo.com>
6051
6052         * tests/test-getaddrinfo.c: New file.
6053
6054         * modules/getaddrinfo-tests: New file.
6055
6056         * MODULES.html.sh: Add inet_pton.
6057
6058         * modules/inet_pton: New file.
6059
6060 2006-06-21  Simon Josefsson  <jas@extundo.com>
6061
6062         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
6063         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
6064         of using the (limited) gnulib implementation on Windows XP.
6065
6066         * m4/inet_pton.m4: New file.
6067
6068 2006-06-21  Simon Josefsson  <jas@extundo.com>
6069
6070         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
6071         variable.
6072
6073         * lib/socket_.h: Don't define WINVER.
6074
6075         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
6076         slightly modified to work in gnulib.
6077
6078 2006-06-21  Simon Josefsson  <jas@extundo.com>
6079
6080         * doc/gnulib.texi (Windows sockets): Add.
6081
6082 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
6083
6084         * lib/read-file.c (fread_file): Start with buffer allocation of
6085         0 bytes rather than 1 byte; this simplifies the code.
6086         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
6087         code to free buffer and save/restore errno.
6088         (internal_read_file): Remove unused local.
6089
6090 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
6091
6092         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
6093         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
6094         Problem reported by Denis Excoffier in
6095         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
6096
6097 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6098
6099         * modules/sys_socket, modules/socklen: Include sys/types since
6100         FreeBSD 4.x's sys/socket.h needs it.
6101
6102 2006-06-19  Simon Josefsson  <jas@extundo.com>
6103
6104         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
6105
6106 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6107
6108         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
6109
6110 2006-06-19  Bruno Haible  <bruno@clisp.org>
6111
6112         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
6113         and FULL_PATH_INTTYPES_H in angle brackets.
6114         Reported by Mark D. Baushke <mdb@gnu.org>.
6115
6116 2006-06-17  Eric Blake  <ebb9@byu.net>
6117
6118         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
6119         errno.
6120
6121 2006-06-17  Bruno Haible  <bruno@clisp.org>
6122
6123         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
6124         <sys/inttypes.h>.
6125
6126 2006-06-17  Bruno Haible  <bruno@clisp.org>
6127
6128         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
6129         whether errno is declared. Assume <errno.h> declares errno.
6130
6131 2006-06-17  Bruno Haible  <bruno@clisp.org>
6132
6133         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
6134
6135 2006-06-17  Bruno Haible  <bruno@clisp.org>
6136
6137         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
6138         problem on Solaris 2.5.1.
6139
6140 2006-06-16  Eric Blake  <ebb9@byu.net>
6141
6142         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
6143         * lib/unicodeio.c [!defined errno]: Likewise.
6144         * lib/strtol.c [!defined errno]: Likewise.
6145         * lib/strtod.c [!defined errno]: Likewise.
6146
6147 2006-06-15  Eric Blake  <ebb9@byu.net>
6148
6149         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
6150
6151 2006-06-15  Eric Blake  <ebb9@byu.net>
6152
6153         * config/srclist.txt (ssize_t.m4): Lose sync.
6154
6155 2006-06-15  Bruno Haible  <bruno@clisp.org>
6156
6157         * modules/stdint (Files): Include m4/full-header-path.m4,
6158         m4/size_max.m4, m4/wchar_t.m4.
6159         (Makefile.am): Many more substitutions.
6160         * modules/stdint-tests: New file.
6161         * tests/test-stdint.c: New file.
6162
6163 2006-06-15  Bruno Haible  <bruno@clisp.org>
6164
6165         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
6166         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
6167         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
6168         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
6169         gl_CHECK_TYPE_SAME): New macros.
6170
6171 2006-06-15  Bruno Haible  <bruno@clisp.org>
6172
6173         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
6174
6175 2006-06-15  Bruno Haible  <bruno@clisp.org>
6176
6177         * lib/stdint_.h: Rewritten to be fully auto-configured.
6178         Fixes bug on HP-UX/IA64.
6179
6180 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
6181
6182         * lib/getdate.y (__attribute__): Don't define if already defined.
6183         Problem reported by Larry Jones.
6184         * lib/utimens.c (__attribute__): Likewise.
6185
6186 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
6187
6188         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
6189         reported by Andreas Schwab.
6190
6191 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6192             Bruno Haible  <bruno@clisp.org>
6193
6194         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
6195         check for the declaration of strnlen and a run test that exposes the
6196         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
6197         rpl_strndup.
6198
6199 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6200             Bruno Haible  <bruno@clisp.org>
6201
6202         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
6203
6204 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6205
6206         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
6207         compile test, for Tru64 4.0D.
6208
6209 2006-05-28  Karl Berry  <karl@gnu.org>
6210
6211         * config/srclist.txt (printf-args.c): lose sync.
6212
6213 2006-05-26  Martin Lambers  <marlam@marlam.de>
6214
6215         * lib/getpass.c: Updates the test for the native W32 API, and adds
6216         missing includes, thus fixing compilation warnings.
6217
6218 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
6219
6220         * lib/exclude.c (exclude_fnmatch): New function.
6221         (excluded_file_name): Call exclude_fnmatch.
6222         * lib/exclude.h (excluded_file_name): New prototype
6223
6224 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
6225
6226         * lib/tempname.c (small_open, large_open): New macros.
6227         (__open, __open64) [!_LIBC]: Remove.
6228         (__gen_tempname): Use small_open and large_open instead of __open
6229         and __open64.  This fixes a portability bug on HP-UX 11.11i
6230         reported by Simon Wing-Tang in
6231         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
6232
6233 2006-05-24  Bruno Haible  <bruno@clisp.org>
6234
6235         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
6236         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
6237         Reported by Thorsten Maerz <torte@netztorte.de> via
6238         Aaron Stone <aaron@serendipity.cx>.
6239
6240 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
6241
6242         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
6243         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
6244         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
6245         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
6246         not really conditional on the cache.
6247         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
6248
6249 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
6250
6251         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
6252         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
6253         (my_usleep): Don't mishandle maximum value.
6254
6255 2006-05-19  Jim Meyering  <jim@meyering.net>
6256
6257         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
6258
6259 2006-05-17  Bruno Haible  <bruno@clisp.org>
6260
6261         Cygwin portability.
6262         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
6263
6264 2006-05-17  Bruno Haible  <bruno@clisp.org>
6265
6266         * lib/stdint_.h: Fix recognition of Cygwin.
6267
6268 2006-05-15  Bruno Haible  <bruno@clisp.org>
6269
6270         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
6271         on libtool patch by Ralf Wildenhues.
6272
6273 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
6274
6275         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
6276         test for C99 conformance; (bool) 0.5 is an integer constant
6277         expression, but (bool) -0.5 is not.  Problem reported by Fedor
6278         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
6279
6280 2006-05-11  Simon Josefsson  <jas@extundo.com>
6281
6282         * m4/xvasprintf.m4: Fix obvious typo.
6283
6284 2006-05-11  Jim Meyering  <jim@meyering.net>
6285
6286         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
6287         James Lemley.
6288
6289 2006-05-10  Simon Josefsson  <jas@extundo.com>
6290
6291         * lib/md4.c: Typo fix, update copyright years.
6292         (K1, K2): Don't use L because it turn computations into 64-bit on
6293         64-bit platforms.
6294
6295 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
6296
6297         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
6298         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
6299         unwanted sign propagation, e.g., on hosts with 64-bit int.
6300         There still are some problems with reeelly weird theoretical hosts
6301         (e.g., 33-bit int) but it's not worth worrying about now.
6302         * lib/sha1.c (rol): Likewise.
6303         (K1, K2, K3, K4): Remove unnecessary L suffix.
6304
6305 2006-05-10  Bruno Haible  <bruno@clisp.org>
6306
6307         * lib/des.c: Cast to avoid warnings.
6308
6309 2006-05-09  Bruno Haible  <bruno@clisp.org>
6310
6311         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
6312         (Depends-on): Depend also on xsize, stdarg.
6313         (configure.ac): Add gl_XVASPRINTF.
6314
6315 2006-05-09  Bruno Haible  <bruno@clisp.org>
6316
6317         * m4/xvasprintf.m4: New file.
6318
6319 2006-05-09  Bruno Haible  <bruno@clisp.org>
6320
6321         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
6322         (EOVERFLOW): Define fallback value.
6323         (xstrcat): New function.
6324         (xvasprintf): Recognize the special case of a string concatenation.
6325
6326 2006-05-08  Eric Blake  <ebb9@byu.net>
6327
6328         * gnulib-tool (func_version): Base copyright year on CVS date.
6329         (func_emit_copyright_notice): New function.
6330         (func_emit_lib_Makefile_am): Use it.
6331         (func_emit_tests_Makefile_am): Likewise.
6332         (func_import): Likewise.
6333
6334 2006-05-08  Bruno Haible  <bruno@clisp.org>
6335
6336         * modules/stdarg: New file.
6337         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
6338
6339 2006-05-08  Bruno Haible  <bruno@clisp.org>
6340
6341         * m4/stdarg.m4: New file, from GNU gettext.
6342
6343 2006-05-08  Bruno Haible  <bruno@clisp.org>
6344
6345         * config/srclist.txt (build-aux/config.rpath): different from latest
6346         release.
6347
6348 2006-05-08  Bruno Haible  <bruno@clisp.org>
6349
6350         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
6351
6352 2006-05-05  Jim Meyering  <jim@meyering.net>
6353
6354         * m4/warning.m4: New file, derived from bison's file by the same name.
6355
6356 2006-05-03  Bruno Haible  <bruno@clisp.org>
6357
6358         * lib/stdint_.h: Shorter URL.
6359         * lib/inttypes.h: Likewise.
6360
6361 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6362
6363         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
6364
6365 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6366
6367         * lib/verify.h: Document the internals better.  Most of this change
6368         was written by Bruno Haible.
6369
6370 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6371
6372         * doc/verify.texi: New file, partly based on a proposal by
6373         Bruno Haible.
6374
6375 2006-05-02  Bruno Haible  <bruno@clisp.org>
6376
6377         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
6378         test from here...
6379         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
6380
6381 2006-04-29  Bruno Haible  <bruno@clisp.org>
6382
6383         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
6384         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
6385
6386 2006-04-29  Bruno Haible  <bruno@clisp.org>
6387
6388         * gnulib-tool: Make --update option actually work.
6389
6390 2006-04-29  Bruno Haible  <bruno@clisp.org>
6391
6392         * doc/gcd.texi: New file.
6393         * doc/gnulib.texi: Include it.
6394
6395 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
6396
6397         * lib/getdate.y (get_date): When adding relative date, start with the
6398         initial time, not with the result of the first mktime call.
6399
6400 2006-04-25  Bruno Haible  <bruno@clisp.org>
6401
6402         * gnulib-tool (func_import): Output the include directives in three
6403         blocks, sorted separately.
6404         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6405
6406 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
6407
6408         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
6409         to define main with arguments, for C++.  Reported by Eric Blake.
6410         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
6411         Prefer 'int main ()' to 'int main (void)', for C++.
6412         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
6413         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
6414         for 'main', for C99 and C++.
6415
6416 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
6417
6418         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
6419         Don't assume that exit status -1 is valid.
6420         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6421         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
6422         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
6423         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
6424         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
6425         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
6426         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
6427         functions can be used without declaring them, or that you can
6428         exit with status -1.
6429         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
6430
6431 2006-04-24  Karl Berry  <karl@gnu.org>
6432
6433         * config/srclist.txt (longdouble.m4): sync lost.
6434
6435 2006-04-24  Eric Blake  <ebb9@byu.net>
6436
6437         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
6438
6439 2006-04-24  Bruno Haible  <bruno@clisp.org>
6440
6441         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
6442         poll() implementation in AIX.
6443         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6444
6445 2006-04-24  Bruno Haible  <bruno@clisp.org>
6446
6447         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
6448         assigned exactly once.
6449
6450 2006-04-23  Claudio Fontana  <claudio@gnu.org>
6451             Bruno Haible  <bruno@clisp.org>
6452
6453         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
6454         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
6455         for AM_CPPFLAGS.
6456
6457 2006-04-23  Bruno Haible  <bruno@clisp.org>
6458
6459         * modules/copy-file: Depend on unistd.
6460         * modules/execute: Likewise.
6461         * modules/fatal-signal: Likewise.
6462         * modules/findprog: Likewise.
6463         * modules/mkdtemp : Likewise.
6464         * modules/pipe: Likewise.
6465         * modules/wait-process: Likewise.
6466
6467 2006-04-23  Bruno Haible  <bruno@clisp.org>
6468
6469         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
6470         condition was already detected.
6471         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6472
6473 2006-04-23  Bruno Haible  <bruno@clisp.org>
6474
6475         * lib/copy-file.c: Include <unistd.h> unconditionally.
6476         * lib/execute.c: Likewise.
6477         * lib/fatal-signal.c: Likewise.
6478         * lib/findprog.c: Likewise.
6479         * lib/mkdtemp.c: Likewise.
6480         * lib/pipe.h: Likewise.
6481         * lib/pipe.c: Likewise.
6482         * lib/wait-process.h: Likewise.
6483
6484 2006-04-23  Bruno Haible  <bruno@clisp.org>
6485
6486         * gnulib-tool (func_usage): Fix --import description. Document
6487         --update.
6488         (func_import): Create temporary file in a temporary directory, if
6489         --dry-run is specified. Silence errors from 'grep' when there are no
6490         m4 files in $m4dir.
6491         (func_create_testdir): Silence errors from 'grep' when there are no
6492         m4 files in $m4dir.
6493         Reported by Karl Berry <karl@freefriends.org>.
6494
6495 2006-04-20  Bruno Haible  <bruno@clisp.org>
6496
6497         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
6498         one argument, so that the code will be portable to Autoconf 2.60.
6499         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
6500         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6501         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
6502
6503 2006-04-19  Derek Price  <derek@ximbiot.com>
6504             Eric Blake  <ebb9@byu.net>
6505
6506         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
6507         rather than "/full/path.h".  Update comment to match.  Shorten &
6508         generalize m4_translit call via AS_TR_CPP.
6509
6510 2006-04-19  Derek Price  <derek@ximbiot.com>
6511             Eric Blake  <ebb9@byu.net>
6512
6513         * lib/inttypes.h: Correct grammar in comment.
6514
6515 2006-04-18  Derek Price  <derek@ximbiot.com>
6516             Paul Eggert  <eggert@cs.ucla.edu>
6517
6518         * modules/inttypes: New file.
6519         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
6520
6521 2006-04-18  Derek Price  <derek@ximbiot.com>
6522             Paul Eggert  <eggert@cs.ucla.edu>
6523
6524         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
6525         New files.
6526
6527 2006-04-18  Derek Price  <derek@ximbiot.com>
6528             Paul Eggert  <eggert@cs.ucla.edu>
6529
6530         * lib/inttypes.h: New file.
6531         * lib/strtoimax.c: Assume <inttypes.h>.
6532
6533 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
6534
6535         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
6536         isn't mounted.  Problem reported by Kir Kolyshkin.
6537
6538 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
6539
6540         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
6541         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
6542         Derek R. Price.
6543         * lib/regex.h (RE_DUP_MAX): Update comment to match current
6544         implementation.
6545
6546 2006-04-12  Eric Blake  <ebb9@byu.net>
6547
6548         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
6549         is now done automatically by the corresponding Autoconf macro.
6550
6551 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
6552
6553         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
6554         time_r.h.
6555
6556 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6557
6558         Merge regex changes from libc, removing some of our
6559         POSIX-conformance changes that were rejected and redoing them in a
6560         less-intrusive way.
6561
6562         * lib/regcomp.c (re_compile_internal, init_dfa):
6563         Length arg is now size_t, not Idx.  All uses changed.
6564         (peek_token): Forward decl now says internal_function.
6565         (__re_error_msgid, __re_error_msgid_idx):
6566         Now static rather than extern with attribute_hidden.
6567         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
6568         For some reason libc prefers K&R style defns for external functions.
6569         (regerror) [!defined _LIBC]: Likewise.
6570         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
6571         (seek_collating_symbol_entry, lookup_collation_sequence_value):
6572         (build_range_exp, build_collating_symbol):
6573         Use K&R-style defn.
6574         (re_compile_fastmap): Use '\0' to memset, not 0.
6575         (utf8_sb_map): Make the calculations more obvious.
6576         (init_dfa, parse_bracket_exp, build_charclass_op):
6577         Call calloc and cast result, as glibc does.
6578         (init_word_char, fetch_token, peek_token, peek_token_bracket):
6579         (build_range_exp, build_collating_symbol):
6580         Now internal functions.
6581
6582         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
6583
6584         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
6585         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
6586         Don't depend on VMS; depend on __VMS instead, for POSIX
6587         namespace cleanness.
6588         (regoff_t): Define to ssize_t, not long int.
6589
6590         Remove the REG_ macros named below.  Instead, make the old names
6591         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
6592         __USE_GNU_REGEX.
6593         (REG_BACKSLASH_ESCAPE_IN_LISTS):
6594         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
6595         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
6596         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
6597         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
6598         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
6599         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
6600         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
6601         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
6602         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
6603         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
6604         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
6605         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
6606         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
6607         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
6608         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
6609         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
6610         (REG_NREGS):
6611         Remove.  All uses replaced by the old RE_* names.
6612         (RE_BACKSLASH_ESCAPE_IN_LISTS):
6613         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
6614         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
6615         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
6616         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
6617         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
6618         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
6619         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
6620         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
6621         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
6622         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
6623         Don't bother having these macros be independent of each others'
6624         values, since they no longer exist in the POSIX name space.
6625
6626         Rename the following member names back to their old names,
6627         unless !__USE_GNU_REGEX.  All uses changed back.
6628         (buffer): Renamed from re_buffer.
6629         (allocated): Renamed from re_allocated.
6630         (used): Renamed from re_used.
6631         (syntax): Renamed from re_syntax.
6632         (fastmap): Renamed from re_fastmap.
6633         (translate): Renamed from re_translate.
6634         (can_be_null): Renamed from re_can_be_null.
6635         (regs_allocated): Renamed from re_regs_allocated.
6636         (fastmap_accurate): Renamed from re_fastmap_accurate.
6637         (no_sub): Renamed from re_no_sub.
6638         (not_bol): Renamed from re_not_bol.
6639         (not_eol): Renamed from re_not_eol.
6640         (newline_anchor): Renamed from re_newline_anchor.
6641         (num_regs): Renamed from rm_num_regs.
6642         (start): Renamed from rm_start.
6643         (end): Renamed from rm_end.
6644
6645         (free_state): Move up a bit.
6646
6647         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
6648         #define to be empty.
6649         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
6650         when that is what is intended.
6651         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
6652         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
6653         (MAX): New macro.
6654         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
6655         All uses changed back to re_malloc, etc.  It's now the caller's
6656         responsibility to check for overflow; all callers changed.
6657         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
6658         (re_x2nrealloc): Remove.
6659         (free_state): Remove decl.
6660
6661         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
6662         (re_set_registers, re_exec):
6663         Use K&R-style defn.
6664
6665         2006-01-31  Roland McGrath  <roland@redhat.com>
6666
6667         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
6668         Reported by Mike Frysinger <vapier@gentoo.org>.
6669
6670         2006-01-15  Andreas Jaeger  <aj@suse.de>
6671
6672         [BZ #1950]
6673         * lib/regex_internal.c (re_string_reconstruct): Adjust for
6674         build_wcs_upper_buffer change.
6675         (build_wcs_upper_buffer): Change return type.
6676
6677         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
6678
6679         * lib/regex_internal.h: Include <stdint.h> if available.
6680
6681         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
6682
6683         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
6684
6685         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
6686
6687         * lib/regcomp.c: Adjust for changed secondary hash function.
6688
6689         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
6690
6691         * lib/regex.h: Pretty printing.
6692         Clean up namespace a bit.
6693
6694         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
6695
6696         * lib/regexec.c (update_cur_sifted_state, check_arrival,
6697         check_arrival_add_next_nodes): Avoid using uninitialized variable.
6698
6699         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
6700                     Ulrich Drepper  <drepper@redhat.com>
6701
6702         [BZ #1302]
6703         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
6704         changed.
6705         (bitset_word_t): Renamed from bitset_word.  All uses changed.
6706
6707         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
6708
6709         [BZ #281]
6710         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
6711         * lib/regcomp.c: Remove unnecessary uses of
6712         unsigned RE_TRANSLATE_TYPE.
6713         * lib/regex_internal.h: Likewise.
6714         * lib/regex_internal.c: Likewise.
6715         * lib/regexec.c: Likewise.
6716         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
6717
6718         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
6719
6720         * lib/regexec.c (find_recover_state): Remove unnecessary
6721         initialization.
6722         (transit_state_bkref): Make DFA a const pointer.
6723         (get_subexp): Likewise.
6724         (check_arrival): Likewise.
6725         (update_cur_sifted_state): Likewise.
6726         (re_search_internal): Likewise.
6727         (prune_impossible_nodes): Likewise.
6728         (acquire_init_state_context): Likewise.
6729         (proceed_next_node): Likewise.
6730         (set_regs): Likewise.
6731         (free_fail_stack_return): Likewise.
6732         (check_arrival_expand_ecl): Mark DFA parameter as const.
6733         (check_arrival_expand_ecl_sub): Likewise.
6734         (check_subexp_limits): Likewise.
6735         (sub_epsilon_src_nodes):  Likewise.
6736         (add_epsilon_src_nodes):  Likewise.
6737         (merge_state_array): Likewise.
6738         (update_regs): Likewise.
6739         (build_trtable): Likewise.
6740         (sift_states_backward): Mark MCTX parameter as const.
6741         (build_sifted_states): Likewise.
6742         (update_cur_sifted_state): Likewise.
6743         (sift_states_mkref): Likewise.
6744         (check_arrival_expand_ecl): Mark eclosure as const.
6745         (check_dst_limits_calc_pos_1): Likewise.
6746         * lib/regex_internal.h (re_match_context_t): Make dfa a const
6747         pointer.
6748
6749         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
6750
6751         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
6752         (transit_state_sb): Likewise.
6753         (transit_state_mb): Likewise.
6754         (sift_states_iter_mb): Likewise.
6755         (check_arrival_add_next_nodes): Likewise.
6756         (check_node_accept_bytes): Change first parameter to pointer-to-const.
6757         [_LIBC] (re_search_2_stub): Use mempcpy.
6758
6759         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
6760         mbrtowc for very simple UTF-8 case.
6761
6762         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
6763         a pointer-to-const.
6764         (re_acquire_state_context): Likewise.
6765         * lib/regex_internal.h: Adjust prototypes.
6766
6767         * lib/regex.c: Prevent using C++ compilers.
6768
6769         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
6770         (re_acquire_state_context): Likewise.
6771
6772 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6773
6774         * modules/regex (Depends-on): Add ssize_t.
6775
6776 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6777
6778         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
6779         translation table.
6780
6781 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6782
6783         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
6784
6785 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
6786             Bruno Haible  <bruno@clisp.org>
6787
6788         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
6789         <sys/types.h> and <inttypes.h>.
6790
6791 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6792
6793         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
6794         `__error_t_defined', so argp.h will not typedef the former.
6795
6796 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
6797
6798         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
6799         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
6800         glibc names.  Even if glibc is changed to conform to POSIX, the
6801         traditional names will be available anyway, since regex depends on
6802         the extensions module.  Also, fix a longstanding typo in the
6803         implementation of Spencer ERE test #75 from grep 2.3.  Problems
6804         reported by Emanuele Giaquinta.  Also, change sense of cached
6805         variable, so that the message makes sense.
6806
6807 2006-03-24  Simon Josefsson  <jas@extundo.com>
6808
6809         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
6810         including some doc fixes.
6811         (base64_encode_alloc): Fix +1 bug on allocation failures.
6812
6813 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6814
6815         * lib/base64.c (base64_encode): Do not read past end of array with
6816         unsanitized input on systems with CHAR_BIT > 8.
6817
6818 2006-03-24  Eric Blake  <ebb9@byu.net>
6819
6820         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
6821
6822 2006-03-22  Karl Berry  <karl@gnu.org>
6823
6824         * config/srclist.txt (*setenv.[ch]): get from coreutils.
6825         * config/srclistvars.sh (COREUTILS): new var.
6826
6827 2006-03-17  Jim Meyering  <jim@meyering.net>
6828
6829         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
6830         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
6831
6832 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6833
6834         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
6835         no longer needs it.  Instead, check that regoff_t is as least
6836         as wide as ptrdiff_t.
6837
6838         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
6839         so that our regex.h stays compatible with the installed regex.
6840         This is helpful for installers who configure --without-included-regex.
6841         Problem reported by Emanuele Giaquinta.
6842
6843 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6844
6845         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
6846         Typedef to long int, not to off_, as POSIX will likely change
6847         in that direction.
6848
6849 2006-03-15  Eric Blake  <ebb9@byu.net>
6850
6851         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
6852
6853 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6854
6855         * lib/argp-help.c (validate_uparams): Fix typo
6856         * lib/argp-parse.c (argp_default_options): Consistently begin help
6857         messages with a lowercase letter.
6858
6859 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
6860
6861         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
6862         overrun buffers and shouldn't be used (much as gets shouldn't be
6863         used).
6864         * lib/time_r.c (asctime_r, ctime_r): Likewise.
6865
6866 2006-03-08  Simon Josefsson  <jas@extundo.com>
6867
6868         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
6869         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6870
6871 2006-03-08  Simon Josefsson  <jas@extundo.com>
6872
6873         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
6874         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6875
6876 2006-03-08  Simon Josefsson  <jas@extundo.com>
6877
6878         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
6879         signal that configure disabled the device.
6880
6881 2006-03-08  Simon Josefsson  <jas@extundo.com>
6882
6883         * build-aux/maint.mk: Fix refresh-po, to handle no translated
6884         languages.
6885
6886 2006-03-07  Simon Josefsson  <jas@extundo.com>
6887
6888         * modules/getopt (Depends-on): Add unistd.
6889
6890         * modules/unistd: New file.
6891
6892 2006-03-07  Simon Josefsson  <jas@extundo.com>
6893
6894         * modules/gc-random: New file.
6895
6896 2006-03-07  Simon Josefsson  <jas@extundo.com>
6897
6898         * m4/unistd_h.m4: New file.
6899
6900 2006-03-07  Simon Josefsson  <jas@extundo.com>
6901
6902         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
6903         test to be side-effect free by storing the result in the cache
6904         variable gl_cv_lib_readline, and moving the assignment of
6905         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
6906         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6907
6908 2006-03-07  Simon Josefsson  <jas@extundo.com>
6909
6910         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
6911         error on missing devices (the functions will return an error).
6912
6913         * m4/gc.m4: Move random stuff to gc-random.m4
6914
6915 2006-03-07  Simon Josefsson  <jas@extundo.com>
6916
6917         * lib/unistd_.h: New file.
6918
6919 2006-03-07  Simon Josefsson  <jas@extundo.com>
6920
6921         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
6922
6923 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6924
6925         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
6926         Problem reported by Juan Manuel Guerrero.
6927
6928 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6929
6930         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
6931         the unistd module.
6932         * lib/getlogin_r.c: Likewise.
6933         * lib/getlogin_r.h: Likewise.
6934         * lib/glob.c: Likewise.
6935         * lib/pagealign_alloc.c: Likewise.
6936         * lib/unistd_.h: Remove; no longer needed.
6937
6938 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6939
6940         * MODULES.html.sh (Support for systems lacking POSIX:2001):
6941         Add unistd.
6942         * modules/c-stack (Depends-on): Add unistd.
6943         * modules/getlogin_r: Likewise.
6944         * modules/glob: Likewise.
6945         * modules/pagealign_alloc: Likewise.
6946         * modules/unistd (Files): Remove lib/unistd_.h.
6947         (EXTRA_DIST): Remove.
6948         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
6949         need unistd_.h.
6950         (MOSTLYCLEANFILES): Remove unistd.h-t.
6951
6952 2006-03-03  Simon Josefsson  <jas@extundo.com>
6953
6954         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
6955
6956 2006-03-03  Simon Josefsson  <jas@extundo.com>
6957
6958         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
6959         libidn and bison.
6960
6961 2006-03-03  Simon Josefsson  <jas@extundo.com>
6962
6963         * build-aux/maint.mk: Add indent target.
6964
6965 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
6966
6967         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
6968         our replacement poll.h in any case, to avoid a differing
6969         declaration from a system header.  Seen on AIX.
6970
6971 2006-03-01  Simon Josefsson  <jas@extundo.com>
6972
6973         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
6974         <kasal@ucw.cz>.
6975
6976 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
6977
6978         * modules/gettime (Depends-on): Add extensions module.
6979         * modules/nanosleep (Depends-on): Likewise.
6980         * modules/settime (Depends-on): Likewise.
6981
6982 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
6983
6984         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
6985         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
6986         pedantically.
6987         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6988         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
6989
6990         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
6991         not "==".  Reported by Ralf Wildenhues.
6992
6993 2006-03-01  Karl Berry  <karl@gnu.org>
6994
6995         * doc/Copyright/request-*: new files, synced from gnuorg.
6996
6997 2006-03-01  Karl Berry  <karl@gnu.org>
6998
6999         * config/srclist.txt (Copyright/*): new entries.
7000
7001 2006-02-28  Simon Josefsson  <jas@extundo.com>
7002
7003         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
7004
7005 2006-02-27  Simon Josefsson  <jas@extundo.com>
7006
7007         * lib/base64.h: Indent #define's.  From Jim Meyering
7008         <jim@meyering.net>.
7009
7010 2006-02-27  Jim Meyering  <jim@meyering.net>
7011
7012         Revert the change of 2006-02-24, so these files can continue
7013         to be sync'd from gettext.
7014         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
7015         of `config.h'.
7016
7017 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
7018
7019         * modules/intprops: New file.
7020         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
7021         Add intprops.
7022         * modules/getloadavg (Files): Remove lib/intprops.h.
7023         (Depends-on): Add intprops.
7024         * modules/human: Likewise.
7025         * modules/inttostr: Likewise.
7026         * modules/openat: Likewise.
7027         * modules/sig2str: Likewise.
7028         * modules/userspec: Likewise.
7029         * modules/utimecmp: Likewise.
7030         * modules/xnanosleep: Likewise.
7031         * modules/xstrtol: Likewise.
7032
7033 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
7034
7035         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
7036         * modules/lock-tests (TESTS): Use $(EXEEXT).
7037         * modules/tls-tests: Likewise.
7038         * modules/argp-tests: Likewise.
7039         (check_PROGRAMS): New var, replacing...
7040         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
7041
7042 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7043
7044         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
7045         `config.h'.
7046
7047 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
7048
7049         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
7050
7051 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7052
7053         Sync from coreutils.
7054         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
7055         gl_CHDIR_SAFER.
7056
7057 2006-02-22  Jim Meyering  <jim@meyering.net>
7058
7059         Sync from coreutils.
7060         * m4/chdir-safer.m4: New file.
7061
7062 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
7063
7064         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
7065         AT_FDCWD exceeds INT_MAX.
7066         * lib/openat.h (AT_FDCWD): Likewise.
7067
7068 2006-02-17  Eric Blake  <address@hidden>
7069
7070         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
7071
7072 2006-02-16  Simon Josefsson  <jas@extundo.com>
7073
7074         * modules/getaddrinfo (Depends-on): Add sys_socket.
7075
7076 2006-02-15  Simon Josefsson  <jas@extundo.com>
7077
7078         * build-aux/maint.mk: Add dsyntax-check rule.
7079
7080 2006-02-15  Eric Blake  <ebb9@byu.net>
7081
7082         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
7083         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
7084         'present but cannot compile' warnings on cygwin.
7085         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
7086         use ws2tcpip.h if sys/socket.h works.
7087         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
7088         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
7089
7090 2006-02-14  Simon Josefsson  <jas@extundo.com>
7091
7092         * modules/maintainer-makefile (Files): Rename.
7093
7094         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
7095         and (the local) Makefile.cfg to maint-cfg.mk.
7096
7097         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
7098         to the latter.
7099
7100         * modules/maintainer-makefile: New module.
7101
7102         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
7103         severaly stripped to make it possible to build it up from scratch
7104         with reliable tests.
7105
7106         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
7107         fixes to permit overriding the default actions when configure and
7108         makefile are not available.
7109
7110 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
7111
7112         Sync from coreutils.
7113         * modules/lstat (Depends-on): Don't depend on xalloc.
7114         (License): Change from GPL to LGPL, since this is now simply a
7115         replacement for a libc function.
7116
7117 2006-02-14  Jim Meyering  <jim@meyering.net>
7118
7119         Sync from coreutils.
7120
7121         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
7122         failure on deficient systems, and simplify gnulib lgpl dependencies.
7123         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
7124         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
7125
7126         * lib/xalloc-die.c: Remove unused definition of N_.
7127
7128 2006-02-14  Jim Meyering  <jim@meyering.net>
7129
7130         Sync from coreutils.
7131         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
7132         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
7133         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
7134         double-quote uses of that variable, to accommodate the rare case in
7135         which getmntent is available in none of the libraries checked.  This
7136         happens at least on FreeBSD 5.0.
7137
7138 2006-02-13  Simon Josefsson  <jas@extundo.com>
7139
7140         * gnulib-tool (Usage): Fix --import, from
7141         karl@freefriends.org (Karl Berry).
7142
7143 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7144
7145         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
7146
7147 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
7148
7149         * lib/argp-namefrob.h: Restore changes accidentally lost during the
7150         "autoupdate" on 2005-12-12.
7151
7152 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
7153
7154         * modules/closeout (Depends-on): Remove atexit.
7155
7156 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
7157
7158         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
7159         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
7160
7161 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
7162
7163         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
7164         __EXTENSIONS__ if this causes compilation to fail.  Problem
7165         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
7166         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
7167
7168 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
7169
7170         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
7171         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
7172         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
7173         All uses changed.
7174
7175 2006-01-26  Simon Josefsson  <jas@extundo.com>
7176
7177         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
7178         prototype is visible on mingw32.
7179
7180         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
7181         for mingw32.
7182
7183         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
7184         mingw32).
7185
7186 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
7187
7188         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
7189         attempt to open for write; this always fails, at least on POSIX
7190         hosts.  This reinstates the 2006-01-09 change, which was
7191         inadvertently removed.
7192
7193 2006-01-26  Bruno Haible  <bruno@clisp.org>
7194
7195         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
7196         Reported by Paul Eggert.
7197
7198 2006-01-26  Bruno Haible  <bruno@clisp.org>
7199             Paul Eggert  <eggert@cs.ucla.edu>
7200
7201         * lib/stdbool_.h (_Bool)
7202         [(! (defined __cplusplus || defined __BEOS__)
7203           && !defined __GNUC__
7204           && !(defined __HP_cc || defined __xlc__
7205                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
7206                || defined __sgi))]:
7207         #define to signed char in these cases too; this simplifies
7208         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
7209         etc., separately) and makes it more conservative.
7210
7211 2006-01-25  Simon Josefsson  <jas@extundo.com>
7212
7213         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
7214         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
7215         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
7216
7217 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7218
7219         * lib/argp-namefrob.h: Bugfix. Remove stray #
7220
7221 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
7222
7223         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
7224         so that we test the test.
7225         Check for yet another HP-UX cc bug involving *bool |= bool.
7226
7227 2006-01-25  Karl Berry  <karl@gnu.org>
7228
7229         * config/srclist.txt (vasnprintf.c): sync lost.
7230
7231 2006-01-25  Jim Meyering  <jim@meyering.net>
7232
7233         Sync from the stable (b5) branch of coreutils:
7234
7235         * lib/fts.c (fts_children): Don't let close() clobber errno from
7236         failed fchdir().
7237
7238         * lib/fts.c (fts_stat): When following a symlink-to-directory,
7239         don't necessarily interpret stat-fails+lstat-succeeds as indicating
7240         a dangling symlink.  That can also happen at least for ELOOP.
7241         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
7242         FYI, this bug predates the inclusion of fts.c in coreutils.
7243
7244         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
7245         in their own block, so pre-c99 compilers don't object.
7246
7247         Avoid the double-free (first in fts_read, second in fts_close) that
7248         would occur when an `active' directory is made inaccessible (e.g.,
7249         via chmod a-x) during a traversal.
7250         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
7251         before returning.  Reproduce this failure by
7252         mkdir -p a/b; cd a; chmod a-x . b
7253         Reported by Stavros Passas.
7254
7255 2006-01-25  Jim Meyering  <jim@meyering.net>
7256
7257         * lib/fileblocks.c: Remove more useless parentheses.
7258         * lib/readutmp.h: Likewise.
7259
7260 2006-01-25  Bruno Haible  <bruno@clisp.org>
7261
7262         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
7263         warnings.
7264         Reported by Paul Eggert.
7265
7266 2006-01-25  Bruno Haible  <bruno@clisp.org>
7267
7268         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
7269         rid of a trap command. For Solaris sh.
7270         Reported by Mark D. Baushke <mdb@gnu.org>.
7271
7272 2006-01-24  Simon Josefsson  <jas@extundo.com>
7273
7274         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
7275         Bruno.
7276
7277 2006-01-24  Karl Berry  <karl@gnu.org>
7278
7279         * config/srclist.txt (argp-namefrob.h): sync lost.
7280
7281 2006-01-24  Jim Meyering  <jim@meyering.net>
7282
7283         * modules/openat (Files): Add lib/intprops.h.
7284         From Mark D. Baushke.
7285
7286 2006-01-24  Jim Meyering  <jim@meyering.net>
7287
7288         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
7289         Reported by Mark D. Baushke.
7290
7291 2006-01-24  Jim Meyering  <jim@meyering.net>
7292
7293         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
7294
7295 2006-01-24  Bruno Haible  <bruno@clisp.org>
7296
7297         * modules/strnlen (Maintainer): Change from glibc to all.
7298
7299 2006-01-24  Bruno Haible  <bruno@clisp.org>
7300
7301         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
7302         Patch by Paul Eggert.
7303
7304 2006-01-24  Bruno Haible  <bruno@clisp.org>
7305
7306         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
7307         already has it.
7308         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
7309         2005-11-26.
7310
7311         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
7312         'signed char' to avoid problems with the built-in _Bool type.
7313         Reported by Paul Eggert on 2005-11-26.
7314
7315 2006-01-24  Bruno Haible  <bruno@clisp.org>
7316
7317         * gnulib-tool (func_import): Avoid constructing complicated sed
7318         expressions inside backquote.
7319         Report and solution by Mark D. Baushke <mdb@gnu.org>.
7320
7321 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
7322
7323         These changes imported from libc.
7324         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
7325         test and two separate function calls.
7326         * lib/strndup.c (__strndup): Add libc_hidden_def.
7327
7328 2006-01-23  Simon Josefsson  <jas@extundo.com>
7329
7330         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
7331         Remove the test_*_SOURCES variable: automake infers it by default.
7332         * modules/tls-tests: Likewise.
7333
7334 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7335
7336         Work around porting bugs reported by Dieter in
7337         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
7338         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
7339         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
7340         Include "getopt.h" first, to check interface.
7341         (getenv): Declare only if defined HAVE_DECL_GETENV &&
7342         !HAVE_DECL_GETENV.
7343         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
7344         (__strndup): Revert to K&R-style function dfns, the glibc style.
7345         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
7346         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
7347         Include strnlen.h first, to get prototype properly.
7348         (strnlen): Renamed from __strnlen.
7349         Remove weak alias.
7350
7351 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7352
7353         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
7354
7355 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7356
7357         * config/srclist.txt: Adjust to reflect glibc reorganization.
7358         This affects only comments.
7359
7360 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7361
7362          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
7363          Reported by Bruce Korb <bkorb@gnu.org>.
7364
7365 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7366
7367         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
7368         to pacify gcc -Wswitch-default.
7369
7370 2006-01-22  Bruno Haible  <bruno@clisp.org>
7371
7372         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
7373         temporary buffer for sprintf, take into account the precision also
7374         for 'd', 'i', 'u', 'o', 'x', 'X'.
7375
7376 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7377
7378         * modules/argp-tests: New module
7379         * tests/test-argp.c: New file
7380         * tests/test-argp-2.sh: New file
7381
7382 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7383
7384         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
7385         (__argp_base_name): Removed
7386         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
7387         typo.
7388         (__argp_base_name): Provide macro definition or extern declaration
7389         depending on the configuration
7390
7391 2006-01-20  Simon Josefsson  <jas@extundo.com>
7392
7393         * modules/inet_ntop (Depends-on): Depend on sys_socket.
7394
7395 2006-01-20  Simon Josefsson  <jas@extundo.com>
7396
7397         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
7398
7399 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
7400
7401         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
7402         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
7403         Suggested by Bruno Haible.
7404
7405 2006-01-20  Karl Berry  <karl@gnu.org>
7406
7407         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
7408         until changes propagate, I guess.
7409
7410 2006-01-19  Simon Josefsson  <jas@extundo.com>
7411
7412         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
7413
7414 2006-01-19  Simon Josefsson  <jas@extundo.com>
7415
7416         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
7417
7418 2006-01-19  Simon Josefsson  <jas@extundo.com>
7419
7420         * gnulib-tool: Set check_PROGRAMS.
7421
7422         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
7423         modules/des-tests, modules/gc-arcfour-tests,
7424         modules/gc-arctwo-tests, modules/gc-des-tests,
7425         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
7426         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
7427         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
7428         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
7429         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
7430         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
7431         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
7432         test_*_SOURCES.
7433
7434 2006-01-18  Simon Josefsson  <jas@extundo.com>
7435
7436         * modules/socklen (Depends-on): Depend on sys_socket.
7437
7438 2006-01-18  Simon Josefsson  <jas@extundo.com>
7439
7440         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
7441         modules/des-tests, modules/gc-arcfour-tests,
7442         modules/gc-arctwo-tests, modules/gc-des-tests,
7443         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
7444         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
7445         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
7446         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
7447         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
7448         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
7449         $(EXEEXT) to automake TESTS variable, for mingw32.
7450
7451 2006-01-17  Simon Josefsson  <jas@extundo.com>
7452
7453         * modules/socklen (Include): Need sys/socket.h.
7454
7455 2006-01-17  Bruno Haible  <bruno@clisp.org>
7456
7457         * modules/ssize_t (Include): Add <sys/types.h>.
7458
7459 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
7460
7461         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
7462         it's not portable and it doesn't work with cross-compiles.
7463         Problem reported by Bruno Haible.  Fix missing-$ typo in
7464         'test "gl_cv_ignore_unused_libraries" ...' that prevented
7465         -zignore from being used with Sun's C compiler.
7466
7467 2006-01-12  Simon Josefsson  <jas@extundo.com>
7468
7469         * lib/base64.c: Fix warning, reported by Bruno Haible
7470         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
7471
7472 2006-01-12  Bruno Haible  <bruno@clisp.org>
7473
7474         * modules/ldd: New file.
7475         * build-aux/ldd.sh.in: New file.
7476         * MODULES.html.sh (Support for building libraries and executables): Add
7477         ldd.
7478
7479 2006-01-12  Bruno Haible  <bruno@clisp.org>
7480
7481         * m4/ldd.m4: New file.
7482
7483 2006-01-12  Bruno Haible  <bruno@clisp.org>
7484
7485         * gnulib-tool (func_import, func_create_testdir): Don't go into an
7486         endless loop while replacing $auxdir with build-aux.
7487
7488 2006-01-11  Simon Josefsson  <jas@extundo.com>
7489
7490         * lib/stdint_.h (SIZE_MAX): Add missing (.
7491
7492 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
7493
7494         Sync from coreutils.
7495         * lib/md5.c: Fix commentary typos.
7496         (alignof, UNALIGNED_P): No need for a GCC-specific version.
7497         * lib/md5.h (__attribute__): Remove; unused.
7498         * lib/sha1.c: Fix commentary to match md5 better.
7499         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
7500         so that we don't need to worry about alignment.  All uses changed.
7501         This merges the 2005-10-28 md5 change into sha1.
7502
7503 2006-01-11  Jim Meyering  <jim@meyering.net>
7504
7505         Sync from coreutils.
7506         * lib/md5.c (OP): Fix spacing.
7507
7508 2006-01-11  Bruno Haible  <bruno@clisp.org>
7509
7510         Ensure automatic ordering between gl_LOCK and gl_ARGP.
7511         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
7512         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
7513
7514 2006-01-11  Bruno Haible  <bruno@clisp.org>
7515
7516         Ensure automatic ordering between gl_LOCK and gl_ARGP.
7517         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
7518         the "early" section as well.
7519
7520 2006-01-11  Bruno Haible  <bruno@clisp.org>
7521
7522         Avoid "ar: no archive members specified" error on MacOS X.
7523         * gnulib-tool (func_modules_add_dummy): New function.
7524         (func_import, func_create_testdir): Invoke it.
7525
7526 2006-01-11  Bruno Haible  <bruno@clisp.org>
7527
7528         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
7529         with $auxdir in AC_CONFIG_FILES statements.
7530
7531 2006-01-11  Bruno Haible  <bruno@clisp.org>
7532
7533         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7534         Initialize also noinst_HEADERS to empty.
7535
7536 2006-01-11  Bruno Haible  <bruno@clisp.org>
7537
7538         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
7539         variables.
7540         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
7541         autoreconf.
7542
7543 2006-01-11  Bruno Haible  <bruno@clisp.org>
7544
7545         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
7546         overridable by the user.
7547         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7548
7549 2006-01-10  Simon Josefsson  <jas@extundo.com>
7550
7551         * modules/sys_socket: New file.
7552
7553 2006-01-10  Simon Josefsson  <jas@extundo.com>
7554
7555         * m4/sys_socket_h.m4: New file.
7556
7557 2006-01-10  Simon Josefsson  <jas@extundo.com>
7558
7559         * lib/socket_.h: New file.
7560
7561 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7562
7563         * modules/readutmp (Maintainer): Add myself.
7564
7565 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7566
7567         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
7568         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
7569         People who are still concerned with buggy memcmp implementations
7570         can invoke gl_FUNC_MEMCMP themselves.
7571
7572 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7573
7574         * lib/regex_internal.h (BITSET_WORD_BITS):
7575         Work around a bug in 64-bit PGC (before version 6.1-2), where the
7576         preprocessor mishandles large unsigned values as if they were signed.
7577         Problem reported by Claudio Fontana in
7578         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
7579
7580 2006-01-10  Jim Meyering  <jim@meyering.net>
7581
7582         Avoid the double-free (first in fts_read, second in fts_close) that
7583         would occur when an `active' directory is made inaccessible (e.g.,
7584         via chmod a-x) during a traversal.
7585         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
7586         before returning.  Reproduce this failure by
7587         mkdir -p a/b; cd a; chmod a-x . b
7588         Reported by Stavros Passas.
7589
7590         Sync from coreutils.
7591         * lib/sha1.c: Tweak grammar in a comment.
7592
7593 2006-01-10  Jim Meyering  <jim@meyering.net>
7594
7595         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
7596         Patch by Joerg Sonnenberger.
7597
7598 2006-01-10  Bruno Haible  <bruno@clisp.org>
7599
7600         * modules/readutmp: Depend on module free.
7601         * modules/strtok_r: Depend on module restrict.
7602
7603 2006-01-10  Bruno Haible  <bruno@clisp.org>
7604
7605         * modules/gettext (configure.ac): Add an invocation of
7606         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
7607
7608 2006-01-10  Bruno Haible  <bruno@clisp.org>
7609
7610         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
7611         Reported by Werner Lemberg <wl@gnu.org>.
7612
7613 2006-01-10  Bruno Haible  <bruno@clisp.org>
7614
7615         * lib/localcharset.c: Update from GNU gettext.
7616
7617 2006-01-10  Bruno Haible  <bruno@clisp.org>
7618
7619         * lib/argp.h (__const): Remove macro. Use const instead.
7620         * lib/argp-fmtstream.h (__const): Likewise.
7621         * lib/glob_.h (__const): Remove macro.
7622         * lib/glob-libc.h: Use const instead of __const.
7623
7624 2006-01-10  Bruno Haible  <bruno@clisp.org>
7625
7626         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
7627         variable.
7628         Needed to avoid an automake error regarding the 'gettext' module.
7629
7630 2006-01-09  Simon Josefsson  <jas@extundo.com>
7631
7632         * modules/inet_ntop (Depends-on): Add restrict.
7633
7634 2006-01-09  Simon Josefsson  <jas@extundo.com>
7635
7636         * modules/gc-rijndael-tests (License): Put under LGPL.
7637
7638         * modules/gc-des-tests (License): Likewise.
7639
7640         * modules/gc-arcfour-tests (License): Likewise.
7641
7642         * modules/gc-arctwo-tests (License): Likewise.
7643
7644         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
7645
7646         * modules/gc-hmac-sha1-tests (Files): Likewise.
7647
7648         * modules/gc-hmac-md5-tests (License): Likewise.
7649
7650         * modules/gc-sha1-tests (License): Likewise.
7651
7652         * modules/gc-md5-tests (License): Likewise.
7653
7654         * modules/gc-md4-tests (License): Likewise.
7655
7656         * modules/gc-md2-tests (License): Likewise.
7657
7658         * modules/gc-tests (License): Likewise.
7659
7660         * modules/des-tests (License): Likewise.
7661
7662         * modules/md4-tests (License): Likewise.
7663
7664         * modules/md2-tests (License): Likewise.
7665
7666 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7667
7668         Sync from coreutils:
7669
7670         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
7671         * modules/lib-ignore: New file.
7672         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
7673         chdir-safer.m4, lchmod.m4.
7674         * modules/openat: Add mkdirat.c, openat-priv.h.
7675
7676 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7677
7678         Sync from coreutils.
7679         * m4/lib-ignore.m4: New file.
7680         * m4/lchmod.m4: New file.
7681
7682 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7683
7684         Sync from coreutils.
7685         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
7686         for write access: POSIX says that must fail.
7687         * lib/fts.c (diropen): Likewise.
7688         * lib/save-cwd.c (save_cwd): Likewise.
7689         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
7690         well, for minor improvements on hosts that lack O_DIRECTORY.
7691         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
7692         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
7693         Fall back on chown if open failed with EACCES.
7694
7695         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
7696         Report an error at compile-time if only a 1-second nominal clock
7697         resolution is found.
7698
7699         * lib/lchmod.h: New file.
7700         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
7701         (make_dir_parents): Use lchown rather than chown, and
7702         lchmod rather than chmod.
7703
7704         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
7705         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
7706         "proc" reported by n0dalus.
7707
7708         * lib/mountlist.c: Include <limits.h>.
7709         (dev_from_mount_options)
7710         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
7711         New function.  It no longer assumes "dev=" has the System V meaning
7712         on Linux (since it doesn't).  It also parses "dev=" more carefully.
7713         (read_file_system_list)
7714         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
7715         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
7716         dev= in that case.
7717
7718         * lib/posixtm.h (PDS_PRE_2000): New macro.
7719         * lib/posixtm.c (year): Arg is now syntax_bits rather than
7720         allow_century.  All usages changed.  Reject dates outside the range
7721         1969-1999 if PDS_PRE_2000 is used.
7722
7723 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7724
7725         Sync from coreutils.
7726         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
7727         (Time of day items): Mention the possibility of leap seconds.
7728         Problem reported by Dr. David Alan Gilbert.
7729
7730 2006-01-09  Jim Meyering  <jim@meyering.net>
7731
7732         Sync from coreutils.
7733
7734         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
7735
7736         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
7737
7738         * lib/modechange.c (mode_compile): Reject an invalid mode string
7739         that starts with an octal digit.  From Andreas Gruenbacher.
7740
7741         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
7742         and dup to open_safer and dup_safer, respectively.
7743         (openat_permissive): Fix typo in comment.
7744
7745         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
7746         "gettext.h"; either no longer needed or are guaranteed by openat.h.
7747         (_): Remove; no longer needed.
7748         (openat): Renamed from rpl_openat; no need for rpl_openat
7749         since openat.h renames openat for us.
7750         Replace most of the body with a call to openat_permissive,
7751         to avoid duplicate code.
7752         Port to (probably hypothetical) environments were mode_t is
7753         wider than int.
7754         (openat_permissive): Require mode arg, so that we can check
7755         types better.  Put it just after flags.  Change cwd failure
7756         indicator from pointer-to-bool to pointer-to-errno-value.
7757         All callers changed.
7758         Invoke openat_save_fail and/or openat_restore_fail if
7759         cwd_errno is null, so that openat can call us.
7760         (openat_permissive, fdopendir, fstatat, unlinkat):
7761         Simplify errno handling to avoid some duplicate code,
7762         as it's OK to set errno on success.
7763         * lib/openat.h: Revamp code so that function macros depend on
7764         __OPENAT_PREFIX only, not also on AT_FDCWD.
7765         (openat_ro): Remove.  Caller changed to use openat_permissive.
7766         (openat_permissive): Now a macro, if not a function.
7767         (openat_restore_fail, openat_save_fail): Now always functions,
7768         since mkdirat needs them even if __OPENAT_PREFIX is defined.
7769
7770         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
7771         and openat.c.
7772         * lib/mkdirat.c: Include openat-priv.h.
7773         Remove definitions of macros defined therein.
7774         * lib/openat.c: Likewise.
7775
7776         * lib/mkdirat.c (mkdirat): New file and function.
7777         * lib/openat.h (mkdirat): Declare.
7778
7779         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
7780
7781         * lib/openat.h (openat_permissive): Declare.
7782         (openat_ro): Define.
7783
7784         * lib/openat.c (EXPECTED_ERRNO): New macro.
7785         (openat_permissive): New function -- used in remove.c rewrite.
7786         (all functions): Set errno just before returning, only if there
7787         was an actual failure.
7788         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
7789
7790         Emulate openat-family functions using Linux's procfs, if possible.
7791         Idea and some code based on Ulrich Drepper's glibc changes.
7792
7793         * lib/openat.c: (BUILD_PROC_NAME): New macro.
7794         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
7795         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
7796         before falling back on save_cwd and restore_cwd.
7797         (fdopendir, fstatat, unlinkat): Likewise.
7798
7799         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
7800         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
7801
7802         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
7803         as second argument to va_arg.  Otherwise, some versions of gcc
7804         warn that `if this code is reached, the program will abort'.
7805
7806 2006-01-09  Jim Meyering  <jim@meyering.net>
7807
7808         Sync from coreutils.
7809         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
7810         Require openat-priv.h.
7811
7812 2006-01-09  Bruno Haible  <bruno@clisp.org>
7813
7814         * modules/strnlen (Include): Use strnlen.h.
7815
7816 2006-01-09  Bruno Haible  <bruno@clisp.org>
7817
7818         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
7819
7820 2006-01-09  Bruno Haible  <bruno@clisp.org>
7821
7822         * lib/sysexit_.h (EX_OK): New macro.
7823         Suggested by Martin Lambers <marlam@marlam.de>.
7824
7825 2006-01-09  Bruno Haible  <bruno@clisp.org>
7826
7827         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
7828         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
7829
7830 2006-01-09  Bruno Haible  <bruno@clisp.org>
7831
7832         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
7833         numbers.
7834
7835 2006-01-09  Bruno Haible  <bruno@clisp.org>
7836
7837         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
7838         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
7839         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
7840         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
7841
7842 2006-01-09  Bruno Haible  <bruno@clisp.org>
7843
7844         * build-aux/javacomp.sh.in: New file, moved from lib/.
7845         * modules/javacomp-script (Files): Update.
7846         (configure.ac): Add AC_CONFIG_FILES invocation.
7847         (EXTRA_DIST): Remove variable.
7848
7849         * build-aux/javaexec.sh.in: New file, moved from lib/.
7850         * modules/javaexec (Files): Update.
7851         (configure.ac): Add AC_CONFIG_FILES invocation.
7852         (EXTRA_DIST): Remove javaexec.sh.in.
7853
7854         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
7855         * modules/csharpcomp-script (Files): Update.
7856         (configure.ac): Add AC_CONFIG_FILES invocation.
7857         (EXTRA_DIST): Remove variable.
7858
7859         * build-aux/csharpexec.sh.in: New file, moved from lib/.
7860         * modules/csharpexec (Files): Update.
7861         (configure.ac): Add AC_CONFIG_FILES invocation.
7862         (EXTRA_DIST): Remove csharpexec.sh.in.
7863
7864 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7865
7866         Sync from coreutils.
7867
7868         Add POSIX ACL support
7869         * lib/acl.h (copy_acl, set_acl): Add declarations.
7870         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
7871         systems other than Linux.
7872         (chmod_or_fchmod): New function: use fchmod when possible,
7873         and chmod otherwise.
7874         (file_has_acl): Add a POSIX ACL implementation, with a
7875         Linux-specific subcase.
7876         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
7877         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
7878         acls are unsupported.
7879         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
7880         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
7881         are unsupported.
7882
7883 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7884
7885         Sync from coreutils.
7886         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
7887
7888 2006-01-07  Bruno Haible  <bruno@clisp.org>
7889
7890         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
7891         gl_EARLY.
7892
7893 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7894
7895         * lib/strftime.c (tzname): Don't declare if it is already #defined.
7896         Problem reported for Mingw by Mark Junker.
7897
7898 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7899
7900         * README: Gnulib normally doesn't generate a tarball.
7901
7902 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
7903
7904         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
7905         long int, not int, for nanosecond counts, so that people who are
7906         used to POSIX struct timespec won't be surprised.  Reported by Jim
7907         Meyering.
7908
7909 2005-12-28  Bruno Haible  <bruno@clisp.org>
7910
7911         * build-aux/config.rpath: Update from GNU gettext.
7912
7913 2005-12-16  Jim Meyering  <jim@meyering.net>
7914
7915         * modules/fprintftime: New module.
7916         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
7917
7918 2005-12-16  Jim Meyering  <jim@meyering.net>
7919
7920         * m4/fprintftime.m4: New file.
7921
7922 2005-12-16  Jim Meyering  <jim@meyering.net>
7923
7924         * lib/fprintftime.c, lib/fprintftime.h: New files.
7925
7926 2005-12-15  Simon Josefsson  <jas@extundo.com>
7927
7928         * modules/socklen (configure.ac): Fix M4 macro name, to align with
7929         new m4/socklen.m4.
7930
7931 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7932
7933         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
7934         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
7935
7936 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7937
7938         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
7939         * lib/argp-help.c (fill_in_uparams): Check if the constructed
7940         struct uparams is valid. Fall back to the default values if it is
7941         not.
7942
7943 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7944
7945         * modules/argp (Files): Add argp-pin.c
7946         (Depends-on): dirname
7947         (lib_SOURCES): Add argp-pin.c
7948
7949 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7950
7951         * m4/argp.m4:  Check if program_invocation_name and
7952         program_invocation_short_name are declared and define appropriate
7953         macros if they are not.
7954
7955 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7956
7957         * lib/argp-help.c (__argp_base_name): New function
7958         (__argp_short_program_name): Rewrite using __argp_base_name
7959         * lib/argp-namefrob.h: Define program_invocation_name and
7960         program_invocation_short_name if requested
7961         (__argp_base_name): Add prototype
7962         * lib/argp-parse.c (argp_def): Use gettext wrappers
7963         (argp_default_parser): Use __argp_base_name
7964         * lib/argp-pin.c: New file. Defines program_invocation_name and
7965         program_invocation_short_name on systems that lack them.
7966
7967 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
7968
7969         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
7970         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
7971         porting problem reported by Georg Schwarz in
7972         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
7973
7974 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
7975
7976         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
7977         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
7978         porting problem reported by Georg Schwarz in
7979         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
7980
7981 2005-12-05  Bruno Haible  <bruno@clisp.org>
7982
7983         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
7984         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
7985         Reported by Mark Junker <mjscod@gmx.de>.
7986
7987 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
7988
7989         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
7990         Use implementation from Albert Chin, with some
7991         comments/corrections by Stepan Kasal and myself.
7992
7993 2005-12-02  Bruno Haible  <bruno@clisp.org>
7994
7995         * gnulib-tool (func_import): Accept GPLed build tool modules when
7996         --lgpl is given.
7997         * modules/csharpcomp-script: New file.
7998         * modules/csharpcomp: Depend on it.
7999         * modules/javacomp-script: New file.
8000         * modules/javacomp: Depend on it.
8001         Suggested by Simon Josefsson.
8002
8003 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
8004
8005         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
8006         statement, to work around an HP-UX 10.20 compiler bug reported by
8007         Peter O'Gorman.
8008
8009 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8010
8011         * modules/savedir (Depends-on): Add openat.
8012
8013 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8014
8015         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
8016         (uintmax_t) [defined uintmax_t]: Do not declare.
8017         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
8018         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
8019         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
8020         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
8021         sake of portability to weird hosts that C allows (though we don't
8022         know of any practical examples).
8023
8024         * lib/savedir.h (fdsavedir): New decl.
8025         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
8026         contains most of the former guts of savedir.
8027         (savedir): Use savedirstream.
8028         Include "openat.h".
8029
8030 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
8031
8032         * modules/obstack (Files): Add m4/ulonglong.m4.
8033         Problem reported by Davide Angelocola.
8034
8035 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
8036
8037         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
8038         coreutils no longer futzes with rounding modes.
8039
8040 2005-11-14  Jim Meyering  <jim@meyering.net>
8041
8042         * lib/mkstemp-safer.c: Include <config.h>, required for possible
8043         replacement of mkstemp.
8044
8045 2005-11-10  Simon Josefsson  <jas@extundo.com>
8046
8047         * lib/readline.c: Remove EOL.
8048
8049 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8050
8051         * modules/gethrxtime (Depends-on): Add gettime.
8052
8053 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8054
8055         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
8056         or gettimeofday; no longer needed.
8057
8058 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8059
8060         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
8061         time business.
8062         (gethrxtime) [! (HAVE_NANOUPTIME
8063         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
8064         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
8065         our own approximation.
8066
8067 2005-11-08  Eric Blake  <ebb9@byu.net>
8068
8069         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
8070
8071 2005-11-08  Eric Blake  <ebb9@byu.net>
8072
8073         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
8074
8075 2005-11-04  Bruno Haible  <bruno@clisp.org>
8076
8077         * gnulib-tool: Implement --update mode.
8078
8079 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
8080
8081         Fix porting problem reported by Theodoros V. Kalamatianos.
8082         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
8083         Don't assume that futimes failing means we must fail.
8084
8085 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
8086
8087         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
8088         variables to suggest the intended function of the PATH_MAX check.
8089
8090 2005-10-30  Kean Johnston  <jkj@sco.com>
8091
8092         Trivial changes to support SCO systems.
8093         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
8094         as PATH_MAX.
8095         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
8096         where __ptr is null when no I/O is pending.
8097
8098 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
8099
8100         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
8101         leave errno alone.  Problem reported by Dmitry V. Levin.
8102
8103 2005-10-28  Simon Josefsson  <jas@extundo.com>
8104
8105         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
8106         Test more.
8107
8108         * tests/test-gc-md2.c, tests/test-md2.c: New files.
8109
8110         * modules/md2, modules/md2-tests: New files.
8111
8112 2005-10-28  Simon Josefsson  <jas@extundo.com>
8113
8114         * m4/inet_ntop.m4: More tests.
8115
8116         * m4/gc-md2.m4, md2.m4: New file.
8117
8118 2005-10-28  Simon Josefsson  <jas@extundo.com>
8119
8120         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
8121         "restrict" keywords, as per POSIX.  Protect the function
8122         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
8123         Don't use K&R prototypes.  Check the sprintf return values.
8124         Re-define EAFNOSUPPORT if not present.  Indent.
8125
8126         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
8127         suggested by Bruno Haible <bruno@clisp.org>.
8128
8129         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
8130
8131         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
8132
8133         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
8134         libgcrypt).
8135
8136         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
8137
8138         * lib/md2.h, lib/md2.c: New files.
8139
8140 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
8141
8142         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
8143         errno alone.  Problem reported by Frederic Jolliton.
8144
8145 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
8146
8147         * modules/verify (License): Change from GPL to LGPL.  This is a
8148         tiny module and there are apparently near-equivalents that are
8149         under the BSD license.
8150
8151 2005-10-24  Simon Josefsson  <jas@extundo.com>
8152
8153         * modules/sha1: Relicense to LGPL.
8154
8155 2005-10-24  Simon Josefsson  <jas@extundo.com>
8156
8157         * lib/md4.h: Shrink buffer size, now that we changed the type.
8158
8159 2005-10-23  Simon Josefsson  <jas@extundo.com>
8160
8161         * gnulib-tool (func_import): Fix --tests-base.
8162
8163 2005-10-22  Simon Josefsson  <jas@extundo.com>
8164
8165         * modules/arcfour (Depends-on): Need stdint.
8166
8167 2005-10-22  Simon Josefsson  <jas@extundo.com>
8168
8169         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
8170         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
8171
8172 2005-10-22  Simon Josefsson  <jas@extundo.com>
8173
8174         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
8175         suggested by Bruno Haible <bruno@clisp.org>.
8176
8177 2005-10-22  Simon Josefsson  <jas@extundo.com>
8178
8179         * lib/crc.h: Include stddef.h, for size_t.
8180
8181 2005-10-22  Simon Josefsson  <jas@extundo.com>
8182
8183         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
8184         arcfour_context struct (simplify test vector testing in GNU
8185         Shishi).
8186
8187 2005-10-21  Simon Josefsson  <jas@extundo.com>
8188
8189         * modules/des, modules/des-tests: New files.
8190
8191         * modules/gc-des, modules/gc-des-tests: New files.
8192
8193         * tests/test-des.c, tests/test-gc-des.c: New file.
8194
8195 2005-10-21  Simon Josefsson  <jas@extundo.com>
8196
8197         * modules/arctwo, modules/arctwo-tests: New files.
8198
8199         * tests/test-arctwo.c: New file.
8200
8201         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
8202
8203         * tests/test-gc-arctwo.c: New file.
8204
8205 2005-10-21  Simon Josefsson  <jas@extundo.com>
8206
8207         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
8208         Bruno Haible <bruno@clisp.org>.
8209
8210         * m4/gc-des.m4: New file.
8211
8212 2005-10-21  Simon Josefsson  <jas@extundo.com>
8213
8214         * m4/arctwo.m4: New file.
8215
8216         * m4/gc-arctwo.m4: New file.
8217
8218 2005-10-21  Simon Josefsson  <jas@extundo.com>
8219
8220         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
8221         block.
8222
8223 2005-10-21  Simon Josefsson  <jas@extundo.com>
8224
8225         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
8226         <bruno@clisp.org>.
8227
8228         * lib/hmac-sha1.c (hmac_sha1): Likewise.
8229
8230         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
8231         Bruno Haible <bruno@clisp.org>.
8232
8233         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
8234         <bruno@clisp.org>.
8235
8236 2005-10-21  Simon Josefsson  <jas@extundo.com>
8237
8238         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
8239
8240 2005-10-21  Simon Josefsson  <jas@extundo.com>
8241
8242         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
8243
8244 2005-10-21  Simon Josefsson  <jas@extundo.com>
8245
8246         * lib/des.h, lib/des.c: New files.
8247
8248         * lib/gc-gnulib.c: Support DES.c
8249
8250 2005-10-21  Simon Josefsson  <jas@extundo.com>
8251
8252         * lib/arctwo.h, lib/arctwo.c: New files.
8253
8254         * lib/gc-gnulib.c: Support ARCTWO.
8255
8256 2005-10-21  Simon Josefsson  <jas@extundo.com>
8257
8258         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
8259         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8260
8261 2005-10-21  Simon Josefsson  <jas@extundo.com>
8262
8263         * gnulib-tool (func_import, func_create_testdir): Define automake
8264         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
8265         Makefile.am snippet),
8266         suggested by Bruno Haible <bruno@clisp.org>.
8267
8268         * modules/gc (Makefile.am): Use it.
8269
8270 2005-10-21  Bruno Haible  <bruno@clisp.org>
8271
8272         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
8273         patch.
8274
8275 2005-10-19  Simon Josefsson  <jas@extundo.com>
8276
8277         * tests/test-gc-rijndael.c: New file.
8278
8279         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
8280
8281 2005-10-19  Simon Josefsson  <jas@extundo.com>
8282
8283         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
8284         interface too.
8285
8286 2005-10-19  Simon Josefsson  <jas@extundo.com>
8287
8288         * tests/test-gc-arcfour.c: New file.
8289
8290         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
8291
8292 2005-10-19  Simon Josefsson  <jas@extundo.com>
8293
8294         * modules/gc-md4, modules/gc-md4-tests: New file.
8295
8296         * tests/test-gc-md4.c: New file.
8297
8298 2005-10-19  Simon Josefsson  <jas@extundo.com>
8299
8300         * m4/gc-md4.m4: New file.
8301
8302 2005-10-19  Simon Josefsson  <jas@extundo.com>
8303
8304         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
8305         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
8306         <kasal@ucw.cz>.
8307
8308 2005-10-19  Simon Josefsson  <jas@extundo.com>
8309
8310         * m4/gc-arcfour.m4: New file.
8311
8312         * m4/gc-rijndael.m4: New file.
8313
8314 2005-10-19  Simon Josefsson  <jas@extundo.com>
8315
8316         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
8317
8318 2005-10-19  Simon Josefsson  <jas@extundo.com>
8319
8320         * lib/gc-gnulib.c: Support ARCFOUR.
8321
8322 2005-10-19  Simon Josefsson  <jas@extundo.com>
8323
8324         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
8325         support.
8326
8327         * lib/gc.h: Add ECB enum type.
8328
8329         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
8330
8331 2005-10-18  Simon Josefsson  <jas@extundo.com>
8332
8333         * tests/test-md5.c: New file.
8334
8335         * modules/md5-tests: New file.
8336
8337 2005-10-18  Simon Josefsson  <jas@extundo.com>
8338
8339         * tests/test-md4.c: New file.
8340
8341         * modules/md4, modules/md4-tests: New files.
8342
8343 2005-10-18  Simon Josefsson  <jas@extundo.com>
8344
8345         * m4/md4.m4: New file.
8346
8347 2005-10-18  Simon Josefsson  <jas@extundo.com>
8348
8349         * lib/md4.h, lib/md4.c: New files, based on md5.?.
8350
8351 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
8352
8353         * gnulib-tool (func_create_testdir): Omit the second check whether
8354         BUILT_SOURCES in nonempty.
8355
8356 2005-10-17  Simon Josefsson  <jas@extundo.com>
8357
8358         * tests/test-rijndael.c: New file.
8359
8360 2005-10-17  Simon Josefsson  <jas@extundo.com>
8361
8362         * modules/sha1: Depend on stdint instead of md5.
8363
8364         * modules/md5: Depend on stdint, remove uint32_t.
8365
8366 2005-10-17  Simon Josefsson  <jas@extundo.com>
8367
8368         * modules/gc-sha1-tests: New file.
8369
8370         * tests/test-gc-sha1.c: New file.
8371
8372 2005-10-17  Simon Josefsson  <jas@extundo.com>
8373
8374         * m4/md5.m4: Remove call to uint32_t.m4.
8375
8376 2005-10-17  Simon Josefsson  <jas@extundo.com>
8377
8378         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
8379
8380         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
8381         md5.h.
8382
8383         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
8384
8385         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
8386
8387 2005-10-17  Simon Josefsson  <jas@extundo.com>
8388
8389         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
8390
8391 2005-10-17  Simon Josefsson  <jas@extundo.com>
8392
8393         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
8394
8395 2005-10-17  Simon Josefsson  <jas@extundo.com>
8396
8397         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
8398
8399         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
8400
8401 2005-10-17  Bruno Haible  <bruno@clisp.org>
8402
8403         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
8404         that it can also be used in a test.
8405
8406 2005-10-16  Bruno Haible  <bruno@clisp.org>
8407
8408         * gnulib-tool (func_emit_tests_Makefile_am): Also define
8409         TESTS_ENVIRONMENT, so that individual tests can augment it.
8410
8411         * gnulib-tool (func_create_testdir): Use an intermediate target for
8412         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
8413         macros, like $(ALLOCA_H), which cannot be passed through the command
8414         line.
8415
8416 2005-10-15  Simon Josefsson  <jas@extundo.com>
8417
8418         * modules/rijndael-tests: New file.
8419
8420         * modules/rijndael: New file.
8421
8422 2005-10-15  Simon Josefsson  <jas@extundo.com>
8423
8424         * m4/rijndael.m4: New file.
8425
8426 2005-10-15  Simon Josefsson  <jas@extundo.com>
8427
8428         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
8429
8430         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
8431
8432 2005-10-14  Simon Josefsson  <jas@extundo.com>
8433
8434         * tests/test-arcfour.c: New file.
8435
8436         * modules/arcfour, modules/arcfour-tests: New files.
8437
8438 2005-10-14  Simon Josefsson  <jas@extundo.com>
8439
8440         * m4/arcfour.m4: New file.
8441
8442 2005-10-14  Simon Josefsson  <jas@extundo.com>
8443
8444         * lib/arcfour.h, lib/arcfour.c: New files.
8445
8446 2005-10-14  Roland McGrath  <roland@redhat.com>
8447
8448         Import from libc.  [BZ #1331]
8449         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
8450         macro argument.
8451         Reported by Matej Vela <vela@debian.org>.
8452
8453 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
8454
8455         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
8456         include <wchar.h>; no longer needed.
8457
8458 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
8459
8460         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
8461
8462 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
8463         and  Ulrich Drepper  <drepper@redhat.com>
8464
8465         Import from libc.
8466         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
8467         instead of inline stream orientation test and two separate
8468         function calls.  Pay no attention to USE_IN_LIBIO.
8469
8470 2005-10-13  Simon Josefsson  <jas@extundo.com>
8471
8472         * modules/gc-hmac-md5-tests: New file.
8473
8474         * tests/test-gc-hmac-sha1.c: New file.
8475
8476         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
8477
8478         * modules/gc-hmac-md5-tests: New file.
8479
8480         * tests/test-gc-md5.c: New file.
8481
8482         * modules/gc-md5-tests: New file.
8483
8484 2005-10-13  Simon Josefsson  <jas@extundo.com>
8485
8486         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
8487         Move memory allocation outside of loop.
8488
8489 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
8490
8491         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
8492         intermediate directory is in a read-only file system.  Problem
8493         reported by Eric Blake.
8494
8495 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
8496
8497         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
8498
8499 2005-10-12  Simon Josefsson  <jas@extundo.com>
8500
8501         * tests/test-hmac-sha1.c: New file.
8502
8503         * modules/hmac-sha1-tests: New file.
8504
8505         * modules/hmac-sha1: New file.
8506
8507 2005-10-12  Simon Josefsson  <jas@extundo.com>
8508
8509         * modules/gc-sha1: New file.
8510
8511 2005-10-12  Simon Josefsson  <jas@extundo.com>
8512
8513         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
8514
8515         * tests/test-gc-pbkdf2-sha1.c: New file.
8516
8517 2005-10-12  Simon Josefsson  <jas@extundo.com>
8518
8519         * modules/gc-md5, modules/gc-hmac-md5: New files.
8520
8521         * modules/gc (Files): Remove md5, memxor and hmac files.
8522
8523 2005-10-12  Simon Josefsson  <jas@extundo.com>
8524
8525         * m4/gc-pbkdf2-sha1.m4: New file.
8526
8527         * m4/gc-hmac-sha1.m4: New file.
8528
8529         * m4/gc-sha1: New file.
8530
8531         * m4/hmac-sha1.m4: New file.
8532
8533 2005-10-12  Simon Josefsson  <jas@extundo.com>
8534
8535         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
8536
8537         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
8538
8539 2005-10-12  Simon Josefsson  <jas@extundo.com>
8540
8541         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
8542         suggested by Bruno Haible <bruno@clisp.org>.
8543
8544 2005-10-12  Simon Josefsson  <jas@extundo.com>
8545
8546         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
8547
8548 2005-10-12  Simon Josefsson  <jas@extundo.com>
8549
8550         * lib/gc-pbkdf2-sha1.c: New file.
8551
8552         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
8553
8554 2005-10-12  Simon Josefsson  <jas@extundo.com>
8555
8556         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
8557
8558         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
8559
8560 2005-10-12  Simon Josefsson  <jas@extundo.com>
8561
8562         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
8563         GC_USE_HMAC_MD5, respectively.
8564
8565         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
8566         (gc_md5): Fix typo.
8567
8568         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
8569
8570         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
8571
8572         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
8573
8574 2005-10-12  Bruno Haible  <bruno@clisp.org>
8575
8576         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
8577         Reported by Stepan Kasal <kasal@ucw.cz>.
8578
8579 2005-10-11  Simon Josefsson  <jas@extundo.com>
8580
8581         * tests/test-crc.c: New file.
8582
8583         * modules/crc, modules/crc-tests: New files.
8584
8585 2005-10-11  Simon Josefsson  <jas@extundo.com>
8586
8587         * m4/crc.m4: New file.
8588
8589 2005-10-11  Simon Josefsson  <jas@extundo.com>
8590
8591         * lib/gc.h: Add gc_hash and gc_hash_buffer.
8592
8593         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
8594
8595         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
8596
8597 2005-10-11  Simon Josefsson  <jas@extundo.com>
8598
8599         * lib/crc.h, lib/crc.c: New files.
8600
8601         * lib/gc.h (gc_hash_buffer): Add doc.
8602
8603 2005-10-11  Bruno Haible  <bruno@clisp.org>
8604
8605         * modules/c-strcasestr: New file.
8606         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
8607
8608 2005-10-11  Bruno Haible  <bruno@clisp.org>
8609
8610         * modules/c-strcase: New file.
8611         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
8612
8613 2005-10-11  Bruno Haible  <bruno@clisp.org>
8614
8615         * lib/strcasecmp.c: Include limits.h.
8616         (strcasecmp): Avoid integer overflow on exotic platforms.
8617         * lib/strncasecmp.c: Include limits.h.
8618         (strncasecmp): Avoid integer overflow on exotic platforms.
8619         Reported by Paul Eggert.
8620
8621 2005-10-11  Bruno Haible  <bruno@clisp.org>
8622
8623         * lib/c-strcasestr.h: New file, from GNU gettext.
8624         * lib/c-strcasestr.c: New file, from GNU gettext.
8625
8626 2005-10-11  Bruno Haible  <bruno@clisp.org>
8627
8628         * lib/c-strcase.h: New file, from GNU gettext.
8629         * lib/c-strcasecmp.c: New file, from GNU gettext.
8630         * lib/c-strncasecmp.c: New file, from GNU gettext.
8631
8632 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
8633
8634         * modules/mempcpy (License): GPL -> LGPL.
8635         * modules/strchrnul (License): Likewise.
8636         * modules/sysexits (License): Likewise.
8637
8638 2005-10-08  Simon Josefsson  <jas@extundo.com>
8639
8640         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
8641
8642 2005-10-07  Simon Josefsson  <jas@extundo.com>
8643
8644         * m4/memxor.m4: Remove gl_C_RESTRICT call.
8645
8646 2005-10-06  Simon Josefsson  <jas@extundo.com>
8647
8648         * tests/test-hmac-md5.c: New file.
8649
8650         * modules/hmac-md5-tests: New file.
8651
8652         * modules/hmac-md5: New file.
8653
8654 2005-10-06  Simon Josefsson  <jas@extundo.com>
8655
8656         * m4/hmac-md5.m4: New file.
8657
8658         * m4/memxor.m4: Require gl_C_RESTRICT.
8659
8660 2005-10-06  Simon Josefsson  <jas@extundo.com>
8661
8662         * lib/memxor.c (memxor): Avoid casts and warnings.
8663
8664 2005-10-06  Simon Josefsson  <jas@extundo.com>
8665
8666         * lib/hmac-md5.c: New file.
8667
8668         * lib/hmac.h: New file.
8669
8670 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
8671
8672         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
8673         promotes to int, not unsigned int, to catch the AIX 5.3
8674         compiler bug.
8675
8676 2005-10-05  Simon Josefsson  <jas@extundo.com>
8677
8678         * modules/memxor: New file.
8679
8680         * modules/iconv (Files): Move config.rpath to havelib, it is used
8681         there.
8682
8683         * modules/havelib (Files): Add config.rpath.
8684
8685 2005-10-05  Simon Josefsson  <jas@extundo.com>
8686
8687         * m4/memxor.m4: New file.
8688
8689 2005-10-05  Simon Josefsson  <jas@extundo.com>
8690
8691         * lib/memxor.c (memxor): Fix compiler error.
8692
8693         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
8694         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
8695
8696         * lib/memxor.h, lib/memxor.c: New files.
8697
8698         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
8699         we assume all systems have it, suggested by Jim Meyering
8700         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
8701         any systems lack sys/socket.h; mingw32 is known to lack it, but we
8702         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
8703         same reasons.
8704
8705 2005-10-05  Simon Josefsson  <jas@extundo.com>
8706
8707         * config/srclist.txt: Add glibc bug 1423 for md5.h.
8708
8709 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
8710
8711         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
8712         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
8713         needed, since the source code now assumes these .h files.
8714
8715 2005-10-05  Derek Price  <derek@ximbiot.com>
8716
8717         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
8718
8719 2005-10-05  Bruno Haible  <bruno@clisp.org>
8720
8721         * modules/stdint (License): Change to LGPL.
8722
8723 2005-10-04  Simon Josefsson  <jas@extundo.com>
8724
8725         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
8726         D. Baushke" <mdb@gnu.org>.
8727
8728 2005-10-04  Bruno Haible  <bruno@clisp.org>
8729
8730         * lib/verify.h (verify_true): Provide alternative definition for C++.
8731
8732 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
8733
8734         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
8735         (SSIZE_MAX): New macro, if not already defined.
8736         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
8737         than 2 GiB.
8738
8739 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8740
8741         Sync from coreutils.
8742         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
8743         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
8744         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
8745         ULLONG_MAX doesn't work with 2.7.2.1.
8746
8747 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8748
8749         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
8750         From Ben Pfaff.
8751
8752         * modules/exclude (Depends-on): Depend on verify.
8753         * modules/strtoimax (Depends-on): Likewise.
8754         * modules/utimecmp (Depends-on): Likewise.
8755
8756 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8757
8758         * lib/exclude.c: Include verify.h.
8759         (verify): Remove.  All callers changed to use verify.h's version.
8760         * lib/strtoimax.c: Likewise.
8761         * lib/utimecmp.c: Likewis.e
8762
8763         Sync from coreutils.
8764         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
8765         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
8766         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
8767         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
8768         bother returning ENOSYS if settimeofday or stime fails; just let
8769         them return whatever errno they want to return.
8770         * lib/utimens.c: Include unistd.h, for dup2.
8771         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
8772         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
8773
8774 2005-10-02  Jim Meyering  <jim@meyering.net>
8775
8776         Sync from coreutils.
8777         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
8778         from glibc-2.2.5 that fails for read-only files.
8779
8780 2005-10-02  Jim Meyering  <jim@meyering.net>
8781
8782         Sync from coreutils.
8783         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
8784         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
8785         `#if HAVE_CONFIG_H'.
8786         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
8787         Remove AT_FDCWD test.
8788         Do not consume the fd unless successful.
8789         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
8790         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
8791         block, so that we don't even try to compile it if settimeofday is
8792         available.  This works around a compilation failure on OSF1 V5.1,
8793         due to stime requiring a `long int*' while tv_sec is `int'.
8794
8795 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
8796
8797         Sync from coreutils.
8798         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
8799         against `yes', rather than just testing for nonempty.
8800
8801 2005-10-01  Simon Josefsson  <jas@extundo.com>
8802
8803         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
8804         and Darwin.
8805
8806         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
8807         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
8808         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
8809         freeaddrinfo and gai_strerror are declared by the POSIX headers.
8810         Check if struct addrinfo is declared.
8811
8812 2005-10-01  Simon Josefsson  <jas@extundo.com>
8813
8814         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
8815         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
8816         AI_* and EAI_* definitions.  Protect function declarations.
8817
8818 2005-10-01  Jim Meyering  <jim@meyering.net>
8819
8820         Sync from coreutils.
8821
8822         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
8823         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
8824         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
8825         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8826         in the inet and nsl libraries.  Required on Solaris 5.7.
8827
8828 2005-10-01  Jim Meyering  <jim@meyering.net>
8829
8830         Sync from coreutils.
8831         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8832         in the inet and nsl libraries.  Required on Solaris 5.7.
8833
8834 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
8835
8836         * lib/getdelim.c (getdelim): Remove unused variables.
8837
8838 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
8839
8840         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
8841         so that the code works even with ancient cpp.  Portability problem
8842         with GCC 2.7.2.1 reported by Thomas M.Ott.
8843
8844 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
8845
8846         * modules/regex (Depends-on): Add strcase.
8847
8848         * modules/gethostname (Licence): Change from GPL to LGPL, since
8849         gethostname.c is a trivial implementation of a standard library
8850         function.
8851         * modules/poll (License): Change from GPL to LGPL, since it's
8852         derived from LGPL code.
8853
8854 2005-09-27  Jim Meyering  <jim@meyering.net>
8855
8856         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
8857         HAVE_CONFIG_H.
8858
8859         * lib/intprops.h (signed_type_or_expr__): Define.
8860         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
8861         for unsigned types.
8862
8863 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
8864
8865         * lib/verify.h (verify_expr): Remove, replacing with:
8866         (verify_true): New macro that returns true instead of void.
8867         (verify_type__): Remove.
8868         (verify): Use verify_true rather than verify_type__.
8869
8870 2005-09-26  Bruno Haible  <bruno@clisp.org>
8871
8872         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
8873         is necessary.
8874         (lib_SOURCES): Remove mbchar.c.
8875         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
8876         (Files): Add m4/mbrtowc.m4.
8877         * modules/mbiter: Likewise.
8878         * modules/mbuiter: Likewise.
8879
8880 2005-09-26  Bruno Haible  <bruno@clisp.org>
8881
8882         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
8883         compile mbchar.c if they are not both present.
8884         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
8885         * m4/mbiter.m4 (gl_MBITER): Likewise.
8886         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
8887         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
8888         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
8889
8890 2005-09-25  Jim Meyering  <jim@meyering.net>
8891
8892         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
8893         also uses socklen_t.
8894
8895 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
8896
8897         * lib/utimens.c (ENOSYS): Define if not already defined.
8898         (futimens): Support having a null PATH if the file descriptor
8899         is nonnegative.
8900
8901         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
8902         Remove.
8903         (__attribute): Define to empty unless GCC 3.1 or later.
8904         This works around a core dump on OpenBSD 3.4, which has GCC
8905         2.95.3, which dumps core when given __attribute__(()).  It also
8906         simplifies other tests, since we really don't want to bother with
8907         worrying about which ancient version of GCC supported what.
8908         Original problem reported by Yoann Vandoorselaere, with part of
8909         the fix suggested by Derek Price.
8910
8911 2005-09-24  Jim Meyering  <jim@meyering.net>
8912
8913         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
8914         so we can once again use a positive bitfield width of 1 -- now we
8915         don't have to explain why we were using a bitfield width of 2.
8916
8917 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8918
8919         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
8920         and similarly for the other external symbols.  Problem reported
8921         by James Gallager.
8922
8923         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
8924         bug reported by Jim Meyering.
8925
8926         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
8927         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
8928         not needed, since socklen is a prerequisite module.
8929
8930 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8931
8932         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
8933         Problem reported by Eric Blake.
8934         (getaddrinfo): Initialize se so that it's not garbage.
8935         Redo internal storage allocation so that it doesn't make unportable
8936         assumptions about alignment.
8937         Fix a memory leak.
8938
8939         * lib/utimens.c (futimens): Use futimesat if available.
8940         Prefer it to futimes since it doesn't have the futimes bug.
8941
8942         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
8943         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
8944         Instead, declare a function that returns a pointer to an array,
8945         and use verify_type__ to declare the size of the array.
8946         Problem and germ of a solution reported by Bruno Haible.
8947         (verify_type__): Use 2, not 1, for bitfield size, to avoid
8948         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
8949
8950 2005-09-23  Jim Meyering  <jim@meyering.net>
8951
8952         Sync from coreutils.
8953         Correct build failure (socklen_t not defined) on at least
8954         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
8955         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
8956
8957 2005-09-23  Jim Meyering  <jim@meyering.net>
8958
8959         * modules/getaddrinfo (Depends-on): Add socklen.
8960
8961 2005-09-23  Bruno Haible  <bruno@clisp.org>
8962
8963         * tests/test-verify.c: New file.
8964
8965 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8966
8967         Sync from coreutils.
8968
8969         * modules/argmatch (Depends-on): Add verify.
8970         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
8971         unistd-safer.
8972         * modules/save-cwd (Depends-on): Likewise.
8973
8974         * modules/openat (Files): Add lib/openat-die.c.
8975         (Depends-on): Remove error, exitfail.
8976         Add dirname.
8977
8978         * modules/verify: New file.
8979         * MODULES.html.sh (Diagnostics <assert.h>): New section,
8980         with "verify" module.
8981
8982 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8983
8984         Sync from coreutils.
8985
8986         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
8987         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
8988         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
8989         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
8990         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
8991         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
8992         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
8993         Don't bother checking for string.h, stdlib.h, unistd.h.
8994         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
8995         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
8996         module's job.
8997         * m4/jm-macros.m4 (gl_MACROS): Likewise.
8998         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
8999
9000         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
9001         (gl_GETDATE): Use it.
9002
9003         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
9004
9005 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9006
9007         Sync from coreutils.
9008
9009         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
9010         stat-time.h.
9011         * lib/argmatch.h: Include verify.h
9012         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
9013         (ARGMATCH_ASSERT): Remove; unused.
9014         * lib/canonicalize.c: Assume STDC_HEADERS.
9015         * lib/exclude.c: Include "strcase.h".
9016         * lib/regex_internal.h [!defined _LIBC]: Likewise.
9017         * lib/getusershell.c: Include stdio--.h rather than stdio.h
9018         and stdio-safer.h.
9019         (getusershell): Call fopen, not fopen_safer.
9020         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
9021         Do not include unistd-safer.h.
9022         (save_cwd): Don't call fd_safer; no longer needed
9023         now that we include fcntl--.h.
9024
9025         * lib/getdate.y (relative_time): New type.
9026         (RELATIVE_TIME_0): New constant.
9027         (parser_control): Use relative_time instead of doing it ourselves.
9028         (%union): Add new relative_time rel member.
9029         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
9030         Now typeless.
9031         (relunit, relunit_snumber): Now of type rel.
9032         (zone, rel, relunit, get_date): Adjust to above changes.
9033
9034         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
9035         Do not include unistd-safer.h.
9036         (getloadavg): Don't call fd_safer; no longer needed
9037         now that we include fcntl--.h.
9038
9039         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
9040         (make_dir_parents): Treat ENOSYS like EEXIST.
9041
9042         Improve quality of diagnostics on restore_cwd failure.
9043         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
9044         (make_dir_parents): Last arg is now int * (for errno), not bool *.
9045         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
9046         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
9047         each time through the loop.  Do not diagnose restore_cwd failure;
9048         that is the caller's job (and perhaps the caller does not care).
9049
9050         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
9051         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
9052         If the file already exists but is not a directory, don't bother
9053         to try to make its parents.
9054         Close potential file descriptor leak if we can't chdir("/") (!).
9055         Don't always return true if chdir($PWD) fails; return true only
9056         if the requested action was done successfully (except for the
9057         chdir($PWD)).
9058         Don't log final directory unless we actually made it.
9059         Refactor to avoid duplicate code to fix up permissions.
9060         Don't attempt to fix up parent permissions if chdir($PWD) fails.
9061
9062         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
9063         to make it a bit faster and (I hope) clearer.
9064         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
9065         Fix bug in formats like %2N.
9066
9067         * lib/verify.h: New file.
9068
9069 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9070
9071         Sync from coreutils.
9072         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
9073
9074 2005-09-22  Jim Meyering  <jim@meyering.net>
9075
9076         Sync from coreutils.
9077
9078         * m4/lstat.m4 (gl_FUNC_LSTAT):
9079         Use AC_LIBSOURCES to require lstat.c and lstat.h.
9080         Remove obsolete comment.
9081         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
9082         * m4/xstrtod.m4: Likewise.
9083
9084         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
9085
9086 2005-09-22  Jim Meyering  <jim@meyering.net>
9087
9088         Sync from coreutils.
9089
9090         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
9091
9092         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
9093         the .tm_year member, since otherwise gcc-4.0 would now warn about
9094         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
9095
9096         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
9097         order to avoid an unsuppressible warning from gcc on 64-bit systems.
9098
9099         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
9100         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
9101         when run in a time zone for which daylight savings time is in effect
9102         for the starting date.
9103
9104         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
9105         stop us from restricting permissions of just-created absolute-named
9106         directories.
9107         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
9108         to restore initial working directory.
9109         * lib/mkdir-p.c (make_dir_parents): New parameter:
9110         different_working_dir, to tell caller if/when we change the working
9111         directory and are unable to return to the initial one.
9112         * lib/mkdir-p.h (make_dir_parents): Update prototype.
9113         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
9114         `return false'.  This fixes a bug introduced on 2004-07-30.
9115
9116         * lib/openat.c (fdopendir): Be sure to close the supplied
9117         file descriptor before returning.  This makes our replacement
9118         implementation a little closer to Solaris's, where fdopendir
9119         ties the file descriptor to the returned DIR* pointer.
9120         * lib/openat.c (unlinkat): New function.
9121         * lib/openat.h (unlinkat): Add prototype.
9122         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
9123         (openat_restore_fail): Rename from openat_restore_die.
9124         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
9125
9126         Provide an alternative to exiting immediately upon save_cwd or
9127         restore_cwd failure.  Now, an application can arrange e.g.,
9128         to perform a longjump in that case.
9129         * lib/openat.c: Include dirname.h.
9130         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
9131         (rpl_openat, fdopendir, fstatat): Call openat_save_die
9132         and openat_restore_die rather than calling error directly.
9133         Don't include "error.h" or "exitfail.h"; they're no longer needed.
9134
9135         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
9136         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
9137         define.
9138
9139         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
9140         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
9141                             int utc, int nanoseconds);
9142         Background:
9143         date should not have to allocate a megabyte of virtual memory to
9144         handle a format argument like +%1048575T.  When implemented with
9145         strftime, it must allocate such a buffer, use strftime to fill it
9146         in, print it, then free it.
9147         With fprintftime, it simply prints everything and exits.
9148         With no need for memory allocation, that's one fewer way to fail.
9149         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
9150         optional field width, not before, so we accept %9:z, not %:9z.
9151         (my_strftime): Be sure to use L_('x') for literals.
9152
9153         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
9154         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
9155         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
9156         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
9157         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
9158         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
9159         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
9160         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
9161         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
9162         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
9163         * lib/xgethostname.c, lib/xreadlink.c:
9164         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
9165
9166         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
9167         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
9168         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
9169         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
9170         and don't include <sys/file.h>).
9171
9172 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
9173
9174         Sync from coreutils.
9175
9176         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
9177         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
9178         [!LDAV_DONE]: Avoid unused variable warning.
9179
9180 2005-09-21  Bruno Haible  <bruno@clisp.org>
9181
9182         * lib/unicodeio.h (unicode_to_mb): New declaration.
9183
9184 2005-09-20  Derek Price  <derek@ximbiot.com>
9185
9186         * lib/getaddrinfo.c: Don't include <netdb.h> included from
9187         getaddrinfo.h.
9188
9189 2005-09-20  Bruno Haible  <bruno@clisp.org>
9190
9191         * gnulib-tool: Remove trailing slashes from the values specified for
9192         --source-base, --m4-base, --tests-base, --aux-dir.
9193         Suggested by Simon Josefsson <jas@extundo.com>.
9194
9195 2005-09-20  Bruno Haible  <bruno@clisp.org>
9196
9197         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
9198         func_modules_to_filelist, func_import, func_create_testdir): Make all
9199         sorting results locale-independent, so that gnulib-cache.m4 doesn't
9200         change when gnulib-tool is invoked in a different locale.
9201
9202 2005-09-19  Simon Josefsson  <jas@extundo.com>
9203
9204         * m4/socklen.m4: Fix typo.
9205
9206 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9207
9208         Use a consistent style for including <config.h>.
9209         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
9210         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
9211         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
9212         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
9213         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
9214         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
9215         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
9216         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
9217         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
9218         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
9219         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
9220         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
9221         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
9222         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
9223         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
9224         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
9225         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
9226         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
9227         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
9228         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
9229         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
9230         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
9231         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
9232         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
9233         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
9234         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
9235         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
9236         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
9237         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
9238         lib/xstrtoumax.c, lib/yesno.c:
9239         Standardize inclusion of config.h.
9240         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
9241         lib/inttostr.h:  Removed inclusion of config.h from header files.
9242         * lib/inttostr.c:  Adjusted in-tree users.
9243         * lib/timespec.h: Remove superfluous warning to include config.h.
9244         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
9245         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
9246         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
9247         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
9248         config.h with HAVE_CONFIG_H.
9249
9250 2005-09-19  Jim Meyering  <jim@meyering.net>
9251
9252         * modules/pathmax (License): Change to LGPL.
9253
9254 2005-09-19  Derek Price  <derek@ximbiot.com>
9255
9256         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
9257
9258 2005-09-19  Bruno Haible  <bruno@clisp.org>
9259
9260         * gnulib-tool (import): Provide default for --tests-base.
9261
9262 2005-09-19  Bruno Haible  <bruno@clisp.org>
9263
9264         * doc/quote.texi: New file, extracted from gnulib.texi.
9265         * doc/ctime.texi: New file, extracted from gnulib.texi.
9266         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
9267         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
9268         * doc/gnulib.texi: Include them.
9269
9270 2005-09-18  Bruno Haible  <bruno@clisp.org>
9271
9272         Portability fix.
9273         * gnulib-tool (func_readlink): New function.
9274         (func_ln_if_changed): Use it.
9275
9276 2005-09-18  Bruno Haible  <bruno@clisp.org>
9277
9278         * gnulib-tool: Support --with-tests also with --import.
9279         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
9280         (func_import): Use variables $testsbase and $inctests. Emit a
9281         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
9282         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
9283         SUBDIRS += $testsdir.
9284         (func_create_testdir): Update.
9285
9286 2005-09-18  Bruno Haible  <bruno@clisp.org>
9287
9288         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
9289         instead of $dry_run.
9290         (func_cp_if_changed, func_mv_if_changed): Remove functions.
9291         (func_ln_if_changed): Don't handle dry-run here.
9292         (func_import): In dry-run mode, detect more precisely which actions
9293         would be performed, and don't use "...ing" verbs.
9294
9295 2005-09-18  Bruno Haible  <bruno@clisp.org>
9296
9297         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
9298         (func_import): Use join on two temporary files instead of three nested
9299         loops, in order to determine which files are new or old.
9300
9301 2005-09-18  Bruno Haible  <bruno@clisp.org>
9302
9303         * gnulib-tool (func_import): Comment out code that spits out the
9304         new files with --dry-run.
9305
9306 2005-09-18  Bruno Haible  <bruno@clisp.org>
9307
9308         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
9309
9310 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9311
9312         * lib/stat-time.h: New file.
9313         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
9314         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
9315         in a different way.
9316         (timespec_cmp): New function.
9317         * lib/utimecmp.c: Include stat-time.h.
9318         (SYSCALL_RESOLUTION): Depend on whether various struct stat
9319         members exist, not on the obsolescent ST_MTIM_NSEC.
9320         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
9321
9322 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9323
9324         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
9325
9326 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9327
9328         * MODULES.html.sh (File system functions): Add stat-time.
9329         * modules/stat-time: New file.
9330         * modules/timespec (Files): Remove m4/st_mtim.m4; this
9331         is now done in a different way, by the stat-time module.
9332         * modules/utimecmp (Depends-on): Add stat-time.
9333
9334 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
9335
9336         * m4/st_mtim.m4: Remove.  Superseded by...
9337         * m4/stat-time.m4: New file.
9338         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
9339         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
9340
9341 2005-09-15  Derek Price  <derek@ximbiot.com>
9342
9343         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
9344
9345 2005-09-15  Derek Price  <derek@ximbiot.com>
9346
9347         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
9348         * lib/regex_internal.c: Ditto, using this...
9349         (__GNUC_PREREQ): ...new macro.
9350         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
9351         using...
9352         (__GNUC_PREREQ): ...this new macro.
9353
9354         * lib/strstr.h: Include string.h. Define strstr as a macro here.
9355
9356 2005-09-15  Derek Price  <derek@ximbiot.com>
9357             Paul Eggert  <eggert@cs.ucla.edu>
9358
9359         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
9360         changes, consolidating in...
9361         * lib/regex_internal.h: ...this file.
9362
9363 2005-09-13  Jim Meyering  <jim@meyering.net>
9364
9365         * lib/canon-host.c: Filter through gnu indent and reword comments
9366         slightly.
9367         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
9368
9369 2005-09-13  Derek Price  <derek@ximbiot.com>
9370
9371         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
9372         failure.
9373         Reported by Jim Meyering  <jim@meyering.net>.
9374
9375 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9376
9377         * lib/base64.c: Typo.
9378         (base64_encode): Put b64str in initialized data section.
9379
9380 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
9381
9382         Merge glibc and coreutils changes into gnulib, plus a few
9383         extra fixes.
9384         * lib/md5.c: Use #error rather than a string.
9385         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
9386         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
9387         (__attribute__): Define to empty for non recent-GCC.
9388         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
9389         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
9390         Renamed from their non-__ counterparts, with new macros replacing
9391         them if not _LIBC.  Add __THROW attribute.
9392         (rol): Remove.
9393         (struct md5_ctx): Align buffer if using GCC.
9394         * lib/sha1.h (struct sha1_ctx): Likewise.
9395         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
9396         The old name was backwards.
9397         (NOTSWAP): Remove; not used.
9398         (rol): New macro, moved here from md5.h.
9399         (sha1_process_block): Remove a FIXME that doesn't make sense.
9400
9401 2005-09-12  Derek Price  <derek@ximbiot.com>
9402
9403         Return usable errors from canon-host.
9404         * lib/canon-host.h: New file.
9405         * lib/canon-host.c (canon_host): Wrap...
9406         (canon_host_r): ...this new function, which now relies exclusively on
9407         getaddrinfo.
9408         (ch_strerror): New function.
9409         (last_cherror): New global.
9410         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
9411         interface.
9412         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
9413         void *.
9414         (freeaddrinfo): Free ai->ai_canonname when set.
9415
9416 2005-09-12  Derek Price  <derek@ximbiot.com>
9417
9418         Make canon-host require getaddrinfo.
9419         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
9420         AC_LIBSOURCE canon-host.h.  Call...
9421         (gl_PREREQ_CANON_HOST): ...this new function, which requires
9422         gl_GETADDRINFO.
9423         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
9424
9425 2005-09-12  Derek Price  <derek@ximbiot.com>
9426
9427         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
9428         LGPL.
9429         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
9430
9431 2005-09-12  Derek Price  <derek@ximbiot.com>
9432
9433         * lib/gai_strerror.c: Include config.h when available.  Include
9434         getaddrinfo.h before other headers to test interface.
9435         Reported by Larry Jones <lawrence.jones@ugs.com>.
9436
9437 2005-09-12  Derek Price  <derek@ximbiot.com>
9438             Paul Eggert  <eggert@cs.ucla.edu>
9439
9440         * modules/glob (Files): Add glob-libc.h.
9441
9442 2005-09-12  Derek Price  <derek@ximbiot.com>
9443             Paul Eggert  <eggert@cs.ucla.edu>
9444
9445         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
9446         glob_.h, glob-libc.h.
9447         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
9448
9449 2005-09-12  Derek Price  <derek@ximbiot.com>
9450             Paul Eggert  <eggert@cs.ucla.edu>
9451
9452         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
9453         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
9454         protecting things that should be done only in gnulib contexts.
9455         * lib/glob_.h: New file, containing only the glob things needed for
9456         gnulib.
9457         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
9458         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
9459         (glob, globfree, glob_pattern_p): Now defined simply in terms of
9460         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
9461         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
9462         and to respect the namespace rules better.
9463
9464 2005-09-08  Simon Josefsson  <jas@extundo.com>
9465
9466         * modules/socklen: New file.
9467
9468 2005-09-08  Simon Josefsson  <jas@extundo.com>
9469
9470         * m4/socklen.m4: New file.
9471
9472 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9473
9474         * modules/utimens (Files): Add m4/utimbuf.m4, since
9475         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
9476         Reported by Sergey Poznyakoff.
9477
9478 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9479
9480         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
9481         definitions, since that's the preferred style in glibc.
9482         Fix a minor spacing issue, and update copyright notice to match
9483         glibc's.
9484
9485 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9486
9487         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
9488
9489 2005-09-06  Simon Josefsson  <jas@extundo.com>
9490
9491         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
9492         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
9493
9494 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9495
9496         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
9497         warning.
9498
9499 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9500
9501         * config/srclist.txt: Add glibc bug 1302.
9502
9503 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
9504
9505         Change bitset word type from unsigned int to unsigned long int,
9506         as this has better performance on typical 64-bit hosts.
9507         Port bitset code to hosts with unusual word sizes.
9508         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
9509         (build_collating_symbol):
9510         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
9511         argument is a bitset.  This is merely a style issue, but it makes
9512         it clearer that an entire array is expected.
9513         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
9514         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
9515         Port to the case where bitset_word is not the same as unsigned int.
9516         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
9517         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
9518         Likewise.
9519         * lib/regexec.c (check_dst_limits_calc_pos_1,
9520         check_subexp_matching_top):
9521         (build_trtable, group_nodes_into_DFAstates):
9522         Likewise.
9523         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
9524         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
9525         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
9526         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
9527         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
9528         * lib/regcomp.c (optimize_subexps, lower_subexp):
9529         Work even if bitset_word has holes in its bitwise representation.
9530         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
9531         * lib/regexec.c (check_dst_limits_calc_pos_1,
9532         check_subexp_matching_top):
9533         Likewise.
9534         * lib/regex_internal.c (re_string_reconstruct):
9535         Don't assume UCHAR_MAX == 255.
9536         * lib/regex_internal.h (bitset_set_all): Likewise.
9537         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
9538         All uses changed.
9539         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
9540         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
9541         All uses changed.
9542         (BITSET_WORD_MAX): New macro.
9543         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
9544         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
9545         (bitset_empty, bitset_copy):
9546         Prefer sizeof (bitset) to multiplying it out ourselves.
9547         (bitset_not_merge): Remove; unused.
9548         (bitset_contain): Return bool, not unsigned int with one bit on.
9549         All callers changed.
9550         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
9551         alignment than re_node_set; do this by defining a new internal
9552         type struct dests_alloc and using it to allocate memory.
9553
9554 2005-09-05  Bruno Haible  <bruno@clisp.org>
9555
9556         * gnulib-tool (func_import): Fix comparison in handling of symbolic
9557         links.
9558
9559 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
9560
9561         * modules/size_max (Makefile.am): Add size_max.h
9562
9563 2005-09-04  Derek Price  <derek@ximbiot.com>
9564
9565         * gnulib-tool (func_import): Fix reversed $symbolic logic.
9566
9567 2005-09-03  Simon Josefsson  <jas@extundo.com>
9568
9569         * gnulib-tool: Fix typo.
9570
9571 2005-09-03  Simon Josefsson  <jas@extundo.com>
9572
9573         * config/srclist.txt: Add glibc bug 1293.
9574
9575 2005-09-03  Derek Price  <derek@ximbiot.com>
9576
9577         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
9578         From Larry Jones <lawrence.jones@ugs.com>.
9579
9580 2005-09-02  Simon Josefsson  <jas@extundo.com>
9581
9582         * modules/socklen: New file.
9583
9584 2005-09-02  Simon Josefsson  <jas@extundo.com>
9585
9586         * modules/havelib: New module.
9587
9588         * modules/gettext, modules/iconv, modules/lock, modules/readline:
9589         Use havelib.
9590
9591 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
9592
9593         Check for arithmetic overflow when calculating sizes, to prevent
9594         some buffer-overflow issues.  These patches are conservative, in the
9595         sense that when I couldn't determine whether an overflow was possible,
9596         I inserted a run-time check.
9597         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
9598         macros.
9599         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
9600         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
9601         (re_xnrealloc, re_x2nrealloc): New inline functions.
9602         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
9603         parse_bracket_exp):
9604         (build_equiv_class, build_charclass): Check for arithmetic overflow
9605         in size expression calculations.
9606         * lib/regex_internal.c (re_string_realloc_buffers):
9607         (build_wcs_upper_buffer, re_node_set_add_intersect):
9608         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
9609         (re_dfa_add_node, register_state): Likewise.
9610         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
9611         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
9612         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
9613         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
9614
9615 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
9616
9617         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
9618         m4/ulonglong.m4.  Problem reported by Martin Lambers.
9619
9620 2005-09-02  Bruno Haible  <bruno@clisp.org>
9621
9622         Support for lib vs. lib64 distinction on biarch platforms.
9623         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
9624         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
9625         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
9626
9627 2005-09-02  Bruno Haible  <bruno@clisp.org>
9628
9629         * gnulib-tool (import): In the other first-use case, provide defaults
9630         as well.
9631
9632 2005-09-02  Bruno Haible  <bruno@clisp.org>
9633
9634         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
9635         patches not yet found in the latest gettext release.
9636
9637 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9638
9639         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
9640         to avoid a collision with bits/local_lim.h in glibc.
9641         All uses changed.  Problem reported by Dmitry V. Levin in
9642         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
9643
9644         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
9645         bugs in int versus size_t comparisons.
9646         (re_string_context_at): Fix bug where the code assumed that
9647         Idx is signed.
9648
9649         Use bool where appropriate.
9650         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
9651         All callers changed.
9652         (calc_eclosure_iter): Likewise, for ROOT arg.
9653         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
9654         (build_charclass_op): Likewise, for NON_MATCH arg.
9655         * lib/regex_internal.c (re_string_allocate, re_string_construct):
9656         (re_string_construct_common): Likewise, for ICASE arg.
9657         * lib/regexec.c (re_search_2_stub, re_search_stub):
9658         Likewise, for RET_LEN arg.
9659         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
9660         (set_regs): Likewise, for FL_BACKTRACK arg.
9661         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
9662         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
9663         (calc_eclosure_iter, parse_bracket_exp):
9664         Use bool for internal variables that are booleans.
9665         * lib/regexec.c (re_search_internal, check_matching,
9666         proceed_next_node):
9667         (set_regs, build_sifted_states, sift_states_bkref):
9668         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
9669         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
9670         (find_collation_sequence_value):
9671         Likewise.
9672         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
9673         (re_node_set_compare):
9674         Return bool, not int. All callers changed.
9675         * lib/regexec.c (check_halt_node_context, check_dst_limits):
9676         (build_trtable, check_node_accept): Likewise.
9677         * lib/regex_internal.h: Include stdbool.h.
9678
9679         Fix bugs uncovered when converting to bool.
9680         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
9681         failure instead of charging ahead blindly.
9682         * lib/regex_internal.c (register_state): Likewise.
9683         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
9684         for freeing internal storage.
9685         (group_nodes_into_DFA_states): Use unsigned int, not int, for
9686         bitset pieces used as boolean, to avoid undefined behavior
9687         on hosts that do int overflow checking.
9688
9689 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9690
9691         * config/srclist.txt: Add glibc bugs 1285-1287.
9692
9693 2005-09-01  Jim Meyering  <jim@meyering.net>
9694
9695         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
9696         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
9697         Require gl_STAT_MACROS, too.
9698
9699 2005-09-01  Bruno Haible  <bruno@clisp.org>
9700
9701         * gnulib-tool (import): In the first-use case, provide defaults.
9702
9703 2005-09-01  Bruno Haible  <bruno@clisp.org>
9704
9705         * gnulib-tool (func_import): Remove the .tmp files.
9706
9707 2005-09-01  Bruno Haible  <bruno@clisp.org>
9708
9709         * gnulib-tool (func_import): Fix handling of symbolic links.
9710
9711 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9712
9713         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
9714         old glibc regex code mishandles strings longer than 2**31 bytes.
9715         This patch fixes this when the regex code is used in gnulib
9716         (i.e., outside glibc).
9717
9718         This patch should not affect the use of the regex code inside
9719         glibc.  No doubt this problem also needs to be handled for glibc
9720         as well, but the result will be an incompatible change to the
9721         glibc ABI, and the old ABI will have to be supported too.  That
9722         can be the the subject for another patch.
9723
9724         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
9725         governing whether the rest of this patch is active.  By default,
9726         the macro is disabled and the patch has no effect.
9727         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
9728         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
9729         (struct re_pattern_buffer, re_search, re_search_2, re_match):
9730         (re_match_2, re_set_registers): Use the new types.
9731         * lib/regex_internal.h (Idx, re_hashval_t): New types.
9732         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
9733         New macros.
9734         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
9735         (re_string_context_at, bin_tree_t, re_dfastate_t):
9736         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
9737         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
9738         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
9739         (re_string_char_size_at, re_string_wchar_at):
9740         (re_string_elem_size_at):
9741         Use the new types and macros to port to 64-bit hosts.
9742         Use unsigned types for internal values, so that the code
9743         mostly works even for arrays larger than SSIZE_MAX.
9744         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
9745         (search_duplicated_node, calc_eclosure_iter, fetch_number):
9746         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
9747         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
9748         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
9749         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
9750         (calc_inveclosure, parse_dup_op, build_range_exp):
9751         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
9752         (fetch_number, create_token_tree, mark_opt_subexp):
9753         Likewise.
9754         * lib/regex_internal.c (re_string_construct_common,
9755         create_ci_newstate):
9756         (create_cd_newstate, re_string_allocate, re_string_construct):
9757         (re_string_realloc_buffers, build_wcs_upper_buffer):
9758         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
9759         (re_string_reconstruct, re_string_peek_byte_case):
9760         (re_string_fetch_byte_case, re_string_context_at):
9761         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
9762         (re_node_set_init_copy, re_node_set_add_intersect):
9763         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
9764         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
9765         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
9766         (re_acquire_state, re_acquire_state_context, register_state):
9767         Likewise.
9768         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
9769         search_cur_bkref_entry):
9770         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
9771         (re_search_internal, re_search_2_stub, re_search_stub)
9772         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
9773         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
9774         (update_cur_sifted_state, check_dst_limits):
9775         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
9776         (check_subexp_limits, sift_states_bkref, merge_state_array):
9777         (check_subexp_matching_top, get_subexp, get_subexp_sub):
9778         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
9779         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
9780         (expand_bkref_cache, check_node_accept_bytes):
9781         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
9782         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
9783         (acquire_init_state_context, check_halt_node_context):
9784         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
9785         (sift_states_backward, clean_state_log_if_needed):
9786         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
9787         (find_recover_state, transit_state_sb, transit_state_mb):
9788         (transit_state_bkref, build_trtable, match_ctx_clean):
9789         Likewise.
9790         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
9791         to work around an assumption that REG_MISSING is negative.
9792
9793         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
9794         (seek_collating_symbol_entry) [defined _LIBC]:
9795         (lookup_collation_sequence_value) [defined _LIBC]:
9796         (build_range_exp, build_collating_symbol) [defined _LIBC]:
9797         Use prototypes rather than old-style function definitions.
9798         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
9799         (transit_state_sb) [0]:
9800         (find_collation_sequence_value) [defined _LIBC]: Likewise.
9801
9802         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
9803         rm_eo.
9804
9805         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
9806         (optimize_subexps, lower_subexp):
9807         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
9808         since the signed shift might overflow.  Use 1u<<31 instead.
9809         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
9810         Likewise.
9811         * lib/regexec.c (check_dst_limits_calc_pos_1,
9812         check_subexp_matching_top): Likewise.
9813
9814         * lib/regcomp.c (optimize_subexps, lower_subexp):
9815         Use CHAR_BIT rather than 8, for clarity.
9816         * lib/regexec.c (check_dst_limits_calc_pos_1):
9817         (check_subexp_matching_top): Likewise.
9818         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
9819         have to worry about portability issues when shifting it left.
9820         Remove no-longer-needed test for table_size > 0.
9821         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
9822         in a word, as the resulting behavior is undefined.
9823         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
9824         in one case, a <= should have been an <, and in another case the
9825         whole test was missing.
9826         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
9827         the standard name CHAR_BIT.
9828         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
9829         this is not true on one's complement and signed-magnitude hosts.
9830
9831         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
9832         next_last_offset.
9833         (struct re_dfa_t): Remove unused member states_alloc.
9834         * lib/regcomp.c (init_dfa): Don't initialize unused members.
9835
9836 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9837
9838         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
9839         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
9840         and large-file glibc and in 32-bit large-file Solaris.
9841
9842 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9843
9844         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
9845         lengths fit in regoff_t; this isn't true if regoff_t is the same
9846         width as size_t.
9847         * lib/regex.c (re_search_internal): 5th arg is LAST_START
9848         (= START + RANGE) instead of RANGE.  This avoids overflow
9849         problems when regoff_t is the same width as size_t.
9850         All callers changed.
9851         (re_search_2_stub): Check for overflow when adding the
9852         sizes of the two strings.
9853         (re_search_stub): Check for overflow when adding START
9854         to RANGE; if it occurs, substitute the extreme value.
9855
9856 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9857
9858         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
9859
9860 2005-08-31  Jim Meyering  <jim@meyering.net>
9861
9862         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
9863         a pointer-to-const.
9864         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
9865         (register_state): Likewise.
9866         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
9867         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
9868         (group_nodes_into_DFAstates): Likewise.
9869
9870 2005-08-31  Jim Meyering  <jim@meyering.net>
9871
9872         * check-module: Add a FIXME comment.
9873
9874 2005-08-31  Eric Blake  <ebb9@byu.net>
9875
9876         * modules/unistd-safer (Files): Add unistd--.h.
9877         * modules/stdio-safer (Files): Add stdio--.h.
9878
9879 2005-08-31  Derek Price  <derek@ximbiot.com>
9880
9881         * lib/getdelim.c (getdelim): Return EOF on EOF.
9882         Reported by Larry Jones <lawrence.jones@ugs.com>.
9883
9884 2005-08-31  Bruno Haible  <bruno@clisp.org>
9885
9886         Avoid unnecessary diffs in the generated lib/Makefile.am.
9887         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
9888         the generated files.
9889         (func_import): Don't set cmd.
9890
9891 2005-08-31  Bruno Haible  <bruno@clisp.org>
9892
9893         * lib/strstr.c: Include <stddef.h>, for NULL.
9894         * lib/strcasestr.c: Likewise.
9895         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
9896
9897 2005-08-31  Bruno Haible  <bruno@clisp.org>
9898
9899         * gnulib-tool: New option --macro-prefix.
9900         (func_import): Use macro_prefix.
9901         (import): Handle option --macro-prefix.
9902
9903 2005-08-31  Bruno Haible  <bruno@clisp.org>
9904
9905         * gnulib-tool (import): Rename most ac_* variables to cached_*.
9906         Also use new variables cached_lgpl, cached_libtool.
9907
9908 2005-08-31  Bruno Haible  <bruno@clisp.org>
9909
9910         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
9911         always instantiating them.
9912
9913 2005-08-31  Bruno Haible  <bruno@clisp.org>
9914
9915         * gnulib-tool (func_import): Read the previous cached settings
9916         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
9917         earlier added by gnulib but are now dropped. Warn when a gnulib file
9918         overwrites a non-gnulib file.
9919
9920 2005-08-31  Bruno Haible  <bruno@clisp.org>
9921
9922         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
9923         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
9924         projects that don't keep autogenerated files in CVS. Put into
9925         actioncmd only the specified modules, not the transitive closure.
9926
9927 2005-08-31  Bruno Haible  <bruno@clisp.org>
9928
9929         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
9930         Create directories that shall be filled.
9931         (import): Don't look for gl_* macros in configure.ac. Recurse across
9932         all directories containing a gnulib-cache.m4 files, if meaningful.
9933
9934 2005-08-31  Bruno Haible  <bruno@clisp.org>
9935
9936         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
9937         (import): Set seen_libtool when we see gl_LIBTOOL.
9938
9939 2005-08-31  Bruno Haible  <bruno@clisp.org>
9940
9941         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
9942         declaration macro definitions from generated gnulib.m4.
9943
9944 2005-08-30  "Oskar Liljeblad"  <oskar@osk.mine.nu>
9945
9946         * lib/iconvme.h: Add prototype for iconv_alloc.
9947
9948 2005-08-29  Simon Josefsson  <jas@extundo.com>
9949
9950         * lib/iconvme.c: Fix errno.
9951
9952 2005-08-29  Bruno Haible  <bruno@clisp.org>
9953
9954         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
9955         that it works when the directory contains spaces.
9956
9957 2005-08-29  Bruno Haible  <bruno@clisp.org>
9958
9959         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
9960
9961 2005-08-29  Bruno Haible  <bruno@clisp.org>
9962
9963         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
9964         Emit more advice.
9965
9966 2005-08-29  Bruno Haible  <bruno@clisp.org>
9967         and Stepan Kasal  <kasal@ucw.cz>
9968
9969         * check-module: If more parameters are given, check each of them
9970         separately; add more exceptions, as noted by Jim Meyering.
9971         (check_module): New procedure.
9972         (%exempt_header): Now contains all exceptions.
9973
9974 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
9975
9976         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
9977
9978 2005-08-29  "Oskar Liljeblad"  <oskar@osk.mine.nu>
9979
9980         * lib/iconvme.c: Split iconv_string into iconv_alloc.
9981
9982 2005-08-28  Bruno Haible  <bruno@clisp.org>
9983
9984         * m4/gnulib-tool.m4: New file.
9985
9986 2005-08-27  Jim Meyering  <jim@meyering.net>
9987
9988         * modules/unistd-safer (Files): Add pipe-safer.c.
9989         * modules/fcntl-safer (Files): Add creat-safer.c.
9990
9991 2005-08-27  Jim Meyering  <jim@meyering.net>
9992
9993         * m4/stdlib-safer.m4: New file.  From coreutils.
9994         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
9995         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
9996         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
9997         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
9998         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
9999
10000 2005-08-27  Jim Meyering  <jim@meyering.net>
10001
10002         * lib/fopen-safer.c: Merge minor changes from coreutils.
10003         * lib/dup-safer.c: Likewise.
10004         * lib/fd-safer.c: Likewise.
10005
10006         Merge from coreutils.
10007         * lib/stdio--.h: New file.
10008         * lib/stdlib--.h: New file.
10009         * lib/mkstemp-safer.c: New file.
10010
10011         GNU tar needs these.
10012         * lib/pipe-safer.c: New file.
10013         * lib/creat-safer.c: New file.
10014         * lib/fcntl--.h (creat): Define to creat_safer.
10015         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
10016         * lib/unistd--.h (pipe): Define to pipe_safer.
10017         * lib/unistd-safer.h: Declare pipe_safer.
10018
10019 2005-08-26  Simon Josefsson  <jas@extundo.com>
10020
10021         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
10022         Haible <bruno@clisp.org>.
10023
10024 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
10025
10026         * lib/regex_internal.h: Remove all references to
10027         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
10028         or better.
10029         (bitset_not, bitset_merge, bitset_not_merge):
10030         (bitset_mask, re_string_allocate, re_string_construct):
10031         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
10032         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
10033         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
10034         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
10035         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10036         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10037         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
10038         (re_acquire_state_context):
10039         Remove unnecessary forward decls.
10040         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
10041         Put __attribute at function definition,
10042         now that the function decl has been removed.
10043         * lib/regex_internal.c (re_string_peek_byte_case):
10044         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
10045         Likewise.
10046
10047 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
10048
10049         * m4/regex.m4: Add AC_PREREQ(2.50).
10050         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
10051
10052 2005-08-25  Simon Josefsson  <jas@extundo.com>
10053
10054         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
10055         __fsetlocking.
10056
10057 2005-08-25  Simon Josefsson  <jas@extundo.com>
10058
10059         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
10060         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
10061         GLIBC specific code.
10062
10063 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10064
10065         Make regex safe for g++.  This fixes one real bug (an "err"
10066         that should have been "*err").  g++ problem reported by
10067         Sam Steingold.
10068         * lib/regex_internal.h (re_calloc): New macro, consistent with
10069         re_malloc etc.  All callers of calloc changed to use re_calloc.
10070         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
10071         not int.  All callers changed.
10072         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
10073         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
10074         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
10075         (find_recover_state): Change "err" to "*err"; this fixes what
10076         appears to be a real bug.
10077         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
10078         versus int.
10079
10080 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10081
10082         * modules/regex (Depends-on): Add malloc, since the code
10083         assumes that !malloc(0) means failure.
10084
10085 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10086
10087         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
10088
10089         alloca modernization/simplification for regex.
10090         * lib/regex.c: Remove portability cruft for alloca.  This no longer
10091         needs to be at the start of the file, and can be moved into
10092         regex_internal.h and simplified.
10093         * lib/regex_internal.h: Include <alloca.h>.
10094         (__libc_use_alloca) [!defined _LIBC]: New macro.
10095         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
10096         now works outside glibc.
10097
10098 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10099
10100         * config/srclist.txt: Add glibc bugs 1241, 1245.
10101
10102 2005-08-25  Jim Meyering  <jim@meyering.net>
10103
10104         * lib/open-safer.c: Include <config.h>.
10105         Otherwise, we'd lose LARGEFILE support in any file using
10106         e.g. "fcntl--.h"
10107
10108 2005-08-25  Bruno Haible  <bruno@clisp.org>
10109
10110         * m4/minmax.m4: Require autoconf 2.52.
10111         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
10112         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
10113         alternatives of translit over the alphabet.
10114         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
10115
10116 2005-08-24  Simon Josefsson  <jas@extundo.com>
10117
10118         * tests/test-getpass.c: New file.
10119
10120 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10121
10122         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
10123         for GNU regex features.
10124
10125 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10126
10127         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
10128         * lib/regex.h (regerror): Likewise.
10129
10130         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
10131         requires this.  (The code never needed it.)
10132
10133         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
10134         All uses of recently-renamed identifiers changed to use the new,
10135         POSIX-compliant names.  The code will build and run just fine
10136         without these changes, but it's better to eat our own dog food
10137         and use the standard-conforming names.
10138
10139         * lib/regex.h: Fix a multitude of POSIX name space violations.
10140         These changes have an effect only for programs that define
10141         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
10142         do not change anything for programs compiled in the normal way.
10143         Also, there is no effect on the ABI.
10144
10145         (_REGEX_SOURCE): New macro.
10146         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
10147         defined and _GNU_SOURCE is not; this fixes a name space violation.
10148
10149         Rename the following macros to obey POSIX requirements.
10150         The old names are still visible as macros if _REGEX_SOURCE is defined.
10151         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
10152         RE_BACKSLASH_ESCAPE_IN_LISTS.
10153         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
10154         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
10155         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
10156         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
10157         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
10158         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
10159         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
10160         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
10161         (REG_INTERVALS): renamed from RE_INTERVALS.
10162         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
10163         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
10164         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
10165         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
10166         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
10167         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
10168         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
10169         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
10170         RE_UNMATCHED_RIGHT_PAREN_ORD.
10171         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
10172         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
10173         (REG_DEBUG): renamed from RE_DEBUG.
10174         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
10175         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
10176         unusual, since we can't clash with the POSIX REG_ICASE.
10177         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
10178         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
10179         (REG_NO_SUB): renamed from RE_NO_SUB.
10180         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
10181         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
10182         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
10183         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
10184         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
10185         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
10186         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
10187         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
10188         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
10189         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
10190         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
10191         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
10192         RE_SYNTAX_POSIX_MINIMAL_BASIC.
10193         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
10194         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
10195         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
10196         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
10197         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
10198         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
10199         (REG_FIXED): Renamed from REGS_FIXED.
10200         (REG_NREGS): Renamed from RE_NREGS.
10201
10202         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
10203         of other REG_* macros, since POSIX says the user is allowed to
10204         #undef these macros selectively.
10205
10206         (reg_errcode_t): Update comment stating what other tables need
10207         to be consistent.
10208
10209         Rename the following enum values to obey POSIX requirements.
10210         The old names are still visible as macros.
10211         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
10212         is not defined, since GNU is supposed to be a superset of POSIX as
10213         much as possible, and since we want reg_errcode_t to be a signed
10214         type for implementation consistency.
10215         (_REG_NOERROR): Renamed from REG_NOERROR.
10216         (_REG_NOMATCH): Renamed from REG_NOMATCH.
10217         (_REG_BADPAT): Renamed from REG_BADPAT.
10218         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
10219         (_REG_ECTYPE): Renamed from REG_ECTYPE.
10220         (_REG_EESCAPE): Renamed from REG_EESCAPE.
10221         (_REG_ESUBREG): Renamed from REG_ESUBREG.
10222         (_REG_EBRACK): Renamed from REG_EBRACK.
10223         (_REG_EPAREN): Renamed from REG_EPAREN.
10224         (_REG_EBRACE): Renamed from REG_EBRACE.
10225         (_REG_BADBR): Renamed from REG_BADBR.
10226         (_REG_ERANGE): Renamed from REG_ERANGE.
10227         (_REG_ESPACE): Renamed from REG_ESPACE.
10228         (_REG_BADRPT): Renamed from REG_BADRPT.
10229         (_REG_EEND): Renamed from REG_EEND.
10230         (_REG_ESIZE): Renamed from REG_ESIZE.
10231         (_REG_ERPAREN): Renamed from REG_ERPAREN.
10232         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
10233         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
10234         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
10235         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
10236
10237         (_REG_RE_NAME, _REG_RM_NAME): New macros.
10238         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
10239         changed.  But support the old name if the new one is not defined
10240         and if _REGEX_SOURCE.
10241
10242         Change the following member names in struct re_pattern_buffer.
10243         The old names are still supported if !_REGEX_SOURCE.
10244         The new names are always supported, regardless of _REGEX_SOURCE.
10245         (re_buffer): Renamed from buffer.
10246         (re_allocated): Renamed from allocated.
10247         (re_used): Renamed from used.
10248         (re_syntax): Renamed from syntax.
10249         (re_fastmap): Renamed from fastmap.
10250         (re_translate): Renamed from translate.
10251         (re_can_be_null): Renamed from can_be_null.
10252         (re_regs_allocated): Renamed from regs_allocated.
10253         (re_fastmap_accurate): Renamed from fastmap_accurate.
10254         (re_no_sub): Renamed from no_sub.
10255         (re_not_bol): Renamed from not_bol.
10256         (re_not_eol): Renamed from not_eol.
10257         (re_newline_anchor): Renamed from newline_anchor.
10258
10259         Change the following member names in struct re_registers.
10260         The old names are still supported if !_REGEX_SOURCE.
10261         The new names are always supported, regardless of _REGEX_SOURCE.
10262         (rm_num_regs): Renamed from num_regs.
10263         (rm_start): Renamed from start.
10264         (rm_end): Renamed from end.
10265
10266         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
10267         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
10268         Prepend __ to parameter names.
10269
10270         Undo yesterday's changes.
10271
10272 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10273
10274         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
10275         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
10276         lib/regex.c.
10277
10278 2005-08-24  Jim Meyering  <jim@meyering.net>
10279
10280         Sync from coreutils.
10281         * m4/fcntl-safer.m4: New file.
10282
10283         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
10284         and object files for this module.
10285
10286 2005-08-24  Jim Meyering  <jim@meyering.net>
10287
10288         Sync from coreutils.
10289         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
10290
10291 2005-08-24  Jim Meyering  <jim@meyering.net>
10292
10293         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
10294         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
10295
10296 2005-08-24  Jim Meyering  <jim@meyering.net>
10297
10298         * modules/fcntl-safer: New module.
10299         * modules/fts (Depends-on): Add fcntl-safer.
10300         * MODULES.html.sh (File descriptor based Input/Output):
10301         Add fcntl-safer.
10302
10303 2005-08-24  Bruno Haible  <bruno@clisp.org>
10304
10305         Support for unit test modules.
10306         * modules/README: Mention tests modules.
10307         * modules/TEMPLATE-TESTS: New file.
10308         * gnulib-tool: New options --extract-tests-module, --with-tests and
10309         --tests-base (unused for the moment).
10310         (testsbase, inctests): New variables.
10311         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
10312         (func_verify_module): Exclude TEMPLATE-TESTS.
10313         (func_verify_nontests_module, func_verify_tests_module): New functions.
10314         (func_get_dependencies): Add implicit dependency for tests modules.
10315         (func_get_tests_module): New function.
10316         (func_modules_transitive_closure): When --with-tests was specified,
10317         include the unit tests as well, unless explicitly avoided.
10318         (func_emit_lib_Makefile_am): Ignore the tests modules here.
10319         (func_emit_tests_Makefile_am): New function.
10320         (func_create_testdir): When --with-tests was specified, emit a
10321         tests/ directory.
10322         * MODULES.html.sh (Future developments): Update.
10323
10324 2005-08-24  Bruno Haible  <bruno@clisp.org>
10325
10326         * modules/tls-tests: New file.
10327         * tests/test-tls.c: New file, from GNU gettext.
10328
10329 2005-08-24  Bruno Haible  <bruno@clisp.org>
10330
10331         * modules/lock-tests: New file.
10332         * tests/test-lock.c: New file, from GNU gettext.
10333
10334 2005-08-24  Bruno Haible  <bruno@clisp.org>
10335
10336         * lib/lock.h: Add multiple inclusion guard.
10337         * lib/tls.h: Add multiple inclusion guard.
10338
10339 2005-08-24  Bruno Haible  <bruno@clisp.org>
10340
10341         * gnulib-tool: Add support for the --aux-dir option to
10342         --create-testdir, --create-megatestdir, --test, --megatest.
10343         (func_create_testdir, func_create_megatestdir): Optionally emit a
10344         AC_CONFIG_AUX_DIR directive.
10345         (create-testdir, create-megatestdir, test, megatest): Provide a
10346         default value for $auxdir.
10347
10348 2005-08-24  Bruno Haible  <bruno@clisp.org>
10349
10350         * gnulib-tool (import): Use compound statement instead of subshell
10351         where possible.
10352
10353 2005-08-24  Bruno Haible  <bruno@clisp.org>
10354
10355         * gnulib-tool (import): Change --aux-dir default to "build-aux".
10356
10357 2005-08-24  Bruno Haible  <bruno@clisp.org>
10358
10359         * gnulib-tool (func_version): Update.
10360
10361 2005-08-24  Bruno Haible  <bruno@clisp.org>
10362
10363         * gnulib-tool (func_import, func_create_testdir,
10364         func_create_megatestdir): Quote all autoconf macro arguments.
10365
10366 2005-08-24  Bruno Haible  <bruno@clisp.org>
10367
10368         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
10369         option --force, because --force causes the aclocal.m4 of each
10370         subdirectory to be newer than the corresponding config.h.in.
10371
10372 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10373
10374         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
10375         All contents moved to gl_REGEX.
10376         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
10377         assume that it does.
10378
10379 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10380
10381         * lib/regex.h (REG_NOSYS)
10382         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
10383         Define, since POSIX requires it as of 2001.
10384         (_REG_ENOSYS)
10385         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
10386         New private symbol, used to keep the enum signed in all cases.
10387         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
10388         Youngman in
10389         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
10390
10391         * lib/regex_internal.c (re_string_skip_chars, register_state):
10392         (calc_state_hash):
10393         Remove forward decls; no longer needed now that we use prototypes.
10394         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
10395         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
10396         (clean_state_log_if_needed): Likewise.
10397
10398 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10399
10400         * config/srclist.txt: Add glibc bugs 1231-1233.
10401
10402 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10403
10404         Fix problems reported by Sam Steingold in
10405         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
10406         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
10407         assumed that reg_errcode_t is a signed type, which is not
10408         necessarily true if _XOPEN_SOURCE is not defined.
10409         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
10410         since some compilers warn about it otherwise.
10411
10412 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10413
10414         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
10415         (init_word_char, create_initial_state, duplicate_node_closure):
10416         (fetch_token, peek_token_bracket, build_range_exp):
10417         (build_collating_symbol): Remove forward decls; no longer needed
10418         now that we use prototypes.
10419
10420         * lib/regcomp.c:
10421         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
10422         (re_compile_fastmap_iter, regcomp, regerror, regfree):
10423         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
10424         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
10425         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
10426         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
10427         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
10428         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
10429         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
10430         (build_range_exp, build_collating_symbol, parse_bracket_exp):
10431         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
10432         (build_charclass, build_charclass_op, fetch_number, create_tree):
10433         (create_token_tree, mark_opt_subexp, duplicate_tree):
10434         Use prototypes rather than old-style definitions.
10435
10436         * lib/regex_internal.c:
10437         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
10438         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
10439         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
10440         (re_string_reconstruct, re_string_peek_byte_case):
10441         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
10442         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
10443         (re_node_set_init_copy, re_node_set_add_intersect):
10444         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10445         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10446         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
10447         (re_acquire_state, re_acquire_state_context, register_state):
10448         (create_ci_newstate, create_cd_newstate, free_state):
10449         Likewise.
10450         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
10451         re_search_2):
10452         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
10453         (re_search_internal, prune_impossible_nodes):
10454         (acquire_init_state_context, check_matching, static):
10455         (check_halt_node_context, check_halt_state_context, proceed_next_node):
10456         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
10457         (update_regs, sift_states_backward, build_sifted_states):
10458         (clean_state_log_if_needed, merge_state_array):
10459         (update_cur_sifted_state, add_epsilon_src_nodes):
10460         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
10461         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
10462         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
10463         (find_recover_state, check_subexp_matching_top, transit_state_mb):
10464         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
10465         (check_arrival, check_arrival_add_next_nodes):
10466         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
10467         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
10468         (check_node_accept_bytes, check_node_accept, extend_buffers):
10469         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
10470         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
10471         (sift_ctx_init):
10472         Likewise.
10473
10474         * lib/regex_internal.h:
10475         (re_string_allocate, re_string_construct, re_string_reconstruct):
10476         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
10477         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
10478         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
10479         (re_string_context_at, re_string_peek_byte_case):
10480         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
10481         is defined, since we now use prototypes always.
10482
10483         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
10484         C89 or better.  All uses removed.
10485
10486 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10487
10488         * config/srclist.txt: Add glibc bugs 1220-1227.
10489
10490 2005-08-20  Jim Meyering  <jim@meyering.net>
10491
10492         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
10493         of unused local, dfa.
10494
10495 2005-08-20  Bruno Haible  <bruno@clisp.org>
10496
10497         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
10498
10499 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10500
10501         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
10502         (re_node_set_insert_last, re_dfa_add_node):
10503         Rename local variables to avoid GCC shadowing warnings.
10504
10505 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10506
10507         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
10508         [defined lint]: Suppress bogus uninitialized-variable warnings.
10509
10510         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
10511         and let the caller return REG_ESPACE if out of space.  This
10512         removes an uninitialied-variable warning with GCC 4.0.1, and also
10513         avoids taking the address of a local variable.  All callers
10514         changed.
10515
10516 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10517
10518         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
10519         $LIBCSRC/posix/regexec.c.
10520         Add glibc bug 1217 for regcomp.c.
10521
10522 2005-08-19  Jim Meyering  <jim@meyering.net>
10523
10524         * lib/regexec.c (proceed_next_node): Redo local variables to
10525         avoid GCC shadowing warnings.
10526
10527 2005-08-18  Bruno Haible  <bruno@clisp.org>
10528
10529         * lib/strstr.c (strstr): Fix return value in multibyte case.
10530         * lib/strcasestr.c (strcasestr): Likewise.
10531
10532 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
10533
10534         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
10535
10536 2005-08-17  Jim Meyering  <jim@meyering.net>
10537
10538         Make the %s format (seconds since the epoch) work for a negative
10539         number and when used with a zero-padded field width, e.g. %015s.
10540
10541         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
10542         label so that it precedes the code to set `digits'.  Otherwise,
10543         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
10544         print `00-22'.  Now, it prints `-0022', as it should.
10545
10546 2005-08-17  Bruno Haible  <bruno@clisp.org>
10547
10548         * modules/strstr (Files): Add m4/mbrtowc.m4.
10549         (Depends-on): Add mbuiter.
10550
10551 2005-08-17  Bruno Haible  <bruno@clisp.org>
10552
10553         * modules/strcasestr: New file.
10554         * MODULES.html.sh (String handling, based on ANSI C 89): Add
10555         strcasestr.
10556
10557 2005-08-17  Bruno Haible  <bruno@clisp.org>
10558
10559         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
10560
10561 2005-08-17  Bruno Haible  <bruno@clisp.org>
10562
10563         * modules/mbuiter: New file.
10564         * MODULES.html.sh (Extended multibyte and wide character utilities):
10565         Add mbuiter.
10566
10567 2005-08-17  Bruno Haible  <bruno@clisp.org>
10568
10569         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
10570         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
10571
10572 2005-08-17  Bruno Haible  <bruno@clisp.org>
10573
10574         * m4/strcasestr.m4: New file.
10575
10576 2005-08-17  Bruno Haible  <bruno@clisp.org>
10577
10578         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
10579         * lib/strstr.c: Completely rewritten, with multibyte locale support.
10580
10581 2005-08-17  Bruno Haible  <bruno@clisp.org>
10582
10583         * lib/strcasestr.h: New file.
10584         * lib/strcasestr.c: New file.
10585
10586 2005-08-17  Bruno Haible  <bruno@clisp.org>
10587
10588         * lib/strcasecmp.c: Use mbuiter.h.
10589
10590 2005-08-17  Bruno Haible  <bruno@clisp.org>
10591
10592         * lib/mbuiter.h: New file.
10593
10594 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
10595
10596         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
10597         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
10598         and gl_GETOPT are both invoked via different paths (as happens
10599         with GNU tar CVS because it uses both argp and getopt), the former
10600         wins.
10601
10602 2005-08-16  Bruno Haible  <bruno@clisp.org>
10603
10604         * modules/tls: New file.
10605         * MODULES.html.sh (Multithreading): Add tls.
10606
10607 2005-08-16  Bruno Haible  <bruno@clisp.org>
10608
10609         * modules/strnlen1: New file.
10610         * MODULES.html.sh (String handling): Add strnlen1.
10611
10612 2005-08-16  Bruno Haible  <bruno@clisp.org>
10613
10614         * modules/strcase (Files): Add m4/mbrtowc.m4.
10615         (Depends-on): Add strnlen1, mbchar.
10616
10617 2005-08-16  Bruno Haible  <bruno@clisp.org>
10618
10619         * modules/mbiter: New file.
10620         * MODULES.html.sh (Extended multibyte and wide character utilities):
10621         Add mbiter.
10622
10623 2005-08-16  Bruno Haible  <bruno@clisp.org>
10624
10625         * modules/mbfile: New file.
10626         * MODULES.html.sh (Extended multibyte and wide character utilities):
10627         Add mbfile.
10628
10629 2005-08-16  Bruno Haible  <bruno@clisp.org>
10630
10631         * modules/mbchar: New file.
10632         * MODULES.html.sh (Extended multibyte and wide character utilities):
10633         New section.
10634
10635 2005-08-16  Bruno Haible  <bruno@clisp.org>
10636
10637         * m4/tls.m4: New file, from GNU gettext.
10638
10639 2005-08-16  Bruno Haible  <bruno@clisp.org>
10640
10641         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
10642         always.
10643         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
10644
10645 2005-08-16  Bruno Haible  <bruno@clisp.org>
10646
10647         * m4/mbiter.m4: New file.
10648
10649 2005-08-16  Bruno Haible  <bruno@clisp.org>
10650
10651         * m4/mbfile.m4: New file.
10652
10653 2005-08-16  Bruno Haible  <bruno@clisp.org>
10654
10655         * m4/mbchar.m4: New file.
10656
10657 2005-08-16  Bruno Haible  <bruno@clisp.org>
10658
10659         * lib/tls.h: New file, from GNU gettext.
10660         * lib/tls.c: New file, from GNU gettext.
10661
10662 2005-08-16  Bruno Haible  <bruno@clisp.org>
10663
10664         * lib/strnlen1.h: New file.
10665         * lib/strnlen1.c: New file.
10666
10667 2005-08-16  Bruno Haible  <bruno@clisp.org>
10668
10669         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
10670         (mbi_init): Update.
10671         (mbi_avail, mbi_advance): Let the iteration end before the terminating
10672         NUL byte, not after it.
10673
10674 2005-08-16  Bruno Haible  <bruno@clisp.org>
10675
10676         * lib/strcase.h (strcasecmp): Add note in comments.
10677         * lib/strncasecmp.c: Use code from strcasecmp.c.
10678         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
10679         (strcasecmp): Work correctly in multibyte locales.
10680
10681 2005-08-16  Bruno Haible  <bruno@clisp.org>
10682
10683         * lib/mbiter.h: New file.
10684
10685 2005-08-16  Bruno Haible  <bruno@clisp.org>
10686
10687         * lib/mbfile.h: New file.
10688
10689 2005-08-16  Bruno Haible  <bruno@clisp.org>
10690
10691         * lib/mbchar.h: New file.
10692         * lib/mbchar.c: New file.
10693
10694 2005-08-16  Bruno Haible  <bruno@clisp.org>
10695
10696         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
10697         the valid ones. Makes the comparison operations transitive:
10698         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
10699         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
10700
10701 2005-08-15  Simon Josefsson  <jas@extundo.com>
10702
10703         * modules/ssize_t (License): Change to 'unlimited'.
10704
10705         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
10706
10707 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10708
10709         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
10710         Add comments for each pending glibc patch.
10711
10712 2005-08-15  Bruno Haible  <bruno@clisp.org>
10713
10714         * lib/regex.h (__restrict_arr): Don't define to __restrict if
10715         __cplusplus is defined.
10716
10717 2005-08-14  Jim Meyering  <jim@meyering.net>
10718
10719         Sync from coreutils.
10720
10721         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
10722         Use the hash-table-based cycle-detection code not just when
10723         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
10724         Reported by James Youngman in
10725         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
10726         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
10727         FTS_TIGHT_CYCLE_CHECK.
10728         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
10729         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
10730         once again.
10731         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
10732         * lib/fts.c (fd_safer): Remove decl.
10733         Include fcntl--.h rather than unistd-safer.h
10734         (fts_safe_changedir): Don't call fd_safer; no longer needed
10735         now that we include fcntl--.h.
10736
10737 2005-08-12  Simon Josefsson  <jas@extundo.com>
10738
10739         * modules/getndelim2: Use ssize_t module.
10740         * modules/getnline: Likewise.
10741         * modules/safe-read: Likewise.
10742         * modules/xreadlink: Likewise.
10743
10744         * modules/ssize_t: New file.
10745
10746 2005-08-12  Simon Josefsson  <jas@extundo.com>
10747
10748         * m4/readline.m4: Look for termcap, curses or ncurses if required.
10749
10750 2005-08-12  Simon Josefsson  <jas@extundo.com>
10751
10752         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10753         ssize_t.
10754
10755 2005-08-12  Simon Josefsson  <jas@extundo.com>
10756
10757         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
10758         readline, getdelim and check_version.
10759         (Support for systems lacking ISO C 99: Sizes of integer types):
10760         Add size_max.
10761
10762 2005-08-12  Bruno Haible  <bruno@clisp.org>
10763
10764         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
10765
10766 2005-08-11  Simon Josefsson  <jas@extundo.com>
10767
10768         * modules/readline: New file.
10769
10770         * modules/strnlen (Files): Add strnlen.h.
10771
10772 2005-08-11  Simon Josefsson  <jas@extundo.com>
10773
10774         * m4/readline.m4: New file.
10775
10776 2005-08-11  Simon Josefsson  <jas@extundo.com>
10777
10778         * lib/readline.h, readline.c: New file.
10779
10780 2005-08-11  Simon Josefsson  <jas@extundo.com>
10781
10782         * doc/gnulib.texi (Initial import, Finishing touches): Mention
10783         gl_AVOID.
10784
10785 2005-08-11  Bruno Haible  <bruno@clisp.org>
10786
10787         * lib/strnlen.h (strnlen): Change parameter name to match comment.
10788
10789 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
10790
10791         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
10792
10793 2005-08-10  Simon Josefsson  <jas@extundo.com>
10794
10795         * tests/test-iconvme.c: New file.
10796
10797 2005-08-10  Simon Josefsson  <jas@extundo.com>
10798
10799         * m4/strnlen.m4: New file.
10800
10801         * m4/strndup.m4: Don't check for strnlen declaration, done in
10802         strnlen.m4.
10803
10804 2005-08-10  Simon Josefsson  <jas@extundo.com>
10805
10806         * lib/strndup.c: Use strnlen.h.
10807
10808         * lib/strnlen.h: New file.
10809
10810 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10811
10812         * README: Typos.
10813
10814 2005-08-02  Simon Josefsson  <jas@extundo.com>
10815
10816         * modules/readline: New file.
10817
10818 2005-08-02  Simon Josefsson  <jas@extundo.com>
10819
10820         * modules/getdelim: New file.
10821
10822         * modules/getline: Rewrite, don't use getndelim2.
10823
10824 2005-08-02  Simon Josefsson  <jas@extundo.com>
10825
10826         * m4/getline.m4: Separate out getdelim stuff into separate module.
10827
10828         * m4/getdelim.m4: New file.
10829
10830 2005-08-02  Simon Josefsson  <jas@extundo.com>
10831
10832         * lib/getline.h, getline.c: Rewrite.
10833
10834         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
10835
10836 2005-07-31  Bruno Haible  <bruno@clisp.org>
10837
10838         * lib/lock.h (gl_lock_initializer): New macro.
10839         (gl_lock_define_initialized): Use it.
10840         (gl_rwlock_initializer): New macro.
10841         (gl_rwlock_define_initialized): Use it.
10842         (gl_recursive_lock_initializer): New macro.
10843         (gl_recursive_lock_define_initialized): Use it.
10844
10845 2005-07-30  Karl Berry  <karl@gnu.org>
10846
10847         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
10848         Report from Ben Pfaff, regarding getopt.
10849
10850 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
10851
10852         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
10853         normal way.
10854         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
10855         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
10856         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
10857         (gl_GETOPT): Use the new macros.  Most of the implementation
10858         is moved to the new macros.  This is for programs like Emacs
10859         that don't want all the functionality of gl_GETOPT.
10860
10861 2005-07-26  Bruno Haible  <bruno@clisp.org>
10862
10863         * m4/lock.m4: Update from GNU gettext.
10864
10865 2005-07-26  Bruno Haible  <bruno@clisp.org>
10866
10867         * lib/lock.h: Update from GNU gettext.
10868         * lib/lock.c: Update from GNU gettext.
10869
10870 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
10871
10872         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
10873         obsolescent AC_TRY_RUN.  Include the default includes files, for
10874         'exit'.
10875
10876 2005-07-24  Bruno Haible  <bruno@clisp.org>
10877
10878         * modules/visibility: New file.
10879         * MODULES.html.sh (Misc): Add visibility.
10880
10881 2005-07-24  Bruno Haible  <bruno@clisp.org>
10882
10883         * m4/visibility.m4: New file.
10884
10885 2005-07-24  Bruno Haible  <bruno@clisp.org>
10886
10887         * doc/visibility.texi: New file.
10888
10889 2005-07-22  Bruno Haible  <bruno@clisp.org>
10890
10891         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
10892         $(ALLOCA_H), redundant through BUILT_SOURCES.
10893         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
10894         redundant through BUILT_SOURCES.
10895         * modules/byteswap (Makefile.am): Remove explicit dependency on
10896         $(BYTESWAP_H), redundant through BUILT_SOURCES.
10897         * modules/fnmatch (Makefile.am): Remove explicit dependency on
10898         $(FNMATCH_H), redundant through BUILT_SOURCES.
10899         * modules/getopt (Makefile.am): Remove explicit dependency on
10900         $(GETOPT_H), redundant through BUILT_SOURCES.
10901         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
10902         redundant through BUILT_SOURCES.
10903         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
10904         redundant through BUILT_SOURCES.
10905         * modules/stdbool (Makefile.am): Remove explicit dependency on
10906         $(STDBOOL_H), redundant through BUILT_SOURCES.
10907         * modules/stdint (Makefile.am): Remove explicit dependency on
10908         $(STDINT_H), redundant through BUILT_SOURCES.
10909         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
10910         Remove explicit dependency on $(SYSEXITS_H).
10911         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
10912
10913 2005-07-18  Simon Josefsson  <jas@extundo.com>
10914
10915         * lib/check-version.c (check_version): Accept identical versions too.
10916
10917 2005-07-18  Bruno Haible  <bruno@clisp.org>
10918
10919         * modules/lock: New file.
10920         * MODULES.html.sh (Multithreading): New section.
10921
10922 2005-07-18  Bruno Haible  <bruno@clisp.org>
10923
10924         * m4/lock.m4: New file, from GNU gettext.
10925
10926 2005-07-18  Bruno Haible  <bruno@clisp.org>
10927
10928         * lib/lock.h: New file, from GNU gettext.
10929         * lib/lock.c: New file, from GNU gettext.
10930
10931 2005-07-18  Bruno Haible  <bruno@clisp.org>
10932
10933         * lib/lock.h (gl_once_t): New type.
10934         (gl_once_define, gl_once): New macros.
10935         * lib/lock.c (fresh_once): New variable.
10936         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
10937         functions.
10938
10939 2005-07-16  Simon Josefsson  <jas@extundo.com>
10940
10941         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
10942         workaround, suggested by Bruno.
10943
10944 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
10945
10946         * modules/xalloc (Depends-on): Add xalloc-die.
10947         * modules/xvasprintf (Depends-on): Add xalloc-die.
10948
10949 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
10950
10951         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
10952         with a minor change.
10953
10954 2005-07-15  Bruno Haible  <bruno@clisp.org>
10955
10956         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
10957         When using lib/poll.c, define poll as rpl_poll.
10958
10959 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
10960
10961         * modules/argp (Depends-on): Remove unlocked-io.
10962
10963 2005-07-14  Derek Price  <derek@ximbiot.com>
10964
10965         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
10966         for glob symlink bug.
10967
10968 2005-07-14  Bruno Haible  <bruno@clisp.org>
10969
10970         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
10971         Instead, test for *_unlocked function declarations directly.
10972
10973 2005-07-11  Simon Josefsson  <jas@extundo.com>
10974
10975         * modules/size_max: New file.
10976
10977         * modules/xsize: Depend on size_max module for size_max.m4.
10978
10979 2005-07-11  Simon Josefsson  <jas@extundo.com>
10980
10981         * lib/size_max.h: New file.
10982
10983 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
10984
10985         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
10986         copyright symbol and the year.
10987         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
10988         (version_etc_va): Use parameterized copyright notice.
10989         Reword to conform to the current GNU coding standards.
10990
10991 2005-07-11  Karl Berry  <karl@gnu.org>
10992
10993         * doc/gnulib.texi (Quoting): new node.
10994         (Initial import): more info, from Patrice.
10995
10996 2005-07-11  Bruno Haible  <bruno@clisp.org>
10997
10998         * gnulib-tool (func_usage): Document option --avoid.
10999         (Command line options): Handle --avoid.
11000         (func_acceptable): New function.
11001         (func_modules_transitive_closure): Use it.
11002
11003 2005-07-11  Bruno Haible  <bruno@clisp.org>
11004
11005         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
11006         Reported by Jim Meyering.
11007
11008 2005-07-10  Bruno Haible  <bruno@clisp.org>
11009
11010         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
11011         Needed when size_t is smaller than 'unsigned int'.
11012         Reported by Paul Eggert.
11013
11014 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11015
11016         * modules/argp (Depends-on): Add unlocked-io
11017
11018 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11019
11020         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
11021         block of defines.
11022
11023 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
11024
11025         * config/srclist.txt: Comment out regcomp.c, since we have a porting
11026         fix now.
11027
11028 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
11029         and Paul Eggert  <eggert@cs.ucla.edu>
11030
11031         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
11032         in wint_t, not wchar_t.  Remove now-unnecessary cast.
11033
11034 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11035
11036         * modules/regex (Files): Add lib/regex_internal.c,
11037         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
11038         (Depends-on): Add extensions.
11039         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
11040
11041 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11042
11043         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
11044         pathconf.
11045         * m4/same.m4 (gl_SAME): Likewise.
11046         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
11047
11048         * m4/regex.m4: Adjust to new libc regex implementation.
11049         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
11050         all the .c and .h parts of (the new) regex.
11051         Quote the m4 stuff better.
11052         Check for RE_ICASE bug of old gnulib.
11053         Check for REG_STARTEND of recent libc.
11054         Rename local variables from jm_* to gl_*.
11055         Quote operand of "test -f".
11056         Say "recent enough" version of libc, not "version 2".
11057         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
11058         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
11059         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
11060         Remove check for btowc, isascii.
11061         Require AM_LANGINFO_CODESET.
11062
11063 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11064
11065         * lib/regex.c, regex.h: Sync from libc.
11066         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
11067         * lib/regexec.c:
11068         New files, synced from libc, except that regex_internal.h
11069         currently has a small porting fix.
11070
11071 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11072
11073         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
11074         regex_internal.c, regexec.c.
11075         Add regex_internal.h too, but as a comment, since the libc version
11076         is currently broken in gnulib mode.
11077
11078 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
11079
11080         Support programs like Emacs that use gnulib but not gettext.
11081         * MODULES.html.sh (Internationalization functions): Add gettext-h.
11082         * modules/gettext-h: New file.
11083         * modules/gettext (Files): Remove lib/gettext.h.
11084         (Depends-on): Add gettext-h.
11085         (Makefile.am): Remove lib_SOURCES.
11086         * modules/argmatch, modules/c-stack, modules/closeout:
11087         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
11088         * modules/execute, modules/file-type, modules/getaddrinfo:
11089         * modules/getopt, modules/human, modules/javacomp:
11090         * modules/javaexec, modules/mkdir-p, modules/obstack:
11091         * modules/openat, modules/pagealign_alloc, modules/pipe:
11092         * modules/quotearg, modules/regex, modules/rpmatch:
11093         * modules/unicodeio, modules/userspec, modules/version-etc:
11094         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
11095         * modules/xsetenv:
11096         Depend on gettext-h, not gettext.
11097
11098 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
11099
11100         * gnulib-tool (func_import): Add support for 'public domain' license.
11101         * modules/alloca, modules/atexit, modules/memmove:
11102         Now public domain, not GPL.
11103         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
11104         * modules/realloc, modules/strerror, modules/strtod:
11105         Now LGPL, not GPL.
11106
11107 2005-07-05  Bruno Haible  <bruno@clisp.org>
11108
11109         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
11110         autoconf CVS. Needed for mingw.
11111
11112 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11113
11114         Remove the dependency of the strftime module on the tzset module.
11115         * modules/strftime (Depends-on): Remove dependency on tzset.
11116
11117 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11118
11119         Remove the dependency of the strftime module on the tzset module.
11120         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
11121         gl_FUNC_TZSET_CLOBBER.
11122
11123 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11124
11125         Remove the dependency of the strftime module on the tzset module.
11126         * lib/strftime.c (my_strftime)
11127         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
11128         Copy the input structure, to work around some of the bug with
11129         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
11130         Solaris releases, you should also use the tzset module, but we won't
11131         require it as a dependency any more since we don't want LGPLed code
11132         to depend on GPLed code.
11133
11134 2005-07-02  Jim Meyering  <jim@meyering.net>
11135
11136         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
11137         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
11138         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
11139         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
11140
11141 2005-07-02  Jim Meyering  <jim@meyering.net>
11142
11143         * lib/backupfile.c (backup_args): Change a `0' to NULL.
11144
11145 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11146
11147         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
11148         declares only 'struct timespec;' (!).
11149
11150 2005-07-01  Jim Meyering  <jim@meyering.net>
11151
11152         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
11153         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
11154         * lib/save-cwd.c, tempname.c:
11155         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11156         and don't include <sys/file.h>).
11157
11158 2005-06-29  Jim Meyering  <jim@meyering.net>
11159
11160         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
11161         type name.  Use the variable name instead.
11162         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
11163         Likewise.
11164
11165 2005-06-28  Simon Josefsson  <jas@extundo.com>
11166
11167         * modules/check-version (Files): Add check-version.m4.
11168
11169 2005-06-28  Simon Josefsson  <jas@extundo.com>
11170
11171         * m4/check-version.m4: New file, suggested by Jim Meyering
11172         <jim@meyering.net>.
11173
11174 2005-06-28  Simon Josefsson  <jas@extundo.com>
11175
11176         * lib/check-version.h, lib/check-version.c: New files.
11177
11178 2005-06-28  Simon Josefsson  <jas@extundo.com>
11179
11180         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
11181         collision with global variable.  Better indentation.  Don't
11182         increment buffer pointer beyond buffer end.  Based on comments
11183         from Paul Eggert <eggert@cs.ucla.edu>.
11184
11185         * lib/base64.h: Indent.
11186
11187 2005-06-28  Simon Josefsson  <jas@extundo.com>
11188
11189         * doc/gnulib.texi (Library version handling): New section.
11190
11191 2005-06-28  Jim Meyering  <jim@meyering.net>
11192
11193         * check-module (find_included_lib_files): Hard-code another
11194         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
11195         but modules/fts-lgpl (correctly) does not list those files.
11196
11197         * modules/canonicalize (Files): Add lib/pathmax.h.
11198
11199 2005-06-25  Simon Josefsson  <jas@extundo.com>
11200
11201         * modules/check-version: New file.
11202
11203 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
11204
11205         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
11206         initializer of struct addrinfo, as an indication that we don't
11207         care how many members the structure has.
11208
11209 2005-06-24  Derek Price  <derek@ximbiot.com>
11210         and Bruno Haible  <bruno@clisp.org>
11211
11212         Remove stat module & update lstat.
11213         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
11214         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
11215         * m4/stat.m4: Remove this file.
11216
11217 2005-06-24  Derek Price  <derek@ximbiot.com>
11218         and Bruno Haible  <bruno@clisp.org>
11219
11220         Remove stat module & update lstat.
11221         * lib/stat.c: Remove this file...
11222         (slash_aware_lstat): ...moving this content and its support...
11223         * lib/lstat.c (rpl_lstat): ...into here.
11224         * lib/lstat.h: New file.
11225
11226 2005-06-24  Derek Price  <derek@ximbiot.com>
11227         and Bruno Haible  <bruno@clisp.org>
11228
11229         Remove stat module & update lstat.
11230         * config/srclist.txt (libc sources): Remove stat.
11231
11232 2005-06-24  Derek Price  <derek@ximbiot.com>
11233         and Bruno Haible  <bruno@clisp.org>
11234
11235         Remove stat module & update lstat.
11236         * MODULES.html.sh (stat): Remove.
11237         * MODULES.html: Regenerated.
11238         * modules/lstat (Description): Correct function name.
11239         (Files): Add "lstat.h".
11240         (Depends-on): Remove stat, add xalloc, stat-macros.
11241         * modules/stat: Remove this file.
11242         (Include): Add "lstat.h", remove <sys/stat.h>.
11243
11244 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
11245
11246         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
11247         (ranged_convert): Don't save conversion in a temporary struct.
11248         This causes a warning with GCC 4.0.0, and anyway in the typical
11249         case it's not worth the extra 100 bytes or so of code.
11250         (ranged_convert, __mktime_internal): When calling a function via a
11251         pointer P, use P () rather than (*P) (), as we now assume C89 or
11252         better.
11253
11254 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
11255
11256         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
11257         "who -r" failed to give output.  Problem reported by Tim Waugh.
11258
11259         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
11260         (xcalloc): Use it to avoid needless tests.
11261         Problem reported by Jim Meyering.
11262
11263 2005-06-20  Derek Price  <derek@ximbiot.com>
11264
11265         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
11266         unnecessary for Autoconfs > 2.59c.
11267
11268 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11269
11270         * lib/argp.h (__option_is_short): Check upper limit of
11271         __key. Isprint() requires its argument to have the value
11272         of an unsigned char or EOF.
11273
11274 2005-06-16  Jim Meyering  <jim@meyering.net>
11275
11276         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
11277         when either N or S is zero.
11278
11279 2005-06-16  Derek Price  <derek@ximbiot.com>
11280
11281         * m4/bison.m4: Declare YACC & YFLAGS precious.
11282
11283 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
11284
11285         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
11286         multibyte string or pattern, fall back on unibyte matching.
11287         Problem reported by James Youngman.
11288
11289 2005-06-08  Bruno Haible  <bruno@clisp.org>
11290
11291         * modules/csharpcomp: New file.
11292         * MODULES.html.sh (C#): Add csharpcomp.
11293
11294 2005-06-08  Bruno Haible  <bruno@clisp.org>
11295
11296         * m4/csharpcomp.m4: New file, from GNU gettext.
11297
11298 2005-06-08  Bruno Haible  <bruno@clisp.org>
11299
11300         * lib/csharpcomp.h: New file, from GNU gettext.
11301         * lib/csharpcomp.c: New file, from GNU gettext.
11302         * lib/csharpcomp.sh.in: New file, from GNU gettext.
11303
11304 2005-06-08  Bruno Haible  <bruno@clisp.org>
11305
11306         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
11307         warning on mingw.
11308
11309 2005-06-07  Derek Price  <derek@ximbiot.com>
11310
11311         Sync from CVS.
11312         * lib/glob_.h: Indent nested #ifdef.
11313
11314 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11315
11316         Sync from coreutils.
11317         Use "file name" when talking about file names, instead of "filename"
11318         or "path", as per the GNU coding standards.
11319         * lib/mkdir-p.c: Renamed from makepath.c.
11320         (make_dir_parents): Renamed from make_path.  All callers changed.
11321         * lib/mkdir-p.h: Likewise.  All includers changed.
11322         * lib/filenamecat.c: Renamed from path-concat.c.
11323         (file_name_concat): Renamed from path_concat.  All callers changed.
11324         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
11325         * lib/filenamecat.h: Likewise.  All includers changed.
11326         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
11327         in comments or local variable names.
11328         * lib/basename.c: Likewise.
11329         * lib/canonicalize.c, canonicalize.h: Likewise.
11330         * lib/dirname.c, dirname.h: Likewise.
11331         * lib/euidaccess.c: Likewise.
11332         * lib/exclude.c: Likewise
11333         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
11334         * lib/fsusage.c, fsuage.h: Likewise.
11335         * lib/fts.c, fts_.h: Likewise.
11336         * lib/getcwd.c: Likewise.
11337         * lib/getloadavg.c: Likewise.
11338         * lib/mkstemp.c: Likewise.
11339         * lib/mountlist.c, mountlist.h: Likewise.
11340         * lib/openat.c, openat.h: Likewise.
11341         * lib/readlink-stub.c: Likewise.
11342         * lib/readutmp.c, readutmp.h: Likewise.
11343         * lib/rename.c: Likewise.
11344         * lib/rmdir.c: Likewise.
11345         * lib/same.c: Likewise.
11346         * lib/savedir.c: Likewise.
11347         * lib/stripslash.c: Likewise.
11348         * lib/tempname.c: Likewise.
11349         * lib/xreadlink.c: Likewise.
11350         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
11351         All uses changed.
11352         * lib/exclude.h: Likewise.
11353
11354         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
11355         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11356         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
11357         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11358         * lib/pathmax.h: Include <limits.h> unconditionally, since other
11359         files have been getting away with it for years (MORE/BSD 4.3
11360         is extinct now).
11361         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
11362         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11363
11364         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
11365         Define to 256, not 255, as per modern POSIX.
11366
11367 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11368
11369         Sync from coreutils.
11370         Use "file name" when talking about file names, instead of "filename"
11371         or "path", as per the GNU coding standards.
11372         * MODULES.html.sh: mkdir-p renamed from makepath.
11373         filenamecat renamed from path-concat.
11374         * modules/filenamecat: Renamed from modules/path-concat.
11375         (Files): filenamecat.h and filenamecat.c renamed from
11376         path-concat.h and path-concat.c.
11377         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
11378         (Include): filenamecat.h, not path-concat.h.
11379         * modules/mkdir-p: Renamed from modules/makepath.
11380         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
11381         makepath.c.
11382         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
11383         (Include): mkdir-p.h, not makepath.h.
11384
11385 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11386
11387         Sync from coreutils.
11388         * m4/mkdir-p.m4: Renamed from makepath.m4.
11389         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
11390         Rename files from makepath.c to mkdir-p.c, and from
11391         makepath.h to mkdir-p.h.
11392         * m4/filenamecat.m4: Renamed from path-concat.m4.
11393         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
11394         Rename files from path-concat.c to filenamecat.c,
11395         and from path-concat.h to filenamecat.h.
11396         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
11397         "file name" in local variables or comments.
11398         * m4/rename.m4: Likewise.
11399
11400 2005-06-01  Bruno Haible  <bruno@clisp.org>
11401
11402         * modules/csharpexec: New file.
11403         * MODULES.html.sh (C#): New section.
11404
11405 2005-06-01  Bruno Haible  <bruno@clisp.org>
11406
11407         * m4/csharp.m4: New file, from GNU gettext.
11408         * m4/csharpexec.m4: New file, from GNU gettext.
11409
11410 2005-06-01  Bruno Haible  <bruno@clisp.org>
11411
11412         * lib/csharpexec.h: New file, from GNU gettext.
11413         * lib/csharpexec.c: New file, from GNU gettext.
11414         * lib/csharpexec.sh.in: New file, from GNU gettext.
11415
11416 2005-05-31  Derek Price  <derek@ximbiot.com>
11417             Paul Eggert  <eggert@cs.ucla.edu>
11418
11419         Sync from cvs.
11420         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
11421
11422 2005-05-31  Derek Price  <derek@ximbiot.com>
11423             Paul Eggert  <eggert@cs.ucla.edu>
11424
11425         Sync from cvs.
11426         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
11427
11428 2005-05-29  Derek Price  <derek@ximbiot.com>
11429
11430         * config/srclist.txt (glob_.h, glob.c): Add these files.
11431
11432 2005-05-29  Derek Price  <derek@ximbiot.com>
11433
11434         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
11435         * modules/glob: New file.
11436         * modules/getlogin_r: Add link to POSIX spec in description.
11437
11438 2005-05-29  Derek Price  <derek@ximbiot.com>
11439             Paul Eggert  <eggert@cs.ucla.edu>
11440
11441         * m4/glob.m4: New file.
11442
11443 2005-05-29  Derek Price  <derek@ximbiot.com>
11444             Paul Eggert  <eggert@cs.ucla.edu>
11445
11446         * lib/glob_.h, lib/glob.c: New files.
11447
11448 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11449
11450         * modules/fts (Files): Remove m4/inttypes-pri.m4.
11451         * modules/fts-lgpl (Depends-on): Remove gettext.
11452
11453 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11454
11455         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
11456         and don't require gt_INTTYPES_PRI.
11457
11458 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11459
11460         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
11461
11462         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
11463         the configuration hassle isn't worth it.
11464         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
11465         (LONGEST_MODIFIER, PRIuMAX): Remove.
11466
11467 2005-05-27  Bruno Haible  <bruno@clisp.org>
11468
11469         * lib/getlogin_r.h: Remove second include of <stddef.h>.
11470
11471 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
11472
11473         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
11474         _POSIX_PTHREAD_SEMANTICS for Solaris.
11475
11476 2005-05-25  Derek Price  <derek@ximbiot.com>
11477
11478         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
11479
11480 2005-05-25  Derek Price  <derek@ximbiot.com>
11481             Paul Eggert  <eggert@cs.ucla.edu>
11482
11483         * modules/getlogin_r, m4/getlogin_r.m4: New files.
11484         * lib/getlogin_r.c, getlogin_r.h: New files.
11485
11486 2005-05-25  Bruno Haible  <bruno@clisp.org>
11487             Derek Price  <derek@ximbiot.com>
11488
11489         * lib/getlogin_r.h: Simplify API documentation.
11490
11491 2005-05-23  Derek Price  <derek@ximbiot.com>
11492
11493         * modules/minmax (Files): Add m4/minmax.m4.
11494         (configure.ac): Add gl_MINMAX.
11495
11496 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
11497
11498         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
11499         so that unistd-safer.h (GPL'ed code) need not be included.
11500
11501 2005-05-22  Bruno Haible  <bruno@clisp.org>
11502
11503         * m4/minmax.m4: New file.
11504         Based on a patch by Derek Price <derek@ximbiot.com>.
11505
11506 2005-05-22  Bruno Haible  <bruno@clisp.org>
11507
11508         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
11509         (INT64_MIN): Fix definition.
11510         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
11511
11512         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
11513         NEED_SIGNED_INT_TYPES.
11514
11515         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
11516         HAVE_SYSTEM_INTTYPES.
11517
11518 2005-05-22  Bruno Haible  <bruno@clisp.org>
11519
11520         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
11521         Also include <sys/param.h> if it defines MIN, MAX.
11522         Based on a patch by Derek Price <derek@ximbiot.com>.
11523
11524 2005-05-21  Jim Meyering  <jim@meyering.net>
11525
11526         * modules/fts (Files): Add m4/inttypes-pri.m4.
11527         (Depends-on): Add lstat and remove gettext.  Alphabetize.
11528
11529 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11530
11531         New fts module.
11532         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
11533         (setup_dir, free_dir): New functions.
11534         (enter_dir, leave_dir): Define trivial
11535         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
11536         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
11537         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
11538         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
11539         Move to fts-cycle.c.
11540         (fts_open): Use setup_dir.
11541         (fts_close): Use free_dir.
11542         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
11543         This adds a label and some gotos, but the alternatives were messier.
11544         Check for memory allocation failure when entering a dir.
11545         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
11546         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
11547         (FTS): New member fts_cycle, that is a union that contains the
11548         old active_dir_ht and cycle_state.  All uses changed to mention
11549         fts_cycle.ht and fts_cycle.state.
11550         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
11551         fts.c, with the following changes:
11552         (setup_dir, free_dir): New functions.
11553         (enter_dir): Now returns bool.  Return true if successful, false
11554         if memory exhausted.  All callers changed.
11555         Do not bother partly cleaning up on
11556         memory allocation failure; that is free_dir's job.
11557         However, free ad if hash_insert fails, to avoid memory leak.
11558         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
11559         fts->fts_options to see which union member to use.
11560
11561 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11562
11563         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
11564         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
11565
11566 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11567
11568         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
11569
11570 2005-05-20  Jim Meyering  <jim@meyering.net>
11571
11572         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
11573         Now a macro, to pacify GCC.
11574
11575 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
11576
11577         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
11578         of -1.
11579
11580 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
11581
11582         * lib/chown.c (rpl_chown): Return -1 on failure.
11583
11584 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
11585
11586         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
11587         Don't check for stddef.h.
11588         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
11589         don't use its results.
11590         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
11591         since we include them unconditionally.  Don't require
11592         AM_STDBOOL_H, since stdbool is a prerequisite.
11593         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
11594         since we assume C89 or better.
11595         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
11596         as we don't use their results.
11597         Don't check for fchdir, memmove, memset, strrchr, as we use
11598         them unconditionally.
11599         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
11600         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
11601
11602 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
11603
11604         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
11605         Include <stddef.h> unconditionally, since we assume C89 now.
11606         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
11607         * lib/fts.c: Include fts_.h first, to check interface.
11608         Do not include intprops.h; no longer needed.
11609         Include cycle-check.h and hash.h, since fts_.h no longer does.
11610         Remove unnecessary casts of closedir to void.
11611         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
11612         decide whether to decrement nlinks.
11613         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
11614         (FTS): Use struct hash_table * instead of Hash_table, so that
11615         we no longer need to include hash.h here.
11616
11617 2005-05-18  Jim Meyering  <jim@meyering.net>
11618
11619         * modules/dirfd (License): Change to LGPL.  Most of the code
11620         is already in the public domain.
11621
11622 2005-05-18  Jim Meyering  <jim@meyering.net>
11623
11624         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
11625         Reported by Yoann Vandoorselaere.
11626
11627 2005-05-17  Jim Meyering  <jim@meyering.net>
11628
11629         * m4/fts.m4: New file, from coreutils.
11630
11631 2005-05-17  Jim Meyering  <jim@meyering.net>
11632
11633         * lib/fts.c, lib/fts_.h: New files, from coreutils.
11634
11635 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11636
11637         Sync from coreutils.
11638         * m4/unlinkdir.m4: New file.
11639
11640 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11641
11642         Sync from coreutils.
11643         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
11644         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
11645         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
11646         White space changes only.
11647         * lib/makepath.c (make_path): Port to hosts where leading "//" is
11648         special.
11649         * lib/yesno.c: Include getline.h, not ctype.h.
11650         (yesno): Don't remove leading white space; POSIX doesn't allow it.
11651         Use getline to remove arbitrary restriction on response length.
11652
11653 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11654
11655         * config/srclist-update: Spell out "Street" in FSF postal
11656         mail address; this is the style the FSF seems to prefer.
11657
11658         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
11659         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
11660         this updates FSF postal mail address.
11661
11662         Sync from coreutils.
11663         * modules/unlinkdir: New file.
11664         * modules/yesno (Depends-on): Add getline.
11665         * MODULES.html.sh (File system functions): Add unlinkdir.
11666
11667 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
11668
11669         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
11670         lib/strsep.h:
11671         Change the initial comment to refer to GPL, not LGPL.
11672         gnulib-tool will change it to LGPL as needed.
11673
11674         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
11675         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
11676         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
11677         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
11678         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
11679         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
11680         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
11681         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
11682         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
11683         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
11684         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
11685         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
11686         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
11687         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
11688         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
11689         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
11690         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
11691         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
11692         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
11693         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
11694         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
11695         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
11696         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
11697         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
11698         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
11699         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
11700         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
11701         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
11702         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
11703         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
11704         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
11705         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
11706         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
11707         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
11708         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
11709         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
11710         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
11711         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
11712         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
11713         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
11714         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
11715         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
11716         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
11717         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
11718         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
11719         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
11720         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
11721         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
11722         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
11723         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
11724         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
11725         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
11726         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
11727         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
11728         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
11729         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
11730         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
11731         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
11732         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
11733         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
11734         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
11735         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
11736         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
11737         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
11738         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
11739         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
11740         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
11741         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
11742         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
11743         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
11744         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
11745         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
11746         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
11747         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
11748         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
11749         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
11750         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
11751         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
11752         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
11753         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
11754         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
11755         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
11756         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
11757         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
11758         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
11759         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
11760         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
11761         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
11762         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
11763         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
11764         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
11765         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
11766         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
11767         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
11768         lib/yesno.c, lib/yesno.h:
11769         Update FSF postal mail address.
11770
11771 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
11772
11773         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
11774         tests/test-memmem.c, tests/test-stpncpy.c:
11775         Update FSF postal mail address.
11776
11777 2005-05-13  Bruno Haible  <bruno@clisp.org>
11778
11779         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
11780         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
11781         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
11782         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
11783         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
11784         Add support for 64-bit integers in the MSVC compiler.
11785
11786 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11787
11788         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
11789
11790 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
11791
11792         * gnulib-tool (func_import): Sort and uniquify recommended includes.
11793
11794 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
11795
11796         * doc/getdate.texi (General date syntax): Don't say that date
11797         date --iso-8601=ns generates acceptable dates; it doesn't yet.
11798         Problem reported by Nic Ferrier.
11799
11800 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11801
11802         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
11803         specified in ai_socktype. Fix invalid ai_protocol
11804         check. ai_protocol is usually set to 0 or depending on
11805         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
11806         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
11807         ai_socktype / ai_protocol in the returned addrinfo structure.
11808
11809 2005-05-10  Simon Josefsson  <jas@extundo.com>
11810
11811         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
11812         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11813
11814 2005-05-10  Karl Berry  <karl@gnu.org>
11815
11816         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
11817         (from http://www.gnu.org/licenses).
11818         * doc/COPYING.LIB: also rename to COPYING.LESSER.
11819         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
11820         fdl.texi suffices.
11821
11822 2005-05-10  Karl Berry  <karl@gnu.org>
11823
11824         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
11825         (COPYING.DOC): remove.
11826
11827         * config/srclist-update: new FSF address.
11828
11829 2005-05-10  Derek Price  <derek@ximbiot.com>
11830
11831         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
11832         possible.
11833
11834 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11835             Bruno Haible  <bruno@clisp.org>
11836
11837         * modules/inet_ntop: New file.
11838         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11839         inet_ntop.
11840
11841 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11842             Bruno Haible  <bruno@clisp.org>
11843
11844         * m4/inet_ntop.m4: New file.
11845
11846 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11847             Bruno Haible  <bruno@clisp.org>
11848
11849         * lib/inet_ntop.h: New file.
11850         * lib/inet_ntop.c: New file, from glibc with modifications.
11851
11852 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
11853
11854         * modules/time_r (License): Change to LGPL.
11855         * modules/extensions (License): Change to LGPL.  Actually,
11856         the license is more permissive than that, but currently gnulib-tool
11857         doesn't know how to handle more-permissive licenses.
11858
11859         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
11860         Problem reported by Dave Love.
11861
11862 2005-05-08  Jim Meyering  <jim@meyering.net>
11863
11864         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
11865         blank.
11866
11867 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
11868
11869         * modules/argmatch (Depends-on): Add stdbool.
11870         * modules/backupfile (Depends-on): Likewise.
11871         * modules/chdir-long (Depends-on): Likewise.
11872         * modules/closeout (Depends-on): Likewise.
11873         * modules/cycle-check (Depends-on): Likewise.
11874         * modules/dirname (Depends-on): Likewise.
11875         * modules/fnmatch (Depends-on): Likewise.
11876         * modules/fsusage (Depends-on): Likewise.
11877         * modules/fwriteerror (Depends-on): Likewise.
11878         * modules/getcwd (Depends-on): Likewise.
11879         * modules/getloadavg (Depends-on): Likewise.
11880         * modules/hard-locale (Depends-on): Likewise.
11881         * modules/makepath (Depends-on): Likewise.
11882         * modules/mountlist (Depends-on): Likewise.
11883         * modules/nanosleep (Depends-on): Likewise.
11884         * modules/posixtm (Depends-on): Likewise.
11885         * modules/quotearg (Depends-on): Likewise.
11886         * modules/readtokens (Depends-on): Likewise.
11887         * modules/readtokens0 (Depends-on): Likewise.
11888         * modules/readutmp (Depends-on): Likewise.
11889         * modules/save-cwd (Depends-on): Likewise.
11890         * modules/strftime (Depends-on): Likewise.
11891         * modules/userspec (Depends-on): Likewise.
11892         * modules/utimecmp (Depends-on): Likewise.
11893         * modules/xgetcwd (Depends-on): Likewise.
11894         * modules/xnanosleep (Depends-on): Likewise.
11895         * modules/xstrtod (Depends-on): Likewise.
11896         * modules/yesno (Depends-on): Likewise.
11897
11898 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
11899
11900         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
11901         needless checks.
11902
11903 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11904
11905         Merge from coreutils.  Among other things,
11906         add bulletproofing for cases where stdin, stdout, or stderr are closed.
11907         * lib/fd-safer.c: New file.
11908         * lib/fcntl-safer.h, open-safer.c: Remove.
11909         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
11910         * lib/dup-safer.c: Include unistd-safer.h first.
11911         Don't include errno.h.
11912         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
11913         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
11914         * lib/file-type.c: Rely on file-type.h change.
11915         * lib/getloadavg.c: Include unistd-safer.h.
11916         (getloadavg): Use safer open.
11917         * lib/getusershell.c: Include "stdio-safer.h".
11918         (getusershell): Use safer fopen.
11919         * lib/long-options.c (long_options): Use NULL rather than 0.
11920         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
11921         'free'.
11922         * lib/modechange.c: Likewise.
11923         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
11924         (MODE_DONE): New constant.
11925         (struct mode_change): Remove 'next' member.
11926         (make_node_op_equals): New function; like the old one of the
11927         same name, except it allocates an array.
11928         (mode_compile, mode_create_from_ref): Use it.
11929         (mode_compile): Allocate result as an array, not a linked list.
11930         Parse octal string ourself, so that we catch mistakes like "+0".
11931         (mode_adjust): Arg is an array, not a linked list.
11932         * lib/modechange.c: Include stat-macros.h, xalloc.h.
11933         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
11934         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
11935         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
11936         Remove.  This is now stat-macros.h's job.
11937         (talloc): Remove.  All callers replaced by xalloc, so that
11938         our invokers don't have to worry about reporting memory failures.
11939         (make_node_op_equals): Remove.
11940         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
11941         New constants.
11942         (struct mode_change): Moved here from modechange.h.
11943         (mode_append_entry): Remove.
11944         (mode_compile): Remove MASKED_OPS arg, since it encouraged
11945         apps to have incorrect behavior.  Use simpler algorithm for head
11946         and tail.  Don't futz with umask; that's now the job of mode_adjust.
11947         Detect more invalid usages rather than having somewhat-random behavior.
11948         Don't insert an "a=" action, as that leads to incorrect behavior.
11949         (mode_compile, mode_create_from_ref): Return NULL on error instead
11950         of an enum, since now there's only one way to have an error.  All
11951         callers changed.
11952         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
11953         at the correct time.  Simplify calculation of "+u" and its ilk.
11954         Don't mishandle "+X".
11955         (mode_free): Remove "register" and localize decls.
11956         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
11957         (struct mode_change): Move to modechange.c; callers don't
11958         need to see this stuff.
11959         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
11960         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
11961         (mode_change, mode_adjust): Reflect the new signatures noted above.
11962         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
11963         that might redefine system include files.
11964         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
11965         (my_usleep): Use NULL rather than (void *) 0.
11966         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
11967         Use siginterrupt to specify that system calls should be interrupted.
11968         (rpl_nanosleep): Move initialization of suspended closer to call of
11969         my_usleep.
11970         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
11971         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
11972         (desirable_utmp_entry): New function.
11973         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
11974         using x2nrealloc, to simplify logic.
11975         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
11976         size calculation.  Do not assume utmp file is a regular file.
11977         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
11978         (READ_UTMP_CHECK_PIDS): New constant.
11979         * lib/save-cwd.c: Include unistd-safer.h.
11980         (save_cwd): Use fd_safer.
11981         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
11982         [!_LIBC] Include "stat-macros.h" instead.
11983         * lib/unistd-safer.h (fd_safer): New decl.
11984
11985 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11986
11987         * modules/getloadavg (Depends-on): Add unistd-safer.
11988         * modules/getusershell (Depends-on): Add stdio-safer.
11989         * modules/lstat (Depends-on): Remove xalloc.
11990         * modules/mkstemp (Depends-on): Add stat-macros.
11991         * modules/modechange (Depends-on): Remove xstrtol.
11992         Add stat-macros, xalloc.
11993         * modules/save-cwd (Depends-on): Add unistd-safer.
11994         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
11995         * modules/unistd-safer (Files): Add lib/fd-safer.c
11996         (Makefile.am): Remove lib_SOURCES.
11997
11998         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
11999         Remove fcntl-safer; unistd-safer supersedes it.
12000
12001 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12002
12003         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
12004         AC_HEADER_STAT.
12005         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
12006         (gl_PREREQ_CHOWN): Remove.
12007         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
12008         it.  Don't require AC_HEADER_STAT.
12009         (gl_PREREQ_LSTAT): Remove.
12010         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
12011         Don't require AC_HEADER_STAT.
12012         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
12013         (gl_PREREQ_RMDIR): Remove.
12014         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
12015         mention stat-macros.h or AC_HEADER_STAT, since we'll make
12016         the stat-macros module a prerequisite.
12017         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
12018         * m4/filemode.m4 (gl_FILEMODE): Likewise.
12019         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
12020         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
12021         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
12022         variable names.
12023         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
12024         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
12025         variable prefixes.
12026         * m4/fcntl-safer.m4: Remove.
12027         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
12028         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
12029         Invoke gl_PREREQ_FD_SAFER.
12030         (gl_PREREQ_FD_SAFER): New macro.
12031         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
12032         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
12033         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
12034         Remove duplicate call to AC_LIBOBJ(readutmp).
12035         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
12036
12037         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
12038         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
12039
12040 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12041
12042         * MODULES.html.sh (Misc): Add byteswap.
12043
12044 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12045
12046         * modules/getcwd (Depends-on): Add extensions.
12047         * modules/openat (Depends-on): Likewise.
12048
12049 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12050
12051         * modules/byteswap: New file.
12052
12053 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12054
12055         * m4/byteswap.m4: New file.
12056
12057 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12058
12059         * lib/byteswap_.h: New file.
12060
12061 2005-04-25  Karl Berry  <karl@gnu.org>
12062
12063         * m4/gettext.m4: Update from GNU gettext 0.14.4.
12064
12065 2005-04-25  Albert Chin  <china@thewrittenword.com>
12066
12067         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
12068         Toolkit C bug.
12069
12070 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
12071
12072         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
12073         (func_ln_if_changed) Remove forcibly for no error message
12074         in case file does not exist.
12075
12076 2005-04-19  Simon Josefsson  <jas@extundo.com>
12077
12078         * gnulib-tool (Options): Make --symlink mean --symbolic.
12079
12080 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
12081
12082         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
12083
12084 2005-04-16  Simon Josefsson  <jas@extundo.com>
12085
12086         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
12087
12088 2005-04-15  Simon Josefsson  <jas@extundo.com>
12089
12090         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
12091
12092 2005-04-15  Simon Josefsson  <jas@extundo.com>
12093
12094         * gnulib-tool: Rename --symlink to --symbolic.
12095
12096 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
12097
12098         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
12099         symbolic links to files instead of copying/moving.  Add --aux-dir,
12100         specifying directory relative --dir where auxiliary build tools
12101         are placed.
12102
12103 2005-04-14  Bruno Haible  <bruno@clisp.org>
12104
12105         * modules/allocsa (License): Change to LGPL.
12106         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
12107
12108 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
12109
12110         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
12111         that "UTC +1 second" continues to work.  Problem reported
12112         by Dmitry V. Levin.
12113         (relunit_snumber): New rule.
12114         (relunit): Use it.
12115
12116 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
12117
12118         * lib/getdate.y (universal_time_zone_table): New constant.
12119         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
12120         universal_time_zone_table.
12121         (lookup_zone): Prefer universal_time_zone_table to
12122         local_time_zone_table, so that "GMT" time stamps are allowed in
12123         London during the summer.  Problem reported by Ian Abbott.
12124
12125 2005-04-12  Jim Meyering  <jim@meyering.net>
12126
12127         * lib/human.c (humblock): Set *options even when returning due to
12128         xstrtoumax conversion failure.  Thanks to a used-uninitialized
12129         warning from gcc-4.
12130
12131 2005-04-09  Jim Meyering  <jim@meyering.net>
12132
12133         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
12134         -Wuninitialized: initialize tm0.tm_year.
12135
12136 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
12137
12138         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
12139         count, since there's no maximum.  All uses changed.
12140         Add member dsts_seen.
12141         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
12142         not being INT_MAX.
12143         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
12144         Use pc_rels_seen to decide whther a date is absolute.
12145
12146         * lib/getdate.y (number): Don't overwrite year.
12147         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
12148         check.
12149
12150 2005-04-02  Simon Josefsson  <jas@extundo.com>
12151
12152         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
12153         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
12154
12155 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
12156
12157         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
12158         where no absolute path name can be longer than PATH_MAX.
12159
12160 2005-03-27  Jim Meyering  <jim@meyering.net>
12161
12162         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
12163
12164 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
12165
12166         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
12167         "one's complement" -> "ones' complement" in comment, as per Knuth.
12168         "value of type" -> "type or expression" in comment.
12169         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
12170
12171 2005-03-26  Jim Meyering  <jim@meyering.net>
12172
12173         Comment nits.
12174         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
12175         Correct typos: s/or/of/.
12176
12177 2005-03-26  Jim Meyering  <jim@meyering.net>
12178
12179         * modules/check-include-files: Move to ../ and rename to...
12180         * check-module: ...this.
12181
12182 2005-03-25  Jim Meyering  <jim@meyering.net>
12183
12184         * modules/xvasprintf (Files): Add xalloc.h.
12185
12186 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
12187
12188         * modules/gettext (Files): config/config.rpath ->
12189         build-aux/config.rpath
12190         * modules/iconv (Files): Likewise.
12191         Problem reported by Oskar Liljeblad.
12192
12193 2005-03-23  Jim Meyering  <jim@meyering.net>
12194
12195         * modules/check-include-files: New script to check for
12196         missing dependencies, multiple includes, etc.
12197
12198         * modules/c-strtold (Depends-on): Add xalloc.
12199         * modules/c-strtod (Depends-on): Add xalloc.
12200         * modules/hash (Depends-on): Add xalloc.
12201         (Files): Remove lib/xalloc.h.
12202
12203         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
12204         * modules/userspec (Files): Add lib/inttostr.h.
12205
12206 2005-03-23  Jim Meyering  <jim@meyering.net>
12207
12208         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
12209
12210 2005-03-22  Jim Meyering  <jim@meyering.net>
12211
12212         * modules/stat-macros: New module.
12213         * modules/canonicalize, modules/euidaccess, modules/file-type,
12214         * modules/filemode, modules/lchown, modules/makepath,
12215         * modules/rmdir, modules/stat: Depend on new stat-macros module
12216         rather than listing lib/stat-macros.h manually.
12217         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
12218
12219 2005-03-22  Jim Meyering  <jim@meyering.net>
12220
12221         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
12222
12223 2005-03-22  Bruno Haible  <bruno@clisp.org>
12224
12225         * config/srclist.txt: Replace target directory 'config' with
12226         'build-aux'.
12227         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
12228         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
12229         ../build-aux/.
12230
12231 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
12232
12233         * modules/chdir-long (Depends-on): Add mempcpy.
12234
12235         * modules/acl, modules/backupfile, modules/c-strtod,
12236         modules/c-strtold, modules/canon-host, modules/canonicalize,
12237         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
12238         modules/exclude, modules/exitfail, modules/file-type,
12239         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
12240         modules/getdate, modules/getline, modules/getpagesize,
12241         modules/getpass, modules/getugroups, modules/group-member,
12242         modules/hard-locale, modules/hash, modules/human, modules/idcache,
12243         modules/inttostr, modules/long-options, modules/makepath,
12244         modules/md5, modules/memcasecmp, modules/memcoll,
12245         modules/modechange, modules/mountlist, modules/path-concat,
12246         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
12247         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
12248         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
12249         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
12250         modules/strftime, modules/strndup, modules/strverscmp,
12251         modules/timespec, modules/unlocked-io, modules/userspec,
12252         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
12253         modules/yesno:
12254         Remove lib_SOURCES line from Makefile.am section, as this is now
12255         done automatically by the corresponding Autoconf macro.
12256
12257 2005-03-21  Jim Meyering  <jim@meyering.net>
12258
12259         Changes imported from coreutils.
12260
12261         * lib/cycle-check.c: Don't include xalloc.h.
12262
12263         * lib/path-concat.c: Don't include assert.h.
12264         (path_concat): Remove assertion that would have triggered
12265         for ABASE starting with more than one slash.
12266         Reported by Andreas Schwab.
12267
12268         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
12269         properly when ABASE is an absolute file name.
12270         Correct the description of this function.
12271         Include <assert.h>.
12272         Add an assertion and a test driver.
12273         This fixes a bug introduced on 2004-07-02.
12274         Andreas Schwab reported the resulting failure of cp --parents:
12275         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
12276
12277 2005-03-21  Jim Meyering  <jim@meyering.net>
12278
12279         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
12280         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
12281
12282 2005-03-21  Jim Meyering  <jim@meyering.net>
12283         and  Paul Eggert  <eggert@cs.ucla.edu>
12284
12285         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
12286         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
12287         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
12288         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
12289         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
12290         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
12291         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
12292         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
12293         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
12294         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
12295         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
12296         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
12297         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
12298         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
12299         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
12300         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
12301         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
12302         for these modules.
12303
12304 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
12305
12306         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
12307         (which shouldn't happen), generate nothing instead of returning 0
12308         immediately, so that nstrftime (NULL, ...) doesn't return 0.
12309
12310 2005-03-16  Bruno Haible  <bruno@clisp.org>
12311
12312         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
12313         HAVE_LONGLONG_64BIT.
12314
12315 2005-03-16  Bruno Haible  <bruno@clisp.org>
12316
12317         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
12318         HAVE_LONGLONG_64BIT.
12319
12320 2005-03-16  Bruno Haible  <bruno@clisp.org>
12321
12322         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
12323         HAVE_LONGLONG_64BIT.
12324
12325 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
12326
12327         * lib/strftime.c (my_strftime): Prepend space to format so that we can
12328         reliably distinguish strftime failure from empty output on POSIX
12329         hosts.
12330
12331 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
12332
12333         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
12334         (iconv_string): Don't guess a size-zero buffer, as that might cause
12335         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
12336         result would be 'too large', where 'too large' is (heuristically)
12337         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
12338         overflow concerns.  This will prevent some unwanted malloc failures
12339         when the inputs are very large.
12340
12341 2005-03-15  Karl Berry  <karl@gnu.org>
12342
12343         * config/srclist.txt (config.rpath): from gettext.
12344         * config/config.rpath: update.
12345
12346 2005-03-15  Bruno Haible  <bruno@clisp.org>
12347
12348         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
12349         to 'negate'.
12350
12351         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
12352         variable.
12353
12354         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
12355         results.
12356
12357 2005-03-14  Simon Josefsson  <jas@extundo.com>
12358
12359         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
12360         <fx@gnu.org>.
12361
12362 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
12363
12364         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
12365         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
12366         intprops.h.
12367         * lib/strtol.c: Likewise.
12368
12369 2005-03-14  Jim Meyering  <jim@meyering.net>
12370
12371         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
12372         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
12373         to be nonzero so that we (and caller) can detect the difference
12374         between a valid zero-length expansion and an error return, even
12375         when the underlying strftime fails before writing anything into
12376         that location.
12377
12378 2005-03-14  Bruno Haible  <bruno@clisp.org>
12379
12380         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
12381         Update from GNU gettext 0.14.3.
12382
12383 2005-03-10  Jim Meyering  <jim@meyering.net>
12384
12385         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
12386
12387 2005-03-10  Jim Meyering  <jim@meyering.net>
12388
12389         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
12390         so that this module works on systems without fchdir.
12391
12392 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
12393
12394         Factor int-properties macros into a single file, except for
12395         glibc-related files.
12396         * lib/intprops.h: New file.
12397         * lib/getloadavg.c: Include it instead of limits.h.
12398         (INT_STRLEN_BOUND): Remove.
12399         * lib/human.c: Include intprops.h.
12400         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
12401         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
12402         302/1000.
12403         * lib/inttostr.h: Include intprops.h instead of limits.h.
12404         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
12405         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
12406         for consistency with intprops.h.
12407         (time_t_is_integer, twos_complement_arithmetic): Use them.
12408         * lib/sig2str.h: Include <signal.h>, intprops.h.
12409         (INT_STRLEN_BOUND): Remove.
12410         * lib/strftime.c (TYPE_SIGNED): Remove.
12411         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
12412         * lib/strtol.c: Adjust comments to match intprops.h.
12413         * lib/userspec.c: Include intprops.h.
12414         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
12415         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
12416         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
12417         instead of rolling our own expressions.
12418         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
12419
12420         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
12421         instead of int.
12422         (my_strftime): Do not mishandle years close to INT_MAX, by doing
12423         the right thing even if adding 1900 would overflow.  Similarly
12424         for tm_mon + 1 and tm_yday + 1.
12425         Make %Y always equivalent to %C%y, and similarly for %G and %g.
12426         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
12427         (DO_SIGNED_NUMBER): New macro.
12428         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
12429
12430 2005-03-07  Bruno Haible  <bruno@clisp.org>
12431
12432         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
12433
12434 2005-03-07  Bruno Haible  <bruno@clisp.org>
12435
12436         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
12437
12438 2005-03-04  Derek R. Price  <derek@ximbiot.com>
12439
12440         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
12441         (func_import): Only replace files via --import when they have actually
12442         changed.
12443
12444 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12445
12446         * m4/mmap-anon.m4: New file.
12447         * m4/pagealign_alloc.m4: New file.
12448
12449 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12450             Bruno Haible  <bruno@clisp.org>
12451
12452         * modules/pagealign_alloc: New file.
12453         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
12454
12455 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12456             Bruno Haible  <bruno@clisp.org>
12457
12458         * lib/pagealign_alloc.h: New file.
12459         * lib/pagealign_alloc.c: New file.
12460
12461 2005-03-03  Bruno Haible  <bruno@clisp.org>
12462
12463         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
12464         Use an all-permissive copyright notice, recommended by RMS.
12465
12466 2005-03-02  Bruno Haible  <bruno@clisp.org>
12467
12468         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
12469         of AIX, the replacement has to be done only after <string.h> is
12470         included, therefore not in config.h. stpncpy.h does the replacement,
12471         and stpncpy.c uses it.
12472
12473 2005-03-02  Bruno Haible  <bruno@clisp.org>
12474
12475         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
12476         stpncpy.c uses it.
12477
12478 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12479
12480         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
12481         The workaround isn't strictly needed for POSIX conformance, and
12482         it's too much of a pain to configure and maintain.  We'll ask
12483         people to fix their kernels instead.
12484         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
12485         (NANOSLEEP_BUG_WORKAROUND): Remove.
12486         (xnanosleep): Remove the workaround.
12487
12488 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12489
12490         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
12491         Reported by Derek Price.
12492         (Include): Add "timespec.h".
12493
12494         * modules/xnanosleep (Depends-on): Remove gethrxtime.
12495
12496 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12497
12498         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
12499         to detect nanosleep bug.
12500
12501 2005-03-01  Bruno Haible  <bruno@clisp.org>
12502
12503         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
12504
12505 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
12506
12507         * modules/gethrxtime: New file.
12508         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
12509         (Depends-on): Add gethrxtime.
12510         (configure.ac): Add gl_XNANOSLEEP.
12511         (Makefile.am): Remove lib_SOURCES line.
12512
12513 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
12514
12515         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
12516         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
12517
12518 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
12519
12520         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
12521         * lib/timespec.h (gettime): Return void, since it always
12522         succeeds now.  All uses changed.
12523         * lib/gettime.c (gettime) Likewise.
12524         [HAVE_NANOTIME]: Prefer nanotime.
12525         Assume gettimeofday succeeds, as POSIX requires.
12526         Assime time () succeeds, since other code already does.
12527         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
12528         (timespec_subtract): Remove.
12529         (NANOSLEEP_BUG_WORKAROUND): New constant.
12530         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
12531         things considerably.  Use it only on GNU/Linux hosts, since the
12532         workaround shouldn't be needed elsewhere.
12533
12534 2005-02-24  Bruno Haible  <bruno@clisp.org>
12535
12536         * modules/gettext (Files): Add m4/glibc2.m4.
12537
12538 2005-02-24  Bruno Haible  <bruno@clisp.org>
12539
12540         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
12541         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
12542         * m4/progtest.m4:
12543         Update from GNU gettext 0.14.2.
12544         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
12545
12546 2005-02-24  Bruno Haible  <bruno@clisp.org>
12547
12548         * lib/localcharset.c: Update from GNU gettext 0.14.2.
12549         * lib/config.charset: Update from GNU gettext 0.14.2.
12550
12551 2005-02-24  Bruno Haible  <bruno@clisp.org>
12552
12553         * lib/gettext.h: Update from GNU gettext 0.14.2.
12554
12555 2005-02-23  Simon Josefsson  <jas@extundo.com>
12556
12557         * m4/iconvme.m4: New file.
12558
12559 2005-02-23  Jim Meyering  <jim@meyering.net>
12560
12561         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
12562         change.
12563         Thanks to Bruno Haible for catching it.
12564
12565 2005-02-22  Simon Josefsson  <jas@extundo.com>
12566
12567         * modules/iconvme: New file.
12568
12569         * MODULES.html.sh: Add iconvme.
12570
12571 2005-02-22  Simon Josefsson  <jas@extundo.com>
12572
12573         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
12574
12575 2005-02-22  Simon Josefsson  <jas@extundo.com>
12576
12577         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
12578
12579 2005-02-22  Jim Meyering  <jim@meyering.net>
12580
12581         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
12582         s/ifndef/ifdef/.
12583
12584 2005-02-20  Neil Conway  <neilc@samurai.com>
12585
12586         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
12587         returned by OSX/Darwin if the specified buffer is not large
12588         enough for the hostname.
12589
12590 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12591
12592         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
12593         pass it to _help, otherwise the latter coredumps trying to
12594         dereference state.root_argp.
12595
12596 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12597
12598         * modules/chdir-long (Depends-on): Add memrchr.
12599         * modules/memrchr (Files): Add lib/memrchr.h.
12600         (Include): "memrchr.h".
12601
12602 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12603
12604         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
12605
12606 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12607
12608         * lib/memrchr.h: New file.
12609         * lib/chdir-long.c: Include it.
12610         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
12611         Don't bother including stddef.h.
12612
12613 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
12614
12615         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
12616         inclusion.
12617         Include <sys/types.h>, for dev_t.
12618         (ME_DUMMY, ME_REMOTE): Move from here....
12619         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
12620         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
12621         Dmitry V. Levin.
12622         Include mountlist.h first, to test the interface.
12623
12624 2005-01-29  Bruno Haible  <bruno@clisp.org>
12625
12626         * lib/progname.c (program_name): Initialize.
12627         Needed when linking statically on MacOS X.
12628
12629 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
12630
12631         Sync from coreutils.
12632         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
12633         (Depends-on): Add c-strtod.
12634         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
12635
12636 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
12637
12638         Sync from coreutils.
12639         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
12640
12641         Remove files that are specific to coreutils.
12642         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
12643
12644 2005-01-28  Bruno Haible  <bruno@clisp.org>
12645
12646         * modules/javacomp: New file.
12647         * MODULES.html.sh (Java): Add javacomp.
12648
12649 2005-01-28  Bruno Haible  <bruno@clisp.org>
12650
12651         * m4/javacomp.m4: New file, from GNU gettext.
12652
12653 2005-01-28  Bruno Haible  <bruno@clisp.org>
12654
12655         * lib/javacomp.sh.in: New file, from GNU gettext.
12656         * lib/javacomp.h: New file, from GNU gettext.
12657         * lib/javacomp.c: New file, from GNU gettext.
12658
12659 2005-01-26  Simon Josefsson  <jas@extundo.com>
12660
12661         * lib/gai_strerror.c: Use GPL in header.
12662
12663 2005-01-26  Bruno Haible  <bruno@clisp.org>
12664
12665         * modules/javaexec: New file.
12666         * MODULES.html.sh (Java): Add javaexec.
12667
12668 2005-01-26  Bruno Haible  <bruno@clisp.org>
12669
12670         * m4/javaexec.m4: New file, from GNU gettext.
12671
12672 2005-01-26  Bruno Haible  <bruno@clisp.org>
12673
12674         * lib/javaexec.sh.in: New file, from GNU gettext.
12675         * lib/javaexec.h: New file, from GNU gettext.
12676         * lib/javaexec.c: New file, from GNU gettext.
12677
12678 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12679
12680         * modules/lchown (Depends-on): Remove lchown.h
12681
12682 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12683
12684         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
12685         must be defined if the header file was not found, in order
12686         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
12687
12688 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12689
12690         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
12691         initializers for struct pentry_state.
12692         (__argp_error): Check return value of __asprintf
12693         (__argp_failure): Translate error message
12694
12695         * lib/argp-parse.c: Removed braces around the expansion of N_()
12696
12697 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12698
12699         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
12700         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
12701         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
12702         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
12703         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
12704         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
12705         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
12706         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
12707         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
12708         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
12709         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
12710         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
12711         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
12712         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
12713         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
12714         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
12715         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
12716         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
12717         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
12718         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
12719         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
12720         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
12721         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
12722         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
12723         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
12724         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
12725         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
12726         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
12727         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
12728         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
12729         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
12730         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
12731         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
12732         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
12733         xstrtol.m4, xstrtoumax.m4, yesno.m4:
12734         Use an all-permissive copyright notice, recommended by RMS.
12735
12736 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
12737
12738         * modules/chdir-long (Depends-on): Remove mempcpy.
12739
12740 2005-01-21  Jim Meyering  <jim@meyering.net>
12741
12742         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
12743         same value as for Solaris 9.
12744
12745         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
12746         component length.  This included changing the parameter to be
12747         of type `char *' rather than `char const *'.
12748         * lib/chdir-long.h (chdir_long): Update prototype.
12749
12750         * lib/openat.c (fdopendir, fstatat): New functions.
12751         * lib/openat.h: Include headers required for use of DIR and struct
12752         stat.
12753         [AT_SYMLINK_NOFOLLOW]: Define.
12754         (fdopendir, fstatat): Add prototypes.
12755
12756 2005-01-21  Bruno Haible  <bruno@clisp.org>
12757
12758         * modules/classpath: New file.
12759         * MODULES.html.sh (Java): Add classpath.
12760
12761 2005-01-21  Bruno Haible  <bruno@clisp.org>
12762
12763         * lib/classpath.h: New file, from GNU gettext.
12764         * lib/classpath.c: New file, from GNU gettext.
12765
12766 2005-01-20  Simon Josefsson  <jas@extundo.com>
12767
12768         * modules/version-etc-fsf: New file.
12769
12770 2005-01-20  Simon Josefsson  <jas@extundo.com>
12771
12772         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
12773         * lib/version-etc.c: Remove version_etc_copyright.
12774         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
12775         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
12776
12777 2005-01-20  Simon Josefsson  <jas@extundo.com>
12778
12779         * lib/base64.h (isbase64): Add.
12780
12781         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
12782         using a unsigned prototype, don't inline.
12783         (base64_decode): Use it.
12784
12785 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12786
12787         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
12788         it.
12789
12790 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12791
12792         * lib/save-cwd.c (save_cwd): Remove code to support the case
12793         where fchdir is missing or flaky.
12794
12795 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12796
12797         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
12798
12799 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
12800
12801         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
12802         AC_LIBSOURCES now does this.
12803         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
12804         with new ullong_max module.
12805
12806 2005-01-19  Bruno Haible  <bruno@clisp.org>
12807
12808         * modules/sh-quote: New file.
12809         * MODULES.html.sh (Executing programs): Add sh-quote.
12810
12811 2005-01-19  Bruno Haible  <bruno@clisp.org>
12812
12813         * lib/sh-quote.h: New file, from GNU gettext.
12814         * lib/sh-quote.c: New file, from GNU gettext.
12815
12816 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12817
12818         Merge from coreutils.
12819         * m4/ullong_max.m4: New file.
12820         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
12821         (gl_MACROS): Assume localeconv exists.
12822
12823 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12824
12825         Merge changes from coreutils, as described below in several
12826         changelogs dated today.
12827
12828         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
12829         (O_DIRECTORY): Remove; not needed here, since "." must be
12830         a directory.  All uses removed.
12831         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
12832         universal on Suns, and we also need to test for IRIX.
12833         Revamp code to use 'if' rather than '#if'.
12834         Avoid unnecessary comparison of cwd->desc to 0.
12835
12836         * lib/utimens.c (futimens): Robustify the previous patch, by checking
12837         for known valid error numbers rather than observed invalid ones.
12838
12839 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12840
12841         * modules/ullong_max: New file.
12842
12843         * modules/chdir-long, modules/openat: New files.
12844         * modules/save-cwd (Depends-on): Depend on chdir-long.
12845         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
12846
12847 2005-01-18  Jim Meyering  <jim@meyering.net>
12848
12849         Merge from coreutils.
12850         * m4/chdir-long.m4, m4/openat.m4: New files.
12851         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
12852         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
12853         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
12854         is sane and DOES follow symlinks.  Besides, testing 20 different
12855         systems found no broken chown implementations.
12856         Prompted by a change in rsync's copy of this macro.
12857         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
12858
12859         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
12860
12861         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
12862         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
12863         NULL-means-set-to-current-time semantics.
12864         Remove temporary file immediately, rather than waiting
12865         for configure's at-exit trap code to do it.
12866
12867 2005-01-18  Jim Meyering  <jim@meyering.net>
12868
12869         * lib/version-etc.c (version_etc_copyright): Update copyright date.
12870
12871         * lib/utimens.c (futimens): Account for the fact that futimes
12872         can also fail with errno == ENOSYS or errno == ENOENT.
12873         Patch from Dmitry V. Levin.
12874
12875         Change the name of the robust chdir function from chdir to chdir_long.
12876         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
12877         (restore_cwd): Use chdir_long, not chdir.
12878         * lib/chdir-long.c: Renamed from chdir.c.
12879         * lib/chdir-long.h: Renamed from chdir.h.
12880         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
12881         Hurd.
12882
12883 2005-01-18  Bruno Haible  <bruno@clisp.org>
12884
12885         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
12886         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
12887         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
12888         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
12889         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
12890         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
12891         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
12892         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
12893         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
12894         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
12895         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
12896         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
12897         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
12898         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
12899         Use an all-permissive copyright notice, recommended by RMS.
12900
12901 2005-01-18  Bob Proulx  <bob@proulx.com>
12902
12903         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
12904         simplify offsetof() macro construct to avoid compile failure with
12905         native HP-UX 11.0 ANSI C compiler.
12906
12907 2005-01-17  Bruno Haible  <bruno@clisp.org>
12908
12909         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
12910         redundant because stpncpy.m4 takes care of it.
12911
12912 2005-01-17  Bruno Haible  <bruno@clisp.org>
12913
12914         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
12915
12916 2005-01-17  Bruno Haible  <bruno@clisp.org>
12917
12918         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
12919         used.
12920
12921 2005-01-17  Bruno Haible  <bruno@clisp.org>
12922
12923         * lib/fwriteerror.h (fwriteerror): Change specification to include
12924         fclose.
12925         * lib/fwriteerror.c: Include <stdbool.h>.
12926         (fwriteerror): At the end, close the file stream. Record whether
12927         stdout was already closed.
12928
12929 2005-01-17  Bruno Haible  <bruno@clisp.org>
12930
12931         * lib/execute.c (environ): Declare if needed.
12932         * lib/pipe.c (environ): Likewise.
12933         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
12934
12935 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12936
12937         * modules/argp: Depend on vsnprintf
12938
12939 2005-01-10  Jim Meyering  <jim@meyering.net>
12940
12941         * modules/closeout (Depends-on): Add atexit.
12942
12943 2005-01-06  Bruno Haible  <bruno@clisp.org>
12944
12945         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
12946
12947 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
12948
12949         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
12950         definitions to be after all include files, to avoid collisions.
12951         Problem reported by Bob Proulx.
12952
12953 2005-01-04  Jim Meyering  <jim@meyering.net>
12954
12955         Changes imported from coreutils.
12956         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
12957         as the mkstemp template, use a temporary directory and an
12958         8.3-friendly template to avoid trouble on systems like DJGPP.
12959         Reported by Juan M. Guerrero via Stepan Kasal.
12960         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
12961         close. Remove the temporary directory right away, rather than waiting
12962         for configure's at-exit trap code to do it.
12963         Suggestion from Stepan Kasal.
12964
12965 2005-01-01  Simon Josefsson  <jas@extundo.com>
12966
12967         * gnulib-tool: Print #include directives when --import'ing.
12968
12969 2004-12-28  Simon Josefsson  <jas@extundo.com>
12970
12971         * tests/test-base64.c: Include required header files.  Remove
12972         unused variables.
12973
12974 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
12975
12976         * modules/error (Depends-on): Remove gettext.
12977
12978 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
12979
12980         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
12981         not needed.  This removes a dependency on the gettext module.
12982         [defined _LIBC]: Do not include <libintl.h>; not needed.
12983
12984 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
12985
12986         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
12987         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
12988
12989 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
12990
12991         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
12992         HAVE_DECL_STRTOLD.
12993
12994 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
12995
12996         * modules/getdate (Depends-on): Remove alloca-opt.
12997
12998 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
12999
13000         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
13001
13002 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13003
13004         * lib/argp-parse.c: Include <stddef.h>.
13005         (alignof, alignto): New macros.
13006         (parser_init): Don't assume that void * is aligned sufficiently
13007         for struct option.
13008
13009         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
13010         need to extend the stack.
13011         (YYINITDEPTH): New macro, so that the initial stack isn't overly
13012         large.
13013
13014 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13015
13016         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
13017
13018 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
13019
13020         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
13021         (2004-10-24) change.  Apparently this was a false alarm.
13022
13023         * modules/getdate: Depend on alloca-opt, not alloca.
13024
13025 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
13026
13027         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
13028         Remove now-obsolete comment about AIX.
13029         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
13030         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
13031         (YYMAXDEPTH): New macro.
13032
13033 2004-12-18  Simon Josefsson  <jas@extundo.com>
13034
13035         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
13036
13037 2004-12-18  Bruno Haible  <bruno@clisp.org>
13038
13039         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
13040
13041 2004-12-18  Bruno Haible  <bruno@clisp.org>
13042
13043         * lib/fatal-signal.c (fatal_signals): Make non-const.
13044         (init_fatal_signals): New function.
13045         (uninstall_handlers, install_handlers): Ignore signals that were set to
13046         SIG_IGN.
13047         (at_fatal_signal): Call init_fatal_signals.
13048         (init_fatal_signal_set): Likewise. Ignore signals that were set to
13049         SIG_IGN.
13050         Reported by Paul Eggert.
13051
13052 2004-12-18  Bruno Haible  <bruno@clisp.org>
13053
13054         * doc/alloca.texi: New file.
13055         * doc/alloca-opt.texi: New file.
13056
13057 2004-12-17  Jim Meyering  <jim@meyering.net>
13058
13059         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
13060         Otherwise, install-sh could exit with improper exit status when
13061         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
13062
13063 2004-12-16  Simon Josefsson  <jas@extundo.com>
13064
13065         * tests/test-base64.c: Add license.
13066
13067 2004-12-15  Stepan Kasal  <address@hidden>
13068
13069         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
13070
13071 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
13072
13073         * modules/getcwd (Files): Add m4/d-ino.m4.
13074         Suggested by Mark D. Baushke.
13075
13076 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
13077
13078         * lib/getdate.y (textint): New member "negative".
13079         (time_zone_hhmm): New function.
13080         Expect 14 shift-reduce conflicts, not 13.
13081         (o_colon_minutes): New rule.
13082         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
13083         (yylex): Set the "negative" member of signed numbers.
13084
13085 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
13086
13087         * doc/getdate.texi (Time of day items, Time zone items):
13088         Describe new formats +00:00, UTC+00:00.
13089
13090 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13091
13092         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
13093         spurious "-l"s.  Problem reported by Stepan Kasal.
13094
13095 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
13096
13097         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
13098         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
13099
13100 2004-12-04  Simon Josefsson  <jas@extundo.com>
13101
13102         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
13103         Vandoorselaere <yoann@prelude-ids.org>.
13104
13105 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13106
13107         Changes imported from coreutils.
13108         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
13109         exist.
13110         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
13111
13112 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13113
13114         Changes imported from coreutils.
13115         * lib/hard-locale.c: Assume <locale.h> exists.
13116         Include "strdup.h".
13117         (GLIBC_VERSION): New macro.
13118         (hard_locale): Assume setlocale exists.
13119         Rewrite to avoid #ifdef.
13120         Use strdup rather than malloc + strcpy.
13121         * lib/human.c: Assume <locale.h> exists.
13122         (human_readable): Assume localeconv exists.
13123
13124 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13125
13126         * modules/hard-locale (Depends-on): Add strdup.
13127
13128 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
13129
13130         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
13131         convert T2, not T.  (Imported from libc.)
13132
13133 2004-11-30  Simon Josefsson  <jas@extundo.com>
13134
13135         * modules/restrict (License): Change to LGPL.
13136
13137 2004-11-30  Simon Josefsson  <jas@extundo.com>
13138
13139         * m4/restrict.m4: Add copyright and copying conditions.
13140
13141 2004-11-30  Simon Josefsson  <jas@extundo.com>
13142
13143         * m4/base64.m4: New file.
13144
13145 2004-11-30  Simon Josefsson  <jas@extundo.com>
13146
13147         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
13148         base64.
13149
13150         * tests/test-base64.c: New file.
13151
13152         * modules/base64: New file.
13153
13154 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
13155
13156         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
13157         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
13158
13159         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
13160
13161 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
13162
13163         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
13164         (__getcwd.c): Don't restore errno; glibc doesn't.
13165         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
13166         first, falling back to our code only if its results look suspicious.
13167         Ensure that the resulting buffer is only as large as necessary.
13168
13169         * lib/readutmp.c: Include readutmp.h first.
13170         Include <errno.h>, since readutmp.h no longer does that.
13171         * lib/readutmp.h: Don't include <errno.h>,
13172         <sys/param.h>, <time.h>; not needed to establish interface.
13173         (errno): Remove decl.
13174         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
13175         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
13176         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
13177
13178 2004-11-28  Simon Josefsson  <jas@extundo.com>
13179
13180         * lib/base64.h, base64.c: New file.
13181
13182 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
13183
13184         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
13185
13186 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
13187
13188         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
13189         (Depends-on): Remove pathmax, same.  Add mempcpy.
13190         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
13191         (Makefile.am): Append getcwd.h to lib_SOURCES.
13192         (Include): Add getcwd.h.
13193         (Maintainer): Change from Jim Meyering to "all, glibc",
13194         since getdate now uses intended-for-glibc code.
13195         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
13196         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
13197
13198 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13199
13200         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
13201         HP's ANSI C compiler.
13202         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
13203         Declaring int functions causes warnings on some modern systems and
13204         shouldn't be needed to compile on ancient ones.
13205         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
13206         defined.
13207
13208         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
13209         with the following changes.
13210         (__set_errno): Parenthesize properly.
13211         Include <stdbool.h>.
13212         (MIN, MAX, MATCHING_INO): New macros.
13213         (__getcwd): Define with prototype, not K&R form.
13214         Use heuristics to allocate default buffer on stack if possible.
13215         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
13216         behavior, and to avoid the PATH_MAX limit when computing
13217         ../../../../...
13218         Use MATCHING_INO to compare inode number to file.
13219         Check for arithmetic overflow in size calculations.
13220         Fix bug in reallocation of dot array that caused getcwd to fail
13221         on directories nested deeper than 75.
13222         Be more careful about saving errno on error.
13223         Do not use realloc; use only free+malloc, as this is a bit
13224         more flexible and avoids a needless copy operation.
13225         Do not inspect st_dev and st_ino for symbolic links; POSIX
13226         doesn't specify the latter.
13227         Check for closedir errors.
13228         Avoid needless casts.
13229         Use "#ifdef weak_alias" around weak_alias, to be like other
13230         glibc code.
13231         The following changes to getcwd.c have effect only when used in
13232         gnulib; they have no effect inside glibc proper.
13233         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
13234         as alloca isn't used.
13235         (alloca, __alloca): Likewise.
13236         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
13237         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
13238         unconditionally, as gnulib assumes C89 or better.
13239         Do not include <sys/param.h>.
13240         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
13241         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
13242         better.
13243         (NULL) [!defined NULL]: Remove; we assume C89 or better.
13244         Include <dirent.h> in a way that is compatible with modern Autoconf.
13245         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
13246         New macros, if not already defined.
13247         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
13248         Use "_LIBC", not "defined _LIBC", for consistency.
13249         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
13250         a mempcpy module.
13251         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
13252         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
13253         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
13254         credit only to Jim Meyering and adjust the copyright dates.
13255         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
13256         <stdlib.h>, <unistd.h>, "pathmax.h".
13257         Instead, include "xgetcwd.h" (first) and "getcwd.h".
13258         (INITIAL_BUFFER_SIZE): Remove.
13259         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
13260
13261 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13262
13263         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
13264         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
13265         Use the _ONCE methods, for efficiency.
13266         Check for fcntl.h.  In test program, include <errno.h>
13267         and <fcntl.h> if available.  Remove old K&R cruft from
13268         test program.  Check for common errors in GNU/Linux,
13269         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
13270         don't do AC_LIBOBJ, as that's getcwd.m4's job.
13271         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
13272         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
13273         name accordingly.
13274         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
13275         accommodate new getcwd.c.
13276         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
13277         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
13278         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
13279         that's all we need now.
13280
13281 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13282
13283         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
13284         argp-parse.c depends on getopt internals, that means we should
13285         always use our getopt, to be on the safe side.
13286         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
13287         order not to spoil the result of an eventual previous invocation
13288         of gl_GETOPT_SUBSTITUTE.
13289
13290 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13291
13292         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
13293         redefinition warnings. To avoid them, include the defines
13294         in `#if !defined __need_getopt ... #endif'. The only place
13295         where __getopt_argv_const is used is in definitions
13296         of getopt_long and getopt_long_only below, which are as well
13297         protected by `#ifndef __need_getopt'.
13298         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
13299         __need_getopt after including <stdio.h> and <unistd.h> These
13300         headers might have defined it.
13301
13302 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
13303
13304         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
13305
13306 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
13307
13308         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
13309         (futimens): New function, which uses futimes if available.
13310         (futimens, utimens): Support timespec==NULL, with same semantics
13311         as utime and utimens.
13312         * lib/utimens.h (futimens): New decl.
13313
13314 2004-11-23  Jim Meyering  <jim@meyering.net>
13315
13316         * lib/getopt_.h: Remove trailing blanks.
13317
13318 2004-11-23  Jim Meyering  <jim@meyering.net>
13319
13320         * lib/__fpending.c: Add comment.
13321
13322 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
13323
13324         * modules/canonicalize (Depends-on): Add xreadlink.
13325         Problem reported by James Youngman.
13326
13327 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
13328
13329         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
13330         New macros.
13331         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
13332         optopt): Use them instead of invoking ## directly; otherwise, the
13333         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
13334
13335 2004-11-19  Bruno Haible  <bruno@clisp.org>
13336
13337         * lib/strtok_r.c: Move comments from here...
13338         * lib/strtok_r.h: ... to here.
13339
13340 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
13341
13342         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
13343         implementations that mishandle size_t overflow.
13344
13345 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
13346
13347         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
13348         might fail.  Problem reported by Yoann Vandoorselaere.
13349         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
13350         implementations that mishandle size_t overflow.
13351
13352 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13353
13354         * modules/canon-host (Depends-on): Add strdup.
13355
13356 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13357
13358         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
13359
13360 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13361
13362         * lib/canon-host.c: Include "strdup.h".
13363         (canon_host): Use getaddrinfo if available, so that IPv6 works.
13364         Use strdup instead of malloc/strcpy to duplicate strings.
13365
13366         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
13367         (human_space_before_unit): New constant.
13368         * lib/human.c (human_readable): Support it.
13369
13370         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
13371         (xgetcwd): Set errno correctly when failing.
13372         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
13373         the failure is actually due to a PATH_MAX problem.
13374
13375         Further getopt changes to make it more likely that glibc will
13376         buy the changes back.
13377         * lib/getopt.c (POSIXLY_CORRECT): New constant.
13378         (getopt): Use it, so to preserve glibc semantic
13379         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
13380         when compiling for libc.
13381         * lib/getopt_.h (__getopt_argv_const): Bring it back.
13382         (getopt_long, getopt_long_only): Use it.
13383
13384         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
13385         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
13386         (getopt): Argv is now char * const *, as per standard.
13387         (_getopt_internal_r, _getopt_internal): Argv is now char **,
13388         not char *__getopt_argv_const *.
13389         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
13390         _getopt_long_only_r): Likewise.
13391         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
13392         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
13393         _getopt_long_r, _getopt_long_only_r): Likewise.
13394         * lib/getopt_.h (__getopt_argv_const): Remove.
13395         (getopt): Argv is now char * const *, as per standard.
13396
13397         * lib/getdate.y (tORDINAL): New token.
13398         (day, relunit): Allow it for relative times.
13399         (relative_time_table): Use tORDINAL for ordinals.
13400
13401 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13402
13403         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
13404         Document that "second" isn't allowed as an ordinal number.
13405
13406 2004-11-16  Jim Meyering  <jim@meyering.net>
13407
13408         * modules/closeout (Depends-on): Add fpending.
13409
13410 2004-11-15  Jim Meyering  <jim@meyering.net>
13411
13412         * lib/closeout.c: Include "__fpending.h" once again.
13413         Include <stdbool.h>.
13414         (close_stdout): Don't fail just because stdout was closed initially,
13415         since some programs don't write to stdout in the normal course of
13416         operation (other than --version and --help), and we don't want this
13417         function to make e.g. `touch file >&-' fail.
13418         But do fail if it was closed and someone has tried to write to it.
13419         E.g., `printf foo >&-' must fail.
13420
13421 2004-11-13  Jim Meyering  <jim@meyering.net>
13422
13423         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
13424
13425 2004-11-12  Simon Josefsson  <jas@extundo.com>
13426
13427         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
13428         small doc fix is still pending.
13429
13430 2004-11-11  Simon Josefsson  <jas@extundo.com>
13431
13432         * modules/strtok_r: New file.
13433
13434         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13435         strtok_r.
13436
13437 2004-11-11  Simon Josefsson  <jas@extundo.com>
13438
13439         * m4/strtok_r.m4: New file.
13440
13441         * m4/getopt.m4: Replace opterr.
13442
13443 2004-11-11  Simon Josefsson  <jas@extundo.com>
13444
13445         * lib/strtok_r.h, strtok_r.c: New file.
13446
13447 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
13448
13449         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
13450         of replacing opterr, getopt, etc.  This should handle the
13451         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
13452
13453 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
13454
13455         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
13456         we can stop lying to compilers about the constness of argv when we
13457         are compiled outside glibc.
13458         (getopt, getopt_long, getopt_long_only): Use it.
13459         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
13460         _getopt_internal, getopt): Likewise.
13461         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
13462         _getopt_long_only_r): Likewise.
13463         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
13464         _getopt_long_r, _getopt_long_only_r): Likewise.
13465
13466         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
13467         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
13468         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
13469         the other external symbols.
13470         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
13471         declaration, since the above renaming now works around collisions.
13472
13473 2004-11-11  Jim Meyering  <jim@meyering.net>
13474
13475         * lib/linebreak.c: Remove trailing blanks.
13476         * lib/alloca_.h: Likewise.
13477         * lib/acosl.c: Likewise.
13478         * lib/euidaccess.c: Likewise.
13479         * lib/allocsa.h: Likewise.
13480
13481 2004-11-10  Simon Josefsson  <jas@extundo.com>
13482
13483         * m4/getaddrinfo.m4: New file.
13484
13485 2004-11-10  Simon Josefsson  <jas@extundo.com>
13486
13487         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
13488
13489 2004-11-10  Simon Josefsson  <jas@extundo.com>
13490
13491         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13492         getaddrinfo.
13493
13494         * modules/getaddrinfo: New file.
13495
13496 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13497
13498         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
13499
13500 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13501
13502         * lib/mktime.c (SHR): New macro, which is a portable
13503         substitute for >> that should work even on Crays.
13504         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
13505         Problem reported by Mark D. Baushke in
13506         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
13507         * lib/getdate.y (SHR): Likewise.
13508         (tm_diff): Use it.
13509         * lib/strftime.c (SHR): Likewise.
13510         (tm_diff): Use it.
13511         * lib/quotearg.c (struct quoting_options): Use unsigned int for
13512         quote_these_too, so that right shifts are well defined.  All uses
13513         changed.
13514
13515 2004-11-10  Jim Meyering  <jim@meyering.net>
13516
13517         Ensure that no close failure goes unreported.
13518         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
13519         return early when it seems there's nothing to flush.
13520         Don't include __fpending.h.
13521
13522 2004-11-10  Jim Meyering  <jim@meyering.net>
13523
13524         * modules/closeout (Depends-on): Remove fpending.
13525
13526 2004-11-10  Jim Meyering  <jim@meyering.net>
13527
13528         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
13529
13530 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
13531
13532         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
13533         gl_FUNC_STRFTIME.
13534         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
13535         and AC_REQUIRE when possible, to avoid duplicate checks.
13536         Check for <wchar.h>.
13537
13538 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
13539
13540         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
13541
13542 2004-11-09  Bruno Haible  <bruno@clisp.org>
13543
13544         * m4/sockpfaf.m4: New file.
13545
13546 2004-11-05  Bruno Haible  <bruno@clisp.org>
13547
13548         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
13549         Reported by Mark D. Baushke <mdb@cvshome.org>.
13550
13551 2004-11-04  Bruno Haible  <bruno@clisp.org>
13552
13553         2004-09-11  Bruno Haible  <bruno@clisp.org>
13554                 * allocsa.valgrind: New file.
13555         2004-02-06  Bruno Haible  <bruno@clisp.org>
13556                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
13557                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
13558                 Reported by Christopher Seip <chris.seip@hp.com>.
13559
13560 2004-11-04  Bruno Haible  <bruno@clisp.org>
13561
13562         * modules/allocsa (Files): Add lib/allocsa.valgrind.
13563         (Makefile.am): Distribute it.
13564
13565 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
13566
13567         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
13568         with errno == ERANGE if the buffer is too small.
13569         Problem reported by Mark D. Baushke.
13570
13571 2004-11-03  Albert Chin  <china@thewrittenword.com>
13572             Paul Eggert  <eggert@cs.ucla.edu>
13573
13574         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
13575         equivalent, substitute $ac_type for equivalent type rather than
13576         blindly using uint32_t *always* which won't work if uint32_t is not
13577         available.  Define _UINT32_T to work around typedef of uint32_t if
13578         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
13579         2.5.1.
13580
13581 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13582
13583         * m4/jm-macros.m4: Sync from coreutils.
13584         (gl_MACROS): Check for mbrlen, for pathchk.
13585         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
13586
13587 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13588
13589         * lib/xreadlink.c (MAXSIZE): New macro.
13590         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
13591         size does not exceed MAXSIZE.  Avoid cast.
13592         As suggested by Mark D. Baushke in
13593         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
13594         if readlink fails with buffer size just under MAXSIZE, try again
13595         with MAXSIZE.
13596
13597 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13598
13599         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
13600
13601 2004-11-02  Derek R. Price  <derek@ximbiot.com>
13602         and  Paul Eggert  <eggert@cs.ucla.edu>
13603
13604         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
13605         (get_date): Overparenthesize to avoid GCC warning.
13606
13607 2004-11-02  Bruno Haible  <bruno@clisp.org>
13608
13609         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
13610         returns void.
13611
13612 2004-11-02  Bruno Haible  <bruno@clisp.org>
13613
13614         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
13615         function returns void.
13616
13617 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
13618
13619         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
13620         fflush_unlocked, flockfile, funlockfile, funlockfile,
13621         fputs_unlocked, putc_unlocked.
13622
13623 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
13624
13625         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
13626         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
13627         already declared.
13628
13629 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13630
13631         * modules/getdate (Files): Add doc/getdate.texi.
13632         (Depends-on): Add setenv, xalloc.
13633
13634 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13635
13636         * lib/getdate.y: Add support for TZ="foo" within a date string.
13637         Fix some bugs near time_t boundaries.  Reject dates with
13638         out-of-range components, e.g., "Sept 31".
13639         Include <stdlib.h>, "setenv.h", "xalloc.h".
13640         (ISDIGIT_LOCALE): Remove; unused.
13641         Note that the TZ and time functions used here are not reentrant.
13642         (mktime_ok, get_tz): New functions.
13643         (TZBUFSIZE): New constant.
13644         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
13645         This requires that we sometimes generate our own TZ="XXX..." setting.
13646
13647 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13648
13649         * doc/getdate.texi: New file, from coreutils with modifications for
13650         the new TZ parsing.
13651
13652 2004-10-27  Derek R. Price  <derek@ximbiot.com>
13653
13654         * lib/mktime.c (not_equal_tm): Remove redundant check.
13655
13656 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
13657
13658         * modules/regex (lib_SOURCES): Add regex.c.
13659         Reported by James Youngman in
13660         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
13661
13662 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
13663
13664         * lib/getdate.y: Use Bison 1.875 features, and some minor
13665         code cleanups.  This change does not affect semantics.
13666         Don't include <stdlib.h>; no longer needed.
13667         Don't include unlocked-io.h; only the "#if TEST" code uses
13668         stdio, and performance isn't crucial there.
13669         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
13670         Bison 1.875 features as described below.
13671         All uses of "PC." replaced by "pc->".
13672         (YYSTYPE): Add a forward declaration.
13673         (yylex, yyerror): Use full prototypes in forward decls.
13674         Use "%pure-parser" rather than obsolescent "%pure_parser".
13675         Use %parse-param and %lex-param instead of obsolescent
13676         YYPARSE_PARAM and YYLEX_PARAM.
13677         (meridian_table, month_and_day_table, time_units_table,
13678         relative_time_table, time_zone_table, military_table,
13679         lookup_zone, lookup_word, get_date):
13680         Use NULL instead of 0 where appropriate.
13681         (to_hour): Avoid abort (), to avoid a dependency on
13682         stdlib.h.
13683         (yyerror, yylex): Now accepts parser_control * arg.
13684         (main) [TEST]: Use '\0' rather than 0 for char.
13685
13686 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
13687
13688         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
13689
13690 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
13691
13692         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
13693         It's now the caller's responsibility to handle the case where
13694         !HAVE_GETPAGESIZE && !defined getpagesize.
13695
13696         * lib/mktime.c (leapyear): Arg is long int, not int.
13697
13698 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
13699
13700         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
13701
13702 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
13703
13704         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
13705         missing.  Problem reported by James Youngman.
13706
13707 2004-10-16  Simon Josefsson  <jas@extundo.com>
13708
13709         * gnulib-tool: Fix comments.  Fix parse problem.
13710         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
13711
13712 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
13713
13714         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
13715         implementation of getopt_long.  Problem reported by Alexander Taler in:
13716         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
13717
13718 2004-10-15  Bruno Haible  <bruno@clisp.org>
13719
13720         * gnulib-tool: Untabify. Initialize supplied_libname.
13721         (func_usage): More homogenous output.
13722         (func_modules_transitive_closure, func_modules_to_filelist,
13723         func_emit_lib_Makefile_am): New functions.
13724         (func_import): New function, extracted from big case statement. Use
13725         func_get_license, func_modules_transitive_closure,
13726         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
13727         opt_lgpl. Don't use test -a, as it's not portable.
13728         (func_create_testdir): Use func_modules_transitive_closure,
13729         func_modules_to_filelist, func_emit_lib_Makefile_am.
13730
13731 2004-10-15  Bruno Haible  <bruno@clisp.org>
13732
13733         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
13734
13735 2004-10-15  Bruno Haible  <bruno@clisp.org>
13736
13737         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
13738         the portions belonging to each module.
13739         Suggested by Derek Robert Price <derek@ximbiot.com>.
13740
13741 2004-10-12  Simon Josefsson  <jas@extundo.com>
13742
13743         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
13744         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
13745         to real functions.
13746
13747 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13748
13749         * modules/vsnprintf: New file.
13750
13751 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13752
13753         * m4/vsnprintf.m4: New file.
13754
13755 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13756
13757         * lib/vsnprintf.h: New file.
13758         * lib/vsnprintf.c: New file.
13759
13760 2004-10-11  Bruno Haible  <bruno@clisp.org>
13761
13762         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
13763         vsnprintf.
13764
13765 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
13766
13767         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
13768
13769 2004-10-07  Bruno Haible  <bruno@clisp.org>
13770
13771         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
13772         fits into the provided buffer.
13773
13774 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
13775
13776         * lib/diacrit.c, diacrit.h: Add GPL notice.
13777
13778         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
13779         notice.
13780         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
13781         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
13782         This avoids a potential constant-folding bug.
13783
13784 2004-10-05  Bruno Haible  <bruno@clisp.org>
13785
13786         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
13787         for the declaration of strsep.
13788
13789 2004-10-05  Bruno Haible  <bruno@clisp.org>
13790
13791         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
13792
13793 2004-10-04  Simon Josefsson  <jas@extundo.com>
13794
13795         * modules/memmem: New file.
13796         * tests/test-memmem.c: New file.
13797         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
13798
13799 2004-10-04  Simon Josefsson  <jas@extundo.com>
13800
13801         * m4/memmem.m4: New file.
13802
13803 2004-10-04  Simon Josefsson  <jas@extundo.com>
13804
13805         * lib/memmem.h: New file.
13806         * lib/memmem.c: New file, taken from glibc.
13807
13808 2004-10-04  Simon Josefsson  <jas@extundo.com>
13809
13810         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
13811         '#ifdef USE_UNLOCKED_IO'.
13812
13813 2004-10-04  Simon Josefsson  <jas@extundo.com>
13814
13815         * config/srclist.txt: Add memmem from glibc.
13816
13817 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13818
13819         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
13820
13821         * modules/argmatch, modules/argp, modules/closeout, modules/error,
13822         modules/exclude, modules/getdate, modules/getline,
13823         modules/getndelim2, modules/getpass, modules/getpass-gnu,
13824         modules/getusershell, modules/linebuffer, modules/md5,
13825         modules/mountlist, modules/posixtm, modules/readtokens,
13826         modules/readutmp, modules/regex, modules/sha1,
13827         modules/version-etc, modules/yesno:
13828         Remove dependency on unlocked-io.
13829
13830 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13831
13832         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
13833
13834         * m4/unlocked-io.m4: Add copyright notice.
13835         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
13836
13837 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13838
13839         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
13840         * lib/xmalloc.c (xmemdup): Likewise.
13841         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
13842         XFREE): Remove these long-obsolescent macros.
13843         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
13844         * lib/xstrdup.c: Remove.
13845
13846         * lib/regex.c (re_comp): Cast gettext return value to char *,
13847         Problem reported by Martin Neitzel via Mark D. Baushke.
13848
13849 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13850
13851         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
13852         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
13853         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
13854         regex.c, sha1.c, version-etc.c, yesno.c:
13855         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
13856         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
13857         the includer's responsibility.
13858
13859         Sync from coreutils.
13860
13861         * lib/modechange.c (mode_compile): Don't decrement a pointer that
13862         points to the start of a string, as the C Standard says the
13863         resulting behavior is undefined.
13864
13865         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
13866         simple -> simple_backups, numbered_existing ->
13867         numbered_existing_backups, numbered -> numbered_backups
13868         to avoid shadowing problems.  All uses changed.
13869         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
13870         * lib/backupfile.c (check_extension, numbered_backup):
13871         Rename locals to avoid shadowing 'basename'.
13872         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
13873         once.
13874
13875         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
13876         * lib/.cvsignore: Add getopt.h.
13877
13878 2004-10-04  Bruno Haible  <bruno@clisp.org>
13879
13880         * modules/README: New file.
13881         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
13882         not a module.
13883
13884 2004-10-02  Jim Meyering  <jim@meyering.net>
13885
13886         * lib/dirfd.h, getpagesize.h: Add copyright notice.
13887
13888 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13889
13890         * modules/strsep: New file.
13891
13892 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13893
13894         * m4/strsep.m4: New file.
13895
13896 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13897
13898         * lib/strsep.h: New file.
13899         * lib/strsep.c: New file.
13900
13901 2004-10-01  Simon Josefsson  <jas@extundo.com>
13902
13903         * lib/snprintf.c (snprintf): Handle size==0.
13904
13905 2004-10-01  Simon Josefsson  <jas@extundo.com>
13906             Bruno Haible  <bruno@clisp.org>
13907
13908         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
13909         (snprintf): Declare 'args'.
13910
13911 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
13912
13913         * lib/snprintf.c: Remove comments as to why each header is needed.
13914
13915 2004-10-01  Bruno Haible  <bruno@clisp.org>
13916
13917         * MODULES.html.sh: Add strsep.
13918
13919 2004-09-30  Simon Josefsson  <jas@extundo.com>
13920
13921         * modules/snprintf: New file.
13922
13923 2004-09-30  Simon Josefsson  <jas@extundo.com>
13924
13925         * m4/snprintf.m4: New file.
13926
13927 2004-09-30  Simon Josefsson  <jas@extundo.com>
13928
13929         * lib/snprintf.h, lib/snprintf.c: New files.
13930
13931 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13932
13933         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
13934         (hol_entry_help): Never translate an empty string.
13935         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
13936         * lib/argp.h (OPTION_NO_TRANS): New option.
13937
13938 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13939
13940         * modules/argp (Maintainer): Replace Simon Josefsson
13941         by Sergey Poznyakoff.
13942
13943 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13944
13945         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
13946         changes merged back into glibc.
13947
13948 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13949
13950         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
13951
13952 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
13953
13954         * lib/xvasprintf.c: Include xalloc.h.
13955         (xvasprintf): Use xalloc_die, not xmalloc_die.
13956
13957 2004-09-29  Bruno Haible  <bruno@clisp.org>
13958
13959         * modules/alloca-opt: New file, derived from modules/alloca.
13960         * modules/allocsa: Depend on alloca-opt instead of alloca.
13961         * modules/setenv: Likewise.
13962         * modules/vasnprintf: Likewise.
13963         * MODULES.html.sh: Add alloca-opt.
13964
13965 2004-09-28  Simon Josefsson  <jas@extundo.com>
13966
13967         * gnulib-tool: New parameter --lgpl, to asseert that modules are
13968         LGPL, and to replace license template from GPL to LGPL.
13969
13970 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
13971
13972         * modules/dummy: Change license to LGPL.
13973
13974 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
13975
13976         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
13977
13978 2004-09-24  Simon Josefsson  <jas@extundo.com>
13979
13980         * modules/minmax (License): Change from GPL to LGPL.
13981
13982 2004-09-23  Simon Josefsson  <jas@extundo.com>
13983
13984         * gnulib-tool (--import): Typo.
13985
13986 2004-09-23  Simon Josefsson  <jas@extundo.com>
13987
13988         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
13989
13990 2004-09-22  Bruno Haible  <bruno@clisp.org>
13991
13992         * modules/*: Add 'License' field.
13993         * gnulib-tool: Accept --extract-license option.
13994         (func_get_license): New function.
13995
13996 2004-09-21  Bruno Haible  <bruno@clisp.org>
13997
13998         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
13999         Reported by Simon Josefsson.
14000
14001 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14002
14003         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
14004         gl_AC_TYPE_LONG_LONG.
14005
14006 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14007
14008         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
14009
14010 2004-09-18  Simon Josefsson  <jas@extundo.com>
14011         and  Paul Eggert  <eggert@cs.ucla.edu>
14012
14013         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
14014         calls with autoreconf.  Define GL_LIB.
14015
14016 2004-09-14  Karl Berry  <karl@gnu.org>
14017
14018         * config/srclist.txt: unsync setenv.c, sigh.
14019
14020 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
14021
14022         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
14023         Problem reported by Bruno Haible in:
14024         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
14025
14026 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
14027
14028         * config/srclist.txt: Comment out argp-pvh.c.
14029
14030 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
14031
14032         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
14033         in case some system header has #define'd it.  Problem reported by
14034         Soeren D. Schulze in
14035         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
14036
14037 2004-09-09  Karl Berry  <karl@gnu.org>
14038
14039         * regex.[ch]: delete from the root.  These were supposed to be
14040                 synced with emacs cvs, but this has not happened for about
14041                 a year, and anyway nothing else uses emacs regex.[ch].
14042                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
14043                 lib/regex[.ch] is untouched.
14044
14045 2004-09-09  Bruno Haible  <bruno@clisp.org>
14046
14047         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
14048
14049 2004-09-09  Bruno Haible  <bruno@clisp.org>
14050
14051         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
14052         modifications.
14053         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
14054
14055 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
14056
14057         * modules/xvasprintf: New file.
14058         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
14059
14060 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
14061
14062         * lib/xvasprintf.h: New file.
14063         * lib/xvasprintf.c: New file.
14064         * lib/xasprintf.c: New file.
14065
14066 2004-09-08  Bruno Haible  <bruno@clisp.org>
14067
14068         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
14069
14070 2004-09-08  Bruno Haible  <bruno@clisp.org>
14071
14072         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
14073         length is > INT_MAX.
14074         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
14075         more.
14076
14077 2004-09-08  Bruno Haible  <bruno@clisp.org>
14078
14079         * lib/stdint_.h: New file, taken from GNU clisp.
14080
14081 2004-09-08  Bruno Haible  <bruno@clisp.org>
14082             Oskar Liljeblad  <oskar@osk.mine.nu>
14083
14084         * modules/stdint: New file.
14085         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
14086
14087 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14088
14089         Import from coreutils.
14090         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
14091         strings on unbounded length.  alloca's performance benefits aren't
14092         that important here.
14093         (V_STRDUP): Remove.
14094         (parse_with_separator): New function, with most of the internals
14095         of the old parse_user_spec.  Allow user to omit both user and group,
14096         for compatibility with FreeBSD.
14097         Clone only the user name, not the entire spec.
14098         Do not set *uid, *gid unless entirely successful.
14099         Avoid memory leak in some failing cases.
14100         Fix regression for USER.GROUP reported by Dmitry V. Levin in
14101         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
14102         (parse_user_spec): Rewrite to use parse_with_separator.
14103
14104 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14105
14106         * modules/userspec: Don't depend on alloca.
14107
14108 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14109
14110         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
14111
14112 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
14113
14114         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
14115         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
14116         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
14117
14118 2004-08-16  Simon Josefsson  <jas@extundo.com>
14119
14120         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
14121         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
14122         Add --dry-run for --import.
14123         Let user provided command line parameters override configure.ac
14124         settings.
14125
14126 2004-08-12  Simon Josefsson  <jas@extundo.com>
14127
14128         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
14129         as discussed with Paul Eggert in threads rooted at
14130         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
14131         and
14132         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
14133         Before, the test was empty, and relied on ELIDE_CODE in source
14134         code.)
14135         (gl_PREREQ_GETOPT): New macro.
14136         (gl_GETOPT): Use them.
14137
14138 2004-08-12  Simon Josefsson  <jas@extundo.com>
14139
14140         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
14141         * lib/getopt_.h: Renamed from getopt.h.
14142
14143 2004-08-12  Simon Josefsson  <jas@extundo.com>
14144
14145         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
14146         Change default library name from libfoo to libgnu.
14147         Now, if you have a configure.ac that says:
14148                 gl_SOURCE_BASE(gl)
14149                 gl_M4_BASE(gl/m4)
14150                 gl_MODULES(error getopt etcetera)
14151                 gl_INIT
14152         you can import all you need by running:
14153                 ../gnulib/gnulib-tool --import
14154
14155         * modules/getopt (Files): Rename getopt.h to getopt_.h.
14156         (Makefile.am): Rewrite, use logic from argz.
14157         (Include): Use <getopt.h> instead of "getopt.h".
14158
14159 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14160
14161         * modules/argp (Files): Add m4/unlocked-io.m4.
14162         (Depends-on): Add extensions.
14163
14164 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14165
14166         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
14167         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
14168         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
14169         Check for program_invocation_name, program_invocation_short_name,
14170         flockfile, funlockfile, features.h, _getopt_long_only_r.
14171
14172 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14173
14174         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
14175         its complicated substitute.
14176         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
14177         and program_invocation_name.
14178         (__argp_basename) [!_LIBC]: Remove; the only use was
14179         replaced by its body.
14180         (__argp_short_program_name): Change condition from
14181         !defined __argp_short_program_name to
14182         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
14183         to match argp-namefrob.h.
14184         (__argp_failure): Don't assume strerror_r returns char *.
14185         * lib/argp-parse.c (N_): Define unconditionally.
14186         (argp_default_options): Fill out initializers with 0 to avoid
14187         gcc warnings.
14188
14189 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14190
14191         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
14192         getopt1.c.
14193
14194 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14195
14196         Merge from coreutils.
14197
14198         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
14199
14200         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
14201         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
14202
14203 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14204
14205         Merge from coreutils.
14206
14207         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
14208         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
14209         for Reliant Unix 5.43.
14210
14211         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
14212         (union fooround): Use uintmax_t, not long int.
14213         The rest is a merge from libc:
14214         [defined _LIBC]: Include <shlib-compat.h>.
14215         (_obstack) [defined _LIBC]: Remove after 2.3.4.
14216
14217         * lib/settime.c (settime): Recode to avoid warning with
14218         Sun Forte C 6U2.
14219
14220         * lib/strverscmp.c: Convert to UTF-8.
14221
14222 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14223
14224         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
14225         m4/uintmax_t.m4.
14226
14227 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14228
14229         * modules/xalloc-die: New file.
14230         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
14231
14232         * modules/md5 (Files): Add m4/uint32_t.m4.
14233         * modules/sha1: Renamed from modules/sha.
14234         (Files):
14235         Rename lib/sha.h to lib/sha1.h.
14236         Rename lib/sha.c to lib/sha1.c.
14237         Rename m4/sha.m4 to m4/sha1.m4.
14238         (lib_SOURCES): Likewise.
14239         (configure.ac): Rename gl_SHA to gl_SHA1.
14240         (Include): sha.h -> sha1.h.
14241
14242 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14243
14244         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
14245         * m4/sha1.m4: Renamed from sha.m4.
14246         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
14247
14248 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14249
14250         * lib/obstack.h (obstack_empty_p):
14251         Don't assume that chunk->contents is suitably aligned.
14252         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
14253         Likewise. Problem reported by Benno in
14254         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
14255
14256         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
14257         readable.  This could be improved further but it'd take some work.
14258
14259 2004-08-08  Simon Josefsson  <jas@extundo.com>
14260
14261         * modules/xgethostname (Depends-on): Remove exit and error (not
14262         used).
14263
14264         * modules/getpass-gnu: Add getpass.h.
14265         (Depends-on): Add stdbool.
14266         * modules/getpass: Add getpass.h.
14267
14268 2004-08-08  Simon Josefsson  <jas@extundo.com>
14269
14270         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
14271         Check getpass declaration.
14272
14273 2004-08-08  Simon Josefsson  <jas@extundo.com>
14274
14275         * lib/xgethostname.c: Don't include error.h (not used).
14276
14277         * lib/getpass.h: Add.
14278         * lib/getpass.c: Include getpass.h first.
14279
14280 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
14281
14282         * lib/xalloc-die.c: New file.
14283         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
14284         All uses removed.
14285         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
14286         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
14287         xalloc-die.c.
14288         (_, N_, xalloc_die): Move to xalloc-die.c.
14289         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
14290         so that we needn't mess with xalloc_msg_memory_exhausted.
14291
14292         * lib/sha1.h: Renamed from sha.h.
14293         (SHA1_H): Renamed from _SHA_H.
14294         (sha1_ctx): Renamed from sha_ctx.
14295         (sha1_init_ctx): Renamed from sha_init_ctx.
14296         (sha1_process_block): Renamed from sha_process_block.
14297         (sha1_process_bytes): Renamed from sha_process_bytes.
14298         (sha1_finish_ctx): Renamed from sha_finish_ctx.
14299         (sha1_read_ctx): Renamed from sha_read_ctx.
14300         (sha1_stream): Renamed from sha_stream.
14301         (sha1_buffer): Renamed from sha_buffer.
14302         * lib/sha1.c: Likewise; renamed from sha.c.
14303         Do not include <sys/types.h>.
14304         Include <stddef.h> rather than <stdlib.h>.
14305
14306 2004-08-08  Bruno Haible  <bruno@clisp.org>
14307
14308         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
14309         FILESYSTEM_PREFIX_LEN.
14310         * lib/progreloc.c: Likewise.
14311         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
14312
14313 2004-08-06  Simon Josefsson  <jas@extundo.com>
14314
14315         * modules/progname (Depends-on): Don't depend on stdbool.
14316
14317 2004-08-06  Simon Josefsson  <jas@extundo.com>
14318
14319         * modules/getsubopt: New file.
14320         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14321         getsubopt.
14322
14323 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14324
14325         More merge from coreutils.
14326
14327         * m4/utimens.m4, m4/utimecmp.m4: New files.
14328         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
14329         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
14330         prereq.m4, sha.m4: Import changes from coreutils.
14331
14332 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14333
14334         More merge from coreutils.
14335         * modules/raise, modules/readtokens0, modules/utimens:
14336         * modules/utimecmp, module/xnanosleep: New files.
14337         * modules/strftime: Add lib/strftime.h.
14338         Change include from <time.h> to "strftime.h".
14339         * modules/yesno: Add lib/yesno.h.
14340         * modules/backupfile: Remove lib/addext.c.
14341         * modules/euidaccess: Add stat-macros.h.
14342         * modules/canonicalize, modules/euidaccess,
14343         modules/filemode, modules/lchown, modules/makepath,
14344         modules/rmdir, modules/stat: Likewise.
14345
14346 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14347
14348         Merge from tar.
14349         * lib/argp-help.c (make_hol, hol_append): Don't assume that
14350         SIZE_MAX is a valid preprocessor constant.
14351         (__argp_basename): Change from "#ifndef _LIBC"
14352         to "#ifndef __argp_short_program_name", so that
14353         we don't compile these functions for tar.
14354
14355         More merges from coreutils.
14356         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
14357         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
14358         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
14359         * lib/addext.c: Remove; no longer needed.
14360         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
14361         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
14362         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
14363         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
14364         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
14365         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
14366         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
14367         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
14368         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
14369         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14370         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
14371         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
14372         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
14373         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
14374         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
14375         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
14376         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
14377         Import changes from coreutils.
14378
14379 2004-08-05  Simon Josefsson  <jas@extundo.com>
14380
14381         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
14382
14383 2004-08-05  Simon Josefsson  <jas@extundo.com>
14384
14385         * m4/getsubopt.m4: New file.
14386
14387 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14388
14389         Merge from coreutils.
14390
14391         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
14392         * m4/getcwd-path-max.m4: New files.
14393
14394         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
14395         FILESYSTEM_PREFIX_LEN ->
14396         FILE_SYSTEM_PREFIX_LEN.
14397         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
14398         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
14399         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
14400         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
14401
14402         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
14403         prerequisite modules now handle the DOS stuff.
14404         Don't check for unistd.h.
14405
14406 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14407
14408         Merge from coreutils.
14409
14410         * lib/.gdb-history: Remove; this doesn't belong here.
14411
14412         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
14413         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
14414         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
14415         * lib/getcwd.c: New files.
14416
14417         * lib/dirname.h: Include <stdbool.h>.
14418         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
14419         for consistency with POSIX terminology.  All uses changed.
14420         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
14421         (strip_trailing_slashes): Use bool for booleans.
14422         * lib/stripslash.c (strip_trailing_slashes): Likewise.
14423
14424         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
14425         sometimes returns a positive errno value even when it succeeds.
14426         (print_errno_message) [!LIBC]: Fall back on strerror if
14427         __strerror_r fails.
14428
14429         * lib/path-concat.c (mempcpy): Don't define if a system header defines
14430         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
14431         (longest_relative_suffix): New function.
14432         (path_concat): Use it.  Assume first argument is not NULL.
14433         Port to DOS.  Omit redundant separators.
14434         Report an error instead of returning NULL.
14435         Use mempcpy instead of memcpy.
14436         (xpath_concat): Remove: not declared or used.
14437
14438         * lib/same.h: Include <stdbool.h>
14439         (same_name): Return bool, not int.
14440         * lib/same.c (same_name): Likewise.
14441         (errno): Don't declare; we assume C89 or better now.
14442
14443         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
14444         if not already defined.
14445
14446         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
14447         * lib/dup-safer.c (errno): Likewise.
14448
14449 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14450
14451         Merge from coreutils.
14452         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
14453         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
14454         * modules/path-concat: Don't depend on strdup.
14455
14456 2004-08-03  Simon Josefsson  <jas@extundo.com>
14457
14458         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
14459         * lib/progname.h: Don't include stdbool.h.
14460
14461 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14462
14463         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
14464         * MODULES.html.sh (func_all_modules): Remove fatal.
14465
14466 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14467
14468         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
14469
14470 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14471
14472         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
14473         working.
14474
14475 2004-08-02  Simon Josefsson  <jas@extundo.com>
14476
14477         * lib/getsubopt.h: New file, with comments from Bruno Haible.
14478         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
14479         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
14480
14481 2004-08-01  Simon Josefsson  <jas@extundo.com>
14482
14483         * lib/xgetdomainname.c: Include stdlib.h, for free().
14484
14485 2004-07-19  Bruno Haible  <bruno@clisp.org>
14486
14487         * MODULES.html.sh (func_all_modules): Add dummy.
14488
14489 2004-07-16  Simon Josefsson  <jas@extundo.com>
14490
14491         * modules/dummy: New file.
14492
14493 2004-07-16  Simon Josefsson  <jas@extundo.com>
14494
14495         * lib/dummy.c: New file.
14496
14497 2004-07-16  Bruno Haible  <bruno@clisp.org>
14498
14499         * lib/backupfile.h: Add extern "C" for C++.
14500         * lib/closeout.h: Likewise.
14501         * lib/copy-file.h: Likewise.
14502         * lib/findprog.h: Likewise.
14503         * lib/full-write.h: Likewise.
14504         * lib/pathname.h: Likewise.
14505         * lib/progname.h: Likewise.
14506         * lib/stpcpy.h: Likewise.
14507         * lib/stpncpy.h: Likewise.
14508         * lib/strcase.h: Likewise.
14509         * lib/strstr.h: Likewise.
14510         * lib/xalloc.h: Likewise.
14511
14512         * lib/mbswidth.h: Add extern "C" for C++.
14513         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
14514
14515 2004-07-13  Robert Millan  <robertmh@gnu.org>
14516
14517         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
14518
14519 2004-07-09  Simon Josefsson  <jas@extundo.com>
14520
14521         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
14522         failed without this.)
14523
14524 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14525
14526         * modules/chown (Files): Add lib/fchown-stub.c, since
14527         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
14528
14529 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14530
14531         * lib/fchown-stub.c: New file.
14532
14533 2004-06-24  Jim Meyering  <jim@meyering.net>
14534
14535         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
14536
14537 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14538
14539         * modules/argz: Omit "#include".
14540
14541         * MODULES.html.sh (func_all_modules): Add calloc, to match
14542         2004-06-01 addition of calloc module.
14543
14544 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14545
14546         * m4/argz.m4: New file, which is autoupdated from libtool.
14547
14548 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14549
14550         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
14551         libtool.
14552
14553 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14554
14555         * config/srclist-update: Don't insist on "USA." before the
14556         close-comment, as libtool omits the period and puts the */ on a
14557         separate line.
14558         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
14559         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
14560
14561 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
14562
14563         * modules/argz: New file.
14564         * MODULES.html.sh (func_all_modules): Add argz.
14565
14566 2004-06-12  Jim Meyering  <jim@meyering.net>
14567         and  Paul Eggert  <eggert@cs.ucla.edu>
14568
14569         * modules/hash (Files): Add lib/xalloc.h.
14570         * modules/pipe (Depends-on): Add wait-process.
14571         * modules/stat (Depends-on): Add xalloc.
14572         * modules/userspec (Files): Add lib/userspec.h.
14573         * modules/xstrto
14574
14575         Upgrade from gettext-0.13.
14576         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
14577         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
14578         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
14579
14580 2004-06-10  Jim Meyering  <jim@meyering.net>
14581
14582         * lib/calloc.c: New file.
14583
14584 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
14585
14586         * lib/getdate.y (yylex): Allow space between sign and number.
14587         Problem reported by Dan Jacobson.
14588
14589 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
14590
14591         Merge from coreutils CVS.
14592
14593         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
14594         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
14595         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
14596         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
14597         xstrtol.m4: Fix copyright date and/or serial number.
14598
14599         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
14600         See if we need an fchown replacement.
14601         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
14602         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
14603         and use the replacement function if we detect either defect.
14604
14605         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
14606         gl_UTIMECMP.
14607
14608 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
14609         and  Jim Meyering  <jim@meyering.net>
14610
14611         Merge from coreutils CVS.
14612
14613         * lib/stat-macros.h: New file, with contents from file-type.h
14614         and coreutils' system.h.
14615         * lib/file-type.c: Include "stat-macros.h".
14616         * lib/file-type.h (file_type): Move all macro definitions to new file,
14617         stat-macros.h.
14618
14619         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
14620         Wrap old code with this conditional.
14621         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
14622         function that does not dereference symlinks.
14623         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
14624
14625         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
14626         dependency problems.
14627         (xreadlink): Accept new arg SIZE, for efficiency.
14628         All decls and uses changed.
14629         * lib/xreadlink.h: Include <stddef.h>, for size_t.
14630
14631         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
14632         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
14633
14634         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
14635         sysexits.h.
14636
14637 2004-06-01  Jim Meyering  <jim@meyering.net>
14638
14639         * m4/calloc.m4: New file.
14640
14641 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
14642
14643         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
14644         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
14645         Also, fix a typo in a diagnostic.
14646
14647 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
14648
14649         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
14650         or AC_FUNC_REALLOC.
14651
14652 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
14653
14654         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
14655         macros to be defined.
14656         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
14657         the allocator returns NULL because the requested size is zero.
14658
14659 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14660
14661         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
14662         var.  Add comment explaining why libc still defines it.  This
14663         merges the following patch from glibc:
14664         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
14665
14666 2004-05-20  Andreas Schwab  <schwab@suse.de>
14667
14668         * m4/free.m4: Replace free if it not known to work, not the other
14669         way round.
14670
14671 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14672
14673         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
14674         present in glibc since revision 1.1 of this file.
14675         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
14676         obstack_alignment_mask, obstack_alloc, obstack_base,
14677         obstack_blank, obstack_blank_fast, obstack_chunk_size,
14678         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
14679         obstack_grow0, obstack_init, obstack_int_grow,
14680         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
14681         obstack_next_free, obstack_object_size, obstack_ptr_grow,
14682         obstack_ptr_grow_fast, obstack_room): Remove declarations of
14683         nonexistent functions.
14684
14685 2004-05-18  Karl Berry  <karl@gnu.org>
14686
14687         * config/srclist.txt: break link for vasnprintf.c.
14688
14689 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
14690
14691         Port obstack to the AS/400, where pointers are 16 bytes wide and
14692         you cannot cast an integer to a valid pointer.  This patch is
14693         currently waiting to be integrated into glibc; see
14694         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
14695
14696         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
14697         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
14698         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
14699         (struct obstack): temp member is now a union of a pointer and
14700         an integer, instead of an integer.  All integer uses changed.
14701         This does not affect the physical layout of struct obstack,
14702         except on hosts (like the AS/400) where the size or alignment of
14703         void * is greater than that of ptrdiff_t.
14704         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
14705         __STDC__)]: Store temporary in pointer member of union, not
14706         integer member.
14707         * lib/obstack.c: Include <stddef.h>, for offsetof.
14708         (struct fooalign): Remove; it doesn't need a name.
14709         (union fooround): Change double to long double, and add void *.
14710         (DEFAULT_ALIGNMENT): Use offsetof to compute.
14711         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
14712         not a macro.  Hence the values are always int; so remove all
14713         casts-to-int in uses.
14714
14715 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
14716
14717         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
14718         we can get this patch merged into glibc.
14719
14720 2004-05-17  Derek R. Price  <derek@ximbiot.com>
14721             Paul Eggert  <eggert@cs.ucla.edu>
14722
14723         * m4/argp: Depend on alloca.
14724
14725 2004-05-17  Derek R. Price  <derek@ximbiot.com>
14726             Paul Eggert  <eggert@cs.ucla.edu>
14727
14728         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
14729         freecoding.
14730
14731 2004-05-17  Bruno Haible  <bruno@clisp.org>
14732
14733         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
14734         precision that consists of a '.' followed by an empty digit string.
14735         Patch by Tor Lillqvist <tml@iki.fi>.
14736
14737 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
14738
14739         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
14740         for backward compatibility with older code.  We need our own
14741         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
14742         it under some other name, and our alloca.h will define it.
14743
14744 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
14745             Derek Price  <derek@ximbiot.com>
14746
14747         * lib/alloca.c: Include <alloca.h>, to get our interface.
14748         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
14749         include <alloca.h> first.  Use C89 prototype for alloca; this
14750         requires including <stddef.h> for size_t.  Use extern "C" if C++.
14751         Use #elif for simplicity, since we can assume C89 now.
14752         Don't try to source the system alloca.h since it will not be found
14753         and to prevent recursively including its replacement.
14754         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
14755         * lib/regex.c: Likewise.
14756
14757 2004-05-16  Derek Price  <derek@ximbiot.com>
14758             Paul Eggert  <eggert@cs.ucla.edu>
14759
14760         getline cleanup.  This changes the getndelim2 API: both order of
14761         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
14762         no delimiter).
14763
14764         * lib/getline.c: Don't include stddef.h or stdio.h, since our
14765         interface does that.
14766         (getline): Always use getdelim, so that we don't have two
14767         copies of this code.
14768         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
14769         if available.
14770         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
14771         (GETNDELIM2_MAXIMUM): New macro.
14772         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
14773         instead of the old practice of delim2==0.  All callers changed.
14774         Return -1 on overflow, instead of returning junk.
14775         Do not set *linesize unless allocation succeeds.
14776         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
14777         that we include sys/types.h.
14778         * lib/getnline.h: Likewise.
14779         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
14780         (getndelim2): Reorder arguments.
14781         * lib/getnline.c (getnline, getndelim):
14782         Don't discard the NMAX argument.
14783         (getnline): Invoke getndelim, to avoid code duplication.
14784         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
14785         of (size_t) -1 by callers of the getnline family.
14786
14787 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14788
14789         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
14790         Check for gettimeofday.
14791         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
14792         Check for settimeofday, stime.
14793
14794 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14795
14796         * lib/nanosleep.c (suspended): Change its type from int to
14797         sig_atomic_t volatile.
14798         (first_call): Make it private to rpl_nanosleep, and have it
14799         be zero initially as that's a bit faster.
14800         (my_usleep): Round up fractional times instead of truncating them,
14801         as this is the usual meaning for 'sleep'.
14802
14803         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
14804         doesn't work.
14805         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
14806         (ENOSYS): Define if not defined.
14807         (settime): Fall back on stime if it exists and settimeofday fails.
14808         But don't bother with fallbacks if a method fails with errno == EPERM.
14809
14810 2004-05-11  Jim Meyering  <jim@meyering.net>
14811
14812         Prior to this change, the save_cwd caller required read access to the
14813         current directory on most systems (ones with the fchdir function).
14814
14815         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
14816         fails, try write-only, and finally, resort to using xgetcwd.
14817
14818 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14819
14820         * lib/obstack.c, obstack.h: Import changes from libc.
14821
14822 2004-04-28  Bruno Haible  <bruno@clisp.org>
14823
14824         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
14825         also implicitly appends .exe to executables.
14826         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
14827         accepts Windows pathnames.
14828         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14829         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14830         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14831         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14832         Reported by Derek Robert Price <derek@ximbiot.com>.
14833
14834 2004-04-21  Karl Berry  <karl@gnu.org>
14835
14836         * config/srclist.txt (localcharset.c): break sync.
14837
14838 2004-04-20  Paul Eggert  <eggert@twinsun.com>
14839
14840         * m4/host-os.m4: Add a copyright notice.
14841
14842 2004-04-20  Jim Meyering  <jim@meyering.net>
14843
14844         Change UTILS_ to gl_ in AC_DEFINE'd names.
14845         Change utils_- and jm_-prefixed variables, too.
14846         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
14847         UTILS_FUNC_MKDIR_TRAILING_SLASH.
14848         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
14849
14850         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
14851         Don't emit trailing blanks.
14852         Also rename jm_-prefixed variables to have gl_ prefix.
14853
14854         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
14855         Also rename jm_-prefixed variables to have gl_ prefix.
14856
14857         * m4/jm-macros.m4: Reflect the renamings.
14858         * m4/prereq.m4: Likewise.
14859
14860 2004-04-20  Jim Meyering  <jim@meyering.net>
14861
14862         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
14863         memory.
14864
14865 2004-04-20  Jim Meyering  <jim@meyering.net>
14866             Bruno Haible  <bruno@clisp.org>
14867
14868         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
14869         memory when realloc fails.
14870
14871 2004-04-19  Jim Meyering  <jim@meyering.net>
14872
14873         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
14874         now that readutmp.c may call `free (0)'.
14875
14876 2004-04-19  Bruno Haible  <bruno@clisp.org>
14877
14878         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
14879         * m4/inttypes_h.m4: Likewise.
14880         * m4/stdint_h.m4: Likewise.
14881         * m4/intmax_t.m4: Likewise.
14882         * m4/uintmax_t.m4: Likewise.
14883
14884 2004-04-18  Jim Meyering  <jim@meyering.net>
14885
14886         * m4/prereq.m4: Don't forbid jm_ prefix.
14887
14888         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
14889         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
14890         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
14891         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
14892         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
14893         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
14894         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
14895         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
14896         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
14897         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
14898         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
14899         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
14900         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
14901         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
14902         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
14903         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
14904         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
14905         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
14906         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
14907
14908 2004-04-18  Jim Meyering  <jim@meyering.net>
14909
14910         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
14911         failure, don't leak memory and do call END_UTMP_ENT.
14912
14913 2004-04-16  Jim Meyering  <jim@meyering.net>
14914
14915         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
14916         coreutils' stat program.
14917         (gl_PREREQ): Don't require jm_PREREQ_STAT.
14918
14919 2004-04-11  Paul Eggert  <eggert@twinsun.com>
14920
14921         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
14922         C89.
14923         (CHAR_BIT): Remove, since we assume C89.
14924         Include <stdint.h> if available, as per current Autoconf CVS advice.
14925
14926 2004-03-31  Jim Meyering  <jim@meyering.net>
14927
14928         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
14929         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
14930         * m4/xalloc.m4: Likewise.
14931
14932 2004-03-30  Paul Eggert  <eggert@twinsun.com>
14933
14934         Merge from coreutils.
14935
14936         * m4/inttostr.m4: New file.
14937         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
14938         Require AM_STDBOOL_H and gl_TIMESPEC instead.
14939         Require gl_CLOCK_TIME.
14940         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
14941
14942 2004-03-30  Paul Eggert  <eggert@twinsun.com>
14943
14944         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
14945         not bool, to be more consistent with Unix conventions.
14946         Suggested by Bruno Haible.
14947
14948         Merge from coreutils.
14949
14950         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
14951         * lib/umaxtostr.c: New files.
14952
14953         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
14954         the usual <time.h> dance.
14955         (get_date): Change signature to support fractional time stamps.
14956         All callers changed.
14957         * lib/getdate.y: Include "getdate.h" first, as we can now
14958         assume C89 and don't need to worry about 'const'.
14959         Similarly, include "unlocked-io.h" near start, not in middle.
14960         Include <limits.h>.
14961         (textint.value): Use long int rather than int.
14962         (textint.digits): Use size_t rather than int.
14963         (BILLION, LOG10_BILLION): New constants.
14964         (parser_control): New member rel_ns.  Members day_ordinal,
14965         time_zone, month, day, hour, minutes, rel_year, rel_month,
14966         rel_day, rel_hour, rel_minutes, rel_seconds
14967         are now long int, not int.  Member seconds is now struct timespec,
14968         not int.  New member timespec_seen.  Members dates_seen, days_seen,
14969         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
14970         not int.
14971         (%union.intval): Now long int, not int.
14972         New member timespec.
14973         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
14974         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
14975         (spec): Now is a timespec or an item list.
14976         (timespec, items): New nonterminals.
14977         (time, rel, relunit, number, get_date):
14978         Add support for fractional seconds.
14979         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
14980         (gmtime, localtime, mktime): Remove decls; not needed with C89.
14981         (to_hour): First arg is now long int, not int.
14982         (to_year): Returns long int, not int.
14983         Don't treat year -70 like 70.
14984         (tm_diff): Returns long int, not int.
14985         (lookup_word): Use bool instead of int when appropriate.
14986         (yylex): Use size_t for count, not int.
14987         Detect overflow when parsing large integer constants.
14988         Add support for fractions.
14989         (get_date): Make pointers 'const' if possible.
14990         Use more-portable code to detect integer overflow.
14991         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
14992         Don't use ctime; it's not reliable if the year has >4 digits.
14993
14994         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
14995         This is for compatibility with BSD.
14996
14997         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
14998         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
14999         From coreutils' system.h.
15000
15001         * lib/userspec.c: Don't include "posixver.h".
15002         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
15003         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
15004         compatible extension.  Simplify code by removing a boolean int
15005         that was always nonzero if a string was nonnull.
15006
15007 2004-03-30  Jim Meyering  <jim@meyering.net>
15008
15009         Merge from coreutils.
15010
15011         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
15012         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
15013         on some systems one must include <grp.h> before it.
15014         Reported by Christian Krackowizer.
15015
15016 2004-03-30  Jim Meyering  <jim@meyering.net>
15017
15018         Merge from coreutils.
15019
15020         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
15021
15022         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
15023         an empty input stream.
15024
15025         * lib/readtokens.c: Include <stdbool.h>.
15026         (readtoken): Use `size_t' rather than int/long.
15027         All callers adjusted.
15028         Use `bool' rather than `int' where appropriate.
15029         Use memset rather than an explicit loop.
15030         Use x2nrealloc rather than xrealloc.
15031         Allow the use of `\0' as a delimiter.
15032         (readtokens): Likewise.
15033         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
15034
15035 2004-03-30  Jim Meyering  <jim@meyering.net>
15036
15037         * m4/realloc.m4: Remove file, since now it does no more than
15038         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
15039         the `configure.ac' section of module/realloc.
15040         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
15041
15042 2004-03-30  Bruno Haible  <bruno@clisp.org>
15043
15044         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
15045         nonnull.
15046
15047 2004-03-29  Paul Eggert  <eggert@twinsun.com>
15048
15049         Merge changes to getloadavg.c from coreutils and Emacs.
15050
15051         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
15052         Define to an expression, not to the empty string.
15053         Include cloexec.h and xalloc.h.
15054         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
15055         Use set_cloexec_flag rather than rolling our own.
15056         * lib/cloexec.c, lib/cloexec.h: New files.
15057
15058 2004-03-29  Paul Eggert  <eggert@twinsun.com>
15059
15060         * m4/cloexec.m4: New file.
15061
15062 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15063
15064         * lib/getopt.h: Sync with libc CVS.
15065
15066 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15067             Bruno Haible  <bruno@clisp.org>
15068
15069         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
15070         mbswidth.
15071
15072 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15073             Bruno Haible  <bruno@clisp.org>
15074
15075         * lib/mbswidth.h: Include <wchar.h> only if
15076         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
15077         <wchar.h>.
15078         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
15079
15080 2004-03-09  Paul Eggert  <eggert@twinsun.com>
15081
15082         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
15083         Sync with libc CVS.
15084         * lib/getopt_int.h: New file, also synced from libc.
15085
15086 2004-03-09  Paul Eggert  <eggert@twinsun.com>
15087
15088         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
15089         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
15090         Bring back getopt.c, getopt.h, getopt1.c.
15091
15092 2004-03-07  Paul Eggert  <eggert@twinsun.com>
15093
15094         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
15095         All uses changed.  Check for sa_sigaction member; this fixes
15096         a bug first reported by Jason Andrade in
15097         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
15098
15099 2004-03-07  Paul Eggert  <eggert@twinsun.com>
15100
15101         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
15102         '#if' expressions.  Unlike the code it replaces, it does not
15103         depend on (defined _SC_PAGESIZE).  However, it does depend on
15104         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
15105         first reported by Jason Andrade in
15106         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
15107
15108 2004-02-25  Simon Josefsson  <jas@extundo.com>
15109
15110         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
15111
15112 2004-02-25  Simon Josefsson  <jas@extundo.com>
15113
15114         * lib/strdup.h: New file.
15115         * lib/strdup.c: Include it.
15116         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
15117         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
15118
15119 2004-02-23  Karl Berry  <karl@gnu.org>
15120
15121         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
15122         (from fencepost.gnu.org:/gd/gnuorg).
15123
15124 2004-02-23  Karl Berry  <karl@gnu.org>
15125
15126         * config/srclistvars.sh (GNUORG) [karl]: redefine.
15127         * config/srclist.txt: add maintain/standards documents.
15128
15129 2004-02-18  Bruno Haible  <bruno@clisp.org>
15130
15131         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
15132         Reported by Derek Robert Price <derek@ximbiot.com>.
15133
15134 2004-02-16  Karl Berry  <karl@gnu.org>
15135
15136         * config/mkinstalldirs, install-sh: update from automake.
15137
15138 2004-02-06  Karl Berry  <karl@gnu.org>
15139
15140         * m4/po.m4: update from gettext 0.14.1.
15141
15142 2004-02-06  Karl Berry  <karl@gnu.org>
15143
15144         * lib/config.charset: update from gettext 0.14.1.
15145
15146 2004-02-05  Paul Eggert  <eggert@twinsun.com>
15147
15148         Add comments and code, prompted by suggestions from Bruno Haible
15149         for sh-quote.
15150         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
15151         describing the enum quoting_style values.
15152         * lib/quotearg.c (quotearg_alloc): New function.
15153         (quotearg_buffer_restyled): Treat lone { and } as special.
15154         Treat = as special.  Work around bug with older shells
15155         that "see" a '\' that is really the 2nd byte of a multibyte char.
15156         Quote empty string with shell_quoting_style.
15157
15158 2004-02-03  Bruno Haible  <bruno@clisp.org>
15159
15160         * m4/pipe.m4: New file, from GNU gettext.
15161
15162 2004-02-03  Bruno Haible  <bruno@clisp.org>
15163
15164         * lib/pipe.h: New file, from GNU gettext.
15165         * lib/pipe.c: New file, from GNU gettext.
15166
15167 2004-01-27  Bruno Haible  <bruno@clisp.org>
15168
15169         * m4/execute.m4: New file, from GNU gettext.
15170
15171 2004-01-27  Bruno Haible  <bruno@clisp.org>
15172
15173         * lib/execute.h: New file, from GNU gettext.
15174         * lib/execute.c: New file, from GNU gettext.
15175         * lib/w32spawn.h: New file, from GNU gettext.
15176
15177 2004-01-24  Paul Eggert  <eggert@twinsun.com>
15178
15179         Merge from diffutils.
15180
15181         * lib/file-type.c (file_type): Add typed memory objects.
15182         * lib/file-type.h (S_TYPEISTMO): New macro.
15183
15184         * lib/c-stack.h (c_stack_action): Remove argv argument.
15185         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
15186         (die): Don't calculate message unless segv_action returns.
15187         (get_stack_location, min_address_from_argv, max_address_from_argv,
15188         volatile stack_base, volatile_stack_size): Remove.
15189         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
15190         that every segmentation violation is a stack overflow.  (Ouch!)
15191         See Debian bug 136249 (still outstanding) for more info about why
15192         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
15193
15194 2004-01-24  Paul Eggert  <eggert@twinsun.com>
15195
15196         Exit-status fix from coreutils.
15197
15198         Use exit_failure consistently in place of EXIT_FAILURE,
15199         so that program exit statuses are consistent on failure.
15200
15201         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
15202         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
15203         * lib/argmatch.h: Comment fix to match the above.
15204         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
15205         Now a macro referring to exit_failure, instead of a separate
15206         variable.  Include "exitfail.h" to get it.
15207         * lib/xstrtol.h: Include "exitfail.h".
15208         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
15209
15210         * lib/long-options.c (parse_long_options): Use prototype
15211         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
15212         for clarity.
15213
15214 2004-01-21  Jim Meyering  <jim@meyering.net>
15215
15216         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
15217         so as not to conflict with a different-sized __mktime_internal
15218         function in GNU libc.
15219         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
15220         Problem building statically-linked `ls' reported by Michael Brunnbauer.
15221
15222 2004-01-20  Karl Berry  <karl@gnu.org>
15223
15224         * config/config.guess: update from config.
15225
15226         * config/srclistvars.sh: GNUWWWLICENSES for karl.
15227
15228 2004-01-20  Bruno Haible  <bruno@clisp.org>
15229
15230         Safer stack allocation.
15231         * lib/setenv.c: Include allocsa.h.
15232         (alloca): Remove fallback definition.
15233         (freea): Remove macro.
15234         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
15235         instead of freea.
15236
15237 2004-01-20  Bruno Haible  <bruno@clisp.org>
15238
15239         * m4/eealloc.m4: New file, from GNU gettext.
15240
15241 2004-01-20  Bruno Haible  <bruno@clisp.org>
15242
15243         * m4/allocsa.m4: New file, from GNU gettext.
15244
15245 2004-01-20  Bruno Haible  <bruno@clisp.org>
15246
15247         * lib/xallocsa.h: New file, from GNU gettext.
15248         * lib/xallocsa.c: New file, from GNU gettext.
15249
15250 2004-01-20  Bruno Haible  <bruno@clisp.org>
15251
15252         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
15253
15254 2004-01-20  Bruno Haible  <bruno@clisp.org>
15255
15256         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
15257         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
15258         specially.
15259
15260 2004-01-20  Bruno Haible  <bruno@clisp.org>
15261
15262         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
15263         patch.
15264
15265 2004-01-20  Bruno Haible  <bruno@clisp.org>
15266
15267         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
15268
15269 2004-01-20  Bruno Haible  <bruno@clisp.org>
15270
15271         * lib/eealloc.h: New file.
15272
15273 2004-01-20  Bruno Haible  <bruno@clisp.org>
15274
15275         * lib/binary-io.h: Avoid warnings on Cygwin.
15276
15277 2004-01-20  Bruno Haible  <bruno@clisp.org>
15278
15279         * lib/allocsa.h: New file, from GNU gettext.
15280         * lib/allocsa.c: New file, from GNU gettext.
15281
15282 2004-01-18  Karl Berry  <karl@gnu.org>
15283
15284         * doc/gpl.texi, doc/lgpl.texi: new files.
15285
15286 2004-01-18  Karl Berry  <karl@gnu.org>
15287
15288         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
15289         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
15290
15291 2004-01-15  Paul Eggert  <eggert@twinsun.com>
15292
15293         Merge from coreutils.
15294
15295         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
15296         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
15297         (gl_DEFAULT_POSIX2_VERSION): Move
15298         the documentation from 'configure' into 'config.hin',
15299         so that 'configure --help' isn't burdened by it and
15300         we don't have to worry about its formatting there.
15301         Reword the documentation so that it's more succinct
15302         and can be run together into a single paragraph.
15303         * m4/same.m4 (gl_SAME): Check for pathconf.
15304
15305 2004-01-15  Paul Eggert  <eggert@twinsun.com>
15306
15307         Merge from coreutils.
15308
15309         * lib/posixver.c: Include posixver.h.
15310
15311         * lib/same.c: Include <stdbool.h>, <limits.h>.
15312         (_POSIX_NAME_MAX): Define if not defined.
15313         (MIN): New macro.
15314         (same_name): If file names are silently truncated, report
15315         that the file names are the same if they are the same after
15316         the silent truncation.
15317
15318         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
15319         conversion function.
15320         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
15321         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
15322         longer needed.
15323
15324 2004-01-15  Jim Meyering  <jim@meyering.net>
15325
15326         Merge from coreutils.
15327
15328         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
15329         if no library is required.
15330         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
15331         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
15332         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
15333         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
15334         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
15335         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
15336         value, $ac_cv_search_crypt, if it's "none required".
15337         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
15338         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
15339         not gl_FUNC_GETLOADAVG.
15340         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
15341         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
15342
15343 2004-01-15  Jim Meyering  <jim@meyering.net>
15344
15345         Merge from coreutils.
15346
15347         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
15348         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
15349         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
15350
15351         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
15352         optional configure-time default.
15353
15354         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15355
15356         * lib/xreadlink.c (xreadlink): Correct outdated comment.
15357
15358 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
15359
15360         Merge from coreutils.
15361
15362         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
15363         value, $ac_cv_search_nanosleep, if it's "none required".
15364
15365 2004-01-14  Paul Eggert  <eggert@twinsun.com>
15366
15367         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
15368         with like-named macro in fnmatch.c.
15369         (EXT): Use an internal constant instead.
15370
15371         Merge fnmatch patches from glibc.
15372         * lib/fnmatch.c (mbsinit): Remove define.
15373         Add libc_hidden_ver (__fnmatch, fnmatch).
15374         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
15375         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
15376
15377 2004-01-14  Karl Berry  <karl@gnu.org>
15378
15379         * config/install-sh: update from automake.
15380
15381 2004-01-13  Karl Berry  <karl@gnu.org>
15382
15383         * config/install-sh: update from automake.
15384
15385 2004-01-09  Karl Berry  <karl@gnu.org>
15386
15387         * config/install-sh: update from automake.
15388
15389 2004-01-05  Karl Berry  <karl@gnu.org>
15390
15391         * config/config.{sub,guess}: update from config.
15392
15393 2003-12-31  Karl Berry  <karl@gnu.org>
15394
15395         * config/depcomp: update from automake.
15396
15397 2003-12-14  Karl Berry  <karl@gnu.org>
15398
15399         * lib/config.charset: update from gettext-runtime.
15400
15401 2003-12-03  Paul Eggert  <eggert@twinsun.com>
15402
15403         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
15404         Bug reported by Alfred M. Szmidt.
15405
15406 2003-12-03  Bruno Haible  <bruno@clisp.org>
15407
15408         * m4/gettext.m4: Upgrade from gettext-0.13.
15409         * m4/po.m4: Upgrade from gettext-0.13.
15410         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
15411         * m4/intmax.m4: New file, from gettext-0.13.
15412         * m4/printf-posix.m4: New file, from gettext-0.13.
15413
15414 2003-11-29  Karl Berry  <karl@gnu.org>
15415
15416         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
15417
15418 2003-11-25  Paul Eggert  <eggert@twinsun.com>
15419             Bruno Haible  <bruno@clisp.org>
15420
15421         * lib/printf-parse.h: Don't include sys/types.h.
15422         (ARG_NONE): New macro.
15423         (char_directive): Change type of *arg_index fields to size_t.
15424         * lib/printf-parse.c: Don't include sys/types.h.
15425         (SSIZE_MAX): Remove macro.
15426         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
15427         Remove unnecessary overflow check.
15428         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
15429         fields.
15430
15431 2003-11-25  Bruno Haible  <bruno@clisp.org>
15432
15433         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
15434
15435 2003-11-25  Bruno Haible  <bruno@clisp.org>
15436
15437         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
15438         gt_TYPE_SSIZE_T.
15439
15440 2003-11-24  Paul Eggert  <eggert@twinsun.com>
15441
15442         * modules/alloca: Remove dependency on xalloc.
15443
15444 2003-11-24  Paul Eggert  <eggert@twinsun.com>
15445
15446         * lib/alloca.c: Remove dependency on xalloc module.
15447         (xalloc_die): Remove.
15448         (memory_full) [!defined emacs]: New macro.
15449         [!defined emacs]: Don't include xalloc.h.
15450         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
15451         address arithmetic overflows.  Change datatypes a bit to avoid
15452         unnecessary casts.
15453
15454 2003-11-22  Jim Meyering  <jim@meyering.net>
15455
15456         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
15457         s/size/size_t/.
15458
15459 2003-11-21  Karl Berry  <karl@gnu.org>
15460
15461         * config/config.{sub,guess}: update from config.
15462
15463 2003-11-18  Karl Berry  <karl@gnu.org>
15464
15465         * config/config.{sub,guess}: update from config.
15466
15467         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
15468
15469 2003-11-17  Paul Eggert  <eggert@twinsun.com>
15470
15471         * README: Mention that S+T cannot overflow if S is the size of
15472         an existing object and T is sufficiently small.
15473
15474 2003-11-17  Jim Meyering  <jim@meyering.net>
15475
15476         On systems without utime and without a utimes function capable of
15477         dealing with a NULL struct utimbuf* argument, this utime replacement
15478         could -- in unusual circumstances -- leak a file descriptor.
15479         * lib/utime.c: Include <unistd.h> and <errno.h>.
15480         (utime_null): Be sure to close `fd' and to preserve errno.
15481         Reported by Geoff Collyer via Arnold Robbins.
15482
15483 2003-11-17  Bruno Haible  <bruno@clisp.org>
15484
15485         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
15486         (Depends-on): Add xsize.
15487
15488 2003-11-17  Bruno Haible  <bruno@clisp.org>
15489
15490         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
15491
15492 2003-11-17  Bruno Haible  <bruno@clisp.org>
15493
15494         * lib/vasnprintf.c (alloca): Remove fallback definition.
15495         (freea): Remove definition.
15496         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
15497         Reported by Paul Eggert.
15498
15499 2003-11-16  Paul Eggert  <eggert@twinsun.com>
15500             Bruno Haible  <bruno@clisp.org>
15501
15502         Protect against address arithmetic overflow.
15503         * lib/printf-args.h: Include stddef.h.
15504         (arguments): Change type of field 'count' to size_t.
15505         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
15506         'unsigned int' where appropriate.
15507         * lib/printf-parse.h: Include sys/types.h.
15508         (char_directive): Change type of *arg_index fields to ssize_t.
15509         (char_directives): Change type of fields 'count', max_*_length to
15510         size_t.
15511         * lib/printf-parse.c: Include sys/types.h and xsize.h.
15512         (SSIZE_MAX): Define fallback value.
15513         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
15514         instead of 'int' where appropriate. Check a_allocated, d_allocated
15515         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
15516         * lib/vasnprintf.c: Include xsize.h.
15517         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
15518         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
15519         overflow. Avoid wraparound when converting a width or precision from
15520         decimal to binary.
15521
15522 2003-11-16  Bruno Haible  <bruno@clisp.org>
15523
15524         Update from GNU gettext.
15525         * lib/printf-parse.c: Generalize to it can be compiled for wide
15526         strings.
15527         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
15528         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
15529         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
15530         SNPRINTF): New macros.
15531         Don't include <alloca.h> if the file is used inside libintl.
15532         (local_wcslen): New function, for Solaris 2.5.1.
15533         (VASNPRINTF): Use it instead of wcslen.
15534
15535 2003-11-16  Bruno Haible  <bruno@clisp.org>
15536
15537         * lib/xsize.h (xmax): New function.
15538         (xsum, xsum3, xsum4): Declare as "pure" functions.
15539
15540 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15541
15542         * modules/xalloc (Files): Undo latest change, since xalloc.h
15543         no longer needs SIZE_MAX or PTRDIFF_MAX.
15544
15545 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15546
15547         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
15548         gl_PTRDIFF_MAX.
15549
15550 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15551
15552         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
15553         "return", to pacify some unknown compiler.  Problem reported
15554         by Joerg Schilling.
15555
15556 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15557
15558         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
15559         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
15560         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
15561         heuristic is just as accurate as far as we know, and it removes a
15562         dependency on size_max.m4 and ptrdiff_max.m4.
15563
15564 2003-11-11  Bruno Haible  <bruno@clisp.org>
15565
15566         * modules/xsize (Files): Add m4/size_max.m4.
15567         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
15568
15569 2003-11-11  Bruno Haible  <bruno@clisp.org>
15570
15571         * m4/size_max.m4: New file.
15572         * m4/ptrdiff_max.m4: New file.
15573         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
15574         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
15575         (gl_XALLOC): Invoke it.
15576
15577 2003-11-11  Bruno Haible  <bruno@clisp.org>
15578
15579         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
15580         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
15581         defined.
15582
15583 2003-11-10  Paul Eggert  <eggert@twinsun.com>
15584
15585         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
15586         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
15587         rejected some allocations of exactly SIZE_MAX - 2 bytes.
15588         From Bruno Haible.
15589         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
15590         not (size_t) -1, since it's defined here.
15591
15592 2003-11-09  Karl Berry  <karl@gnu.org>
15593
15594         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
15595
15596 2003-11-06  Paul Eggert  <eggert@twinsun.com>
15597
15598         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
15599         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
15600         Reject sizes of exactly SIZE_MAX bytes.
15601         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
15602         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
15603
15604 2003-11-05  Bruno Haible  <bruno@clisp.org>
15605
15606         * lib/xsize.h: Include limits.h, to avoid a possible collision with
15607         SIZE_MAX defined in <limits.h> on Solaris.
15608
15609 2003-11-04  Jim Meyering  <jim@meyering.net>
15610
15611         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
15612         variable names, rather than @VAR@.
15613         * modules/poll: Likewise.
15614
15615 2003-11-04  Bruno Haible  <bruno@clisp.org>
15616
15617         * modules/xsize: New file.
15618         * modules/linebreak: Depend on xsize.
15619         * MODULES.html.sh (func_all_modules): Add xsize.
15620
15621 2003-11-04  Bruno Haible  <bruno@clisp.org>
15622
15623         * m4/xsize.m4: New file.
15624
15625 2003-11-04  Bruno Haible  <bruno@clisp.org>
15626
15627         * lib/xsize.h: New file.
15628         * lib/linebreak.c: Include xsize.h.
15629         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
15630         argument for overflow.
15631         Suggested by Paul Eggert.
15632
15633 2003-11-03  Karl Berry  <karl@gnu.org>
15634
15635         * config/config.{guess,sub}: update from config.
15636
15637 2003-11-03  Jim Meyering  <jim@meyering.net>
15638
15639         * modules/userspec (lib_SOURCES): Add userspec.h.
15640         (Include): Add "userspec.h".
15641         Improve description.
15642
15643 2003-11-03  Jim Meyering  <jim@meyering.net>
15644
15645         * lib/userspec.c: Include "userspec.h".
15646         * lib/userspec.h: New file.
15647
15648 2003-11-03  Bruno Haible  <bruno@clisp.org>
15649
15650         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
15651
15652 2003-11-03  Bruno Haible  <bruno@clisp.org>
15653
15654         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
15655         available, to avoid (extremely rare) race condition.
15656         Suggested by Paul Eggert.
15657
15658 2003-11-02  Karl Berry  <karl@gnu.org>
15659
15660         * config/srclist.txt (vasprintf.c): sync broken, sigh.
15661
15662 2003-10-31  Paul Eggert  <eggert@twinsun.com>
15663
15664         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
15665         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
15666         (read_filesystem_list): Set and use me_type_malloced.
15667         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
15668         whatever the type happens to be), for brevity and consistency.
15669         Check for size calculation overflow on Alphas running OSF/1.
15670
15671 2003-10-31  Jim Meyering  <jim@meyering.net>
15672
15673         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
15674
15675         * lib/linebuffer.c: Include <string.h> for declaration of memset.
15676
15677 2003-10-30  Paul Eggert  <eggert@twinsun.com>
15678             Bruno Haible  <bruno@clisp.org>
15679
15680         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
15681         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
15682
15683 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15684
15685         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
15686         netbsd*-gnu*.  Suggested by Robert Millan.
15687
15688 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15689
15690         * modules/group-member: Depend on stdbool.
15691
15692 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15693
15694         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
15695
15696 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15697
15698         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
15699         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
15700         after the 'gnu' in these cases.  This fixes some bugs in the
15701         previous change, and is based on suggestions by Robert Millan.
15702
15703 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15704
15705         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
15706         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
15707         no longer needed.
15708         * lib/quotearg.c (quotearg_n_options): Use it.
15709         * lib/group-member.c: Include <stdbool.h>.
15710         (free_group_info): Arg is now const *; don't free arg.
15711         (get_group_info): Now returns bool and accepts struct group_info *,
15712         rather than returning a malloc'ed struct group_info *.
15713         All uses changed.  Check for overflow in internal size calculation.
15714
15715         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
15716         rather than xmalloc/xrealloc.
15717         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
15718         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
15719         conformance bug: the old code used a pointer after freeing the
15720         storage that it addressed.
15721         * lib/hash.c (hash_initialize): Simplify the code by using
15722         xalloc_oversized rather than doing it by hand.
15723         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
15724         the buffer preserved.  Use free and xmalloc instead.
15725         * lib/quotearg.c (quotearg_n_options): Likewise.
15726         Use a simpler test for size overflow.  Don't use xalloc_oversized
15727         because unsigned int might be wider than size_t (!); this suggests
15728         that we should switch from unsigned int to size_t for slot numbers.
15729
15730 2003-10-28  Paul Eggert  <eggert@twinsun.com>
15731
15732         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
15733         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
15734         NetBSD kernels.  Requested by Richard Stallman.
15735
15736 2003-10-27  Paul Eggert  <eggert@twinsun.com>
15737
15738         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
15739         to allocate the returned structure.  Do not allocate a subarray,
15740         as x2nrealloc will do that.
15741         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
15742         instead of xnrealloc.
15743         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
15744
15745 2003-10-27  Bruno Haible  <bruno@clisp.org>
15746
15747         * lib/stdbool_.h: Better support for BeOS.
15748
15749 2003-10-26  Paul Eggert  <eggert@twinsun.com>
15750
15751         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
15752         now uses inline.
15753
15754 2003-10-26  Paul Eggert  <eggert@twinsun.com>
15755
15756         * lib/xalloc.h (xalloc_oversized): New static inline function, for
15757         callers that want to do their own size-overflow checking.  Include
15758         <stdbool.h>, since xalloc_oversized returns bool.
15759         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
15760         to use xalloc_oversized.
15761
15762         Add two functions x2realloc, x2nrealloc, for programs that grow
15763         arrays dynamically by doubling their sizes.
15764         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
15765         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
15766         New functions.
15767
15768         Port to C99 semantics for 'inline' of external functions.
15769         Bug reported by Bruno Haible.
15770         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
15771         with the old contents of xnmalloc.
15772         (xnmalloc, xmalloc): Use it.
15773         (xnrealloc_inline): New static inline function,
15774         with the old contents of xnrealloc.
15775         (xnrealloc, xrealloc): Use it.
15776
15777         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
15778         that.
15779
15780 2003-10-26  Karl Berry  <karl@gnu.org>
15781
15782         * config/srclist.txt (COPYING.DOC): no longer available from
15783         /gd/gnuorg; don't know where the ultimate source is.
15784
15785 2003-10-25  Paul Eggert  <eggert@twinsun.com>
15786
15787         Fix several address-calculation bugs in the hash modules,
15788         plus some minor code cleanup.
15789
15790         * lib/hash.h: Include <stdbool.h>, for bool.
15791         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
15792         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
15793         hash_get_n_entries, hash_get_max_bucket_length,
15794         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
15795         hash_rehash): Use size_t rather than unsigned.
15796         * lib/hash.c (struct hash_table, hash_get_n_buckets,
15797         hash_get_n_buckets_used, hash_get_n_entries,
15798         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
15799         hash_get_entries, hash_do_for_each, hash_string, is_prime,
15800         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
15801         Likewise.
15802         (SIZE_MAX): Define if not defined.
15803         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
15804         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
15805         hash_print):
15806         Use const * when possible.
15807         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
15808         (check_tuning): Fix bug: if tuning parameters were very close to
15809         0 or 1, rounding errors could have caused subscript violations.
15810         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
15811         (hash_initialize): Add 'fail:' label
15812         to free table and return NULL, and use it to simplify code.
15813         Use calloc rather than clearing the storage ourself.
15814         (hash_initialize, hash_rehash): Check for arithmetic overflow in
15815         buffer size calculations.
15816         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
15817         Include <stddef.h>, for size_t.
15818         * lib/hash-pjw.c (hash_pjw): Likewise.
15819         Switch to method described by Bruno Haible.
15820         Include <limits.h>, for CHAR_BIT.
15821         (SIZE_BITS): New macro.
15822
15823 2003-10-23  Paul Eggert  <eggert@twinsun.com>
15824
15825         * m4/getline.m4 (AM_FUNC_GETLINE):
15826         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
15827         hosts.  Problem reported by Derek Robert Price in
15828         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
15829         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
15830         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
15831
15832 2003-10-21  Paul Eggert  <eggert@twinsun.com>
15833
15834         * lib/getndelim2.c (getndelim2): When size calculation overflows,
15835         ceiling the allocation at NMAX bytes rather than silently
15836         discarding input bytes before NMAX is reached.  This makes
15837         a difference only if NMAX exceeds SIZE_MAX / 2.
15838
15839         * lib/obstack.c: Merge from glibc.
15840         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
15841         Add libc_hidden_def (_obstack_newchunk).
15842         (_obstack_free) [! defined _LIBC]: Remove.
15843         [defined _LIBC]: Make a strong alias from obstack_free, rather than
15844         a clone of the function body.
15845         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
15846         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
15847
15848         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
15849         glibc.
15850         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
15851         arg to memcpy.
15852
15853         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
15854         (obstack_ptr_grow_fast, obstack_int_grow_fast):
15855         Don't use lvalue casts, as GCC plans to remove support for them
15856         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
15857         was also present in the non-GCC version, indicating that this
15858         code had always been buggy and had never been widely used.
15859         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
15860         Use the fast variant of each macro, rather than copying the
15861         definiens of the fast variant; that way, we'll be more likely to
15862         catch future bugs in the fast variants.
15863
15864 2003-10-20  Bruno Haible  <bruno@clisp.org>
15865
15866         * modules/wait-process: New file.
15867         * MODULES.html.sh (func_all_modules): Add wait-process.
15868
15869 2003-10-20  Bruno Haible  <bruno@clisp.org>
15870
15871         * m4/wait-process.m4: New file.
15872
15873 2003-10-20  Bruno Haible  <bruno@clisp.org>
15874
15875         * lib/wait-process.h: New file, from GNU gettext.
15876         * lib/wait-process.c: New file, from GNU gettext.
15877
15878 2003-10-19  Jim Meyering  <jim@meyering.net>
15879
15880         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
15881         HPUX 10.20.
15882
15883 2003-10-18  Karl Berry  <karl@gnu.org>
15884
15885         * config/config.guess: update from config.
15886
15887 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15888
15889         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
15890         (getgroups): First arg is int, not size_t.
15891         Don't let 'free' mangle errno.
15892
15893 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15894
15895         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
15896
15897 2003-10-16  Karl Berry  <karl@gnu.org>
15898
15899         * config/config.{guess,sub}: update from config.
15900
15901 2003-10-16  Jim Meyering  <jim@meyering.net>
15902
15903         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
15904         memcpy.
15905
15906 2003-10-15  Paul Eggert  <eggert@twinsun.com>
15907
15908         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
15909         (SIZE_MAX): Remove.
15910         (new_exclude, add_exclude_file): Initial size no longer needs to
15911         be a power of 2.
15912         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
15913         our own address arithmetic overflow checking.
15914
15915         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
15916         (fnmatch): Do not alloca more than 2000 wide characters;
15917         instead, use malloc for large buffers.
15918         Check for address arithmetic overflow, and return -1
15919         with errno set to ENOMEM in that case.
15920         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
15921         (NEW_PATTERN): Do not alloca more than 8000 bytes;
15922         instead, return -1.  Check for address arithmetic overflow.
15923
15924 2003-10-14  Paul Eggert  <eggert@twinsun.com>
15925
15926         Handle invalid suffixes and overflow independently, so that
15927         callers can treat them independently as needed.  Fix some bugs in
15928         suffix handling, e.g., "100k@" was not diagnosed as an invalid
15929         suffix for a human-readable blocksize.  The major caller-visible
15930         change is the addition of a new
15931         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
15932         that both overflow and suffix chars were found.
15933
15934         * lib/human.c (humblock): Don't check separately for invalid suffix
15935         char; that is xstrtoumax's job (now that its bug is fixed).
15936         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
15937         INTMAX_MAX]: New macros.
15938         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
15939         TYPE_MAXIMUM): New macros.
15940         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
15941         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
15942         if overflow occurs, as it's what __strtol does and it's more useful
15943         in practice.
15944         (__xstrtol): If __strtol reports some error other than ERANGE,
15945         reflect it to the caller as LONGINT_INVALID.  If it reports
15946         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
15947         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
15948         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
15949         value.
15950         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
15951         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
15952         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
15953         [defined UINTMAX_MAX]: New macros.
15954
15955 2003-10-14  Bruno Haible  <bruno@clisp.org>
15956
15957         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
15958
15959 2003-10-14  Bruno Haible  <bruno@clisp.org>
15960
15961         * m4/sig_atomic_t: New file, from GNU gettext.
15962         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
15963
15964 2003-10-14  Bruno Haible  <bruno@clisp.org>
15965
15966         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
15967         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
15968         Also use volatile where needed.
15969
15970 2003-10-12  Paul Eggert  <eggert@twinsun.com>
15971
15972         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
15973         Change maintainer from Bruno Haible to 'all'.
15974
15975 2003-10-12  Paul Eggert  <eggert@twinsun.com>
15976
15977         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
15978
15979 2003-10-12  Paul Eggert  <eggert@twinsun.com>
15980
15981         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
15982         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
15983         and define in terms of the other primitives.
15984         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
15985         (SIZE_MAX): Define if not already defined.
15986         (array_size_overflow): New function.
15987         (xalloc_die): Abort instead of exiting if 'error' returns.
15988         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
15989         (xmalloc, xrealloc): Use them.
15990         (xcalloc): Check for address arithmetic overflow.
15991         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
15992         a bit faster than strcpy.
15993
15994 2003-10-10  Simon Josefsson  <jas@extundo.com>
15995
15996         * modules/argp (Depends-on): Add restrict and strcase.
15997
15998 2003-10-10  Simon Josefsson  <jas@extundo.com>
15999
16000         * m4/argp.m4: Add AC_C_INLINE.
16001
16002 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16003
16004         Merge getpass from libc, plus a few fixes.
16005
16006         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
16007         Include <stdbool.h>.
16008         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
16009         __fsetlocking to empty.
16010         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
16011         do include <bits/libc-lock.h>.
16012         Do not include <fcntl.h>; not needed.
16013         [_LIBC]: Include <wchar.h>.
16014         (NOTCANCEL_MODE): New macro.
16015         (flockfile, funlockfile) [_LIBC]: New macros.
16016         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
16017         [!_LIBC]: New macros.
16018         (call_fclose): New function.
16019         (getpass): Use it.  Save tty stream separately; this simplifies the
16020         code and makes it more reliable if stdin happens to equal stdout.
16021         Invoke __fsetlocking on tty.
16022         Handle thread cancellation if needed.
16023         Namespace cleanup (use __tcgetattr, __getline).
16024         Use bool for Booleans.
16025         [USE_IN_LIBIO]: Handle wide streams.
16026         [!_LIBC]: Unconditionally do the fseek, since we don't know what
16027         stream might go where.
16028
16029         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
16030         doesn't have to include <stdio.h> before us.
16031         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
16032         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
16033         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
16034         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
16035         if not declared, so that we can use getpass.c code from libc without
16036         rewriting it.
16037         (flockfile, ftrylockfile, funlockfile): New macros.
16038
16039 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16040
16041         * modules/getpass: Depend on stdbool.
16042
16043 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16044
16045         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
16046
16047 2003-10-07  Karl Berry  <karl@gnu.org>
16048
16049         * config/config.{guess,sub}: update from config.
16050
16051 2003-10-06  Jim Meyering  <jim@meyering.net>
16052             Bruno Haible  <bruno@clisp.org>
16053
16054         This lets translators provide better translations for the
16055         "Written by ..." part of --version output.
16056         * lib/version-etc.h: Include stdarg.h.
16057         (version_etc_copyright): Declare as readonly.
16058         (version_etc): Make this function variadic with a NULL-terminated list
16059         of author name strings.
16060         (version_etc_va): New declaration.
16061         * lib/version-etc.c: Include stdarg.h, stdlib.h.
16062         (version_etc_copyright): Declare as readonly.
16063         (version_etc_va): New function. Provide a different translatable string
16064         for each possible number of authors < 10. Abbreviate when there are 10
16065         authors or more.
16066         (version_etc): Make this function variadic. Call version_etc_va.
16067         Suggestion from Gary V. Vaughan.
16068
16069         * lib/long-options.h (parse_long_options): Change prototype: the
16070         authors string is moved to the end and becomes variadic.
16071         * lib/long-options.c: Include stdarg.h.
16072         (parse_long_options): Make this function variadic, too.
16073         Call version_etc_va, not version_etc.
16074
16075 2003-10-06  Bruno Haible  <bruno@clisp.org>
16076
16077         * modules/version-etc-2: Remove file.
16078         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
16079
16080 2003-10-06  Bruno Haible  <bruno@clisp.org>
16081
16082         * modules/fatal-signal: New file.
16083         * MODULES.html.sh (func_all_modules): Add fatal-signal.
16084
16085 2003-10-06  Bruno Haible  <bruno@clisp.org>
16086
16087         * m4/fatal-signal.m4: New file.
16088         * m4/signalblocking.m4: New file, from GNU gettext.
16089
16090 2003-10-06  Bruno Haible  <bruno@clisp.org>
16091
16092         * lib/version-etc-2.h: Remove file.
16093         * lib/version-etc-2.c: Remove file.
16094
16095 2003-10-06  Bruno Haible  <bruno@clisp.org>
16096
16097         * lib/fatal-signal.h: New file, from GNU gettext.
16098         * lib/fatal-signal.c: New file, from GNU gettext.
16099
16100 2003-10-05  Paul Eggert  <eggert@twinsun.com>
16101
16102         * README: Rework advice for preventing empty .o files.
16103         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
16104         not <sys/types.h>.
16105
16106 2003-10-04  Karl Berry  <karl@gnu.org>
16107
16108         * lib/argp*: update from libc.
16109
16110 2003-10-04  Karl Berry  <karl@gnu.org>
16111
16112         * config/config.{guess,sub}: update from config.
16113
16114 2003-10-02  Bruno Haible  <bruno@clisp.org>
16115
16116         * modules/lchown (Include): Add lchown.h.
16117         * modules/time_r (Include): Use "..." syntax.
16118         * modules/xgetdomainname (Include): Add xgetdomainname.h.
16119
16120 2003-10-01  Simon Josefsson  <jas@extundo.com>
16121
16122         * MODULES.html.sh (func_all_modules): Move gethostname from section
16123         'based on' to section 'lacking' POSIX:2001.
16124
16125 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
16126
16127         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
16128         to output mode on the same stream.
16129
16130 2003-09-29  Paul Eggert  <eggert@twinsun.com>
16131
16132         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
16133         Fix arg typo in previous patch.
16134
16135 2003-09-28  Jim Meyering  <jim@meyering.net>
16136
16137         * lib/error.c: Correct cpp indentation.
16138
16139 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16140
16141         * modules/free: New file.
16142
16143 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16144
16145         * m4/free.m4: New file.
16146
16147 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16148
16149         * lib/minmax.h (MIN, MAX)
16150         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
16151         Omit the special code that used __typeof__, since we worry that
16152         it could be more trouble than it's worth.  See:
16153         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
16154         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
16155
16156         * lib/free.c: New file.
16157
16158 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
16159
16160         Trivial fixes to Makefile.am parts of module listings.
16161         * modules/strstr: Append strstr.h to lib_SOURCES.
16162         * modules/strcase: Likewise, for strcase.h.
16163
16164 2003-09-27  Karl Berry  <karl@gnu.org>
16165
16166         * config/mkinstalldirs: update from automake.
16167
16168 2003-09-26  Paul Eggert  <eggert@twinsun.com>
16169
16170         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
16171         (error_tail): Do not loop, reallocating temporary buffer, since
16172         the output cannot contain more wide characters than the input
16173         contains bytes, the size must be big enough already.  This avoids
16174         one potential size overflow calculation.  Check for size overflow
16175         when calculating temporary buffer size.  Free temporary buffer
16176         when done, if it was allocated with malloc; this plugs a memory
16177         leak.  Remove casts from void * to pointers, that are no longer
16178         needed now that we're assuming C89 or better.
16179
16180         Merge error changes from glibc.
16181
16182         * lib/error.c, error.h: Update copyright notice header to match glibc.
16183         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
16184         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
16185         Disable cancellation while printing error.
16186         * lib/error.h: Prepend __ to parameter names.
16187
16188 2003-09-26  Jim Meyering  <jim@meyering.net>
16189
16190         * lib/error.c (error_tail): Move some declarations
16191         into inner scope where the local variables are used.
16192
16193 2003-09-26  Bruno Haible  <bruno@clisp.org>
16194
16195         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
16196         stpncpy().
16197         Don't define stpncpy through config.h; it's now done through stpncpy.h.
16198
16199 2003-09-26  Bruno Haible  <bruno@clisp.org>
16200
16201         * lib/stpncpy.h (gnu_stpncpy): New declaration.
16202         (stpncpy): Define as alias for gnu_stpncpy.
16203         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
16204
16205 2003-09-25  Simon Josefsson  <jas@extundo.com>
16206
16207         * lib/xgetdomainname.h: New file.
16208         * lib/xgetdomainname.c: New file.
16209
16210 2003-09-25  Simon Josefsson  <jas@extundo.com>
16211             Bruno Haible  <bruno@clisp.org>
16212
16213         * modules/getdomainname: New file.
16214         * modules/xgetdomainname: New file.
16215         * MODULES.html.sh (func_all_modules): Add getdomainname,
16216         xgetdomainname.
16217
16218 2003-09-25  Simon Josefsson  <jas@extundo.com>
16219             Bruno Haible  <bruno@clisp.org>
16220
16221         * m4/getdomainname.m4: New file.
16222
16223 2003-09-25  Simon Josefsson  <jas@extundo.com>
16224             Bruno Haible  <bruno@clisp.org>
16225
16226         * lib/getdomainname.h: New file.
16227         * lib/getdomainname.c: New file.
16228
16229 2003-09-25  Karl Berry  <karl@gnu.org>
16230
16231         * lib/argp-fmtstream.c, argp-help.c: update from libc.
16232
16233 2003-09-25  Karl Berry  <karl@gnu.org>
16234
16235         * config/install-sh: update from automake.
16236
16237 2003-09-25  Bruno Haible  <bruno@clisp.org>
16238
16239         * modules/version-etc-2: New file, from modules/version-etc with
16240         modifications.
16241         * MODULES.html.sh (func_all_modules): Add version-etc-2.
16242
16243 2003-09-25  Bruno Haible  <bruno@clisp.org>
16244
16245         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
16246         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
16247
16248 2003-09-24  Simon Josefsson  <jas@extundo.com>
16249
16250         * modules/xgethostname: Add xgethostname.h.
16251
16252 2003-09-24  Paul Eggert  <eggert@twinsun.com>
16253
16254         * lib/linebuffer.c (freebuffer): Don't free the argument, just
16255         the buffer associated with the argument.  Bug reported by
16256         Simon Josefsson.
16257
16258 2003-09-24  Paul Eggert  <eggert@twinsun.com>
16259
16260         * README: Document assumptions that 'int' is at least 32 bits
16261         wide, that integer arithmetic is 2's complement without overflow,
16262         that there are no holes in integer values, that adding sizes of
16263         two nonoverlapping objects can't overflow, and that all-bits-zero
16264         yields scalar zero.  Fix spelling and capitalization typos.
16265
16266 2003-09-19  Karl Berry  <karl@gnu.org>
16267
16268         * lib/argp.h: update from libc.
16269
16270 2003-09-17  Paul Eggert  <eggert@twinsun.com>
16271
16272         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
16273         to avoid spurious warnings like "AC_RUN_IFELSE was called before
16274         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
16275
16276 2003-09-17  Paul Eggert  <eggert@twinsun.com>
16277
16278         * gnulib-tool: Use "test -h", not "test -L", for portability
16279         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
16280         (tags_regexp): Remove, since \| doesn't conform to POSIX.
16281         (sed_extract_prog): Issue s commands one-by-one, rather than
16282         using \| in one s command.
16283
16284 2003-09-16  Paul Eggert  <eggert@twinsun.com>
16285
16286         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
16287         input error, instead of returning NULL the next time we are called
16288         (and therefore losing track of errno).
16289
16290 2003-09-16  Bruno Haible  <bruno@clisp.org>
16291
16292         * gnulib-tool (func_create_testdir): Warn about duplicated
16293         dependencies.
16294
16295 2003-09-15  Paul Eggert  <eggert@twinsun.com>
16296
16297         * modules/argmatch, modules/fatal, modules/obstack,
16298         modules/xalloc, modules/xgethostname: Sort dependencies by
16299         importance, not alphabetically.
16300
16301 2003-09-15  Paul Eggert  <eggert@twinsun.com>
16302
16303         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
16304         fails, so that the caller gets the proper errno.
16305
16306         * lib/readutmp.c (read_utmp): Likewise.
16307         Check for fstat error.  Close stream and free storage
16308         when failing.
16309
16310 2003-09-14  Karl Berry  <karl@gnu.org>
16311
16312         * config/srclist.txt (strdup.c): disable for c89 changes.
16313
16314 2003-09-14  Jim Meyering  <jim@meyering.net>
16315
16316         * lib/getloadavg.c: Correct cpp indentation.
16317         * lib/strdup.c: Likewise.
16318         * lib/vasnprintf.c: Likewise.
16319
16320 2003-09-14  Bruno Haible  <bruno@clisp.org>
16321
16322         * modules/fwriteerror: New file.
16323         * MODULES.html.sh (func_all_modules): Add fwriteerror.
16324
16325 2003-09-14  Bruno Haible  <bruno@clisp.org>
16326
16327         * lib/fwriteerror.h: New file.
16328         * lib/fwriteerror.c: New file.
16329
16330 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16331
16332         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
16333         modules/xgethostname, modules/xalloc: Depend on exit.
16334
16335 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16336
16337         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
16338
16339         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
16340         and AC_MINIX, too, so that their extensions are available.
16341
16342         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
16343         This macro has been superseded by gl_BACKUPFILE.
16344
16345         More patches to assume C89 or better.
16346
16347         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
16348
16349         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
16350         unconditionally.
16351         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
16352         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
16353         Include <string.h>, <stdlib.h> unconditionally.
16354         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
16355         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
16356         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
16357         headers or for string.h.
16358         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
16359         or strtoul.
16360
16361         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
16362         headers.
16363         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
16364         * m4/userspec.m4 (gl_USERSPEC): Likewise.
16365         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
16366         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
16367         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
16368         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
16369         memcpy, memset.
16370         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
16371         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
16372         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
16373         strtol.
16374         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
16375         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
16376         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
16377         strtoul.
16378
16379 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16380
16381         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
16382         * lib/obstack.c [!defined _LIBC]: Likewise.
16383         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
16384         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
16385         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
16386
16387         More changes to assume C89 or better.
16388
16389         * lib/error.c (error_tail): Assume vprintf.
16390
16391         * lib/argmatch.c (getenv): Remove decl.
16392         * lib/progreloc.c (get_full_program_name): Define via prototype.
16393         * lib/setenv.c (clearenv): Likewise.
16394         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
16395         needed.
16396         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
16397         (malloc, memcpy): Remove decls.
16398         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
16399         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
16400         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
16401         (memcpy): Remove macro.
16402         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
16403         (__P): Remove.  All uses removed.
16404         (PTR): Remove.  All uses changed to void *.
16405         (CHAR_BIT, NULL): Remove.
16406         (spaces, zeros, memset_space, memset_zero)
16407         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
16408         Remove.
16409         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
16410         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
16411         Define with prototype.
16412         Remove now-unnecessary prototype decl.
16413         (extra_args_spec): Assume ANSI C.  All uses changed.
16414         (extra_args_spec_iso): Remove.
16415         (my_strftime, emacs_strftimeu): Define via prototype.
16416         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
16417         unconditionally.
16418         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
16419         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
16420         (strtoul, strtol): Remove decls.
16421         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
16422         LONG_MAX): Remove.
16423         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
16424         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
16425         (LOCALE_PARAM_PROTO): New macro.
16426         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
16427         (INTERNAL (strtol), strtol): Define with a prototype.
16428         (PARAMS): Remove.  All uses removed.
16429         * lib/tempname.c: Include <string.h> unconditionally.
16430         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
16431         * lib/xgethostname.c (main): Define with a prototype.
16432         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
16433         Include <stdlib.h> unconditionally.
16434         (calloc, malloc, realloc, free): Remove decls.
16435         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
16436         Include <stdlib.h> unconditionally.  Sort include file names.
16437         (strtod): Remove.
16438         (xstrtod): Define with a prototype.
16439         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
16440         (strtol, strtoul): Remove decls.
16441
16442 2003-09-11  Paul Eggert  <eggert@twinsun.com>
16443
16444         More patches to assume C89 or better.
16445         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
16446         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
16447         string.h, memchr, STDC_HEADERS.
16448
16449 2003-09-11  Paul Eggert  <eggert@twinsun.com>
16450
16451         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
16452         Include <stdlib.h>, <string.h> unconditionally.
16453         Remove now-unnecessary cast to char *.
16454         * lib/strnlen.c: Include <string.h> unconditionally.
16455         * lib/yesno.c (yesno): Define with a prototype.
16456
16457 2003-09-11  Bruno Haible  <bruno@clisp.org>
16458
16459         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
16460
16461 2003-09-10  Jim Meyering  <jim@meyering.net>
16462
16463         * lib/error.c: Correct indentation of cpp directives.
16464
16465 2003-09-10  Bruno Haible  <bruno@clisp.org>
16466
16467         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
16468         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
16469         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
16470         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
16471         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
16472         <stdlib.h> and <string.h> checks.
16473         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
16474         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
16475
16476 2003-09-10  Bruno Haible  <bruno@clisp.org>
16477
16478         * lib/strcspn.c: Include <string.h> unconditionally.
16479         * lib/strpbrk.c: Include <string.h> unconditionally.
16480         * lib/strstr.c: Include <string.h> unconditionally.
16481         * lib/unicodeio.c: Include <string.h> unconditionally.
16482         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
16483         * lib/unsetenv.c: Likewise.
16484         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
16485         * lib/yesno.c: Include <stdlib.h> unconditionally.
16486         (rpmatch): Add prototype.
16487
16488 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16489
16490         More patches to assume C89 or better.
16491         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
16492         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
16493         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
16494         or for string.h.
16495         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
16496         stdlib.h.
16497         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
16498         C headers.
16499         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
16500         string.h.
16501         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
16502         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
16503         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
16504         or for string.h.
16505         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
16506         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
16507         C headers.
16508         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
16509         memcpy.
16510         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
16511         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
16512         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
16513         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
16514         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
16515         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
16516         string.h, free.
16517         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
16518         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
16519         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
16520         C headers, or for string.h.
16521         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
16522         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
16523         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
16524         headers, memory.h, stdlib.h, string.h, strings.h.
16525         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
16526         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
16527         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
16528         strchr.
16529         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
16530         headers, memory.h, string.h.
16531         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
16532         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
16533         free.
16534         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
16535         headers.
16536         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
16537         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
16538         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
16539         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
16540         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
16541
16542 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16543
16544         More K&R removal.
16545
16546         * lib/acosl.c (main): Use a prototype.
16547         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
16548         tanl.c: Likewise.
16549
16550         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
16551
16552         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
16553         (getopt, etopt_long, getopt_long_only, _getopt_internal)
16554         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
16555         with a prototype.
16556         * lib/getopt.c (const): Remove macro.
16557         Include <string.h> unconditionally.
16558         (my_index): Remove; all uses changed to strchr.
16559         (strlen): Remove decl.
16560         (exchange): Remove forward decl; no longer needed.
16561         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
16562         Define with prototype.
16563         * lib/getopt1.c (const): Remove macro.
16564         (getopt_long, getopt_long_only, main): Define with prototype.
16565
16566         * lib/getugroups.c: Include <string.h> unconditionally.
16567
16568         * lib/getusershell.c: Include <stdlib.h> unconditionally.
16569         (getusershell, setusershell, endusershell, readname, main):
16570         Define with prototypes.
16571
16572         * lib/group-member.c: Include group-member.h first.
16573         Include <stdlib.h> unconditionally.
16574
16575         * lib/hard-locale.c: Include hard-locale.h first.
16576         Include <stdlib.h>, <string.h> unconditionally.
16577
16578         * lib/hash.c (free, malloc): Remove decls.
16579         Include <stdlib.h> unconditionally.
16580
16581         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
16582         (getenv): Do not declare.
16583
16584         * lib/idcache.c: Include <string.h> unconditionally.
16585
16586         * lib/long-options.c: Include long-options.h first, to test interface.
16587         Include <stdlib.h> unconditionally.
16588
16589         * lib/makepath.c: Include makepath.h first, to test interface.
16590         Include <stdlib.h> and <string.h> unconditionally.
16591
16592         * lib/linebuffer.c: Include <stdlib.h>.
16593         (free): Remove decl.
16594
16595         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
16596         stddef.h. rpl_malloc returns void *, not char *.
16597         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
16598         prototype.
16599
16600         * lib/md5.h: Include <limits.h> unconditionally.
16601         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
16602         (__P): Remove; all uses removed.
16603         * lib/md5.c: Include "md5.h" first.
16604         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
16605         md5_buffer, md5_process_bytes, md5_process_block):
16606         Define with prototypes.
16607         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
16608         * lib/sha.c: Include "sha.h" first.
16609         Include <stdlib.h>, <string.h> unconditionally.
16610
16611         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
16612         * lib/memcmp.c (__ptr_t): Likewise.
16613         * lib/memrchr.c (__ptr_t): Likewise.
16614         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
16615         Include <string.h> unconditionally.
16616         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
16617         * lib/memchr.c: Include <stdlib.h> unconditionally.
16618         * lib/memchr.c (LONG_MAX): Remove.
16619         * lib/memrchr.c (LONG_MAX): Likewise.
16620         * lib/memchr.c (__memchr): Define via a prototype.
16621         * lib/memrchr.c (__memrchr): Likewise.
16622         * lib/memcmp.c (__P): Remove, and remove all uses.
16623         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
16624         Remove forward decls; no longer needed.
16625         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
16626         Use types required by C89 in prototype.
16627
16628         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
16629         * lib/savedir.c: Likewise.
16630         * lib/mkdir.c (free): Remove decl.
16631         * lib/rmdir.c (rmdir): Define with a prototype.
16632         * lib/savedir.c: Include savedir.h first, to test interface.
16633
16634         * lib/mktime.c (STDC_HEADERS): Remove.
16635         Include <stdlib.h>, <string.h> unconditionally.
16636
16637         * lib/modechange.c: Include <stdlib.h> unconditionally.
16638         (malloc): Remove decl.
16639
16640         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
16641         (free): Remove decl.
16642
16643         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
16644         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
16645         (This type really should be intptr_t, but that's a C99ism.)
16646         (_obstack_memcpy): Remove: all uses changed to memcpy.
16647         Include <string.h> unconditionally.
16648         (struct obstack): Assume __STDC__ for types of members
16649         chunkfun, freefun, extra_arg.
16650         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
16651         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
16652         obstack_begin, obstack_specify_allocation,
16653         obstack_specify_allocation_with_arg, obstack_chunkfun,
16654         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
16655         Remove unprototyped decls and the macros that use them.
16656         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
16657         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
16658         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
16659         (defined __STDC__ && __STDC__)]:
16660         Remove nonprototyped code.
16661         Include <stdlib.h> unconditionally.
16662         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
16663         _obstack_allocated_p, _obstack_free, obstack_free,
16664         _obstack_memory_used, print_and_abort):
16665         Define using prototypes.
16666         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
16667         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
16668         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
16669         obstack_next_free, obstack_object_size, obstack_room) [0]:
16670         Remove unused, unprototyped code.
16671
16672         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
16673
16674         * lib/physmem.c (physmem_total, physmem_available, main): Define
16675         with prototypes.
16676
16677         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
16678         (main): Define with a prototype.
16679
16680         * lib/posixver.c (getenv): Remove decl.
16681
16682         * lib/putenv.c (malloc): Returns void *, not char *.
16683         Include <string.h> unconditionally.
16684         (strchr, memcpy, NULL): Do not define.
16685
16686         * lib/readtokens.c: Include readtokens.h first, to test interface.
16687         Include <stdlib.h>, <string.h> unconditionally.
16688         (init_tokenbuffer): Define with a prototype.
16689
16690         * lib/regex.c (PARAMS): Remove.  All uses removed.
16691         All uses of _RE_ARGS removed, too.
16692         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
16693         unconditionally.
16694         (bzero): Assume memset exists.
16695         (memcmp, memcpy, NULL): Remove.
16696         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
16697         char, or assignments to local vars of type signed char.
16698         (init_syntax_once, PREFIX(extract_number_and_incr),
16699         PREFIX(print_partial_compiled_pattern),
16700         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
16701         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
16702         PREFIX(regex_grow_registers), PREFIX(regex_compile),
16703         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
16704         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
16705         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
16706         wcs_compile_range, byte_compile_range, truncate_wchar,
16707         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
16708         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
16709         count_mbs_length, wcs_re_match_2_internal,
16710         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
16711         PREFIX(alt_match_null_string_p),
16712         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
16713         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
16714         regfree, PREFIX(extract_number)): Define with prototype.  Remove
16715         now-unnecessary declaration, if any.
16716         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
16717         regcomp, regexec):
16718         Remove now-unnecessary casts among pointer types.
16719         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
16720
16721         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
16722         (free): Remove decl.
16723
16724         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
16725
16726         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
16727         (free): Remove decl.
16728
16729         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
16730         * lib/xgetcwd.c: Likewise.
16731
16732         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
16733         (free): Remove decl.
16734
16735         * lib/strchrnul.c (strchrnul): Define with a prototype.
16736         Fix bug: c_in was not converted to char before searching.
16737
16738         The following changes are not K&R related:
16739
16740         * lib/group-member.h: Include <sys/types.h>, so that this file is
16741         self-contained.
16742         * lib/makepath.h: Likewise.
16743
16744         * lib/getusershell.c (readname, default_index, line_size, readname):
16745         Use size_t, not int, for sizes.
16746         (readname): If the size overflows, report an error instead of
16747         looping forever.
16748
16749 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16750
16751         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
16752         libc.
16753
16754 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16755
16756         * README: New section: portability guidelines.
16757
16758 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
16759
16760         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
16761         C89 spec.
16762
16763 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
16764
16765         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
16766
16767 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16768
16769         Assume C89 or better; remove K&R cruft.
16770         A few of these changes were first proposed by Derek Robert Price
16771         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
16772
16773         * lib/addext.c: Include <string.h> unconditionally.
16774         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
16775         Don't declare getenv or malloc.
16776
16777         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
16778         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
16779         (NULL): Remove.
16780         (find_stack_direction, alloca): Use prototypes.
16781
16782         * lib/atexit.c (atexit): Define using a prototype.
16783
16784         * lib/basename.c, dirname.c, stripslash.c:
16785         Include <string.h> unconditionally.
16786
16787         * lib/bcopy.c: Include <stddef.h>.
16788         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
16789
16790         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
16791
16792         * lib/error.h (error, error_at_line, error_print_progname)
16793         [! (defined (__STDC__) && __STDC__)]: Remove decls.
16794         * lib/error.c: Include error.h first, to check interface.
16795         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16796         (VA_START): Remove; all uses changeed to va_start.
16797         (exit, strerror): Remove decls.
16798         (error_print_progname): Prototype uncondionally.
16799         Don't include <errno.h>; no longer needed.
16800         (private_strerror): Remove.
16801         (error_tail): Always define.
16802         (error, error_at_line): Assume C89 or better; always use prototypes.
16803         * lib/fatal.c: Include "fatal.h" first, to test interface.
16804         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16805         (VA_START): Remove; all uses changed to va_start.
16806         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
16807         this case.
16808         (exit): Remove decl.
16809         (fatal): Prototype unconditionally.  Assume va_start works.
16810         Abort at end, to pacify gcc.
16811
16812         * lib/euidaccess.c (main): Define with a prototype.
16813
16814         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
16815
16816         * lib/exitfail.c: Include <stdlib.h> unconditionally.
16817
16818         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
16819         prototypes.
16820         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
16821         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
16822         (getenv): Remove decl.
16823         (fnmatch): Define using a prototype.
16824         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
16825         (FCT): Define using a prototype.
16826
16827         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
16828
16829         * lib/gethostname.c: Include <stddef.h>.
16830         (gethostname): Define with prototype.  Length is size_t, not int.
16831
16832 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16833
16834         Assume C89 or better; remove K&R cruft.
16835         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
16836         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
16837         string.h, getenv, malloc.
16838         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
16839         headers.
16840         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
16841         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
16842         do not check for strerror.
16843         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
16844         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
16845         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
16846         do not check for doprnt or vprintf.
16847         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
16848         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
16849
16850 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16851
16852         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
16853         getversion.c should have been removed then, but was accidentally
16854         preserved.
16855
16856         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
16857         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
16858
16859 2003-09-08  Karl Berry  <karl@gnu.org>
16860
16861         * config/config.sub, config.guess, srclistvars.sh: update from savannah
16862                 config, forget about prep.
16863
16864         * config/depcomp, missing: update from automake.
16865
16866 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16867
16868         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
16869         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16870
16871 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16872
16873         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
16874         copy_tm_result.  Bug reported by Simon Josefsson in
16875         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16876
16877 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16878
16879         * m4/time_r.m4: New file.
16880         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
16881         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
16882         is. Check for timegm declaration.
16883         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
16884         Do not check for gmtime_r.
16885         Replace mktime if __mktime_internal does not exist and if mktime
16886         hasn't been replaced already.
16887
16888 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16889
16890         * lib/time_r.c, lib/time_r.h: New files.
16891
16892         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
16893         __localtime_r.
16894         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
16895         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
16896
16897         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
16898         __gmtime_r.
16899         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
16900         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
16901         Include <time_r.h>.
16902
16903         * lib/timegm.c: Switch to glibc implementation, with the following
16904         changes:
16905         [defined HAVE_CONFIG_H]: Include <config.h>.
16906         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
16907         (__mktime_internal) [!defined _LIBC]: New decl.
16908         (__gmtime_r) [!defined _LIBC]: New macro and function.
16909         (timegm): Use a prototype, since gnulib assumes C89.
16910         Do not bother declaring tmp to be const, as it's not really usefu.
16911         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
16912         (timegm): Declare only if HAVE_DECL_TIMEGM.
16913
16914 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16915
16916         * MODULES.html.sh (func_all_modules): Add time_r.
16917         * modules/time_r: New file.
16918         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
16919         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
16920
16921 2003-09-03  Paul Eggert  <eggert@twinsun.com>
16922
16923         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
16924         Bug reported by Lute Kamstra in
16925         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
16926
16927         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
16928         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
16929         course with correspondingly smaller numbers for tomorrow and
16930         yesterday.  From Tadayoshi Funaba.  Originally installed into
16931         sh-utils on 1999-08-07, but the patch got lost (I guess during the
16932         coreutils merge?).
16933
16934 2003-08-31  Simon Josefsson  <jas@extundo.com>
16935
16936         * modules/timegm: New file.
16937         * MODULES.html.sh (func_all_modules): Add timegm.
16938
16939 2003-08-31  Simon Josefsson  <jas@extundo.com>
16940
16941         * m4/timegm.m4: New file.
16942
16943 2003-08-31  Simon Josefsson  <jas@extundo.com>
16944
16945         * lib/timegm.h: New file.
16946         * lib/timegm.c: New file.  Based on
16947         wget-1.8.2/src/http.c:mktime_from_utc.
16948
16949 2003-08-31  Karl Berry  <karl@gnu.org>
16950
16951         * lib/argp.h: update from libc.
16952
16953 2003-08-28  Bruno Haible  <bruno@clisp.org>
16954
16955         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
16956         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
16957         followed by '#define fnmatch fnmatch_posix' gives an error.
16958
16959 2003-08-28  Bruno Haible  <bruno@clisp.org>
16960
16961         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
16962         warning on QNX, which defines O_BINARY to 000000.
16963
16964 2003-08-27  Jim Meyering  <jim@meyering.net>
16965
16966         * m4/mkstemp.m4: Require that the system mkstemp be able to create
16967         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
16968         would fail after 32.  Reported by Danny Levinson.  Details here:
16969         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
16970
16971 2003-08-24  Bruno Haible  <bruno@clisp.org>
16972
16973         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
16974         MSVC7 <stdio.h> is included later.
16975
16976 2003-08-22  Simon Josefsson  <jas@extundo.com>
16977
16978         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
16979
16980 2003-08-20  Karl Berry  <karl@gnu.org>
16981
16982         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
16983
16984 2003-08-20  Bruno Haible  <bruno@clisp.org>
16985
16986         * modules/progname: New file.
16987         * MODULES.html.sh (func_all_modules): Add progname.
16988
16989 2003-08-20  Bruno Haible  <bruno@clisp.org>
16990
16991         * lib/progname.h: New file, from GNU gettext.
16992         * lib/progname.c: New file, from GNU gettext.
16993         * lib/progreloc.c: New file, from GNU gettext.
16994
16995 2003-08-19  Jim Meyering  <jim@meyering.net>
16996
16997         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
16998         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
16999
17000 2003-08-19  Bruno Haible  <bruno@clisp.org>
17001
17002         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
17003         more.
17004
17005 2003-08-19  Bruno Haible  <bruno@clisp.org>
17006
17007         * lib/xstrdup.c: Assume <string.h> exists.
17008
17009 2003-08-18  Paul Eggert  <eggert@twinsun.com>
17010
17011         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
17012         in makefile rules.
17013
17014 2003-08-18  Jim Meyering  <jim@meyering.net>
17015
17016         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
17017         * m4/lib-ld.m4: Likewise.
17018
17019 2003-08-18  Jim Meyering  <jim@meyering.net>
17020
17021         * lib/setenv.h: Indent nested cpp directive.
17022         * lib/vasnprintf.c: Remove trailing blanks.
17023
17024 2003-08-17  Simon Josefsson  <jas@extundo.com>
17025
17026         * modules/xstrndup: New file.
17027         * MODULES.html.sh (func_all_modules): Add xstrndup.
17028
17029 2003-08-17  Simon Josefsson  <jas@extundo.com>
17030
17031         * modules/argp: Fix autoconf macro name. Add more dependencies.
17032
17033 2003-08-17  Simon Josefsson  <jas@extundo.com>
17034
17035         * m4/xstrndup.m4: New file.
17036
17037 2003-08-17  Simon Josefsson  <jas@extundo.com>
17038
17039         * m4/argp.m4: New file.
17040
17041 2003-08-17  Simon Josefsson  <jas@extundo.com>
17042             Bruno Haible  <bruno@clisp.org>
17043
17044         * lib/xstrndup.h: New file.
17045         * lib/xstrndup.c: New file.
17046
17047 2003-08-17  Bruno Haible  <bruno@clisp.org>
17048
17049         * modules/strndup (Files, Include): Add lib/strndup.h.
17050
17051 2003-08-17  Bruno Haible  <bruno@clisp.org>
17052
17053         * modules/euidaccess (Files): Add lib/euidaccess.h.
17054
17055 2003-08-17  Bruno Haible  <bruno@clisp.org>
17056
17057         * lib/strndup.h: New file.
17058
17059 2003-08-17  Bruno Haible  <bruno@clisp.org>
17060
17061         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
17062         like AC_GNU_SOURCE.
17063         * modules/extensions (configure.ac): Comment out the invocation of
17064         gl_USE_SYSTEM_EXTENSIONS.
17065
17066 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17067
17068         Merges from coreutils, etc.
17069         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
17070         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
17071         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
17072         fixing a typo.
17073         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
17074         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
17075
17076 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17077
17078         Document merge from coreutils.
17079         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
17080         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
17081         * modules/utime: Add m4/utimes-null.m4.
17082
17083 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17084
17085         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
17086         space, undoing this 2003-08-12 change:
17087         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
17088
17089 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17090
17091         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
17092         strtoul.c from libc, undoing this 2003-08-12 change:
17093         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
17094
17095 2003-08-16  Jim Meyering  <jim@meyering.net>
17096
17097         Merges from coreutils.
17098         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
17099         prefix.  Adjust cache variables similarly.  Create 500 rather than
17100         just 300 files, to exercise bug on Darwin6.5, too.
17101         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
17102         $missing_dir.
17103         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
17104         AM_SYS_POSIX_TERMIOS.
17105         Reported by mkc@mathdogs.com.
17106         Also change use of $am_cv_sys_posix_termios
17107         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
17108         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
17109         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
17110         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
17111         in /proc/mounts until it finds one with matching device number.  This
17112         is unnecessary when the FILE argument *is* a mount point.  No stat call
17113         is necessary in that case.  So, disable the statvfs-testing code on
17114         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
17115         as RedHat bug# 84846.
17116         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
17117         to 1MB, so as not to render systems with no stack size limit (e.g.,
17118         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
17119         Include <unistd.h>.  On some systems,
17120         it is required for the definition of _SC_PAGESIZE.
17121
17122 2003-08-16  Jim Meyering  <jim@meyering.net>
17123
17124         Merge from coreutils.
17125         * lib/xstrtoimax.c: #else #if -> #elif.
17126         * lib/xstrtoumax.c: Likewise.
17127
17128 2003-08-16  Jim Meyering  <jim@meyering.net>
17129
17130         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
17131         * m4/utimes.m4: Removed.
17132         * m4/utimes-null.m4: Renamed from utimes.m4.
17133
17134         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
17135         to 1MB, so as not to render systems with no stack size limit (e.g.,
17136         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
17137         Include <unistd.h>.  On some systems,
17138         it is required for the definition of _SC_PAGESIZE.
17139
17140 2003-08-16  Jim Meyering  <jim@meyering.net>
17141         and Paul Eggert  <eggert@cs.ucla.edu>
17142
17143         Merges from coreutils, etc.
17144
17145         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
17146         using the latest version from cvs.  This avoids problems with #line
17147         directives using a vendor (Sun) compiler.
17148         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
17149         Don't set GETGROUPS_LIB here; now it's
17150         done via getgroups.m4's wrapper function.
17151         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
17152         rather than just in sh-util/configure.in, so that the
17153         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
17154         same.
17155         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
17156         AC_FUNC_GETLOADAVG where to find getloadavg.c.
17157         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
17158         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
17159         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
17160         Remove code that is now done by the newly-required macros.
17161         Append $(EXEEXT) to DF_PROG.
17162         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
17163         Do not invoke or require the following here,
17164         since prereq.m4 or some gnulib .m4 now does this for us:
17165         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
17166         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
17167         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
17168         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
17169         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
17170         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
17171         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
17172         AC_FUNC_OBSTACK.
17173         Do not replace the following functions, as this is now the job
17174         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
17175         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
17176         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
17177         atexit getpass, strdup, getpagesize.
17178         Replace 'raise'.
17179         Do not check for the following functions, as this is now the job
17180         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
17181         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
17182         setregid.
17183         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
17184         Check for sys/sysctl.h.
17185         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
17186         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
17187         of checking for ssize_t ourselves.
17188
17189         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
17190         Require every macro that gnulib/modules/* suggests for us.
17191         (jm_PREREQ_ADDEXT): New macro.
17192         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
17193         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
17194
17195         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
17196         (gl_PHYSMEM): Use it.
17197         Also check for `table' function.
17198         Check for new headers and functions.
17199         Add check for sys/sysmp.h.
17200         With suggestions from Kaveh Ghazi.
17201         Ignore headers that are present but cannot be compiled.  This
17202         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
17203         C 5.4.
17204
17205 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17206
17207         Document merge from coreutils.
17208         * modules/userspec: Depend on posixver.
17209         * modules/strftime: Depend on tzset.
17210
17211 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17212
17213         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
17214         rather than tab, after '#' in shell-script copyright notices.
17215         Suggested by Bruno Haible.
17216
17217 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17218
17219         * config/srclist-update: Use three spaces, rather than tab, after '#'
17220         in shell-script copyright notices.  Suggested by Bruno Haible.
17221         Remove unnecessary parenthesization in regular expression.
17222
17223 2003-08-15  Jim Meyering  <jim@meyering.net>
17224
17225         Merge from coreutils.
17226         * lib/xgethostname.c: Include <stdlib.h>.
17227         (xghostname): Don't exit for anything other than memory-related
17228         failure; just return NULL.
17229         * lib/userspec.c: Include "posixver.h".
17230         (parse_user_spec): Accept `.' as a separator only
17231         in pre-POSIX-200112 mode.
17232         * lib/strtoimax.c: Use #elif rather than #else #if.
17233         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
17234         Remove function, now that we can rely on a working tzset function.
17235         [!_LIBC]: Ensure that the required autoconf test has been run.
17236         [!defined _NL_CURRENT && HAVE_STRFTIME]:
17237         Use underlying_strftime for %r.
17238         * lib/sha.c: Merge in some clean-up and optimization changes from
17239         glibc.
17240         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
17241         Ensure that it is a multiple of 64.
17242         Rearrange loop exit tests so as to avoid performing an
17243         additional fread after encountering an error or EOF.
17244         * lib/realloc.c: Update copyright date.
17245
17246 2003-08-15  Jim Meyering  <jim@meyering.net>
17247         and Paul Eggert  <eggert@twinsun.com>
17248
17249         Merge from coreutils.
17250         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
17251         member but strut utmpx does not.  Needed for AIX 4.3.3.
17252         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
17253
17254 2003-08-15  Jim Meyering  <jim@meyering.net>
17255         and Paul Eggert  <eggert@cs.ucla.edu>
17256
17257         Merges from coreutils, etc.
17258         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
17259         Require gl_FUNC_TZSET_CLOBBER.
17260         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
17261         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
17262         members.
17263
17264 2003-08-14  Paul Eggert  <eggert@twinsun.com>
17265
17266         Help the merge from coreutils.
17267         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
17268         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
17269         * m4/tzset.m4: Use it too.
17270
17271 2003-08-14  Paul Eggert  <eggert@twinsun.com>
17272
17273         * modules/tzset: New file.
17274
17275 2003-08-14  Jim Meyering  <jim@meyering.net>
17276
17277         Merges from coreutils.
17278         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
17279         variable names, rather than @FNMATCH_H@.
17280         * modules/alloca: Likewise for $(ALLOCA_H).
17281
17282         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
17283         the three copies of the literal target, `fnmatch.h'.
17284         * modules/alloca (alloca.h): Likewise.
17285
17286 2003-08-14  Jim Meyering  <jim@meyering.net>
17287
17288         Merge from coreutils.
17289         * m4/tzset.m4: New file.
17290         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
17291         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
17292         otherwise, AIX 5.1 systems would end up using the latter.
17293         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
17294         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
17295         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
17296         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
17297
17298 2003-08-14  Jim Meyering  <jim@meyering.net>
17299
17300         Merge from coreutils.
17301         * lib/obstack.h: Whitespace changes.
17302         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
17303         and xcalloc return values.
17304         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
17305         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
17306         hang on OSF/1 5.1 for DIR on both local and remote file systems.
17307         Reported by (and fix confirmed by) Nelson H. F. Beebe.
17308         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
17309         error from mntctl.
17310         Use mntctl's return value to drive the entry-processing loop, since
17311         we can't rely on the value of the vmt_length member in the last
17312         entry.  On some systems doing so could result in exhausting
17313         virtual memory.  Based in part on a patch from Mike Jetzer.
17314
17315 2003-08-14  Jim Meyering  <jim@meyering.net>
17316         and Paul Eggert  <eggert@twinsun.com>
17317
17318         Merges from coreutils, plus other fixes.
17319         * lib/physmem.c: Merge in portability changes from gcc/libiberty
17320         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
17321         for credits and details.  Thanks to Kaveh Ghazi for helping
17322         to keep these files in sync.
17323         (ARRAY_SIZE): Define it.
17324         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
17325         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
17326         (memcasecmp): Don't assume size_t fits in unsigned int.
17327         Remove casts and duplicate code.
17328         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
17329         (memcpy): Remove definition.
17330         Merge in some clean-up and optimization changes from glibc.
17331         [BLOCKSIZE]: Move definition to top of file.
17332         Ensure that it is a multiple of 64.
17333         Rearrange loop exit tests so as to avoid performing an
17334         additional fread after encountering an error or EOF.
17335         * lib/md5.h (md5_uintptr): Define.
17336         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
17337         return to the initial working directory.  Preserve errno
17338         for caller.
17339         * lib/idcache.c: Include "xalloc.h".
17340         (xmalloc, xrealloc): Remove decls.
17341         (getuser): Remove casts no longer required in C89.
17342         * lib/human.c: Include stdio.h, for sprintf.
17343         * lib/group-member.c: Include "xalloc.h".
17344         (xmalloc, xrealloc): Remove decls.
17345         (get_group_info): Remove casts no longer required in C89.
17346         * lib/getusershell.c (readname): Remove casts no longer required in
17347         C89.
17348         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
17349         * lib/getline.c: Whitespace fix, from coreutils.
17350
17351 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17352
17353         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
17354         Check for isascii.
17355
17356         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
17357         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
17358         Undo previous (whitespace-only) change.
17359
17360 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17361
17362         * lib/exclude.c: Include <ctype.h>
17363         (IN_CTYPE_DOMAIN): New macro.
17364         (is_space): New fn.
17365         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
17366         and empty lines.
17367
17368         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
17369         Undo previous (whitespace-only) change.
17370
17371 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17372
17373         * config/srclist-update: Change update back to the old behavior,
17374         leaving whitespace alone.  Use one 'sed' command rather than a
17375         pipeline.
17376         (fixlicense): Now a variable, not a function.
17377         (remove_trailing_blanks): Remove.
17378         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
17379         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
17380         Undo previous (whitespace-only) change.
17381
17382 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17383
17384         Merge from coreutils.
17385         * modules/euidaccess: Add lib_SOURCES, include for new
17386         file euidaccess.h
17387
17388 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17389
17390         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
17391         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
17392         Normalize leading white space and remove trailing white space.
17393
17394         Merge from coreutils
17395         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
17396
17397         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
17398         0.12.1.  These files are now being upgraded automatically by
17399         ../config/srclist-update.
17400
17401 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17402
17403         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
17404         Normalize leading white space and remove trailing white space.
17405         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
17406         notice, as per ../config/srclist-update.
17407
17408         Merge from coreutils.
17409         * lib/euidaccess.h: New file.
17410         * lib/euidaccess.c: Include it.
17411         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
17412         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
17413         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
17414
17415 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17416
17417         * config/srclist-update: Add copyright notice.
17418         (remove_id_lines, remove_trailing_blanks): New constants.
17419         (fixfile): Use them to normalize spacing a bit in copied files.
17420         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
17421         Normalize leading white space and remove trailing white space.
17422
17423         * config/texinfo.tex: Sync with texinfo.
17424
17425         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
17426         strtoul.c from libc, to merge coreutils whitespace changes.
17427
17428         * config/srclist.txt: Get the following m4 files from gettext:
17429         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
17430         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
17431         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
17432         wint_t.m4.
17433
17434 2003-08-12  Karl Berry  <karl@gnu.org>
17435
17436         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
17437         been made.
17438
17439 2003-08-11  Paul Eggert  <eggert@twinsun.com>
17440
17441         * modules/gnu-source, m4/gnu-source.m4:
17442         Remove; we're assuming Autoconf 2.54 or later now.
17443         Suggested by Bruno Haible.
17444         * MODULES.html.sh (func_all_modules): Remove gnu-source.
17445
17446 2003-08-11  Bruno Haible  <bruno@clisp.org>
17447
17448         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
17449
17450 2003-08-11  Bruno Haible  <bruno@clisp.org>
17451
17452         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
17453         (vasnprintf): Use it instead of wcslen.
17454
17455 2003-08-11  Bruno Haible  <bruno@clisp.org>
17456
17457         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
17458         value to ensure that _Bool promotes to int. Use #define for _Bool when
17459         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
17460
17461 2003-08-10  Karl Berry  <karl@gnu.org>
17462
17463         * lib/regex.h: update from libc (whitespace fix).
17464
17465 2003-08-09  Paul Eggert  <eggert@twinsun.com>
17466
17467         Merge some files from coreutils.  These changes were
17468         originally made by Jim Meyering.
17469         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
17470         many older Unixes require this.
17471         * lib/alloca.c (alloca): Remove cast to argument of free;
17472         no longer needed in C89.
17473         * lib/alloca_.h, regex.h: Fix white space to match
17474         what GNU indent does.
17475
17476 2003-08-09  Paul Eggert  <eggert@twinsun.com>
17477
17478         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
17479         apparently Emacs's Unicode mode got confused before my 2003-08-05
17480         checkin.
17481
17482 2003-08-08  Paul Eggert  <eggert@twinsun.com>
17483
17484         * m4/extensions.m4: New file.
17485         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
17486         Require gl_USE_SYSTEM_EXTENSIONS.
17487         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
17488         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
17489
17490 2003-08-08  Paul Eggert  <eggert@twinsun.com>
17491
17492         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
17493         * modules/extensions, modules/gnu-source: New files.
17494         * modules/timespec, modules/unlocked-io: Depend on extensions.
17495
17496 2003-08-07  Paul Eggert  <eggert@twinsun.com>
17497
17498         * modules/restrict: New file.
17499         * MODULES.html.sh (func_all_modules): Add restrict.
17500         * modules/regex: Depend on restrict.
17501
17502 2003-08-07  Paul Eggert  <eggert@twinsun.com>
17503
17504         * m4/restrict.m4: New file.
17505         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
17506
17507 2003-08-07  Bruno Haible  <bruno@clisp.org>
17508
17509         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
17510         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
17511
17512 2003-08-07  Bruno Haible  <bruno@clisp.org>
17513
17514         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
17515         makes the module 'getndelim2' compatible with the module 'getline'.
17516
17517 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17518
17519         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
17520         byte with "\201" to avoid glitches when editing that source file
17521         with multi-gnome-terminal.
17522
17523 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17524
17525         * lib/bumpalloc.h: Remove.
17526
17527 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17528
17529         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
17530         * modules/bumpalloc: Remove.
17531
17532 2003-08-04  Paul Eggert  <eggert@twinsun.com>
17533
17534         * lib/getloadavg.c: Change copyright notice and spacing to conform to
17535         GNU coding style.
17536
17537         Merge from coreutils.
17538         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
17539         1. From glibc.
17540         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
17541         from Karl Berry, implemented by Jim Meyering.
17542         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
17543         from Dmitry V. Levin.
17544         Remove anachronistic cast of xrealloc.
17545         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
17546         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
17547         type. Otherwise, it wouldn't compile with at least /bin/cc on
17548         ymp-cray-unicos9.0.2.X.
17549         Combine two mostly-identical uses of alloca into one.
17550         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
17551
17552 2003-08-04  Dave Love  <d.love@dl.ac.uk>
17553
17554         [From Emacs.]
17555
17556         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
17557         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
17558         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
17559         obsolete NLIST_NAME_UNION.
17560         [__GNU__]: Undef BSD and FSCALE.
17561         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
17562
17563 2003-08-03  Paul Eggert  <eggert@twinsun.com>
17564
17565         * lib/stdbool_.h (_Bool): Make it signed char, instead of
17566         an enum type, so that it's guaranteed to promote to int.  See:
17567         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
17568
17569 2003-08-03  Karl Berry  <karl@gnu.org>
17570
17571         * config/depcomp: update from automake.
17572
17573 2003-07-31  Paul Eggert  <eggert@twinsun.com>
17574
17575         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
17576         (strerror): Don't assume that a printable int fits in 14 bytes.
17577
17578 2003-07-31  Bruno Haible  <bruno@clisp.org>
17579
17580         * modules/getpass-gnu: New file.
17581         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
17582
17583 2003-07-31  Bruno Haible  <bruno@clisp.org>
17584
17585         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
17586
17587 2003-07-24  Karl Berry  <karl@gnu.org>
17588
17589         * config/missing: update from automake.
17590
17591 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
17592             Bruno Haible  <bruno@clisp.org>
17593
17594         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
17595         * lib/getline.c (getline, getdelim): Likewise.
17596         Remove _GNU_SOURCE define; now it's defined in config.h through
17597         m4/getline.m4.
17598
17599 2003-07-23  Karl Berry  <karl@gnu.org>
17600
17601         * config/config.sub: update from prep.
17602
17603 2003-07-22  Paul Eggert  <eggert@twinsun.com>
17604
17605         * modules/xalloc (Depends-on): Add exitfail.
17606         * modules/xmemcoll: Likewise.
17607
17608 2003-07-22  Paul Eggert  <eggert@twinsun.com>
17609
17610         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
17611         over-parenthesization in macros.
17612
17613         Sync with coreutils.
17614
17615         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
17616         required by C99.
17617
17618         Use `exit_failure' for xalloc and xmemcoll instead of their own
17619         private exit-failure variables.
17620         * lib/xalloc.h (xalloc_exit_failure): Remove.
17621         * lib/xmalloc.c: Likewise.  Include exitfail.h.
17622         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
17623         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
17624         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
17625         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
17626
17627 2003-07-20  Jim Meyering  <jim@meyering.net>
17628
17629         * modules/closeout (Depends-on): Add exitfail.
17630         Suggestion from Bruno Haible.
17631
17632 2003-07-19  Karl Berry  <karl@gnu.org>
17633
17634         * config/config.sub: update from prep.
17635
17636 2003-07-18  Paul Eggert  <eggert@twinsun.com>
17637
17638         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
17639         Remove.
17640         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
17641         to test that it can stand by itself.  Include "exitfail.h".
17642         Clients should set exit_failure instead.
17643         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
17644
17645 2003-07-18  Bruno Haible  <bruno@clisp.org>
17646
17647         * modules/getndelim2: New file.
17648         * modules/getline: Share files with module getndelim2.
17649         * modules/getnline: Depend on getndelim2 instead of sharing files with
17650         it. Add getnline.c to lib_SOURCES.
17651         * MODULES.html.sh (func_all_modules): Add getndelim2.
17652
17653 2003-07-18  Bruno Haible  <bruno@clisp.org>
17654
17655         * m4/getndelim2.m4: New file.
17656         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
17657         invoke gl_PREREQ_GETNDELIM2.
17658         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
17659         gl_PREREQ_GETNDELIM2.
17660         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
17661         gl_GETNDELIM2.
17662
17663 2003-07-18  Bruno Haible  <bruno@clisp.org>
17664
17665         * lib/getndelim2.h: New file.
17666         * lib/getndelim2.c: Make into a module of its own. Include config.h,
17667         getndelim2.h.
17668         (getndelim2): Make non-static. Change return type to ssize_t.
17669         * lib/getline.h: Change argument names.
17670         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
17671         * lib/getnline.c: Include getndelim2.h.
17672
17673 2003-07-18  Andreas Schwab  <schwab@suse.de>
17674
17675         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
17676
17677 2003-07-17  Karl Berry  <karl@gnu.org>
17678
17679         * config/config.sub: update from prep.
17680
17681 2003-07-17  Bruno Haible  <bruno@clisp.org>
17682
17683         * modules/getnline: New file.
17684         * modules/getline: Add lib/getndelim2.c to source file list.
17685         * MODULES.html.sh (func_all_modules): Add getnline.
17686
17687 2003-07-17  Bruno Haible  <bruno@clisp.org>
17688
17689         * m4/getnline.m4: New file.
17690
17691 2003-07-17  Bruno Haible  <bruno@clisp.org>
17692
17693         * m4/Makefile.am.in: Remove file.
17694         * m4/Makefile.am: Remove file.
17695         * m4/Makefile.in: Remove file.
17696
17697 2003-07-17  Bruno Haible  <bruno@clisp.org>
17698
17699         * lib/getnline.h: New file.
17700         * lib/getnline.c: New file.
17701         * lib/getndelim2.c: New file, extracted from getline.c.
17702         (getndelim2): Renamed from getdelim2, with added nmax argument.
17703         * lib/getline.c: Include getndelim2.c.
17704         (getdelim2): Moved out to getndelim2.c.
17705         (getline, getdelim): Update.
17706
17707 2003-07-17  Bruno Haible  <bruno@clisp.org>
17708
17709         * lib/Makefile.am: Remove file.
17710         * lib/Makefile.in: Remove file.
17711
17712 2003-07-17  Bruno Haible  <bruno@clisp.org>
17713
17714         * configure.in: Remove file.
17715         * Makefile.in: Remove file.
17716
17717 2003-07-17  Bruno Haible  <bruno@clisp.org>
17718
17719         * MODULES.html.sh: Put the </BODY> right before </HTML>.
17720
17721 2003-07-16  Karl Berry  <karl@gnu.org>
17722
17723         * config/srclist-update: was running fixlicense twice, which caused
17724                 texinfo.tex to be nullified for some reason.  Simplify,
17725                 $gplsrc is no longer needed as far as I can see?
17726
17727 2003-07-16  Jim Meyering  <jim@meyering.net>
17728
17729         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
17730
17731 2003-07-15  Paul Eggert  <eggert@twinsun.com>
17732
17733         * config/srclist.txt: Get the following files from gettext-runtime/intl
17734         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
17735         ref-del.sin.  From Bruno Haible.
17736         * config/srclist-update (fixfile): Change grep pattern again, since the
17737         previous fix didn't work (there was another trailing $).  Use
17738         '[$]' to escape the $s.
17739
17740 2003-07-15  Karl Berry  <karl@gnu.org>
17741
17742         * lib/vasnprintf.c: update from gettext.
17743
17744 2003-07-15  Karl Berry  <karl@gnu.org>
17745
17746         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
17747         gets expanded when surrounded by '$'.
17748
17749 2003-07-15  Jim Meyering  <jim@meyering.net>
17750
17751         * modules/save-cwd: Don't depend on error.  From Derek Price.
17752
17753 2003-07-15  Jim Meyering  <jim@meyering.net>
17754
17755         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
17756
17757 2003-07-14  Simon Josefsson  <jas@extundo.com>
17758
17759         * modules/mempcpy: New file.
17760         * MODULES.html.sh (func_all_modules): Add mempcpy.
17761
17762 2003-07-14  Simon Josefsson  <jas@extundo.com>
17763
17764         * m4/mempcpy.m4: New file.
17765
17766 2003-07-14  Simon Josefsson  <jas@extundo.com>
17767
17768         * lib/mempcpy.h: New file.
17769         * lib/mempcpy.c: New file.
17770
17771 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17772
17773         * modules/getdate, modules/posixtm: Depend on mktime.
17774
17775 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17776
17777         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
17778         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
17779         unicodeio.c, unicodeio.h, unlocked-io.h:
17780         Switch from LGPL to GPL.
17781
17782 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17783
17784         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
17785         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
17786         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
17787         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
17788         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
17789         updated automatically by ../config/srclist-update.  This changes
17790         their license from LPGL to GPL.
17791
17792 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17793
17794         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
17795         assumed to refer to the root of the most recent stable gettext version.
17796         * config/srclistvars.sh: Add defaults for eggert.
17797         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
17798         Match "This program" as well as "The program".  This is needed
17799         for gettext.
17800
17801 2003-07-14  Jim Meyering  <jim@meyering.net>
17802
17803         Don't emit diagnostics.  Let callers do that.
17804         * lib/save-cwd.c: Don't include "error.h".
17805         (save_cwd): Don't call error.  Ensure that errno is valid
17806         when returning nonzero.
17807
17808         * lib/save-cwd.h (restore_cwd): Update prototype.
17809         * lib/save-cwd.c (restore_cwd): Remove two parameters.
17810         Simplify.  Don't call error upon failure.  Let callers do that.
17811         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
17812         when auditing is enabled.  But don't bother updating the #if.
17813
17814 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
17815
17816         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
17817         it breaks C++ compilation.
17818         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
17819
17820 2003-07-10  Simon Josefsson  <jas@extundo.com>
17821
17822         * modules/strchrnul (Makefile.am): Add strchrnul.h.
17823
17824 2003-07-10  Jim Meyering  <jim@meyering.net>
17825
17826         * m4/clock_time.m4: Remove trailing blank.
17827         * m4/intmax_t.m4: Likewise.
17828
17829 2003-07-10  Jim Meyering  <jim@meyering.net>
17830
17831         * lib/vasnprintf.c: Remove trailing blanks.
17832         Make cpp indentation consistent.
17833
17834 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17835
17836         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
17837         posixver.c, strftime.c, strnlen.c, strverscmp.c:
17838         Switch from LGPL to GPL.
17839
17840 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17841
17842         * config/srclist.txt: Sort sublists.  Add
17843         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
17844         that differ from gnulib for one reason or another; we'd like this list
17845         to be smaller but for now let's document what we have.
17846
17847 2003-07-08  Paul Eggert  <eggert@twinsun.com>
17848
17849         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
17850         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
17851         and sweeter "eval x=$x".
17852         * config/srclist.txt: Get lib/argp* from glibc.
17853
17854 2003-07-07  Paul Eggert  <eggert@twinsun.com>
17855
17856         * lib/mktime.c: Fix some boundary cases and remove need for floating
17857         point.
17858
17859         Issue a compile-time diagnostic if time_t is floating point, or if
17860         two's complement arithmetic is not in effect, or if arithmetic
17861         right shift does not propagate the sign.  These assumptions were
17862         all in the original code but they weren't checked.
17863
17864         (TIME_T_MIDPOINT, verify): New macros.
17865         (__isleap): Remove; it has integer overflow problems.
17866         (leapyear): New function, without those problems.
17867         (ydhms_tm_diff): Remove; splitting into two parts.
17868         (ydhms_diff): New function, containing the arithmetic part of
17869         the old ydhms_tm_diff function.  Issue a compile-time
17870         diagnostic if we are not using C99 integer division.
17871         Avoid casts when possible.
17872         (guess_time_tm): New function, containing the checking part of
17873         the old ydhms_tm_diff function.  Return the new value, rather than
17874         the difference between it and the old.  Accept a new argument T
17875         so that *T specifies the old value.  Check for overflow in the result.
17876
17877         (__mktime_internal): Use a time_t offset, not a long int offset.
17878         This undoes the 2003-06-04 change, which is no longer needed now
17879         that we have better overflow checking.
17880         (localtime_offset): Likewise.
17881
17882         (__mktime_internal): Avoid harmful overflow on hosts where time_t
17883         and long are 64-bit but int is only 32-bit.
17884         (ydhms_diff): Use long int to store year1 and yday1.
17885         Issue a compile-time diagnostic if long int is not wide enough.
17886
17887         (__mktime_internal): Use long int to store adjusted year and yday.
17888         Use plain C rather than preprocessor commands, if that doesn't
17889         affect efficiency.
17890         Check for overflow (and try to repair) after each probe
17891         rather than checking only at the very end.  This avoids some bugs
17892         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
17893         does not equal GMT offset at maximum time).
17894         Use integer to check for overflow rather than floating point; this
17895         is more portable to non-IEEE hosts, and is a tad faster.
17896         When we detect that we are oscillating between two values,
17897         don't check whether tm_isdst has the requested value, since
17898         we already know the answer.  When tm_isdst has the wrong value,
17899         use a different heuristic to find the right one, based on the
17900         extreme values actually observed in practice in tz2003a,
17901         rather than the (overly optimistic) "previous 3 calendar quarters".
17902
17903         (not_equal_tm, print_tm, check_result): Use "const T" rather than
17904         "T const" to accommodate glibc style.
17905         (check_result): Use less-confusing report format.  "long" -> "long int.
17906         (main): Likewise.
17907         Don't loop if the iteration overflows time_t.
17908         Allow a negative step in the iteration.
17909
17910 2003-07-06  Karl Berry  <karl@gnu.org>
17911
17912         * config/depcomp: update from automake.
17913         * config/config.sub: update from prep.
17914
17915 2003-07-03  Karl Berry  <karl@gnu.org>
17916
17917         * config/config.guess: update from prep.
17918
17919 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17920
17921         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
17922         xreadlink.c now includes it unconditionally.
17923
17924 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17925
17926         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
17927         having it depend on HAVE_SYS_TYPES_H.
17928
17929 2003-07-01  Bruno Haible  <bruno@clisp.org>
17930
17931         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
17932         <sys/types.h> should be sufficient.
17933         Reported by Paul Eggert.
17934
17935 2003-06-26  Karl Berry  <karl@gnu.org>
17936
17937         * config/depcomp: update from automake.
17938
17939 2003-06-26  Bruno Haible  <bruno@clisp.org>
17940
17941         * modules/human: Depend on module stdbool.
17942
17943 2003-06-25  Bruno Haible  <bruno@clisp.org>
17944
17945         * modules/readlink: New file.
17946         * modules/xreadlink: Depend on it.
17947         * MODULES.html.sh (func_all_modules): Add readlink.
17948
17949 2003-06-25  Bruno Haible  <bruno@clisp.org>
17950
17951         * m4/readlink.m4: New file.
17952
17953 2003-06-25  Bruno Haible  <bruno@clisp.org>
17954
17955         * lib/readlink.c: New file.
17956
17957 2003-06-22  Karl Berry  <karl@gnu.org>
17958
17959         * config/srclist.txt: update mkinstalldirs from automake.
17960         * config/mkinstalldirs: update.
17961
17962 2003-06-22  Bruno Haible  <bruno@clisp.org>
17963
17964         Portability to mingw32.
17965         * m4/ssize_t.m4: New file, from GNU gettext.
17966         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
17967         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
17968
17969 2003-06-22  Bruno Haible  <bruno@clisp.org>
17970
17971         * modules/safe-read: Add m4/ssize_t.m4.
17972         * modules/xreadlink: Add m4/ssize_t.m4.
17973
17974 2003-06-20  Bruno Haible  <bruno@clisp.org>
17975
17976         Assume C89, so PARAMS isn't needed.
17977         * lib/unicodeio.h (PARAMS): Remove.
17978         * lib/unicodeio.c: Don't use PARAMS.
17979
17980 2003-06-18  Karl Berry  <karl@gnu.org>
17981
17982         * config/config.{guess,sub}: update from prep.
17983
17984 2003-06-18  Jim Meyering  <jim@meyering.net>
17985
17986         Merge changes from coreutils.
17987         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
17988         Remove explicit declarations of xmalloc and realloc.
17989         Include xalloc.h.
17990         (read_utmp): Remove anachronistic cast of xmalloc.
17991
17992 2003-06-17  Paul Eggert  <eggert@twinsun.com>
17993
17994         Assume C89, so PARAMS isn't needed.
17995         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
17996         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
17997         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
17998         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
17999         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
18000         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
18001         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
18002         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
18003         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
18004         lib/xstrtod.h, lib/xstrtol.h: Likewise.
18005         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
18006         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
18007         no longer needed. Anyway, config.h should always be included before any
18008         other file.
18009
18010 2003-06-11  Simon Josefsson  <jas@extundo.com>
18011
18012         * modules/sysexits: New file.
18013         * MODULES.html.sh (func_all_modules): Add sysexits.
18014
18015 2003-06-11  Simon Josefsson  <jas@extundo.com>
18016
18017         * lib/sysexit_.h: New file.
18018
18019 2003-06-11  Derek Price  <derek@ximbiot.com>
18020
18021         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
18022         necessary.
18023
18024 2003-06-11  Bruno Haible  <bruno@clisp.org>
18025
18026         * m4/sysexits.m4: New file.
18027
18028 2003-06-10  Simon Josefsson  <jas@extundo.com>
18029
18030         * lib/argp.h: New file, from glibc.
18031         * lib/argp-ba.c: New file, from glibc.
18032         * lib/argp-eexst.c: New file, from glibc.
18033         * lib/argp-fmtstream.c: New file, from glibc.
18034         * lib/argp-fmtstream.h: New file, from glibc.
18035         * lib/argp-fs-xinl.c: New file, from glibc.
18036         * lib/argp-help.c: New file, from glibc.
18037         * lib/argp-namefrob.h: New file, from glibc.
18038         * lib/argp-parse.c: New file, from glibc.
18039         * lib/argp-pv.c: New file, from glibc.
18040         * lib/argp-pvh.c: New file, from glibc.
18041         * lib/argp-xinl.c: New file, from glibc.
18042
18043 2003-06-10  Simon Josefsson  <jas@extundo.com>
18044
18045         * modules/strchrnul: New file.
18046
18047 2003-06-10  Simon Josefsson  <jas@extundo.com>
18048
18049         * modules/argp: New file.
18050
18051 2003-06-10  Simon Josefsson  <jas@extundo.com>
18052
18053         * m4/strchrnul.m4: New file.
18054
18055 2003-06-10  Simon Josefsson  <jas@extundo.com>
18056
18057         * lib/strchrnul.h: New file.
18058         * lib/strchrnul.c: New file.
18059
18060 2003-06-10  Bruno Haible  <bruno@clisp.org>
18061
18062         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
18063
18064 2003-06-07  Karl Berry  <karl@gnu.org>
18065
18066         * config/config.{guess,sub}: update from prep.
18067
18068 2003-06-07  Jim Meyering  <jim@meyering.net>
18069
18070         * modules/strtod: Use $(...) notation, not @...@ for
18071         AC_REPLACE'd variables.
18072         * modules/localcharset: Likewise.
18073
18074 2003-06-07  Jim Meyering  <jim@meyering.net>
18075
18076         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
18077         in place of my name in the copyright comment.
18078         Remove definition and uses of __P.
18079
18080         From coreutils.
18081         * lib/stat.c: Don't declare xmalloc explicitly.
18082         Instead, include "xalloc.h".
18083         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
18084         xrealloc, and xcalloc return values.
18085         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
18086         Improve comment.
18087         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
18088
18089 2003-06-07  Bruno Haible  <bruno@clisp.org>
18090
18091         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
18092         avoid AC_CONFIG_LINKS.
18093         * modules/fnmatch (Makefile.am): Use explicit creation rule for
18094         fnmatch.h, to avoid AC_CONFIG_LINKS.
18095         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
18096
18097 2003-06-07  Bruno Haible  <bruno@clisp.org>
18098
18099         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
18100         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
18101         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
18102         directory.
18103         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
18104         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
18105         directory.
18106
18107 2003-06-06  Jim Meyering  <jim@meyering.net>
18108
18109         Merge from coreutils.
18110         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
18111         Consolidate declarations and initializations of *_base* locals.
18112
18113         Merge from coreutils.
18114         This avoids a core dump on systems without GNU putenv,
18115         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
18116         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
18117         (unsetenv): New static function, from GNU libc.
18118         (rpl_putenv): Use it.
18119
18120         * lib/modechange.c: Remove trailing blanks.
18121
18122         Merge from coreutils.
18123         * lib/fsusage.c: Remove declaration of statfs.
18124         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
18125
18126         * lib/posixtm.c: Include <stdbool.h> unconditionally.
18127
18128 2003-06-06  Jim Meyering  <jim@meyering.net>
18129
18130         * lib/stdbool_.h: Renamed from stdbool.h.in.
18131
18132 2003-06-06  Jim Meyering  <jim@meyering.net>
18133             Bruno Haible  <bruno@clisp.org>
18134
18135         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
18136         Adjust Makefile.am snippet not to redirect directly to target.
18137         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
18138
18139 2003-06-05  Paul Eggert  <eggert@twinsun.com>
18140
18141         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
18142         mismatch, look in future quarters as well as past.  This fixes a
18143         bug when processing fall-backwards gaps immediately after a long
18144         period of daylight-saving time.
18145
18146         * lib/mktime.c: Assume freestanding C89 or better.
18147         (HAVE_LIMITS_H): Remove.  Assume it's 1.
18148         (__P): Remove; not used.
18149         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
18150         (mktime, not_equal_tm, print_tm, check_result,
18151         main): Use prototypes.  Use const * where appropriate.
18152         (main): Fix typo in testing code that uncovered by above changes.
18153         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
18154
18155 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18156
18157         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
18158         locale.h, localeconv.  This merges changes from coreutils.
18159
18160         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
18161         It can be removed after the next Autoconf is released.
18162         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
18163         needed.
18164
18165 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18166
18167         * lib/mktime.c: Fix Debian bug 177940
18168         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
18169         (localtime_offset): Now long int, not time_t, because we want it
18170         to be guaranteed to be signed.  All uses changed.
18171         (__mktime_internal): If overflow would occur when adding offset,
18172         don't add it.
18173
18174         Merge 'human' changes from coreutils.  Rewrite to support
18175         locale-specific notations like thousands separators.
18176         * lib/human.c: Simplify authorship notice.
18177         Include human.h immediately after config.h.
18178         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
18179         <limits.h>: Do not include, since human.h does.
18180         (SIZE_MAX, UINTMAX_MAX): New macros.
18181         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
18182         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
18183         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
18184         (power_letter): Renamed from suffixes.
18185         (generate_suffix_backwards): Remove.
18186         (adjust_value): Now takes int style (because of human.h changes)
18187         and long double value (for greater precision on some platforms).
18188         (group_number): New function.
18189         (human_readable): Use it.  Use integer options, not enum.
18190         Put the options before the sizes in the arg list.
18191         Support all the new options.
18192         The old human_readable function has been removed;
18193         use inttostr.h instead.
18194         (human_readable, default_block_size, humblock):
18195         Use uintmax_t, not int, for block sizes.
18196         (human_readable_inexact, block_size_types): Remove.
18197         (block_size_opts): New constant.
18198         (human_options): Renamed from human_block_size, with new signature
18199         that allows block sizes up to UINTMAX_MAX.  All callers changed.
18200         * lib/human.h: Add copyright and authorship notice.
18201         Include <limits.h> and <stdbool.h> unconditionally.
18202         (PARAMS): Remove.  All uses removed.
18203         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
18204         (enum human_inexact_style): Remove tag; now a nameless enum.
18205         (human_floor, human_ceiling, human_round_to_even): Now have
18206         values 2, 0, 1 rather than -1, 1, 0.
18207         (human_group_digits, human_suppress_point_zero, human_autoscale,
18208         human_base_1024, human_SI, human_B): New constants.
18209         (human_readable_inexact, human_block_size): Remove.
18210         (human_readable): Size args are now uintmax_t, not int.
18211         (human_options): New decl.
18212
18213         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
18214         unnecessary now that we assume C89 or better.  This change
18215         imported from coreutils.
18216
18217         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
18218         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
18219         in the 2003-05-30 sync from glibc.
18220
18221         .h files should stand alone, but we shouldn't include <sys/types.h>
18222         if we can get away with just <stddef.h>.
18223
18224         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
18225         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
18226         rather than <sys/types.h>, as we merely need size_t.
18227         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
18228         to get size_t.
18229         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
18230         Include <stdio.h>, to get FILE.
18231         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
18232         memcasecmp.h has included <stddef.h> and all we need is size_t.
18233         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
18234         our interface, instead of including <sys/types.h>
18235
18236 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18237
18238         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
18239         now, as glibc mktime is buggy on non-glibc systems.
18240
18241 2003-06-03  Karl Berry  <karl@gnu.org>
18242
18243         * config/config.sub: update from prep.
18244
18245 2003-06-02  Paul Eggert  <eggert@twinsun.com>
18246
18247         [from coreutils]
18248         Fix some minor time-related bugs with POSIX time arguments.
18249         Some valid time stamps were being rejected (notably -1, and
18250         time stamps before 1900 on 64-bit hosts).  And some invalid
18251         time stamps were being accepted, e.g. September 31.
18252
18253         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
18254         that we can return (time_t) -1 successfully.
18255         * lib/posixtm.c: Likewise.
18256         [HAVE_STDBOOL_H]: Include <stdbool.h>.
18257         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
18258         (t): Remove static var.
18259         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
18260         of static var.  All uses changed.
18261         (year): Do not reject years before 1900; they can occur with
18262         64-bit time_t.
18263         (posix_time_parse): Do not check for out-of-range components;
18264         that is now the caller's responsibility, since our checks were
18265         only approximations.
18266         (posixtime): Use mktime to check for out-of-range components,
18267         since it knows them exactly.
18268         If mktime returns (time_t) -1, check whether an error actually occurred
18269         by invoking localtime on -1.
18270         (main) [TEST_POSIXTIME]: Check for input data errors, and report
18271         posixtime failures better.
18272         Improve the test data (in comments only).
18273
18274 2003-06-02  Karl Berry  <karl@gnu.org>
18275
18276         * config/mkinstalldirs (version): new variable.
18277         (--version): new option.
18278         (usage): improve message.
18279
18280 2003-05-30  Karl Berry  <karl@gnu.org>
18281
18282         * lib/mktime.c: update from libc.
18283
18284 2003-05-30  Bruno Haible  <bruno@clisp.org>
18285
18286         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
18287         * config/config.rpath: Upgrade to gettext-0.12.1.
18288
18289 2003-05-30  Bruno Haible  <bruno@clisp.org>
18290
18291         * m4/gettext.m4: Upgrade to gettext-0.12.1.
18292         * m4/nls.m4: New file, from gettext-0.12.1.
18293         * m4/po.m4: New file, from gettext-0.12.1.
18294         * m4/progtest.m4: Upgrade to gettext-0.12.1.
18295
18296 2003-05-30  Bruno Haible  <bruno@clisp.org>
18297
18298         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
18299         * lib/localcharset.h: Likewise.
18300         * lib/localcharset.c: Likewise.
18301
18302 2003-05-29  Karl Berry  <karl@gnu.org>
18303
18304         * config/config.rpath: update from gettext.
18305
18306 2003-05-28  Paul Eggert  <eggert@twinsun.com>
18307
18308         Assume the headers required for C89 freestanding compilers.
18309         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
18310         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
18311         * m4/human.m4 (gl_HUMAN): Likewise.
18312         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
18313         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
18314         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18315         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
18316         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18317         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
18318
18319 2003-05-28  Paul Eggert  <eggert@twinsun.com>
18320
18321         Assume the headers required for C89 freestanding compilers.
18322         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
18323         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
18324         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
18325         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
18326         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
18327         define, since <limits.h> is guaranteed to do that.
18328         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
18329         * lib/exclude.c: Include <stdbool.h> unconditionally.
18330         * lib/tempname.c: Include <stddef.h> unconditionally.
18331         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
18332         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
18333         <stddef.h> does that.
18334         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
18335         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
18336         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
18337         needed.
18338         * lib/xstrtol.c: Likewise.
18339         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
18340         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
18341
18342         * lib/addext.c (addext): Use assignment rather than cast, to avoid
18343         warnings on some platforms.
18344
18345         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
18346         arbitrarily.
18347
18348 2003-05-26  Jim Meyering  <jim@meyering.net>
18349
18350         Merge in a change from coreutils:
18351         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
18352         that is guaranteed to be `no'.  Use `no_such_member' to indicate
18353         that condition, rather than `-1' which is slightly misleading.
18354         Change the name of the cache variable to have the gl_ prefix.
18355         Prompted by a patch from Richard Dawe for DJGPP.
18356
18357 2003-05-24  Karl Berry  <karl@gnu.org>
18358
18359         * config/config.guess: update from prep.
18360
18361 2003-05-22  Karl Berry  <karl@gnu.org>
18362
18363         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
18364
18365 2003-05-20  Karl Berry  <karl@gnu.org>
18366
18367         * config/config.guess: update from prep.
18368
18369 2003-05-18  Karl Berry  <karl@gnu.org>
18370
18371         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
18372         might actually be set by the user.
18373
18374         * config/depcomp, install-sh, mdate-sh: update from automake.
18375
18376 2003-05-17  Bruno Haible  <bruno@clisp.org>
18377
18378         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
18379         invalid expansion for AC_EGREP_CPP.
18380         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
18381         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
18382         Suggested by Akim Demaille <akim@epita.fr> in
18383         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
18384
18385 2003-05-12  Jim Meyering  <jim@meyering.net>
18386
18387         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
18388         the space-padded-by-default conversion specifiers, %e, %k, %l.
18389
18390 2003-05-12  Bruno Haible  <bruno@clisp.org>
18391
18392         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
18393         the string is longer than 4 KB.
18394
18395 2003-05-11  Karl Berry  <karl@gnu.org>
18396
18397         * config/config.{guess,sub}: update from prep.
18398
18399 2003-05-09  Bruno Haible  <bruno@clisp.org>
18400
18401         * modules/error: Add m4/strerror_r.m4 to file list.
18402
18403 2003-05-03  Bruno Haible  <bruno@clisp.org>
18404
18405         Upgrade to Unicode-4.0.
18406         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
18407         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
18408         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
18409         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
18410         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
18411         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
18412         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
18413         Change width of U+E0100..U+E01EF from 1 to 0.
18414
18415 2003-04-25  Jim Meyering  <jim@meyering.net>
18416
18417         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
18418         of type size_t, not int.
18419
18420 2003-04-25  Bruno Haible  <bruno@clisp.org>
18421
18422         * lib/copy-file.c: Include <stddef.h>, for size_t.
18423
18424 2003-04-21  Paul Eggert  <eggert@twinsun.com>
18425
18426         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
18427         code which expansion is under static control.  Patch imported from
18428         Akim Demaille's patch to Bison; see
18429         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
18430
18431 2003-04-14  Bruno Haible  <bruno@clisp.org>
18432
18433         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
18434
18435 2003-04-11  Jim Meyering  <jim@meyering.net>
18436
18437         Merge changes from Coreutils.
18438
18439         2003-03-22  Jim Meyering  <jim@meyering.net>
18440
18441         * lib/strftime.c (widen): Cast alloca return value to proper type.
18442
18443         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
18444
18445         From GNU libc.
18446         * lib/strftime.c (my_strftime): Handle very large width
18447         specifications for numeric values correctly.  Improve checks for
18448         overflow.
18449
18450         2003-01-19  Jim Meyering  <jim@meyering.net>
18451
18452         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
18453         definitions.
18454         (nl_get_alt_digit) [! defined my_strftime]: Define.
18455         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
18456         _nl_get_alt_digit and _nl_get_walt_digit.
18457
18458         * lib/strftime.c (my_strftime): Merge in locale-related changes from
18459         libc. These changes have no effect outside of _LIBC.
18460
18461 2003-04-10  Bruno Haible  <bruno@clisp.org>
18462
18463         * modules/findprog: New file.
18464         * MODULES.html.sh (func_all_modules): Add it.
18465
18466 2003-04-10  Bruno Haible  <bruno@clisp.org>
18467
18468         * m4/findprog.m4: New file.
18469         * m4/eaccess.m4: New file.
18470
18471 2003-04-10  Bruno Haible  <bruno@clisp.org>
18472
18473         * lib/findprog.h: New file, from GNU gettext.
18474         * lib/findprog.c: New file, from GNU gettext.
18475
18476 2003-04-05  Jim Meyering  <jim@meyering.net>
18477
18478         Merge changes from Coreutils.
18479
18480         * lib/exclude.h (PARAMS): Remove definition and uses.
18481         * lib/exclude.c: Remove uses of `PARAMS'.
18482
18483         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
18484         Add test-cases for DOS filenames. Declare program_name.
18485         (main): Set up program_name.  Patch by Rich Dawe.
18486
18487         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18488         error from mntctl.
18489         Use mntctl's return value to drive the entry-processing loop, since
18490         we can't rely on the value of the vmt_length member in the last
18491         entry.  On some systems doing so could result in exhausting
18492         virtual memory.  Based in part on a patch from Mike Jetzer.
18493
18494 2003-04-04  Bruno Haible  <bruno@clisp.org>
18495
18496         * modules/linebreak: New file.
18497         * MODULES.html.sh (func_all_modules): Add it.
18498
18499 2003-04-04  Bruno Haible  <bruno@clisp.org>
18500
18501         * m4/linebreak.m4: New file.
18502
18503 2003-04-04  Bruno Haible  <bruno@clisp.org>
18504
18505         * lib/linebreak.h: New file, from GNU gettext.
18506         * lib/linebreak.c: New file, from GNU gettext with slight
18507         modifications.
18508         * lib/lbrkprop.h: New file, from GNU gettext.
18509
18510 2003-04-03  Bruno Haible  <bruno@clisp.org>
18511
18512         * modules/utf8-ucs4: New file.
18513         * modules/utf16-ucs4: New file.
18514         * modules/ucs4-utf8: New file.
18515         * modules/ucs4-utf16: New file.
18516         * MODULES.html.sh (func_all_modules): Add them.
18517
18518 2003-04-03  Bruno Haible  <bruno@clisp.org>
18519
18520         * m4/utf-ucs4.m4: New file.
18521         * m4/ucs4-utf.m4: New file.
18522
18523 2003-04-03  Bruno Haible  <bruno@clisp.org>
18524
18525         * lib/utf8-ucs4.h: New file, from GNU gettext.
18526         * lib/utf16-ucs4.h: New file, from GNU gettext.
18527         * lib/ucs4-utf8.h: New file, from GNU gettext.
18528         * lib/ucs4-utf16.h: New file, from GNU gettext.
18529
18530 2003-04-02  Bruno Haible  <bruno@clisp.org>
18531
18532         * modules/binary-io: New file.
18533         * MODULES.html.sh (func_all_modules): Add it.
18534
18535 2003-04-02  Bruno Haible  <bruno@clisp.org>
18536
18537         * lib/binary-io.h: New file, from GNU gettext.
18538
18539 2003-04-01  Bruno Haible  <bruno@clisp.org>
18540
18541         * modules/pathname: New file.
18542         * MODULES.html.sh (func_all_modules): Add it.
18543
18544 2003-04-01  Bruno Haible  <bruno@clisp.org>
18545
18546         * lib/pathname.h: New file, from GNU gettext.
18547         * lib/concatpath.c: New file, from GNU gettext.
18548
18549 2003-03-30  Bruno Haible  <bruno@clisp.org>
18550
18551         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
18552
18553 2003-03-30  Bruno Haible  <bruno@clisp.org>
18554
18555         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
18556         function chown() doesn't exist.
18557
18558 2003-03-28  Bruno Haible  <bruno@clisp.org>
18559
18560         * modules/copy-file: New file.
18561         * MODULES.html.sh (func_all_modules): Add it.
18562
18563 2003-03-28  Bruno Haible  <bruno@clisp.org>
18564
18565         * m4/copy-file.m4: New file.
18566
18567 2003-03-28  Bruno Haible  <bruno@clisp.org>
18568
18569         * lib/copy-file.h: New file, from GNU gettext.
18570         * lib/copy-file.c: New file, from GNU gettext.
18571
18572 2003-03-18  Jim Meyering  <jim@meyering.net>
18573
18574         * lib/quote.c (quote_n): Fix typo in comment.
18575
18576 2003-03-18  Bruno Haible  <bruno@clisp.org>
18577
18578         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
18579         checking.
18580         * m4/onceonly_2_57.m4: Likewise.
18581
18582 2003-03-17  Bruno Haible  <bruno@clisp.org>
18583
18584         * m4/onceonly.m4: Require autoconf 2.54 or newer.
18585         (m4_quote): Remove macro.
18586         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
18587
18588 2003-03-14  Jim Meyering  <jim@meyering.net>
18589
18590         Merge changes from Coreutils.
18591         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
18592         to be const, in order to avoid warnings.
18593         (obstack_room): Likewise.
18594         (obstack_empty_p): Likewise.
18595
18596 2003-03-14  Bruno Haible  <bruno@clisp.org>
18597
18598         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
18599         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
18600
18601 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18602
18603         Merge changes from Bison.
18604         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
18605         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
18606         when compiling Bison 1.875's `bitset bset = obstack_alloc
18607         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
18608         * lib/hash.c: Include <stdbool.h> unconditionally.
18609
18610 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18611
18612         * m4/onceonly.m4 (m4_quote): New macro.
18613         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
18614         Quote AC_FOREACH variable-expansions properly.
18615
18616 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18617
18618         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
18619
18620 2003-03-09  Paul Eggert  <eggert@twinsun.com>
18621
18622         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
18623         Reported by Bruce Becker; see:
18624         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
18625
18626 2003-03-03  Paul Eggert  <eggert@twinsun.com>
18627             Bruno Haible  <bruno@clisp.org>
18628
18629         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
18630         Reported by John Hughes, see
18631         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
18632
18633 2003-02-20  Bruno Haible  <bruno@clisp.org>
18634
18635         * MODULES.html.sh (func_all_modules): Add poll.
18636
18637 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18638
18639         * modules/poll: New file.
18640
18641 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18642
18643         * lib/poll_.h: New file.
18644         * lib/poll.c: New file.
18645
18646 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18647
18648         * m4/poll.m4: New file.
18649
18650 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18651
18652         * modules/mathl: New file.
18653
18654 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18655
18656         * lib/mathl.h: New file.
18657         * lib/acosl.c: New file.
18658         * lib/asinl.c: New file.
18659         * lib/atanl.c: New file.
18660         * lib/ceill.c: New file.
18661         * lib/cosl.c: New file.
18662         * lib/expl.c: New file.
18663         * lib/floorl.c: New file.
18664         * lib/frexpl.c: New file.
18665         * lib/ldexpl.c: New file.
18666         * lib/logl.c: New file.
18667         * lib/sincosl.c: New file.
18668         * lib/sinl.c: New file.
18669         * lib/sqrtl.c: New file.
18670         * lib/tanl.c: New file.
18671         * lib/trigl.c: New file.
18672         * lib/trigl.h: New file.
18673
18674 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18675
18676         * m4/mathl.m4: New file.
18677
18678 2003-02-18  Bruno Haible  <bruno@clisp.org>
18679
18680         * MODULES.html.sh (func_all_modules): Add mathl.
18681
18682 2003-02-17  Bruno Haible  <bruno@clisp.org>
18683
18684         * modules/mkdtemp: New module.
18685         * MODULES.html.sh (func_all_modules): Add it.
18686
18687 2003-02-17  Bruno Haible  <bruno@clisp.org>
18688
18689         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
18690
18691 2003-02-17  Bruno Haible  <bruno@clisp.org>
18692
18693         * lib/mkdtemp.h: New file, from GNU gettext.
18694         * lib/mkdtemp.c: New file, from GNU gettext.
18695
18696 2003-02-02  Jim Meyering  <jim@meyering.net>
18697
18698         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
18699         e.g. glibc-2.2.93.
18700
18701 2003-01-31  Bruno Haible  <bruno@clisp.org>
18702
18703         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
18704         'rpl_rename'.
18705         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
18706         'rpl_strnlen'.
18707         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
18708         'rpl_strtod'.
18709         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
18710         'rpl_utime'.
18711
18712 2003-01-31  Bruno Haible  <bruno@clisp.org>
18713
18714         * lib/rename.c: #undef rename before defining rpl_rename.
18715         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
18716
18717 2003-01-30  Bruno Haible  <bruno@clisp.org>
18718
18719         * modules/vasnprintf, modules/vasprintf: New modules.
18720         * MODULES.html.sh (func_all_modules): Add them.
18721
18722 2003-01-30  Bruno Haible  <bruno@clisp.org>
18723
18724         * m4/signed.m4: New file, from GNU gettext.
18725         * m4/longdouble.m4: New file, from GNU gettext.
18726         * m4/wchar_t.m4: New file, from GNU gettext.
18727         * m4/wint_t.m4: New file, from GNU gettext.
18728         * m4/vasnprintf.m4: New file.
18729         * m4/vasprintf.m4: New file.
18730
18731 2003-01-30  Bruno Haible  <bruno@clisp.org>
18732
18733         * lib/printf-args.h: New file, from GNU gettext.
18734         * lib/printf-args.c: New file, from GNU gettext.
18735         * lib/printf-parse.h: New file, from GNU gettext.
18736         * lib/printf-parse.c: New file, from GNU gettext.
18737         * lib/vasnprintf.h: New file, from GNU gettext.
18738         * lib/vasnprintf.c: New file, from GNU gettext.
18739         * lib/asnprintf.c: New file, from GNU gettext.
18740         * lib/vasprintf.h: New file, from GNU gettext with modifications.
18741         * lib/vasprintf.c: New file, from GNU gettext.
18742         * lib/asprintf.c: New file, from GNU gettext.
18743
18744 2003-01-29  Bruno Haible  <bruno@clisp.org>
18745
18746         * modules/stpncpy: New module.
18747         * MODULES.html.sh (func_all_modules): Add it.
18748
18749 2003-01-29  Bruno Haible  <bruno@clisp.org>
18750
18751         * m4/stpncpy.m4: New file.
18752
18753 2003-01-29  Bruno Haible  <bruno@clisp.org>
18754
18755         * lib/stpncpy.h: New file, from GNU gettext with modifications.
18756         * lib/stpncpy.c: New file, from GNU gettext with modifications.
18757
18758 2003-01-28  Bruno Haible  <bruno@clisp.org>
18759
18760         * modules/c-ctype: New module.
18761         * MODULES.html.sh (func_all_modules): Add it.
18762
18763 2003-01-28  Bruno Haible  <bruno@clisp.org>
18764
18765         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
18766         Paul Eggert.
18767         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
18768         Paul Eggert.
18769
18770 2003-01-27  Bruno Haible  <bruno@clisp.org>
18771
18772         * modules/xsetenv: New module.
18773         * MODULES.html.sh (func_all_modules): Add it.
18774
18775 2003-01-27  Bruno Haible  <bruno@clisp.org>
18776
18777         * lib/xsetenv.h: New file, from GNU gettext.
18778         * lib/xsetenv.c: New file, from GNU gettext.
18779
18780 2003-01-23  Jim Meyering  <jim@meyering.net>
18781
18782         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
18783         from working on systems without dirfd (at least Irix and OSF1/Tru64).
18784
18785 2003-01-23  Bruno Haible  <bruno@clisp.org>
18786
18787         * modules/minmax: New module.
18788         * MODULES.html.sh (func_all_modules): Add it.
18789
18790 2003-01-23  Bruno Haible  <bruno@clisp.org>
18791
18792         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
18793         Eggert.
18794
18795 2003-01-22  Bruno Haible  <bruno@clisp.org>
18796
18797         * modules/exit: New module.
18798         * MODULES.html.sh (func_all_modules): Add it.
18799
18800 2003-01-22  Bruno Haible  <bruno@clisp.org>
18801
18802         * lib/exit.h: New file, from GNU gettext.
18803
18804 2003-01-19  Bruno Haible  <bruno@clisp.org>
18805
18806         * gnulib-tool: Recognize option --extract-maintainer.
18807         (func_get_maintainer): New function.
18808         * modules/*: Add Maintainer entry.
18809
18810 2003-01-16  Jim Meyering  <jim@meyering.net>
18811
18812         * m4/regex.m4: The `regex' struct is both input and output.
18813         Initialize it before each use.  Patch by Tim Waugh.
18814
18815 2003-01-16  Bruno Haible  <bruno@clisp.org>
18816
18817         * MODULES.html.sh: Add a table of contents. Add the module name as
18818         leftmost column. Add hyperlinks.
18819
18820 2003-01-15  Bruno Haible  <bruno@clisp.org>
18821
18822         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
18823
18824 2003-01-15  Bruno Haible  <bruno@clisp.org>
18825
18826         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
18827         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
18828         suffix.
18829
18830 2003-01-15  Bruno Haible  <bruno@clisp.org>
18831
18832         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
18833
18834 2003-01-15  Bruno Haible  <bruno@clisp.org>
18835
18836         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
18837         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
18838
18839 2003-01-14  Jim Meyering  <jim@meyering.net>
18840
18841         * lib/same.c (same_name): Tweak a comment.
18842
18843 2003-01-14  Bruno Haible  <bruno@clisp.org>
18844
18845         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
18846         when a string comparison is sufficient.
18847
18848 2003-01-14  Bruno Haible  <bruno@clisp.org>
18849
18850         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
18851         'unsigned int'.
18852
18853 2003-01-14  Bruno Haible  <bruno@clisp.org>
18854
18855         * lib/hash-pjw.c: Add comment about low quality of this function.
18856
18857 2003-01-13  Bruno Haible  <bruno@clisp.org>
18858
18859         * modules/stpcpy: Distribute lib/stpcpy.h.
18860         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
18861
18862 2003-01-13  Bruno Haible  <bruno@clisp.org>
18863
18864         * modules/*: Add a description.
18865         * modules/strpbrk: Fix Makefile.am snippet.
18866         * modules/strtoimax: Fix dependencies.
18867         * modules/strtoumax: Likewise.
18868
18869 2003-01-13  Bruno Haible  <bruno@clisp.org>
18870
18871         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
18872         * modules/alloca (Makefile.am): All object files depend on alloca.h.
18873         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
18874
18875 2003-01-13  Bruno Haible  <bruno@clisp.org>
18876
18877         * gnulib-tool (func_create_testdir): Store config/* files in the main
18878         directory.
18879         * config.rpath: Move to ...
18880         * config/config.rpath: ... here.
18881         * modules/gettext: Contains config/config.rpath, not config.rpath.
18882         * modules/iconv: Likewise.
18883
18884 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18885
18886         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18887         to avoid collisions with libcurses and libreadline.
18888
18889         * m4/getstr.m4: Remove.
18890         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
18891
18892 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18893
18894         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18895         to avoid collisions with libcurses and libreadline.
18896
18897         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
18898         * lib/getstr.h, getstr.c: Remove.
18899         * lib/getline.c: Include "getline.h", to check interface.
18900         Move body of old getstr.c here: this defines MIN_CHUNK and
18901         declares getdelim2, which is renamed from getstr.
18902         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
18903
18904         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
18905         All uses changed.
18906         * lib/linebuffer.h: Likewise.
18907         (readline): Remove backward-compatibility macro.
18908
18909 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18910
18911         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18912         to avoid collisions with libcurses and libreadline.
18913         * getstr: Remove.
18914         * MODULES.html.sh: Remove getstr.
18915         * modules/getline: Depend on unlocked-io, not getstr.
18916
18917 2003-01-12  Jim Meyering  <jim@meyering.net>
18918
18919         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
18920
18921 2003-01-10  Bruno Haible  <bruno@clisp.org>
18922
18923         * modules/alloca: Change Makefile.am requirements. Simplify Include
18924         requirements. Add lib/alloca_.h to file list.
18925
18926 2003-01-10  Bruno Haible  <bruno@clisp.org>
18927
18928         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
18929
18930 2003-01-10  Bruno Haible  <bruno@clisp.org>
18931
18932         * lib/alloca_.h: New file.
18933         * lib/getdate.y: Unconditionally include alloca.h.
18934         * lib/makepath.c: Likewise.
18935         * lib/setenv.c: Likewise.
18936         * lib/userspec.c: Likewise.
18937
18938 2003-01-09  Karl Berry  <karl@gnu.org>
18939
18940         * MODULES.html.sh: include `dirname $0` in PATH, to find
18941         gnulib-tool.
18942
18943 2003-01-09  Bruno Haible  <bruno@clisp.org>
18944
18945         * modules/stdbool: Change configure.ac, Makefile.am requirements.
18946         Simplify Include requirements. Add lib/stdbool.h.in to file list.
18947
18948 2003-01-09  Bruno Haible  <bruno@clisp.org>
18949
18950         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
18951
18952 2003-01-09  Bruno Haible  <bruno@clisp.org>
18953
18954         * lib/stdbool.h.in: New file.
18955
18956 2003-01-09  Bruno Haible  <bruno@clisp.org>
18957
18958         * gnulib-tool (func_all_modules): Ignore files ending in ~.
18959         * MODULES.html.sh: Likewise.
18960
18961 2003-01-08  Jim Meyering  <jim@meyering.net>
18962
18963         * lib/full-write.c: Undefine and define-away `const' after inclusion
18964         of errno.h, not before.  Suggestion from Bruno Haible.
18965
18966 2003-01-08  Bruno Haible  <bruno@clisp.org>
18967
18968         * modules/full-read: Depend on full-write.
18969
18970 2003-01-08  Bruno Haible  <bruno@clisp.org>
18971
18972         * lib/safe-read.c: Include specification header first, to ensure its
18973         selfcontainedness.
18974         * lib/full-write.c: Likewise.
18975
18976 2003-01-07  Jim Meyering  <jim@meyering.net>
18977
18978         * lib/full-write.c: Rework so that it may serve to define full_read,
18979         too.
18980         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
18981
18982 2003-01-07  Bruno Haible  <bruno@clisp.org>
18983
18984         * lib/strtoimax.c: Include <stdint.h> as an alternative to
18985         <inttypes.h>.
18986         * lib/xstrtol.h: Likewise.
18987         * lib/xstrtoimax.c: Likewise.
18988         * lib/xstrtoumax.c: Likewise.
18989         * lib/human.h: Likewise.
18990
18991         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
18992         on systems that have <inttypes.h> but not <stdint.h>.
18993
18994 2003-01-07  Bruno Haible  <bruno@clisp.org>
18995
18996         * MODULES.html.sh: Add copyright notice.
18997         (missed_files): Omit CVS directory entries.
18998         (func_module): Make it work with sed-3.02.
18999         * MODULES.txt: Remove file.
19000
19001 2003-01-06  Jim Meyering  <jim@meyering.net>
19002
19003         * lib/version-etc.c: Update year in translatable copyright string.
19004
19005 2003-01-03  Karl Berry  <karl@gnu.org>
19006
19007         * config/config.{guess,sub}: update from prep.
19008
19009 2003-01-02  Karl Berry  <karl@gnu.org>
19010
19011         * doc/COPYING.DOC: belatedly updated to 1.2.
19012
19013 2003-01-01  Karl Berry  <karl@gnu.org>
19014
19015         * gnulib-tool (func_verify_module): report module name $module in
19016         error message, not $1.
19017         * gnulib-tool (create-testdir): don't complain if destdir couldn't
19018         be created, only if it doesn't exist.
19019         * gnulib-tool (last_checkin_date): don't expand the $Date here.
19020
19021 2002-12-31  Paul Eggert  <eggert@twinsun.com>
19022
19023         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
19024
19025 2002-12-31  Paul Eggert  <eggert@twinsun.com>
19026
19027         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
19028         memcmp if strcoll doesn't work.
19029
19030 2002-12-31  Bruno Haible  <bruno@clisp.org>
19031
19032         * lib/utime.c (utime_null): No need to call ftruncate if the file was
19033         nonempty.
19034
19035 2002-12-31  Bruno Haible  <bruno@clisp.org>
19036
19037         * lib/memcoll.c (STRCOLL): New macro.
19038         (memcoll): Use it.
19039
19040 2002-12-31  Bruno Haible  <bruno@clisp.org>
19041
19042         * lib/localcharset.h: New file.
19043         * lib/localcharset.c: Include it.
19044         * lib/unicodeio.c: Likewise.
19045
19046 2002-12-31  Bruno Haible  <bruno@clisp.org>
19047
19048         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
19049         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
19050
19051 2002-12-31  Bruno Haible  <bruno@clisp.org>
19052
19053         * lib/getline.h: Include <stddef.h>, for size_t.
19054
19055         * lib/unicodeio.h: Include <stddef.h>, for size_t.
19056         * lib/unicodeio.c: Don't include <stddef.h>.
19057
19058 2002-12-31  Bruno Haible  <bruno@clisp.org>
19059
19060         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
19061         HAVE_TM_ZONE.
19062
19063 2002-12-24  Karl Berry  <karl@gnu.org>
19064
19065         * config/config.guess: update from prep.
19066
19067 2002-12-24  Bruno Haible  <bruno@clisp.org>
19068
19069         General infrasructure.
19070         * m4/README: Rewritten.
19071         * m4/onceonly.m4: New file.
19072         * m4/onceonly_2_57.m4: New file.
19073
19074         Module atexit.
19075         * m4/atexit.m4: New file.
19076
19077         Module strtod.
19078         * m4/strtod.m4: New file.
19079
19080         Module strtol.
19081         * m4/strtol.m4: New file.
19082
19083         Module strtoul.
19084         * m4/strtoul.m4: New file.
19085
19086         Module memchr.
19087         * m4/memchr.m4: New file.
19088
19089         Module memcmp.
19090         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
19091         (jm_FUNC_MEMCMP): Invoke it.
19092
19093         Module memcpy.
19094         * m4/memcpy.m4: New file.
19095
19096         Module memmove.
19097         * m4/memmove.m4: New file.
19098
19099         Module memset.
19100         * m4/memset.m4: New file.
19101
19102         Module strcspn.
19103         * m4/strcspn.m4: New file.
19104
19105         Module strpbrk.
19106         * m4/strpbrk.m4: New file.
19107
19108         Module strstr.
19109         * m4/strstr.m4: New file.
19110
19111         Module strerror.
19112         * m4/strerror.m4: New file.
19113
19114         Module mktime.
19115         * m4/mktime.m4: Renamed from jm-mktime.m4.
19116         (gl_PREREQ_MKTIME): New macro.
19117         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
19118
19119         Module malloc.
19120         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
19121         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
19122         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
19123
19124         Module realloc.
19125         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
19126         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
19127         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
19128
19129         Module strftime.
19130         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
19131         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
19132         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
19133         gl_TM_GMTOFF.
19134         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
19135
19136         Module xalloc.
19137         * m4/xalloc.m4: New file.
19138
19139         Module alloca.
19140         * m4/alloca.m4: New file.
19141
19142         Module putenv.
19143         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
19144         (jm_FUNC_PUTENV): Invoke it.
19145
19146         Module setenv.
19147         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
19148         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
19149         when invoked twice.
19150         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
19151         gt_FUNC_SETENV.
19152
19153         Module memrchr.
19154         * m4/memrchr.m4: New file.
19155
19156         Module stpcpy.
19157         * m4/stpcpy.m4: New file.
19158
19159         Module strcase.
19160         * m4/strcase.m4: New file.
19161
19162         Module strdup.
19163         * m4/strdup.m4: New file.
19164
19165         Module strnlen.
19166         * m4/strnlen.m4: New file.
19167
19168         Module strndup.
19169         * m4/strndup.m4: New file.
19170
19171         Module xstrtod.
19172         * m4/xstrtod.m4: New file.
19173
19174         Module xstrtol.
19175         * m4/xstrtol.m4: New file.
19176
19177         Module getdate.
19178         * m4/getdate.m4: New file.
19179
19180         Module unlocked-io.
19181         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
19182         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
19183         * m4/jm-glibc-io.m4n: Remove file.
19184
19185         Module long-options.
19186         * m4/long-options.m4: New file.
19187
19188         Module md5.
19189         * m4/md5.m4: New file.
19190
19191         Module sha.
19192         * m4/sha.m4: New file.
19193
19194         Module getstr.
19195         * m4/getstr.m4: New file.
19196
19197         Module getline.
19198         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
19199         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
19200         <sys/types.h>, for size_t. Use the function name gnu_getline, not
19201         simply getline. Infoke gl_PREREQ_GETLINE.
19202
19203         Module obstack.
19204         * m4/obstack.m4: New file.
19205
19206         Module hash.
19207         * m4/hash.m4: New file.
19208
19209         Module readtokens.
19210         * m4/readtokens.m4: New file.
19211
19212         Module strverscmp.
19213         * m4/strverscmp.m4: New file.
19214
19215         Module stdbool.
19216         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
19217         OSF/1.
19218
19219         Module strtoll.
19220         * m4/strtoll.m4: New file.
19221
19222         Module strtoull.
19223         * m4/strtoull.m4: New file.
19224
19225         Module strtoimax.
19226         * m4/strtoimax.m4: New file.
19227
19228         Module strtoumax.
19229         * m4/strtoumax.m4: New file.
19230
19231         Module xstrtoimax.
19232         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
19233         jm_AC_PREREQ_XSTRTOIMAX.
19234         Moved the strtol prerequisites to strtol.m4.
19235         Moved the strtoll prerequisites to strtoll.m4.
19236         Moved the strtoimax prerequisites to strtoimax.m4.
19237
19238         Module xstrtoumax.
19239         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
19240         jm_AC_PREREQ_XSTRTOUMAX.
19241         Moved the strtoul prerequisites to strtoul.m4.
19242         Moved the strtoull prerequisites to strtoull.m4.
19243         Moved the strtoumax prerequisites to strtoumax.m4.
19244
19245         Module chown.
19246         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
19247         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
19248
19249         Module dup2.
19250         * m4/dup2.m4: New file.
19251
19252         Module ftruncate.
19253         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
19254         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
19255
19256         Module getgroups.
19257         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
19258         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
19259
19260         Module gettimeofday.
19261         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
19262         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
19263         gl_PREREQ_GETTIMEOFDAY.
19264
19265         Module mkdir.
19266         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
19267         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
19268
19269         Module mkstemp.
19270         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
19271         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
19272         jm_AC_TYPE_UINTMAX_T.
19273         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
19274
19275         Module stat.
19276         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
19277         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
19278
19279         Module lstat.
19280         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
19281         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
19282
19283         Module timespec.
19284         * m4/timespec.m4 (gl_TIMESPEC): New macro.
19285         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
19286         * m4/st_mtim.m4: Indentation.
19287
19288         Module nanosleep.
19289         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
19290         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
19291         gl_PREREQ_NANOSLEEP.
19292
19293         Module regex.
19294         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
19295         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
19296         (gl_REGEX): New macro.
19297
19298         Module rename.
19299         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
19300         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
19301
19302         Module rmdir.
19303         * m4/rmdir.m4: New file.
19304
19305         Module utime.
19306         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
19307         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
19308         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
19309
19310         Module dirname.
19311         * m4/dirname.m4: New file.
19312
19313         Module getopt.
19314         * m4/getopt.m4: New file.
19315
19316         Module unistd-safer.
19317         * m4/unistd-safer.m4: New file.
19318
19319         Module fnmatch.
19320         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
19321         declaration.
19322         (gl_PREREQ_FNMATCH_EXTRA): New macro.
19323         (gl_FUNC_FNMATCH_POSIX): New macro.
19324         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
19325         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
19326         simply fnmatch.
19327
19328         Module exclude.
19329         * m4/exclude.m4: New file.
19330
19331         Module human.
19332         * m4/human.m4: New file.
19333
19334         Module acl.
19335         * m4/acl.m4: Nop.
19336
19337         Module backupfile.
19338         * m4/backupfile.m4: New file.
19339         * m4/d-ino.m4: Indentation.
19340
19341         Module fsusage.
19342         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
19343         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
19344         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
19345
19346         Module dirfd.
19347         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
19348         requirements.
19349
19350         Module euidaccess.
19351         * m4/euidaccess.m4: New file.
19352
19353         Module file-type.
19354         * m4/file-type.m4: New file.
19355
19356         Module fileblocks.
19357         * m4/fileblocks.m4: New file.
19358
19359         Module filemode.
19360         * m4/filemode.m4: New file.
19361
19362         Module isdir.
19363         * m4/isdir.m4: New file.
19364
19365         Module lchown.
19366         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
19367         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
19368
19369         Module makepath.
19370         * m4/makepath.m4: New file.
19371
19372         Module modechange.
19373         * m4/modechange.m4: New file.
19374
19375         Module mountlist.
19376         * m4/mountlist.m4: New file.
19377         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
19378         Indentation.
19379
19380         Module path-concat.
19381         * m4/path-concat.m4: New file.
19382
19383         Module pathmax.
19384         * m4/pathmax.m4: New file.
19385
19386         Module same.
19387         * m4/same.m4: New file.
19388
19389         Module save-cwd.
19390         * m4/save-cwd.m4: New file.
19391
19392         Module savedir.
19393         * m4/savedir.m4: New file.
19394
19395         Module xgetcwd.
19396         * m4/xgetcwd.m4: New file.
19397         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
19398
19399         Module xreadlink.
19400         * m4/xreadlink.m4: New file.
19401
19402         Module safe-read.
19403         * m4/safe-read.m4: New file.
19404
19405         Module safe-write.
19406         * m4/safe-write.m4: New file.
19407
19408         Module closeout.
19409         * m4/closeout.m4: New file.
19410
19411         Module stdio-safer.
19412         * m4/stdio-safer.m4: New file.
19413
19414         Module getpass.
19415         * m4/getpass.m4: New file.
19416
19417         Module getugroups.
19418         * m4/getugroups.m4: New file.
19419
19420         Module group-member.
19421         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
19422         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
19423
19424         Module idcache.
19425         * m4/idcache.m4: New file.
19426
19427         Module userspec.
19428         * m4/userspec.m4: New file.
19429
19430         Module gettime.
19431         * m4/clock_time.m4: New file.
19432         * m4/gettime.m4: New file.
19433
19434         Module settime.
19435         * m4/settime.m4: New file.
19436
19437         Module posixtm.
19438         * m4/posixtm.m4: New file.
19439
19440         Module gethostname.
19441         * m4/gethostname.m4: New file.
19442
19443         Module canon-host.
19444         * m4/canon-host.m4: New file.
19445
19446         Module gettext.
19447         * m4/codeset.m4: New file, from gettext-0.11.5.
19448         * m4/gettext.m4: New file, from gettext-0.11.5.
19449         * m4/glibc21.m4: New file, from gettext-0.11.5.
19450         * m4/iconv.m4: New file, from gettext-0.11.5.
19451         * m4/intdiv0.m4: New file, from gettext-0.11.5.
19452         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
19453         * m4/inttypes.m4: New file, from gettext-0.11.5.
19454         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
19455         * m4/isc-posix.m4: New file, from gettext-0.11.5.
19456         * m4/lcmessage.m4: New file, from gettext-0.11.5.
19457         * m4/lib-ld.m4: New file, from gettext-0.11.5.
19458         * m4/lib-link.m4: New file, from gettext-0.11.5.
19459         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
19460         * m4/progtest.m4: New file, from gettext-0.11.5.
19461         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
19462         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
19463         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
19464
19465         Module localcharset.
19466         * m4/localcharset.m4: New file.
19467
19468         Module hard-locale.
19469         * m4/hard-locale.m4: New file.
19470
19471         Module mbswidth.
19472         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
19473         onceonly macros.
19474         * m4/mbrtowc.m4: Add comment.
19475
19476         Module memcasecmp.
19477         * m4/memcasecmp.m4: New file.
19478
19479         Module memcoll.
19480         * m4/memcoll.m4: New file.
19481
19482         Module unicodeio.
19483         * m4/unicodeio.m4: New file.
19484
19485         Module rpmatch.
19486         * m4/rpmatch.m4: New file.
19487
19488         Module yesno.
19489         * m4/yesno.m4: New file.
19490
19491         Module exitfail.
19492         * m4/exitfail.m4: New file.
19493
19494         Module c-stack.
19495         * m4/c-stack.m4 (gl_C_STACK): New macro.
19496         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
19497
19498         Module error.
19499         * m4/error.m4 (gl_ERROR): New macro.
19500         (jm_PREREQ_ERROR): Use onceonly macros.
19501
19502         Module fatal.
19503         * m4/fatal.m4: New file.
19504
19505         Module getloadavg.
19506         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
19507         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
19508
19509         Module getpagesize.
19510         * m4/getpagesize.m4: New file.
19511
19512         Module getusershell.
19513         * m4/getusershell.m4: New file.
19514
19515         Module physmem.
19516         * m4/physmem.m4: New file.
19517
19518         Module posixver.
19519         * m4/posixver.m4: New file.
19520
19521         Module quotearg.
19522         * m4/quotearg.m4: New file.
19523
19524         Module quote.
19525         * m4/quote.m4: New file.
19526
19527         Module readutmp.
19528         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
19529
19530         Module sig2str.
19531         * m4/sig2str.m4: New file.
19532
19533         Other.
19534         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
19535         ulonglong.m4.
19536         * m4/intmax_t.m4: New file.
19537         * m4/d-type.m4: Indentation.
19538         * m4/jm-macros.m4: Update.
19539         * m4/prereq.m4 (jm_PREREQ): Update.
19540         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
19541         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
19542         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
19543         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
19544         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
19545         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
19546         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
19547         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
19548         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
19549         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
19550         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
19551         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
19552         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
19553         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
19554         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
19555         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
19556         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
19557         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
19558         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
19559
19560 2002-12-24  Bruno Haible  <bruno@clisp.org>
19561
19562         * MODULES.txt: Update according to m4/ changes.
19563
19564         Module gettext.
19565         * config.rpath: New file, from gettext-0.11.5.
19566
19567         * modules/*: New module descriptions.
19568         * gnulib-tool: New file.
19569         * MODULES.html.sh: New file.
19570
19571 2002-12-21  Karl Berry  <karl@gnu.org>
19572
19573         * doc/fdl.texi: update to version 1.2.
19574
19575 2002-12-19  Karl Berry  <karl@gnu.org>
19576
19577         * config/config.guess: update from prep.
19578
19579 2002-12-18  Bruno Haible  <bruno@clisp.org>
19580
19581         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
19582         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
19583
19584 2002-12-17  Bruno Haible  <bruno@clisp.org>
19585
19586         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
19587         stdlib.h, string.h.
19588
19589 2002-12-17  Bruno Haible  <bruno@clisp.org>
19590
19591         * lib/canon-host.c (strdup): Remove unused declaration.
19592
19593         * lib/fsusage.c: Include full_read.h.
19594         (get_fs_usage): Use full_read instead of safe_read.
19595
19596         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
19597
19598 2002-12-12  Karl Berry  <karl@gnu.org>
19599
19600         * config/config.guess: update from prep.
19601
19602 2002-12-11  Bruno Haible  <bruno@clisp.org>
19603
19604         * m4/setenv.m4: New file, from gettext-0.11.5.
19605
19606 2002-12-11  Bruno Haible  <bruno@clisp.org>
19607
19608         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
19609         not unsetenv().
19610         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
19611         modifications:
19612
19613         2002-12-11  Bruno Haible  <bruno@clisp.org>
19614
19615                 * setenv.c (alloca): Fall back to malloc.
19616                 (freea): New macro.
19617                 (setenv): Use freea() to free memory allocated with alloca().
19618
19619         2002-11-13  Bruno Haible  <bruno@clisp.org>
19620
19621                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
19622                 function declarations.
19623                 * unsetenv.c (unsetenv): Likewise.
19624
19625         2002-03-04  Bruno Haible  <bruno@clisp.org>
19626
19627                 Portability to AIX 4.3.3.
19628                 * unsetenv.c: New file, extracted from setenv.c.
19629                 * setenv.c: Move the unsetenv() function to unsetenv.c.
19630
19631         2001-12-20  Bruno Haible  <bruno@clisp.org>
19632
19633                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
19634                 use malloc instead. For SunOS 4.
19635
19636         2001-12-11  Bruno Haible  <bruno@clisp.org>
19637
19638                 * setenv.c: Declare alloca.
19639                 (compar_fn_t): New typedef.
19640                 (KNOWN_VALUE, STORE_VALUE): Use it.
19641
19642         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
19643         setenv.h.
19644
19645 2002-12-10  Paul Eggert  <eggert@twinsun.com>
19646
19647         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
19648         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
19649         Choose values that are less likely to collide with system fnmatch
19650         options.
19651         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
19652         defined (e.g., a pure POSIX system).
19653         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
19654         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
19655
19656 2002-12-06  Paul Eggert  <eggert@twinsun.com>
19657
19658         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
19659         a pain in practice to deal with generated m4 files.  This change
19660         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
19661
19662         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
19663         and jm-glibc-io.m4, as they are no longer a special case.
19664         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
19665         kludge and the auto-generation stuff.  Check only whether the
19666         functions are declared, not whether they exist, since older hosts
19667         that don't declare the functions can't use the optimization anyway.
19668
19669 2002-12-06  Jim Meyering  <jim@meyering.net>
19670
19671         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
19672
19673         Merge in changes from libc's misc/error.c, in preparation
19674         for the merge of gnulib's changes back into libc.
19675
19676         * lib/error.c (_): Define only if not already defined.
19677         Move definition to follow all #include directives.
19678         Include unlocked-io.h only if !_LIBC.
19679         [_LIBC]: Include <libio/libioP.h>.
19680         [USE_IN_LIBIO]: Include <libio/iolibio.h>
19681         (fflush): Tweak definition to use INTUSE.
19682         (putc): Define.
19683
19684 2002-12-05  Paul Eggert  <eggert@twinsun.com>
19685
19686         * lib/alloca.c [defined emacs]: Include "lisp.h".
19687         (xalloc_die) [defined emacs]: New macro.
19688         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
19689         [! defined emacs]: Include <xalloc.h>.
19690         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
19691         (pointer): Typedef to POINTER_TYPE *.
19692         (malloc): Remove decl; we now always use xmalloc.
19693         (alloca): Use old-style definition, since Emacs needs this.
19694         Check for arithmetic overflow when computing combined size.
19695
19696 2002-12-04  Paul Eggert  <eggert@twinsun.com>
19697
19698         Do not generate unlocked-io.h automatically, since it's easier to
19699         maintain it by hand.
19700
19701         * lib/unlocked-io.h: New file, from GNU diffutils,
19702         but with proper copyright notice and attribution.
19703         * lib/gen-uio: Remove.
19704         * lib/Makefile.am: Add copyright notice.
19705         (libfetish_a_SOURCES): Add unlocked-io.h.
19706         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
19707         (DISTCLEANFILES, io_functions): Remove macros.
19708         (EXTRA_DIST): Remove gen_uio.
19709         (unlocked-io.h): Remove rule.
19710
19711 2002-12-04  Jim Meyering  <jim@meyering.net>
19712
19713         Reflect the fact that stat.c and lstat.c are no longer generated.
19714         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
19715         (DISTCLEANFILES): Likewise.
19716         (EXTRA_DIST): Likewise.
19717         (all_local): Don't depend on stat.c or lstat.c.
19718         (stat.c, lstat.c): Remove rules.
19719         (EXTRA_DIST): Remove xstat.in.
19720
19721         * lib/xstat.in: Remove file.  Contents moved into stat.c.
19722         * lib/stat.c: New file.  Contents mostly from xstat.in.
19723         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
19724         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
19725
19726         * lib/safe-read.c: Rework so that it may serve to define safe_write,
19727         too.
19728         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
19729
19730 2002-12-03  Jim Meyering  <jim@meyering.net>
19731
19732         * lib/safe-read.c, safe-write.c: Change variable names and comments,
19733         but not semantics, to minimize the differences between these two files.
19734         (safe_read): Change comment to mention SAFE_READ_ERROR.
19735
19736         * lib/safe-read.c (IS_EINTR): Define.
19737         (safe_read): Use IS_EINTR in place of in-function cpp directives.
19738
19739 2002-12-02  Jim Meyering  <jim@meyering.net>
19740
19741         * lib/safe-read.c (EINTR): Define.
19742         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
19743         (INT_MAX): Provide fallback.
19744         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
19745
19746         * lib/safe-read.h (SAFE_READ_ERROR): Define.
19747
19748 2002-12-02  Bruno Haible  <bruno@clisp.org>
19749
19750         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
19751         Define, taken from safe-read.c.
19752         (INT_MAX): Provide fallback.
19753         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
19754         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
19755
19756         * lib/safe-read.c (EINTR): Remove definition.
19757         (safe_read): Don't use EINTR if it is absent.
19758
19759 2002-12-01  Jim Meyering  <jim@meyering.net>
19760
19761         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
19762         zero.
19763         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
19764
19765 2002-11-27  Paul Eggert  <eggert@twinsun.com>
19766
19767         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
19768         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
19769         with `if (! (value < limit)) abort ();', for readability.
19770
19771 2002-11-26  Karl Berry  <karl@gnu.org>
19772
19773         * lib/strdup.c: copy from libc again, with jim's ok.
19774         * lib/.cppi-disable: re-add strdup.c
19775
19776 2002-11-25  Karl Berry  <karl@gnu.org>
19777
19778         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
19779         instead of "strtol.c".
19780
19781 2002-11-25  Karl Berry  <karl@gnu.org>
19782
19783         * config/install-sh: update from automake for variable quoting, $0 in
19784         error msgs, etc.
19785
19786         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
19787         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
19788         entry.
19789
19790 2002-11-25  Jim Meyering  <jim@meyering.net>
19791
19792         * lib/mktime.c: Sync from libc, now that it has the latest fix.
19793
19794 2002-11-24  Karl Berry  <karl@gnu.org>
19795
19796         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
19797         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
19798
19799 2002-11-24  Jim Meyering  <jim@meyering.net>
19800
19801         Update from coreutils:
19802
19803         * lib/mktime.c: Merge in changes from libc.
19804
19805         Avoid a link-time failure on some Linux systems.
19806         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
19807         (otherwise).
19808         (__mon_yday): Declare with the STATIC attribute.
19809         (__mktime_internal): Likewise.
19810         Based on a report from Greg Schafer.
19811
19812 2002-11-23  Jim Meyering  <jim@meyering.net>
19813
19814         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
19815         Use `unsigned', not `int', as type of index.
19816
19817         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
19818
19819         * lib/fsusage.c: Remove unneeded parentheses around operands of
19820         `defined'.
19821
19822 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19823
19824         * lib/quotearg.h: Allow multiple inclusion by surrounding with
19825         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
19826         so that we can be included first.
19827         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
19828         * lib/quotearg.c: Include quotearg.h immediately after config.h.
19829         No need to include stddef.h or sys/types.h any more.
19830         Surround local include files with "", not "<>".
19831         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
19832         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
19833         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
19834         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19835         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19836         (ISPRINT): Remove; no longer needed now that we assume C89.
19837
19838         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
19839         Preserve errno.
19840
19841         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
19842         quotearg_char): Use SIZE_MAX rather than
19843         (size_t) -1 when we are talking about "infinity".
19844
19845         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
19846
19847 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19848
19849         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
19850         hint that one should use `if (! x) abort ();' rather than `assert
19851         (x);', and anyway it's one less thing to worry about configuring.
19852         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
19853         hash_rehash, hash_insert): Use abort rather than assert.
19854
19855 2002-11-22  Bruno Haible  <bruno@clisp.org>
19856
19857         * lib/safe-read.h: Assume C89. Add comments.
19858         (safe_read): Change return type to size_t.
19859         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
19860         byte counts > SSIZE_MAX correctly.
19861         * lib/safe-write.h: New file.
19862         * lib/safe-write.c: New file.
19863         * lib/full-read.h: New file.
19864         * lib/full-read.c: New file.
19865         * lib/full-write.h: Assume C89. Add comments.
19866         * lib/full-write.c: Include safe-write.h.
19867         (full_write): Rewritten to use safe_write.
19868         Suggested by Jim Meyering and Paul Eggert.
19869
19870 2002-11-21  Jim Meyering  <jim@meyering.net>
19871
19872         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
19873
19874         Merge in changes from the coreutils.
19875
19876         2002-09-25  Paul Eggert  <eggert@twinsun.com>
19877         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
19878         <stdint.h>.
19879         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
19880         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
19881         int.  Work more efficiently if X is the same width as uintmax_t.
19882         Do not compare X to -1, to avoid bogus compiler warning.
19883         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
19884         Don't assume that f_frsize and f_bsize are the same type.
19885
19886         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
19887         warning on FreeBSD.
19888
19889         * lib/makepath.c (make_path): Restore umask *before* creating the final
19890         component.
19891         (make_path): Minor reformatting.
19892
19893         * lib/xmalloc.c: Adjust to work with new autoconf macros,
19894         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
19895         HAVE_MALLOC/HAVE_REALLOC.
19896
19897         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
19898         dummy ones.  At least on GNU/Linux systems, `auto' means something
19899         else.
19900         From Michael Stone.
19901
19902 2002-11-21  Bruno Haible  <bruno@clisp.org>
19903
19904         Remove case insensitive option matching.
19905         * lib/argmatch.h (argcasematch): Remove declaration.
19906         (ARGCASEMATCH): Remove macro.
19907         (__xargmatch_internal): Remove case_sensitive argument.
19908         (XARGMATCH): Update.
19909         (XARGCASEMATCH): Remove macro.
19910         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
19911         case_sensitive argument.
19912         (argcasematch): Remove function.
19913         (__xargmatch_internal): Remove case_sensitive argument.
19914         (main): Use XARGMATCH instead of XARGCASEMATCH.
19915
19916         * lib/xmalloc.c: Change compile-time error message. Add comment about
19917         required autoconf version.
19918
19919 2002-11-20  Paul Eggert  <eggert@twinsun.com>
19920
19921         Merge argmatch cleanups from Bison.  Assume C89.
19922
19923         * lib/argmatch.c: Include config.h here, not in argmatch.h.
19924         Include stdlib.h, for EXIT_FAILURE.
19925         Always include <string.h>, since we assume C89.
19926         (EXIT_FAILURE): Remove pre-C89 bug workaround.
19927         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
19928         Include <stddef.h> instead, since it's all we need for size_t.
19929         (PARAMS): Remove.  All uses removed.
19930         (ARRAY_CARDINALITY): Do not bother to #undef.
19931         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
19932         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
19933         Remove unnecessary parentheses.
19934         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
19935         Insert necessary parentheses.
19936         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
19937         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
19938
19939 2002-11-19  Bruno Haible  <bruno@clisp.org>
19940
19941         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
19942         * lib/mbswidth.h: Include <stddef.h>, for size_t.
19943
19944         * lib/mbswidth.h (PARAMS): Remove macro.
19945         (mbswidth, mbsnwidth): Use ANSI C function declarations.
19946         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
19947
19948         * lib/gcd.h (PARAMS): Remove macro.
19949         (gcd): Use ANSI C function declarations.
19950         * lib/gcd.c (gcd): Likewise.
19951
19952 2002-11-15  Bruno Haible  <bruno@clisp.org>
19953
19954         * lib/strcspn.c: Include <stddef.h>.
19955         (strcspn): Use ANSI C function declaration. Change return type to
19956         size_t. Use NULL.
19957         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
19958         (strpbrk): Use NULL.
19959         * lib/strpbrk.h (PARAMS): Remove macro.
19960         (strpbrk): Use ANSI C function declaration.
19961         * lib/strstr.c: Don't include <sys/types.h>.
19962         * lib/strstr.h (PARAMS): Remove macro.
19963         (strstr): Use ANSI C function declarations.
19964
19965 2002-11-14  Karl Berry  <karl@gnu.org>
19966
19967         * config/mkinstalldirs: `do' on separate line, instead of
19968         `for var; do'.
19969
19970 2002-11-06  Bruno Haible  <bruno@clisp.org>
19971
19972         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
19973         * lib/gcd.c (gcd): Likewise.
19974
19975 2002-11-05  Bruno Haible  <bruno@clisp.org>
19976
19977         * lib/gcd.h: New file, from gettext-0.11.5.
19978         * lib/gcd.c: New file, from gettext-0.11.5.
19979
19980 2002-11-05  Bruno Haible  <bruno@clisp.org>
19981
19982         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19983         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19984         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19985         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19986
19987         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
19988         <libintl.h>.
19989         * lib/makepath.c: Include gettext.h instead of <locale.h> and
19990         <libintl.h>.
19991
19992         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
19993         * lib/human.c: Include gettext.h instead of <libintl.h>.
19994         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
19995         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
19996         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
19997         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
19998         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
19999         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
20000         (textdomain): Remove definition.
20001         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
20002
20003         * lib/long-options.c: Remove include of <libintl.h> and definition of
20004         _.
20005         * lib/same.c: Remove include of <libintl.h> and definition of _.
20006
20007 2002-11-04  Owen Taylor  <otaylor@redhat.com>
20008
20009         * lib/config.charset: A few additions for Solaris.
20010
20011 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20012
20013         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
20014         * lib/localcharset.c (locale_charset): Declare as extern "C".
20015
20016 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20017
20018         * lib/config.charset: msdos in uk_UA uses CP1125.
20019
20020 2002-11-04  Bruno Haible  <bruno@clisp.org>
20021
20022         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
20023         * lib/strcase.h: New file, from GNU gettext-0.11.5.
20024         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
20025         * lib/strstr.h: New file, from GNU gettext-0.11.5.
20026         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
20027
20028 2002-11-04  Bruno Haible  <bruno@clisp.org>
20029
20030         * lib/localcharset.c (locale_charset): Don't return an empty string.
20031
20032 2002-11-04  Bruno Haible  <bruno@clisp.org>
20033
20034         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
20035         aliases.
20036
20037 2002-11-04  Bruno Haible  <bruno@clisp.org>
20038
20039         * lib/config.charset: Update for newest glibc. Add canonical names
20040         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
20041
20042 2002-11-04  Bruno Haible  <bruno@clisp.org>
20043
20044         * lib/config.charset: Add support for NetBSD.
20045
20046 2002-11-04  Bruno Haible  <bruno@clisp.org>
20047
20048         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
20049
20050 2002-11-01  Bruno Haible  <bruno@clisp.org>
20051
20052         * configure.in: Add AC_CONFIG_AUX_DIR call.
20053         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
20054         test/Makefile.
20055         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
20056
20057 2002-09-28  Karl Berry  <karl@gnu.org>
20058
20059         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
20060         installed automake until the next release, since changes have been
20061         made.
20062
20063 2002-09-25  Karl Berry  <karl@gnu.org>
20064
20065         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
20066         * lib/getopt*: copy from libc/posix.
20067         * lib/gettext.h: copy from gettext.
20068         * lib/.cppi-disable: add strdup.c, gettext.h.
20069
20070 2002-09-25  Karl Berry  <karl@gnu.org>
20071
20072         * config/srclist.txt: enable gettext.h check.
20073         * config/config.{guess,sub}: update from prep.
20074         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
20075                 from automake 1.6.3.
20076         See srclist*.
20077
20078 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
20079
20080         * regex.c (PATFETCH): Remove the translating fetch.
20081         (PATFETCH_RAW): Rename to PATFETCH.
20082         (set_image_of_range): New fun.
20083         (SET_RANGE_TABLE_WORK_AREA): Use it.
20084         (regex_compile): Don't translate the pattern chars so eagerly.
20085         Only do it when inserting an `exactn' bytecode or when handling
20086         a char-range.
20087         (mutually_exclusive_p): Avoid empty statement.
20088
20089 2002-07-06  Jim Meyering  <meyering@lucent.com>
20090
20091         * m4/README: Don't mention Makefile.am.in.
20092         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
20093
20094 2002-07-01  Jim Meyering  <meyering@lucent.com>
20095
20096         * lib/c-stack.c: Include sys/time.h.
20097         From Volker Borchert.
20098
20099 2002-06-26  Paul Eggert  <eggert@twinsun.com>
20100
20101         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
20102
20103 2002-06-26  Paul Eggert  <eggert@twinsun.com>
20104
20105         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
20106         New macro.  Use it uniformly instead of
20107         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
20108         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
20109         reported by Vin Shelton.
20110
20111 2002-06-22  Paul Eggert  <eggert@twinsun.com>
20112
20113         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
20114         Do not assume SA_SIGINFO behavior.
20115         Bug reported by Jim Meyering on NetBSD 1.5.2.
20116
20117 2002-06-22  Jim Meyering  <meyering@lucent.com>
20118
20119         * m4/c-stack.m4: New file, from diffutils-2.8.2.
20120         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
20121
20122         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
20123         now that configure.ac uses AC_GNU_SOURCE.
20124         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
20125         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
20126
20127         Update to latest tools.  Suggestions from Paul Eggert.
20128         * m4/stdbool.m4: New file, from diffutils-2.8.2.
20129         * m4/gnu-source.m4: Update from diffutils-2.8.2.
20130         * m4/fnmatch.m4: Likewise.
20131         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
20132         to AC_HEADER_STDBOOL
20133
20134 2002-06-22  Jim Meyering  <meyering@lucent.com>
20135
20136         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
20137         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
20138
20139 2002-06-22  Jim Meyering  <meyering@lucent.com>
20140
20141         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
20142
20143         * lib/exitfail.c, exitfail.h: Likewise.
20144         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
20145
20146         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
20147         of fnmatch.h.
20148         (EXTRA_DIST): Add fnmatch_loop.c.
20149         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
20150
20151         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
20152         * lib/fnmatch.c: Update from diffutils-2.8.2.
20153         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
20154         * lib/fnmatch.h: Remove file.
20155
20156 2002-06-21  Jim Meyering  <meyering@lucent.com>
20157
20158         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
20159         * m4/mbrtowc.m4: Likewise.
20160
20161         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
20162         * m4/mbswidth.m4: Reflect name change:
20163         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
20164         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
20165
20166         * m4/lib-link.m4: Update from gettext-0.11.2.
20167         * m4/gettext.m4: Likewise.
20168
20169         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
20170         From Alfred M. Szmidt.
20171
20172 2002-06-18  Paul Eggert  <eggert@twinsun.com>
20173
20174         * lib/file-type.h: Report an error if neither S_ISREG nor
20175         S_IFREG is defined, instead of using a test specific to glibc
20176         2.2.  This should be safe, since POSIX requires S_ISREG and
20177         Unix Version 7 had S_IFREG.  We don't need to check for
20178         <sys/types.h> since we don't use any symbols that it defines.
20179
20180 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
20181
20182         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
20183         $@-t, so that each temporary file name is unique and valid in the first
20184         8 characters, for operation under DOS.
20185
20186 2002-06-15  Paul Eggert  <eggert@twinsun.com>
20187
20188         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
20189
20190 2002-06-15  Jim Meyering  <meyering@lucent.com>
20191
20192         Work even with DJGPP 2.03, which lacks support for symlinks.
20193         From Richard Dawe.
20194         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
20195         is defined.
20196         * lib/lchown.c (S_ISLNK): Likewise.
20197
20198 2002-06-15  Jim Meyering  <meyering@lucent.com>
20199
20200         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
20201         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
20202         have been included before this file.
20203
20204 2002-06-14  Jim Meyering  <meyering@lucent.com>
20205
20206         * lib/file-type.h: Use the version from diffutils-2.8.2.
20207         * lib/file-type.c: Likewise.
20208
20209 2002-06-07  Jim Meyering  <meyering@lucent.com>
20210
20211         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
20212         They're needed at least for NetBSD 1.5.2.
20213         ($statxfs_includes): Include those same headers.
20214         ($statxfs_includes): Include sys/vfs.h if available.
20215         ($statxfs_includes): Likewise for sys/statvfs.h.
20216         Check for the following members in both structs statfs and statvfs:
20217         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
20218
20219 2002-06-01  Jim Meyering  <meyering@lucent.com>
20220
20221         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
20222         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
20223
20224 2002-05-28  Jim Meyering  <meyering@lucent.com>
20225
20226         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
20227         Reported by Volker Borchert.
20228
20229 2002-05-27  Jim Meyering  <meyering@lucent.com>
20230
20231         Fix a problem seen only on nonconforming systems whereby ls.c's
20232         use of localtime, and then of gettimeofday would cause trouble:
20233         the localtime call used to initialize rpl_gettimeofday's save
20234         mechanism would clobber ls's current local time information so
20235         that in any long listing the first file would always be listed
20236         with date 1970-01-01.  Analysis by Volker Borchert.
20237
20238         * lib/gettimeofday.c (localtime): Undefine.
20239         (rpl_localtime): New function.
20240
20241 2002-05-27  Jim Meyering  <meyering@lucent.com>
20242
20243         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
20244         localtime.
20245
20246         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
20247         use the replacement function; it wouldn't resolve at link time.
20248         Reported by Volker Borchert.
20249
20250 2002-05-22  Jim Meyering  <meyering@lucent.com>
20251
20252         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
20253         file-type.h.
20254         * lib/file-type.h: New file.
20255         * lib/file-type.c (file_type): New file/function.  Extracted from
20256         diffutils.
20257
20258 2002-04-30  Jim Meyering  <meyering@lucent.com>
20259
20260         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
20261
20262 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20263
20264         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
20265
20266 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20267
20268         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
20269         Do not check for alloca.h (no longer used) or stdbool.h (was never
20270         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
20271
20272 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20273
20274         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
20275
20276 2002-04-29  Jim Meyering  <meyering@lucent.com>
20277
20278         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
20279         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
20280         Use AC_FUNC_STRNLEN here instead.
20281
20282         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
20283         With autoconf-2.53a, it's part of AC_PROG_CC.
20284
20285 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20286
20287         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
20288         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
20289
20290 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20291
20292         * lib/sig2str.h, lib/sig2str.c: New files.
20293         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
20294
20295 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20296
20297         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
20298         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
20299         of 127, since 64 is the largest conceivable number for ancient
20300         nonstandard hosts.
20301         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
20302
20303 2002-04-28  Jim Meyering  <meyering@lucent.com>
20304
20305         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
20306
20307 2002-04-24  Jim Meyering  <meyering@lucent.com>
20308
20309         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
20310         (jm_PREREQ): Use it.
20311
20312         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
20313         mach/mach.h fcntl.h.
20314         Check for this function: setlocale.
20315
20316 2002-04-24  Jim Meyering  <meyering@lucent.com>
20317
20318         * lib/gettext.h: New file, from Gettext.
20319         * lib/Makefile.am (INCLUDES): Remove -I../intl.
20320         (libfetish_a_SOURCES): Add gettext.h.
20321
20322 2002-04-16  Jim Meyering  <meyering@lucent.com>
20323
20324         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
20325         ut_pid, ut_id, ut_exit.
20326
20327 2002-04-16  Jim Meyering  <meyering@lucent.com>
20328
20329         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
20330         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
20331         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
20332
20333 2002-04-12  Jim Meyering  <meyering@lucent.com>
20334
20335         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
20336         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
20337         existence of the getmntinfo function.  Needed for Darwin 5.3.
20338
20339         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
20340         This is necessary at least on Darwin 5.3.
20341
20342         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
20343         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
20344         strnlen.o in the library, and that makes some versions of ranlib
20345         object.
20346
20347 2002-04-12  Jim Meyering  <meyering@lucent.com>
20348
20349         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
20350
20351 2002-04-09  Jim Meyering  <meyering@lucent.com>
20352
20353         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
20354         to be more precise.  Rather than saying we're checking whether the
20355         function `works', say what we're testing.
20356         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
20357         Reported by Bruno Haible.
20358
20359 2002-03-10  Jim Meyering  <meyering@lucent.com>
20360
20361         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
20362         Suggestion from Santiago Vila.
20363
20364 2002-03-08  Jim Meyering  <meyering@lucent.com>
20365
20366         * lib/rename.c: Mention that this wrapper is needed also on
20367         mips-dec-ultrix4.4 systems.
20368
20369 2002-03-02  Jim Meyering  <meyering@lucent.com>
20370
20371         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
20372         not HAVE_CLOCK_SETTIME.
20373
20374 2002-02-27  Paul Eggert  <eggert@twinsun.com>
20375
20376         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
20377         Check for clock_settime.
20378
20379 2002-02-27  Paul Eggert  <eggert@twinsun.com>
20380
20381         * lib/nanosleep.h: Rename to....
20382         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
20383
20384         * lib/gettime.c: New file.
20385         * lib/settime.c: New file.
20386         * lib/stime.c: Remove.
20387
20388         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
20389         timespec.h.  Remove nanosleep.h.
20390
20391 2002-02-25  Paul Eggert  <eggert@twinsun.com>
20392
20393         * m4/acl.m4: New file.
20394         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
20395         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
20396
20397 2002-02-25  Paul Eggert  <eggert@twinsun.com>
20398
20399         * lib/acl.c, lib/acl.h: New files.
20400         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
20401
20402 2002-02-24  Jim Meyering  <meyering@lucent.com>
20403
20404         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
20405         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
20406         cause trouble.  Reported by Nelson Beebe.
20407
20408 2002-02-23  Paul Eggert  <eggert@twinsun.com>
20409
20410         * lib/path-concat.c (xpath_concat): Reorder code to pacify
20411         compilers that don't know that xalloc_die never returns.
20412
20413 2002-02-20  Jim Meyering  <meyering@lucent.com>
20414
20415         * lib/getdate.c: Regenerate using bison-1.33.
20416
20417 2002-02-17  Jim Meyering  <meyering@lucent.com>
20418
20419         * config/config.guess (main): Don't use `head -1'; it's no longer
20420         portable. Use `sed 1q' instead.
20421
20422 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
20423
20424         * m4/codeset.m4: Upgrade to gettext-0.11.
20425         * m4/gettext.m4: Upgrade to gettext-0.11.
20426         * m4/glibc21.m4: Upgrade to gettext-0.11.
20427         * m4/iconv.m4: Upgrade to gettext-0.11.
20428         * m4/isc-posix.m4: Upgrade to gettext-0.11.
20429         * m4/lcmessage.m4: Upgrade to gettext-0.11.
20430         * m4/lib-ld.m4: New file, from gettext-0.11.
20431         * m4/lib-link.m4: New file, from gettext-0.11.
20432         * m4/lib-prefix.m4: New file, from gettext-0.11.
20433         * m4/progtest.m4: Upgrade to gettext-0.11.
20434
20435 2002-02-15  Paul Eggert  <eggert@twinsun.com>
20436
20437         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
20438         (jm_PREREQ): Use it.
20439
20440 2002-02-15  Paul Eggert  <eggert@twinsun.com>
20441
20442         * lib/posixver.c, lib/posixver.h: New files.
20443         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
20444
20445 2002-02-02  Paul Eggert  <eggert@twinsun.com>
20446             Bruno Haible  <bruno@clisp.org>
20447
20448         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
20449         (fwrite_success_callback): New declaration.
20450         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
20451         print_unicode_char. Call failure callback instead of error.
20452         (fwrite_success_callback): New function.
20453         (exit_failure_callback): New function.
20454         (fallback_failure_callback): New function.
20455         (print_unicode_char): Call unicode_to_mb.
20456
20457 2002-01-26  Jim Meyering  <meyering@lucent.com>
20458
20459         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
20460         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
20461
20462 2002-01-26  Jim Meyering  <meyering@lucent.com>
20463
20464         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
20465
20466 2002-01-22  Paul Eggert  <eggert@twinsun.com>
20467
20468         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
20469
20470 2002-01-22  Jim Meyering  <meyering@lucent.com>
20471
20472         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
20473         Otherwise, some versions of automake would omit the rule that makes
20474         Makefile from Makefile.in.
20475
20476 2002-01-21  Paul Eggert  <eggert@twinsun.com>
20477
20478         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
20479         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
20480         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
20481         (memcoll): Set errno to zero if there is no error.
20482
20483         * lib/quotearg.c (quotearg_buffer_restyled):
20484         Fix bug with quoting buffers containing NUL when backslashing escapes.
20485         This bug was exposed by the other changes in this patch.
20486         (quotearg_n_options): New arg ARGSIZE.
20487         All callers changed.
20488         (quoting_options_from_style): New function.
20489         (quotearg_n_style): Use it.
20490         (quotearg_n_style_mem): New function.
20491
20492         * lib/quotearg.h (quotearg_n_style_mem): New function.
20493
20494 2002-01-19  Jim Meyering  <meyering@lucent.com>
20495
20496         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
20497         Remove useless quotes: DF_PROG="df".
20498         * m4/strnlen.m4: New file.
20499
20500 2002-01-16  Paul Eggert  <eggert@twinsun.com>
20501
20502         * lib/backupfile.c (ISDIGIT): Comment fix.
20503         * lib/getdate.y (ISDIGIT): Likewise.
20504         * lib/posixtm.c (ISDIGIT, year): Likewise.
20505         * lib/strverscmp.c (ISDIGIT): Likewise.
20506         * lib/userspec.c (ISDIGIT): Likewise.
20507
20508 2002-01-16  Jim Meyering  <meyering@lucent.com>
20509
20510         * lib/getdate.y: Add three semicolons, each just before a closing
20511         brace. Bison (as of version 1.31) no longer papers over that mistake.
20512
20513 2002-01-05  Jim Meyering  <meyering@lucent.com>
20514
20515         * lib/version-etc.c (version_etc_copyright): Update copyright year.
20516
20517 2001-12-19  Paul Eggert  <eggert@twinsun.com>
20518
20519         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
20520         not silently exit merely because the output buffer happens to
20521         have nothing pending.
20522
20523 2001-12-18  Paul Eggert  <eggert@twinsun.com>
20524
20525         See the big note in ../ChangeLog.
20526         * lib/human.c (suffixes): Prefer K to k for 1024.
20527         (generate_suffix_backwards): New function.
20528         (human_readable_inexact): Use it.
20529         * lib/xstrtol.c (__xstrtol): If there is no number but there
20530         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
20531         Accept 'K' as well as 'k'.
20532
20533 2001-12-15  Jim Meyering  <meyering@lucent.com>
20534
20535         * lib/regex.h (__restrict_arr): Update from libc.
20536
20537         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
20538         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
20539         (STREQ): Define.
20540
20541 2001-12-14  Jim Meyering  <meyering@lucent.com>
20542
20543         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
20544         Suggestion from Bruno Haible.
20545
20546 2001-12-10  Jim Meyering  <meyering@lucent.com>
20547
20548         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
20549         xrealloc, Instead, include "xalloc.h".
20550         (initbuffer): Don't cast xmalloc return value to char*.
20551         (readline): Reword comment.
20552         Don't cast xrealloc return value to char*
20553         Return NULL, not 0.
20554
20555 2001-12-09  Jim Meyering  <meyering@lucent.com>
20556
20557         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
20558         about `signed and unsigned type in conditional expression'.
20559         * lib/posixtm.c (posix_time_parse): Likewise.
20560
20561         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
20562
20563         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
20564         to avoid a pedantic warning.
20565
20566         * lib/getstr.c: Don't include assert.h.
20567         (getstr): Remove warning-evoking assertions.
20568         Return -1 if offset parameter is out of bounds.
20569         Change the type of a local from int to size_t.
20570
20571         * lib/strftime.c (my_strftime_localtime_r): Include this function
20572         definition in the `#if ! HAVE_TM_GMTOFF' block.
20573
20574         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
20575         Include xalloc.h instead.
20576
20577 2001-12-02  Jim Meyering  <meyering@lucent.com>
20578
20579         * lib/tempname.c: Don't declare getenv, thus reverting the change of
20580         2001-11-18.  It's no longer necessary, now that stdlib.h is always
20581         included.
20582
20583         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
20584         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
20585
20586 2001-11-30  Akim Demaille  <akim@epita.fr>
20587
20588         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
20589         before being defined.
20590
20591 2001-11-27  Paul Eggert  <eggert@twinsun.com>
20592
20593         * lib/quotearg.h (quotearg_n, quotearg_n_style):
20594         First arg is int, not unsigned.
20595         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20596         (SIZE_MAX, UINT_MAX): New macros.
20597         (quotearg_n_options): Abort if N is negative.
20598         Avoid overflow check on hosts where size_t is 64 bits and int
20599         is 32 bits, as overflow is impossible there.
20600         Fix off-by-one typo that caused unnecessary reallocation.
20601
20602 2001-11-27  Jim Meyering  <meyering@lucent.com>
20603
20604         * lib/tempname.c: Merge with version from libc.
20605         * lib/regex.c: Likewise.
20606
20607         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
20608         systems for which STDC_HEADERS is 0, it was not included, resulting in
20609         a warning about an integer-to-pointer conversion problem with getenv.
20610         Reported by Volker Borchert.
20611
20612 2001-11-26  Jim Meyering  <meyering@lucent.com>
20613
20614         * lib/gtod.h: Remove file.
20615         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
20616         * lib/gettimeofday.c: Don't include gtod.h.
20617         (GTOD_init): Remove function.
20618         (rpl_gettimeofday): Do its job here instead, rather than aborting.
20619         Suggestion from Volker Borchert.
20620
20621 2001-11-23  Jim Meyering  <meyering@lucent.com>
20622
20623         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
20624         it.
20625         * lib/hash.c (struct hash_table): Define it here instead.
20626
20627 2001-11-22  Jim Meyering  <meyering@lucent.com>
20628
20629         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
20630
20631 2001-11-20  Jim Meyering  <meyering@lucent.com>
20632
20633         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
20634         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
20635
20636 2001-11-19  Jim Meyering  <meyering@lucent.com>
20637
20638         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
20639         directory.  Use "conftestXXXXXX" as the template.
20640         Suggestion from Paul Eggert.
20641
20642         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
20643         immediately, so the test doesn't mistakenly hit the max-open-files
20644         limit.
20645
20646 2001-11-18  Paul Eggert  <eggert@twinsun.com>
20647
20648         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
20649         (TEMPORARIES): New macro.
20650         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
20651         removes an artificial limitation (e.g. HP-UX 10.20, where
20652         TMP_MAX is 17576).
20653
20654 2001-11-18  Jim Meyering  <meyering@lucent.com>
20655
20656         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
20657
20658 2001-11-18  Jim Meyering  <meyering@lucent.com>
20659
20660         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
20661         on SunOS 4.
20662
20663         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
20664         files will be created before anything else.
20665
20666 2001-11-17  Paul Eggert  <eggert@twinsun.com>
20667
20668         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
20669         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
20670
20671 2001-11-17  Jim Meyering  <meyering@lucent.com>
20672
20673         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
20674         Prompted by a report from Bob Proulx.
20675
20676         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
20677         Instead, require UTILS_FUNC_MKSTEMP.
20678
20679 2001-11-17  Jim Meyering  <meyering@lucent.com>
20680
20681         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
20682         Now, that's done as part of AC_FUNC_STRTOD.
20683
20684 2001-11-17  Jim Meyering  <meyering@lucent.com>
20685
20686         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
20687         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
20688         rather than group writable.  Patch by Juan F. Codagnone.
20689
20690         * lib/readtokens.c: Remove explicit declarations of xmalloc and
20691         xrealloc, Instead, include "xalloc.h".
20692
20693         * lib/mountlist.c: Include unlocked-io.h after all system headers.
20694         Remove explicit declarations of xmalloc, xrealloc,
20695         and xstrdup.  Instead, include "xalloc.h".
20696
20697         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
20698         unlocked-io.h.
20699         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
20700         Likewise.
20701         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
20702
20703         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
20704         Reported by Padraig Brady.
20705
20706         * lib/mkstemp.c: #undef mkstemp.
20707         Include config.h.
20708         (rpl_mkstemp): Rename from mkstemp.
20709         Protoize.
20710
20711 2001-11-16  Jim Meyering  <meyering@lucent.com>
20712
20713         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
20714         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
20715         determine the amount of total physical memory, use pstat_getstatic.
20716         HPUX-11 doesn't define _SC_PHYS_PAGES.
20717         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
20718         If sysconf couldn't be used to determine the amount of available
20719         physical memory, use both pstat_getstatic and pstat_getdynamic.
20720         Based on a patch from Bob Proulx.
20721
20722 2001-11-10  Jim Meyering  <meyering@lucent.com>
20723
20724         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
20725         (jm_PREREQ): Use it.
20726
20727 2001-11-09  Jim Meyering  <meyering@lucent.com>
20728
20729         * m4/jm-macros.m4: Require autoconf-2.52f.
20730         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
20731         Use these AC_-prefixed names, not the AM_-prefixed ones.
20732
20733         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
20734
20735 2001-11-05  Jim Meyering  <meyering@lucent.com>
20736
20737         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
20738
20739 2001-11-04  Jim Meyering  <meyering@lucent.com>
20740
20741         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
20742         $DEFS.
20743
20744 2001-11-03  Jim Meyering  <meyering@lucent.com>
20745
20746         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
20747         of AC_DEFUN.
20748
20749         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
20750         know the name of the variable in the macro definition.
20751
20752 2001-11-03  Jim Meyering  <meyering@lucent.com>
20753
20754         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
20755         in argmatch_to_argument call.
20756
20757         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
20758         argument.
20759
20760         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
20761         e.g., a fault due to an attempt to free a NULL pointer.
20762
20763 2001-11-01  Jim Meyering  <meyering@lucent.com>
20764
20765         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
20766         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
20767
20768 2001-11-01  Jim Meyering  <meyering@lucent.com>
20769
20770         * lib/dirfd.c, lib/dirfd.h: New files.
20771         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
20772
20773         * lib/hash.c (hash_print) [TESTING]: Clean up.
20774
20775 2001-10-22  Paul Eggert  <eggert@twinsun.com>
20776
20777         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
20778         to avoid a warning if -Wall.
20779
20780 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
20781
20782         * README: New file
20783         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
20784         (per RMS's instructions, this is now the canonical source)
20785         * lgpl/, gpl/: New directories.
20786
20787 2001-10-21  Paul Eggert  <eggert@twinsun.com>
20788
20789         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
20790
20791 2001-10-21  Jim Meyering  <meyering@lucent.com>
20792
20793         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
20794         this code would end up calling gettext even in packages built
20795         with --disable-nls.
20796         * lib/getopt.c (_): Likewise.
20797         * lib/regex.c (_): Likewise.
20798
20799 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20800
20801         * m4/error.m4 (jm_PREREQ_ERROR):
20802         Do not invoke AC_CHECK_FUNCS with strerror_r, as
20803         AC_FUNC_STRERROR_R does that.
20804         Check for strerror declaration.
20805
20806         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
20807         are supposed to have them these days.
20808         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
20809         Merge changes from latest Autoconf CVS.
20810         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
20811         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
20812         POSIX decided to standardize on the int flavor of strerror_r.
20813
20814 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20815
20816         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
20817         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
20818         Use strerror_r that is only a macro, even if it is not a function.
20819         (strerror): Check for HAVE_DECL_STRERROR before declaring.
20820         (private_strerror): Use prototypes, not old-style function definition.
20821         (print_errno_message): New function.
20822         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
20823         char*-flavored one.
20824         (error_tail, error, error_at_line): Use it.
20825
20826 2001-10-11  Jim Meyering  <meyering@lucent.com>
20827
20828         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
20829         and quote_n (1, ... to avoid clobbering a buffer.
20830
20831 2001-10-05  Jim Meyering  <meyering@lucent.com>
20832
20833         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
20834         hash-pjw.h.
20835         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
20836         * lib/hash-pjw.h: New file.
20837
20838 2001-09-30  Jim Meyering  <meyering@lucent.com>
20839
20840         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
20841         `struct fsstat' has the `f_fstypename' member.
20842         Use that to define FS_TYPE, which is now used to make
20843         the getfsstat link test tighter.
20844
20845 2001-09-30  Jim Meyering  <meyering@lucent.com>
20846
20847         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
20848         Include <sys/ucred.h>, for Apple Darwin.
20849         Include sys/mount.h and sys/fs_types.h only if available.
20850         (FS_TYPE): Define.
20851         (read_filesystem_list): Use FS_TYPE.
20852
20853 2001-09-29  Paul Eggert  <eggert@twinsun.com>
20854
20855         * lib/exclude.c (excluded_filename): 0 -> false, since it's
20856         a boolean context.
20857
20858 2001-09-29  Jim Meyering  <meyering@lucent.com>
20859
20860         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20861         [one-argument getmntent function]): Include stdio.h before mntent.h.
20862         SunOS 4.1.x needs it for the declaration of `FILE'.
20863         Patch by Volker Borchert.
20864
20865         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20866         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
20867         sys/fs_types.h, and make the link-test for getfsstat guard #include
20868         directives with appropriate #if HAVE_*_H tests so that we can
20869         detect getfsstat on Apple Darwin1.3.7 systems.
20870         Reported by Nelson Beebe.
20871         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
20872
20873 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20874
20875         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20876         #defines strtoimax.  Also treat the other strto* functions
20877         like strtoimax.
20878
20879         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
20880         Check for strtoul and strtoumax,
20881         as those declarations are made even in the signed case.
20882         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
20883         Likewise, for strtol and strtoimax.
20884
20885 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20886
20887         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20888         #defines strtoimax.  Also treat the other strto* functions
20889         like strtoimax.
20890
20891         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
20892         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
20893         (strtoimax, strtoumax): Do not declare if already defined as a macro.
20894
20895 2001-09-26  Jim Meyering  <meyering@lucent.com>
20896
20897         Most macros in unlocked-io.h had the wrong number of arguments.
20898         * lib/gen-uio: New script.
20899         (USE_UNLOCKED_IO): Define to 1 if not already defined.
20900         * lib/unlocked-io.hin: Remove file.
20901         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
20902         rather than trying to embed it here.
20903         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
20904         Reported by Padraig Brady.
20905
20906 2001-09-25  Volker Borchert  <bt@teknon.de>
20907
20908         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
20909         `result'.
20910
20911 2001-09-24  Jim Meyering  <meyering@lucent.com>
20912
20913         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
20914
20915 2001-09-23  Jim Meyering  <meyering@lucent.com>
20916
20917         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
20918         instead of the mere test for existence of mntent.h.  The latter
20919         would get a false-positive on AIX 3.4 systems.
20920         In the outer getmntent if-block, don't die if neither of the getmntent
20921         tests succeeds.  Instead, just fall through and continue with the
20922         remaining tests.
20923
20924 2001-09-23  Jim Meyering  <meyering@lucent.com>
20925
20926         * lib/mountlist.c: Remove useless parentheses in #if directives.
20927         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
20928         the deprecated MOUNTED symbol is no longer defined in mntent.h.
20929
20930 2001-09-22  Jim Meyering  <meyering@lucent.com>
20931
20932         * m4/gettext.m4: New file.  From gettext.
20933         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
20934         * m4/progtest.m4: Likewise
20935         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
20936         * m4/glibc21.m4: Likewise.
20937
20938         * m4/libintl.m4: Remove.  No longer used.
20939
20940 2001-09-22  Jim Meyering  <meyering@lucent.com>
20941
20942         * lib/localcharset.c: Update from latest gettext.
20943         * lib/config.charset: Likewise.
20944
20945 2001-09-20  Jim Meyering  <meyering@lucent.com>
20946
20947         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
20948         strtoimax.
20949         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
20950         strtoumax.
20951
20952 2001-09-20  Jim Meyering  <meyering@lucent.com>
20953
20954         * lib/xstrtol.c (strtoimax): Guard declaration with
20955         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
20956         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
20957         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
20958         (strtoumax): Likewise, for completeness (it wasn't necessary).
20959
20960 2001-09-17  Paul Eggert  <eggert@twinsun.com>
20961
20962         * lib/strtoimax.c (HAVE_LONG_LONG):
20963         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
20964         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
20965         to work around bug in IBM C compiler.
20966
20967 2001-09-17  Jim Meyering  <meyering@lucent.com>
20968
20969         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
20970         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
20971         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
20972         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
20973         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
20974         whenever the right hand side need not be expanded by the shell.
20975
20976 2001-09-16  Paul Eggert  <eggert@twinsun.com>
20977
20978         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
20979         library.  It's not correct, as some older glibcs are buggy.
20980         fnmatch wasn't fixed until glibc 2.2.
20981
20982         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
20983         special shell magic here.
20984
20985 2001-09-16  Jim Meyering  <meyering@lucent.com>
20986
20987         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
20988         * m4/jm-macros.m4: Require it.
20989
20990 2001-09-16  Jim Meyering  <meyering@lucent.com>
20991
20992         * lib/mkdir.c: New file.
20993
20994 2001-09-15  Jim Meyering  <meyering@lucent.com>
20995
20996         * m4/jm-macros.m4: Check for help2man.
20997
20998 2001-09-11  Jim Meyering  <meyering@lucent.com>
20999
21000         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
21001         The body, by Paul Eggert, was moved here from configure.in.
21002         * m4/jm-macros.m4: Require UTILS_HOST_OS.
21003
21004 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21005
21006         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
21007         (jm_PREREQ): Use it.
21008
21009 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21010
21011         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
21012         Use ssize_t, not int, to store result of readlink.
21013         Check for ssize_t overflow as well as size_t overflow,
21014         as POSIX says the result of readlink is implementation-defined
21015         when ssize_t overflows.
21016         Remove unnecessary cast to char*.
21017         Use free+malloc instead of realloc, as the storage doesn't need
21018         to be preserved and it's clearer and can be more efficient that way.
21019         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
21020         * lib/xreadlink.h (xreadlink): Update prototype.
21021
21022 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21023
21024         * lib/xgetcwd.c: Revert some of the previous change; intead,
21025         fix the HAVE_GETCWD_NULL code to behave more like the
21026         !HAVE_GETCWD_NULL code used to.
21027
21028         Include "xalloc.h".
21029         (xgetcwd): Do not return NULL when memory is exhausted; instead,
21030         invoke xalloc_die.
21031
21032 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21033
21034         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
21035         sys/param.h, as pathmax.h includes them.
21036
21037 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21038
21039         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
21040         (jm_PREREQ_XGETCWD): New macro.
21041
21042         * m4/getcwd.m4: New file.
21043
21044 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21045
21046         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
21047         like the HAVE_GETCWD_NULL code.
21048         Include pathmax.h if not HAVE_GETCWD.
21049         Do not include xalloc.h.
21050         (INITIAL_BUFFER_SIZE): New symbol.
21051         Do not use xmalloc / xrealloc, since the caller is responsible for
21052         handling errors.  Preserve errno around `free' during failure.
21053         Do not overrun buffer when using getwd.
21054
21055 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21056
21057         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
21058         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
21059         getcwd (NULL, 0).
21060
21061 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21062
21063         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
21064         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
21065         spotted by Jim Meyering.
21066
21067 2001-09-03  Jim Meyering  <meyering@lucent.com>
21068
21069         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
21070         failure.
21071
21072 2001-09-02  Jim Meyering  <meyering@lucent.com>
21073
21074         * lib/error.c: Update from GNU libc.
21075
21076 2001-09-01  Jim Meyering  <meyering@lucent.com>
21077
21078         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
21079         Used by df.
21080
21081 2001-09-01  Jim Meyering  <meyering@lucent.com>
21082
21083         * lib/xreadlink.c: New file.
21084         * lib/xreadlink.h: New file.
21085         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
21086         xreadlink.h.
21087
21088         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
21089         doesn't conflict with sparc Solaris 7's definition in
21090         /usr/include/sys/int_types.h.
21091
21092         * lib/exclude.c: Use `""', not `<>' to #include non-system header
21093         files.
21094         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
21095         and strncasecmp as r-values.  Unixware didn't have declarations.
21096
21097 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21098
21099         * lib/xstrtol.h: Add copyright notice.
21100         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
21101         LONGINT_INVALID_SUFFIX_CHAR.
21102
21103 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21104
21105         * lib/xstrtol.c (strtoimax): New decl.
21106
21107 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21108
21109         * lib/xgetcwd.c: Don't include pathmax.h.
21110         Include stdlib.h and unistd.h if available.
21111         Include xalloc.h.
21112         (xmalloc, xstrdup, free): Remove decls.
21113         (xgetcwd): Don't assume sizes fit in unsigned.
21114         Check for overflow when computing sizes.
21115         Simplify reallocation code.
21116
21117 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21118
21119         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
21120         a directory's st_size can have an arbitrary value, so the old
21121         usage could waste an arbitrary amount of memory.  All uses
21122         changed.
21123         * lib/savedir.h: Update prototype.
21124
21125 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21126
21127         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
21128
21129         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
21130         old strtoimax.c.
21131
21132         Also, make the following further changes to make this file's
21133         configuration more similar to that of strtol.c:
21134         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
21135         (strtoumax, uintmax_t, strtoull, strtol): Remove.
21136         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
21137         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
21138         changed to signed values.
21139
21140         And make the following changes as well:
21141         Fix copyright notice, as 1999 was missing.
21142         (verify): New macro.
21143         (strtoimax): Check sizes at compile-time, not run-time.
21144         Prefer strtol to strtoll if both work.
21145         (main): Remove; it was not that useful and was a pain to maintain.
21146
21147         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
21148
21149 2001-08-31  Jim Meyering  <meyering@lucent.com>
21150
21151         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
21152         Use an initial, malloc'd, buffer of length 128 rather than
21153         a statically allocated one of length 1024.
21154
21155 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21156
21157         Simplify code, partly by assuming autoconf 2.52 semantics.
21158
21159         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
21160
21161         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
21162         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
21163         All uses removed.
21164         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
21165         Move AC_REQUIRE to next-to-top level, to avoid confusion.
21166         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
21167         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
21168         jm_AC_HEADER_INTTYPES_H.
21169         * m4/jm-macros.m4 (jm_MACROS): Likewise.
21170
21171         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
21172
21173         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
21174         Quote first arg of AC_DEFUN.
21175         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
21176         since they are needed to parse the include file even if we need
21177         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
21178         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
21179         but with opposite signedness.
21180
21181 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21182
21183         Merge 'exclude' changes from tar 1.13.22.
21184         This fixes one or two unlikely storage allocation overflow bugs,
21185         but doesn't change user-visible behavior otherwise.
21186
21187 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21188
21189         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
21190         (jm_PREREQ_EXCLUDE): New macro.
21191
21192 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21193
21194         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21195         tm to be declared.
21196
21197 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21198
21199         * lib/hash.c: Remove '2001' from copyright notice.
21200
21201 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21202
21203         * lib/full-write.h: New file.
21204         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
21205         * lib/full-write.c: Correct credits, as cccp.c no longer
21206         exists and anyway it was so heavily changed from the old cccp
21207         code as to be unrecognizable.  Include full-write.h.
21208         (full_write) Return size_t, with short writes meaning failure.
21209         All callers changed.  This fixes a bug with large buffers
21210         on 64-bit hosts.
21211         * lib/utime.c: Include full-write.h.
21212
21213 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21214
21215         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
21216         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
21217         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
21218         Include if available.
21219         (<xalloc.h>): Include
21220         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
21221         (verify): New macro.  Use it to verify that EXCLUDE macros do not
21222         collide with FNM macros.
21223         (struct patopts): New struct.
21224         (struct exclude): Use it, as exclude patterns now come with options.
21225         (new_exclude): Support above changes.
21226         (new_exclude, add_exclude_file):
21227         Initial size must now be a power of two to simplify overflow checking.
21228         (free_exclude, fnmatch_no_wildcards): New function.
21229         (excluded_filename): No longer requires options arg, as the options
21230         are determined by add_exclude.  Now returns bool, not int.
21231         (excluded_filename, add_exclude):
21232         Add support for the fancy new exclusion options.
21233         (add_exclude, add_exclude_file): Now takes int options arg.
21234         Check for arithmetic overflow when computing sizes.
21235         (add_exclude_file): xrealloc might modify errno, so don't
21236         realloc until after errno might be used.
21237
21238         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
21239         New macros.
21240         (free_exclude): New decl.
21241         (add_exclude, add_exclude_file): Now takes int options arg.
21242         (excluded_filename): No longer requires options arg, as the options
21243         are determined by add_exclude.  Now returns bool, not int.
21244
21245 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21246
21247         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
21248
21249 2001-08-27  Jim Meyering  <meyering@lucent.com>
21250
21251         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
21252
21253         * lib/version-etc.c (N_): Remove definition.
21254         Revert most of last change.
21255         Instead, simply don't mark the `Copyright...' string for translation.
21256         Based on advice from Paul Eggert.
21257
21258         * lib/strtoxmax.c: Tweak comment.
21259
21260 2001-08-26  Jim Meyering  <meyering@lucent.com>
21261
21262         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
21263
21264         * m4/xstrtoimax.m4: New file.
21265         * m4/xstrtoumax.m4: Add comments explaining why we
21266         AC_REPLACE_FUNCS(strtol).
21267
21268 2001-08-26  Jim Meyering  <meyering@lucent.com>
21269
21270         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
21271         of copyright with `%s' so translators don't get an untranslated
21272         message in 2002.
21273         (COPYRIGHT_YEAR): Define.
21274         (version_etc): Use fprintf rather than fputs.
21275         Suggestion from Ulrich Drepper.
21276
21277         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
21278
21279         * lib/strtoll.c: New file, from GNU libc.
21280         * lib/xstrtoimax.c: New file.
21281
21282         * lib/xstrtol.h: Add xstrtoimax.
21283         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
21284         * lib/strtoimax.c: New file.  Likewise, but first define
21285         STRTOUXMAX_SIGNED.
21286
21287         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
21288         ...
21289         * lib/strtoxmax.c: ... then renamed to this.
21290
21291 2001-08-18  Paul Eggert  <eggert@twinsun.com>
21292
21293         * m4/inttypes.m4: Add AC_PREREQ(2.13).
21294         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
21295         (jm_AC_TYPE_INTMAX_T): New macro.
21296         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
21297
21298         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
21299
21300         * m4/longlong.m4: Renamed from ulonglong.m4.
21301         * m4/inttypes.m4: Renamed from inttypes_h.m4.
21302         * m4/uintmax_t.m4: Removed.
21303
21304 2001-08-13  Paul Eggert  <eggert@twinsun.com>
21305
21306         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
21307         Port to Solaris 8, where 'sed' requires a space after the 'r'
21308         command, and where sh dislikes "$/".  Clean up the spacing a bit.
21309         Redirect output to $tmp just once.
21310
21311 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
21312
21313         * lib/addext.c (<errno.h>): Include.
21314         (errno): Declare if not defined.
21315         (addext): Work correctly when pathconf returns -1 and leaves
21316         errno alone because there is no limit.  Also, work even if
21317         pathconf returns a value greater than SIZE_MAX.
21318
21319 2001-08-12  Jim Meyering  <meyering@lucent.com>
21320
21321         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
21322         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
21323         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
21324         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
21325         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
21326         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
21327         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
21328         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
21329         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
21330         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
21331         utime.m4, utimes.m4, xstrtoumax.m4:
21332         Quote the first argument in each use of AC_DEFUN.
21333
21334 2001-08-12  Jim Meyering  <meyering@lucent.com>
21335
21336         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
21337         Simply `return getcwd (NULL, 0);'.
21338         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
21339         Use 1300 as initial value for length, not PATH_MAX.
21340
21341         * lib/pathmax.h: Clean up cpp syntax.
21342
21343 2001-08-12  Jim Meyering  <meyering@lucent.com>
21344
21345         * lib/gettimeofday.c: New file.
21346         * lib/gtod.h: New file.
21347         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
21348
21349 2001-08-05  Jim Meyering  <meyering@lucent.com>
21350
21351         * m4/jm-macros.m4: Require autoconf-2.52.
21352
21353 2001-08-04  Jim Meyering  <meyering@lucent.com>
21354
21355         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
21356         stmt, to get in sync with glibc.
21357
21358 2001-08-03  Paul Eggert  <eggert@twinsun.com>
21359
21360         The following changes are from gettext 0.10.39 as maintained by
21361         Bruno Haible.
21362
21363         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
21364         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
21365         with inverted sense.  All uses changed.
21366
21367         * lib/mbswidth.c: Don't include <limits.h>.
21368         Include <stdlib.h> and <string.h> unconditionally.
21369         (iswcntrl, mbsinit, ISCNTRL): New macros.
21370         (mbsnwidth): Use K&R style function declarations.
21371         Don't bother checking for MB_LEN_MAX == 1, since the compiler
21372         can optimize it when MB_CUR_MAX == 1.
21373         The width of control characters is zero, not 1.
21374
21375 2001-08-03  Paul Eggert  <eggert@twinsun.com>
21376
21377         The following changes are from gettext 0.10.39 as maintained by
21378         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
21379
21380         * m4/codeset.m4: Upgrade to serial AM1.
21381         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
21382         all uses changed.  Quote first arg of AC_DEFUN.
21383         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
21384
21385         * m4/iconv.m4: Upgrade to serial AM2.
21386         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
21387         Add --with-libconv-prefix.
21388         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
21389         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
21390         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
21391         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
21392         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
21393
21394         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
21395         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
21396         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
21397         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
21398         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
21399         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
21400         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
21401         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
21402         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
21403
21404         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
21405         string.h any more.
21406
21407         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
21408         not the default value.
21409
21410         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
21411         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
21412         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
21413         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
21414         Also check for iswcntrl, used for wcwidth fallback.
21415         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
21416         to Autoconf 2.13.
21417
21418 2001-08-03  Jim Meyering  <meyering@lucent.com>
21419
21420         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
21421         as it was in the original.  Reported by Paul Eggert.
21422
21423 2001-07-16  Jim Meyering  <meyering@lucent.com>
21424
21425         * m4/gettimeofday.m4: New file.
21426         Prompted by a report from Bernhard Baehr.
21427
21428 2001-07-15  Jim Meyering  <meyering@lucent.com>
21429
21430         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
21431         stuff. Now it's in ../Makefile.cfg.
21432
21433 2001-07-15  Jim Meyering  <meyering@lucent.com>
21434
21435         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
21436         (BUILT_SOURCES): Add unlocked-io.h.
21437         (io_functions): Define.
21438         (unlocked-io.h): New rule.
21439         (DISTCLEANFILES): Add unlocked-io.h.
21440         (all-local): Depend on unlocked-io.h, to ensure it is created.
21441
21442         * lib/unlocked-io.hin: New file
21443
21444         * lib/regex.c: Update from glibc.
21445
21446 2001-07-05  Jim Meyering  <meyering@lucent.com>
21447
21448         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
21449         recommendation.
21450         (libfetish_a_SOURCES): Put all .h files here instead.
21451         Remove a thus-exposed (better checks in automake) duplicate and
21452         two unnecessary .h files.
21453
21454 2001-07-04  Jim Meyering  <meyering@lucent.com>
21455
21456         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
21457         that generates jm-glibc-io.m4 so that it doesn't trigger any make
21458         distcheck failure.
21459
21460 2001-07-02  Jim Meyering  <meyering@lucent.com>
21461
21462         The following changes were prompted by suggestions from Bruno Haible.
21463
21464         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
21465         is now generated.
21466         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
21467         definition of EXTRA_DIST.
21468         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
21469         ensure that the generated file is created/updated whenever the list
21470         of $(unlocked_functions) is changed.
21471         (jm-glibc-io.m4): New rule.
21472         (unlocked-io.h): New rule -- currently unused.
21473
21474 2001-06-24  Jim Meyering  <meyering@lucent.com>
21475
21476         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
21477         unmatched right bracket, rather than kludging it with an extra,
21478         falsely-matching quote in a comment.  Patch by Akim Demaille.
21479
21480 2001-06-11  Jim Meyering  <meyering@lucent.com>
21481
21482         * lib/regex.c: Update from GNU libc.
21483
21484 2001-05-27  Jim Meyering  <meyering@lucent.com>
21485
21486         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
21487         Check for ut_type in struct utmp.
21488
21489 2001-05-27  Jim Meyering  <meyering@lucent.com>
21490
21491         * lib/readutmp.h (UT_TYPE): Define.
21492
21493 2001-05-24  Jim Meyering  <meyering@lucent.com>
21494
21495         * lib/argmatch.c: Include "quote.h".
21496         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
21497         quote function.  Reported by Göran Uddeborg.
21498
21499 2001-05-22  Jim Meyering  <meyering@lucent.com>
21500
21501         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
21502         now that we use the package-supplied version unconditionally.
21503         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
21504
21505 2001-05-21  Jim Meyering  <meyering@lucent.com>
21506
21507         * m4/regex.m4: Change a couple backticks to single quotes to avoid
21508         shell syntax errors.
21509
21510 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
21511
21512         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
21513
21514 2001-05-20  Paul Eggert  <eggert@twinsun.com>
21515
21516         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
21517         Don't bother to check library strftime, since
21518         we'll be using our own my_strftime function anyway.
21519         Define my_strftime instead of strftime.
21520
21521 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
21522
21523         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
21524         which is not yet declared.
21525
21526 2001-05-15  Jim Meyering  <meyering@lucent.com>
21527
21528         * m4/regex.m4: Use proper quoting so brackets appear in the test
21529         program.
21530         Reported by, and with help from, Bruno Haible.
21531
21532 2001-05-13  Jim Meyering  <meyering@lucent.com>
21533
21534         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
21535         undefined.
21536
21537 2001-05-11  Paul Eggert  <eggert@twinsun.com>
21538
21539         dirname code cleanup.  base_name now behaves more compatibly
21540         with POSIX basename when given file names that have trailing
21541         slashes, and similarly for dir_name.  Add new primitives
21542         base_len and dir_len.  Put the directory-name-related decls
21543         into dirname.h.
21544
21545         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
21546         * lib/backupfile.c (base_name): Likewise.
21547         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
21548         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
21549         * lib/makepath.c (strip_trailing_slashes): Likewise.
21550         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
21551         ISSLASH): Likewise.
21552         * lib/rename.c (strip_trailing_slashes): Likewise.
21553         * lib/same.c (base_name): Likewise.
21554         * lib/stripslash.c (ISSLASH): Likewise.
21555
21556         * lib/addext.c: Include <dirname.h> after size_t is defined.
21557         * lib/backupfile.c: Likewise.
21558
21559         * lib/addext.c (addext): Use base_len to trim redundant
21560         trailing slashes instead of doing it ourselves.
21561         But do not trim the last slash if it is not redundant.
21562
21563         * lib/backupfile.c (find_backup_file_name,
21564         max_backup_version): Use base_len instead of rolling it ourselves.
21565         Handle the case of "" and (on DOS) "C:" correctly.
21566
21567         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
21568         needed. Include <string.h>, <dirname.h>.
21569         (base_name): Allow file names ending in slashes, other than names
21570         that are all slashes.  In this case, return the basename followed
21571         by the slashes.  This is more general, and can be used in places
21572         where the original base_name purposely had an assertion failure.
21573         (base_len): New function.
21574
21575         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
21576         Do not include <assert.h>; no longer needed.
21577         Include xalloc.h.
21578         (memrchr): Remove decl.
21579         (dir_name_r): Remove.
21580         (dir_len): Renamed from dirlen.  All callers changed.
21581         Rewrite in terms of base_name, for simplicity and consistency.
21582         (dir_name): Never return NULL.  All callers changed.
21583         Do not include <stdlib.h> in test program; no longer needed.
21584         return 0; is fine for test program.
21585
21586         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
21587         New macros.
21588         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
21589
21590         * lib/path-concat.c (path_concat): Use base_len to compute
21591         base length, not strlen; this means we cannot rely on memcpy
21592         to null-terminate.
21593
21594         * lib/same.c (STREQ): Remove.
21595         (same_name): Handle the case where the basename ends in trailing '/'.
21596
21597         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
21598         a slash was stripped.  Do not strip the last slash after a
21599         file system prefix.
21600
21601 2001-05-11  Paul Eggert  <eggert@twinsun.com>
21602
21603         * lib/Makefile.am (libfetish_a_SOURCES):
21604         Add strftime.c, since we now compile it on all hosts.
21605
21606         * lib/strftime.c (my_strftime):
21607         Define to nstrftime if emacs, but only if my_strftime is not defined.
21608         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
21609         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
21610         Add one more extra argument: a nanoseconds value.
21611         All uses changed.
21612         (ns): New macro.
21613         (my_strftime function): Add %N format.
21614         (emacs_strftimeu): Renamed from emacs_strftime,
21615         with extra ut argument.
21616
21617 2001-05-09  Paul Eggert  <eggert@twinsun.com>
21618
21619         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
21620
21621 2001-04-21  Jim Meyering  <meyering@lucent.com>
21622
21623         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
21624         doesn't interfere.
21625
21626 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
21627
21628         * m4/ftruncate.m4: Check for chsize.
21629         Link with ftruncate.o unconditionally if ftruncate is missing.
21630         This was required when cross-compiling to i586-mingw32msvc.
21631
21632 2001-04-08  Jim Meyering  <meyering@lucent.com>
21633
21634         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
21635         recomputed; that's necessary when the offset spans a DST transition.
21636         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
21637
21638 2001-04-02  Jim Meyering  <meyering@lucent.com>
21639
21640         * lib/regex.h, regex.c: Update from GNU libc.
21641
21642 2001-03-24  Jim Meyering  <meyering@lucent.com>
21643
21644         * m4/jm-macros.m4: Require autoconf-2.49d.
21645
21646 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
21647
21648         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
21649
21650 2001-03-19  Paul Eggert  <eggert@twinsun.com>
21651
21652         * lib/version-etc.c (version_etc_copyright): Update to 2001.
21653
21654 2001-03-17  Jim Meyering  <meyering@lucent.com>
21655
21656         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
21657         now that the version in autoconf is equivalent.
21658         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
21659
21660         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
21661         Suggestion from Akim Demaille.
21662
21663         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
21664         (jm_PREREQ_TEMPNAME): New function.
21665
21666 2001-03-16  Paul Eggert  <eggert@twinsun.com>
21667
21668         * lib/tempname.c (uint64_t): Define to uintmax_t if
21669         not defined, and if UINT64_MAX is not defined.
21670         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
21671         Reported by John David Anglin.
21672
21673 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
21674
21675         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
21676         resolve alias if codeset is empty.
21677         * lib/config.charset (BeOS): Use wildcard syntax.
21678
21679 2001-03-13  Jim Meyering  <meyering@lucent.com>
21680
21681         * lib/path-concat.c (path_concat)
21682         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
21683         concatenating e.g., `C:' and `foo'.
21684         From Bruno Haible.
21685
21686 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
21687
21688         * lib/localcharset.c (locale_charset): Don't use
21689         setlocale(LC_CTYPE,NULL). Don't return NULL.
21690         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
21691
21692 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
21693
21694         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
21695         support for DOS/DJGPP.
21696
21697 2001-03-01  Paul Eggert  <eggert@twinsun.com>
21698
21699         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
21700         lacks mkstemp.  Compile our own tempname.c if we compile our own
21701         mkstemp.c, as mkstemp relies on tempname.
21702
21703 2001-03-01  Jim Meyering  <meyering@lucent.com>
21704
21705         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
21706         AH_VERBATIM really does output its argument verbatim.
21707
21708 2001-02-28  Paul Eggert  <eggert@twinsun.com>
21709
21710         * lib/Makefile.am (libfetish_a_SOURCES):
21711         Add dup-safer.c, fopen-safer.c.
21712         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
21713
21714         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
21715         * lib/unistd-safer.h: New files.
21716
21717 2001-02-25  Paul Eggert  <eggert@twinsun.com>
21718
21719         The mkstemp replacement is taken from glibc 2.2.2, with some
21720         portability fixes for use outside glibc, as follows:
21721
21722         * lib/tempname.c (struct_stat64): New macro.
21723         (direxists, __gen_tempname): Use it.
21724         This avoids a portability problem with Solaris 8.
21725
21726         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
21727         (<stddef.h>, <stdint.h>, <string.h>):
21728         Include only if STDC_HEADERS || _LIBC.
21729         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
21730         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
21731         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
21732         (__set_errno): Define this macro if <errno.h> doesn't.
21733         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
21734         Define these macros if <stdio.h> doesn't.
21735         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
21736         Define these macros if <sys/stat.h>
21737         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
21738         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
21739         __xstat64): Define if not _LIBC.
21740         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
21741         (__gen_tempname): Invoke gettimeofday only if
21742         HAVE_GETTIMEOFDAY || _LIBC;
21743         otherwise, fall back on plain "time".
21744         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
21745
21746         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
21747
21748         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
21749
21750 2001-02-18  Paul Eggert  <eggert@twinsun.com>
21751
21752         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
21753
21754 2001-02-17  Paul Eggert  <eggert@twinsun.com>
21755
21756         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
21757         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
21758         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
21759         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21760
21761 2001-02-17  Paul Eggert  <eggert@twinsun.com>
21762
21763         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
21764         Remove workaround macros for hosts that have mbrtowc but not
21765         mbstate_t, as we now insist on proper declarations for both
21766         before using mbrtowc.
21767
21768 2001-02-17  Jim Meyering  <meyering@lucent.com>
21769
21770         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
21771         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
21772         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
21773         UnixWare 7.1.1.
21774
21775         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
21776         rather than AC_CACHE_VAL.
21777
21778 2001-02-17  Jim Meyering  <meyering@lucent.com>
21779
21780         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
21781         around included file name.
21782
21783         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
21784
21785         * lib/strftime.c: Update from GNU libc (the only changes were to
21786         comments).
21787
21788 2001-02-17  Jim Meyering  <meyering@lucent.com>
21789
21790         * lib/regex.c: Update from libc.
21791
21792 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
21793
21794         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
21795         clash.
21796
21797 2001-02-16  Paul Eggert  <eggert@twinsun.com>
21798
21799         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
21800         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
21801         Reported by Mark Hounschell via Paul Eggert.
21802
21803 2001-02-07  Jim Meyering  <meyering@lucent.com>
21804
21805         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
21806
21807 2001-02-05  Jim Meyering  <meyering@lucent.com>
21808
21809         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
21810         it includes the patch required for `large file' support with at least
21811         HP-UX's 10.20 /bin/cc.
21812
21813 2001-02-03  Jim Meyering  <meyering@lucent.com>
21814
21815         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
21816         AS_IF, now that it works once again (mysteriously).
21817         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21818
21819 2001-01-30  Jim Meyering  <meyering@lucent.com>
21820
21821         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
21822         * m4/chown.m4: Rename conftestchown to conftest.chown.
21823         * m4/rename.m4: s/conftestdir/conftest.d1/ and
21824         s/conftestdir2/conftest.d2/.
21825         * m4/utimes.m4: s/conftestdata/conftest.data/
21826         Inspired by Pavel Roskin's change in autoconf.
21827
21828 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
21829
21830         * lib/config.charset: Update for FreeBSD 4.2.
21831
21832 2001-01-27  Jim Meyering  <meyering@lucent.com>
21833
21834         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
21835         a use of AS_IF.
21836         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21837
21838 2001-01-26  Jim Meyering  <meyering@lucent.com>
21839
21840         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
21841         quotearg.c includes it.
21842
21843 2001-01-26  Jim Meyering  <meyering@lucent.com>
21844
21845         * lib/quotearg.c: Include stddef.h.
21846         * lib/quote.c: Include stddef.h.
21847         Reported by Axel Kittenberger.
21848
21849         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
21850         line in double quotes so that it evokes a better diagnostic.
21851         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
21852         Reported by Axel Kittenberger.
21853
21854 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
21855
21856         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
21857         as if it was a `charset'.
21858
21859 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21860
21861         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
21862         has const.
21863
21864 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21865
21866         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
21867         to avoid a warning.  Add back 'const' to inptr.
21868
21869 2001-01-20  Jim Meyering  <meyering@lucent.com>
21870
21871         Be sure that headers are checked before used in code compiled
21872         for the type checks.
21873         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
21874         In place of that, invoke jm_CHECK_ALL_TYPES.
21875         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
21876         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
21877         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
21878         The check for ssize_t was mistakenly run before the test for unistd.h.
21879
21880         The configure-time check for stdbool.h was missing.
21881         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
21882         (jm_PREREQ_HASH): New function.
21883
21884 2001-01-17  Jim Meyering  <meyering@lucent.com>
21885
21886         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
21887         for autoconf-2.49c.
21888         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
21889
21890 2001-01-16  Jim Meyering  <meyering@lucent.com>
21891
21892         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
21893         From Bruno Haible.
21894
21895 2001-01-14  Jim Meyering  <meyering@lucent.com>
21896
21897         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
21898         foo and bar.  Create conftestdir/ in the script, not in the C code.
21899         Remove directories in the script, not in the C code.
21900         Remove conftestdir{,2} before trying to create the directory.
21901         Make the entire configure script fail if the mkdir fails.
21902
21903 2001-01-14  Jim Meyering  <meyering@lucent.com>
21904
21905         * lib/rename.c: New file.  From Volker Borchert.
21906         Include stdlib.h, string.h or strings.h, and xalloc.h.
21907         Use strip_trailing_slashes rather than open-coding it.
21908
21909 2001-01-03  Paul Eggert  <eggert@twinsun.com>
21910
21911         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
21912
21913 2001-01-03  Jim Meyering  <meyering@lucent.com>
21914
21915         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
21916         of local `inptr' to avoid warning with some system declarations of
21917         iconv.
21918
21919 2001-01-02  Volker Borchert  <bt@teknon.de>
21920
21921         * m4/rename.m4: New file.
21922         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
21923
21924 2001-01-01  Jim Meyering  <meyering@lucent.com>
21925
21926         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
21927         even on systems with utmpx.h.  It's necessary for the declaration of
21928         utmp's ut_user member.  Reported by Andreas Jaeger.
21929
21930         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
21931         available. They are required for the declarations of getgrgid and
21932         getpwuid resp.
21933         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
21934         Reported by Andreas Jaeger.
21935
21936 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
21937
21938         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
21939         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
21940         so `make install' also works in VPATH builds.
21941
21942 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
21943
21944         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
21945         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
21946         can be used in subdirectories.
21947
21948 2000-12-29  Paul Eggert  <eggert@twinsun.com>
21949
21950         * lib/modechange.c: Do not assume that mode_t uses the
21951         traditional octal encoding.  E.g. "chmod 1 FOO" should set
21952         the other-execute bit of FOO even if S_IXOTH != 1.
21953
21954         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
21955         WOTH, XOTH, ALLM): New macros.
21956         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
21957          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
21958         Use them.
21959         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
21960         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
21961         (mode_compile):
21962         No need to use uintmax_t; unsigned long is long enough.
21963         Don't bother to get suffix since we don't use it.
21964
21965 2000-12-26  Jim Meyering  <meyering@lucent.com>
21966
21967         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
21968         better with autoheader.
21969
21970 2000-12-24  Jim Meyering  <meyering@lucent.com>
21971
21972         * lib/hash.c (is_prime): Return explicit boolean values.
21973         (hash_get_first): Return NULL to appease Irix5.6's 89.
21974         Reported by Nelson Beebe.
21975
21976 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
21977
21978         * lib/localcharset.c (locale_charset): Add support for Win32.
21979
21980 2000-12-18  Paul Eggert  <eggert@twinsun.com>
21981
21982         * lib/physmem.h, lib/physmem.c: New files.
21983
21984         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
21985         (noinst_HEADERS): Add physmem.h.
21986
21987         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
21988         't' for compatibility with Solaris 8 sort.
21989
21990 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
21991
21992         * lib/config.charset: Add support for BeOS.
21993
21994 2000-12-17  Jim Meyering  <meyering@lucent.com>
21995
21996         * m4/dos.m4 (jm_AC_DOS): New file and macro.
21997         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
21998
21999 2000-12-16  Jim Meyering  <meyering@lucent.com>
22000
22001         This bug had a serious impact on chown: `chown N:M FILE' (for integer
22002         N and M) would have treated it like `chown N:N FILE'.
22003
22004         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
22005
22006 2000-12-16  Jim Meyering  <meyering@lucent.com>
22007
22008         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
22009         SHELLS_FILE to a file name that's useful on djgpp systems.
22010         Include stdlib.h.
22011         (ADDITIONAL_DEFAULT_SHELLS): Define.
22012         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
22013         Based mostly on a patch from Prashant TR.
22014
22015 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
22016
22017         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
22018         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
22019         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
22020
22021 2000-12-08  Andreas Schwab  <schwab@suse.de>
22022
22023         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
22024         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
22025
22026 2000-12-07  Jim Meyering  <meyering@lucent.com>
22027
22028         * lib/stripslash.c (ISSLASH): Define.
22029         (strip_trailing_slashes): Use ISSLASH rather than comparing against
22030         `/'.
22031         From Prashant TR.
22032
22033         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
22034         (dir_name_r): Declare this function as static.
22035         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
22036         manifest itself on a name containing a mix of slashes and
22037         backslashes.
22038         Make this function work with names starting with a DOS-style
22039         drive letter and colon prefix.
22040         (dir_name): Append `.' if necessary.
22041         Based mostly on patches from Prashant TR and Eli Zaretskii.
22042
22043         * lib/dirname.h (dir_name_r): Remove prototype.
22044
22045 2000-12-06  Paul Eggert  <eggert@twinsun.com>
22046
22047         * m4/off_t-format.m4: Remove this file.
22048         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
22049
22050 2000-12-06  Jim Meyering  <meyering@lucent.com>
22051
22052         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
22053         replacement strtoull, we may well need the replacement strtoul, too.
22054         Check for declarations of strtoul and strtoull.
22055         Check for strtol.  Mainly as a cue to cause automake to include
22056         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
22057         Check for limits.h -- strtol.c needs it.
22058
22059 2000-12-05  Jim Meyering  <meyering@lucent.com>
22060
22061         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
22062
22063 2000-12-04  Jim Meyering  <meyering@lucent.com>
22064
22065         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
22066         Also include memory.h, stdlib.h, unistd.h if appropriate.
22067         Reported by Andreas Jaeger (conflicting declaration of malloc).
22068
22069 2000-12-02  Jim Meyering  <meyering@lucent.com>
22070
22071         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
22072         * m4/jm-macros.m4 (jm_MACROS): require it.
22073
22074 2000-12-02  Jim Meyering  <meyering@lucent.com>
22075
22076         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
22077
22078 2000-12-01  Paul Eggert  <eggert@twinsun.com>
22079
22080         * lib/memrchr.c: Include <config.h> before any system include file.
22081
22082 2000-11-30  Jim Meyering  <meyering@lucent.com>
22083
22084         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
22085
22086 2000-11-30  Jim Meyering  <meyering@lucent.com>
22087
22088         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
22089
22090 2000-11-29  Paul Eggert  <eggert@twinsun.com>
22091
22092         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
22093
22094 2000-11-26  Jim Meyering  <meyering@lucent.com>
22095
22096         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
22097
22098 2000-11-22  Paul Eggert  <eggert@twinsun.com>
22099
22100         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
22101         size of (size_t) -1; it's not portable.
22102
22103 2000-11-17  Jim Meyering  <meyering@lucent.com>
22104
22105         * lib/strstr.c: Update from GNU libc.
22106
22107 2000-11-17  Akim Demaille  <akim@epita.fr>
22108
22109         * lib/obstack.h: Formatting changes.
22110         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
22111         prevent type checking.
22112         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22113         cast the value to (void *): assigning a `foo *' to a `void *'
22114         variable is valid.
22115         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22116
22117 2000-11-16  Jim Meyering  <meyering@lucent.com>
22118
22119         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
22120
22121 2000-11-11  Jim Meyering  <meyering@lucent.com>
22122
22123         * lib/error.c: Add a couple #includes, merging from GNU libc version.
22124
22125 2000-11-10  Jim Meyering  <meyering@lucent.com>
22126
22127         * lib/obstack.h: Update from GNU libc.
22128         * lib/obstack.c: Likewise.
22129
22130 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
22131
22132         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
22133
22134 2000-11-06  Paul Eggert  <eggert@twinsun.com>
22135
22136         * lib/getusershell.c (setusershell): Use rewind rather than
22137         fseek/fseeko, to avoid configuration hassles with fseeko.
22138         Don't bother opening SHELLS_FILE if shellstream is NULL;
22139         it's not necessary.
22140
22141 2000-11-05  Jim Meyering  <meyering@lucent.com>
22142
22143         * lib/makepath.h (make_dir): Declare.
22144         * lib/makepath.c (make_dir): Remove `static' attribute.
22145         Tweak a comment.
22146
22147 2000-11-04  Jim Meyering  <meyering@lucent.com>
22148
22149         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
22150
22151 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
22152
22153         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
22154         last one in a bucket, advance to the next bucket.
22155
22156 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
22157
22158         * lib/fnmatch.c: Do not comment out all the code if we are using
22159         the GNU C library, because in some cases we are replacing buggy
22160         code in the GNU C library itself.
22161
22162 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
22163
22164         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
22165         (regex_compile): Catch bogus \(\1\).
22166
22167 2000-10-30  Paul Eggert  <eggert@twinsun.com>
22168
22169         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
22170         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
22171         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
22172
22173 2000-10-30  Paul Eggert  <eggert@twinsun.com>
22174
22175         * lib/error.h, getline.h, modechange.h:
22176         Remove "2000" from Copyright line, as the file hasn't been
22177         changed this year other than in the copyright notice.
22178
22179         * lib/xalloc.h: Add "2000" to Copyright line, as this file
22180         was changed this year.
22181
22182 2000-10-29  Jim Meyering  <meyering@lucent.com>
22183
22184         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
22185         renaming.
22186         * m4/ls-mntd-fs.m4: Likewise
22187
22188 2000-10-29  Jim Meyering  <meyering@lucent.com>
22189
22190         * lib/xstat.in: Fix grammar in comment.
22191
22192 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
22193
22194         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
22195         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
22196         doesn't define __restrict_arr.
22197
22198 2000-10-28  Jim Meyering  <meyering@lucent.com>
22199
22200         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
22201         (jm_PREREQ_MEMCHR): New function.
22202
22203 2000-10-28  Jim Meyering  <meyering@lucent.com>
22204
22205         * lib/memchr.c: Update from libc.
22206         Adjust for portability:
22207         [HAVE_STDLIB_H]: Include stdlib.h.
22208         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
22209         Undef __memchr, too.
22210         [!weak_alias]: Define __memchr to memchr.
22211
22212         * lib/regex.c: Update from libc.
22213         * lib/regex.h: Likewise.
22214         * lib/getopt1.c: Likewise.
22215         * lib/memcmp.c: Likewise.
22216
22217         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
22218         Avoid using fseek, when possible -- it's broken by design.
22219         Patch by Ulrich Drepper.
22220
22221 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
22222
22223         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
22224         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
22225         Giving in to popular pressure to shut up the compiler with casts.
22226
22227 2000-10-26  Jim Meyering  <meyering@lucent.com>
22228
22229         * lib/strftime.c: Update from libc.
22230
22231 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
22232
22233         * regex.c: More `unsigned char' -> `re_char' changes.
22234         Also change several `int' into `re_wchar_t'.
22235         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
22236         (PUSH_FAILURE_POINTER): Don't cast any more.
22237         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
22238         We want GCC to complain, since this piece of code makes
22239         re_match non-reentrant, which *should* be fixed.
22240         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
22241         (EXTEND_BUFFER): Use RETALLOC.
22242         (SET_LIST_BIT): Don't cast.
22243         (re_wchar_t): New type.
22244         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
22245         that those two functions will always properly return.
22246         (IMMEDIATE_QUIT_CHECK): Cast to void.
22247         (analyse_first): Use recursion rather than an explicit stack.
22248         (re_compile_fastmap): Can't fail anymore.
22249         (re_search_2): Don't check re_compile_fastmap for failure.
22250         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
22251         Now also sets the new value (passed in a new argument).
22252         (re_match_2_internal): Use it.
22253         Also, use a new var `reg' of type size_t when looping through regs
22254         rather than reuse the inappropriate `mcnt'.
22255
22256 2000-10-25  Jim Meyering  <meyering@lucent.com>
22257
22258         * lib/obstack.c: Update from libc.
22259
22260 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
22261
22262         * regex.c (regex_compile): Change the way of handling a range from
22263         a char less than 256 to a char not less than 256.
22264
22265 2000-10-24  Andrew Innes  <andrewi@gnu.org>
22266
22267         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
22268         NT-Emacs only.
22269         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
22270         so that re_search functions only quit when callers expect them to.
22271
22272 2000-10-23  Jim Meyering  <meyering@lucent.com>
22273
22274         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
22275         wrong.  That set_locale call must not have any side effects.
22276         From Paul Eggert.
22277
22278 2000-10-22  Jim Meyering  <meyering@lucent.com>
22279
22280         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
22281         [CYCLIC]: Remove now-unused definition.
22282
22283         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
22284         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
22285         Suggestion from Ulrich Drepper.
22286
22287 2000-10-21  Jim Meyering  <meyering@lucent.com>
22288
22289         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
22290         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
22291         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
22292
22293 2000-10-21  Jim Meyering  <meyering@lucent.com>
22294
22295         * lib/dirname.c (memrchr): Declare if necessary.
22296         (dir_name): Remove the restriction that there be no
22297         trailing slashes.  Now, this code skips past them, effectively
22298         ignoring them.
22299         [TEST_DIRNAME] (main): New unit tests.
22300
22301         * lib/memrchr.c: New file from GNU libc.
22302         Undef __memrchr, too.
22303         [!weak_alias]: Define __memrchr to memrchr.
22304         Guard weak_alias use with `#ifdef weak_alias'.
22305
22306 2000-10-21  Jim Meyering  <meyering@lucent.com>
22307
22308         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
22309         (dir_name): Use dir_name_r.
22310         * lib/dirname.h (dir_name_r): Declare it.
22311
22312 2000-10-17  Jim Meyering  <meyering@lucent.com>
22313
22314         * lib/quote.h (PARAMS): Define and use.
22315         Reported by Akim Demaille.
22316
22317         * lib/getopt.c: Update from libc.
22318
22319 2000-10-16  Jim Meyering  <meyering@lucent.com>
22320
22321         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
22322         setlocale.
22323         From Jan Fedak.
22324
22325 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
22326
22327         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
22328
22329 2000-09-25  Jim Meyering  <meyering@lucent.com>
22330
22331         * lib/md5.h (rol): Define (from GnuPG).
22332
22333         * lib/sha.c: Give credit (GnuPG) where due.
22334         (M): Use rol rather than open-coding it.
22335         Add a FIXME comment.
22336
22337 2000-09-21  Jim Meyering  <meyering@lucent.com>
22338
22339         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
22340         Reported by Michael Stone.
22341
22342 2000-09-20  Jim Meyering  <meyering@lucent.com>
22343
22344         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
22345         (noinst_HEADERS): Add sha.h.
22346         Based on code from Scott G. Miller and from GnuPG.
22347
22348 2000-09-18  Jim Meyering  <meyering@lucent.com>
22349
22350         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
22351         LIBS. Otherwise, everyone ends up linking with -lelf for some
22352         configurations.
22353         Reported by Mike Stone.
22354
22355 2000-09-15  Jim Meyering  <meyering@lucent.com>
22356
22357         * lib/regex.c: Update from libc.
22358
22359 2000-09-10  Jim Meyering  <meyering@lucent.com>
22360
22361         * lib/getopt.c (_getopt_internal): Update from glibc.
22362
22363 2000-09-09  Jim Meyering  <meyering@lucent.com>
22364
22365         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
22366         think it should be used as a general replacement for isascii.
22367         * lib/fnmatch.c: Likewise.
22368         * lib/mbswidth.c: Likewise
22369         * lib/regex.c: Likewise.
22370
22371         Don't use atoi.
22372         * lib/userspec.c: Include sys/param.h and limits.h.
22373         Include xstrtol.h.
22374         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22375         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
22376         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
22377         UID, GID.  Check range.
22378
22379 2000-09-06  Jim Meyering  <meyering@lucent.com>
22380
22381         * lib/getopt.c (_getopt_internal): Update from glibc.
22382
22383 2000-08-30  Jim Meyering  <meyering@lucent.com>
22384
22385         * lib/strftime.c: Merge in changes from GNU libc.
22386
22387 2000-08-26  Jim Meyering  <meyering@lucent.com>
22388
22389         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
22390         * m4/fpending.m4: New file.
22391
22392 2000-08-26  Jim Meyering  <meyering@lucent.com>
22393
22394         * lib/closeout.c: Include "__fpending.h".
22395         (close_stdout_status): Return right away if there's nothing to flush.
22396
22397         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
22398         * lib/__fpending.c: New file.
22399         * lib/__fpending.h: New file.
22400
22401 2000-08-20  Jim Meyering  <meyering@lucent.com>
22402
22403         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
22404         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
22405         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
22406
22407 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
22408
22409         Improve fileutils installation on systems where running
22410         programs (like install) can't be unlinked.
22411         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
22412         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
22413
22414 2000-08-07  Paul Eggert  <eggert@twinsun.com>
22415
22416         Standardize on "memory exhausted" instead of "Memory exhausted"
22417         or "virtual memory exhausted".
22418         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
22419         "virtual memory exhausted".
22420         * lib/same.c (same_name): Invoke xalloc_die instead of printing
22421         our own message.
22422         * lib/userspec.c (parse_user_spec): Likewise.
22423         * lib/bumpalloc.h: comment fix
22424         * lib/same.c, userspec.c: Include xalloc.h.
22425
22426         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
22427         not char *const and pointing to a constant array.
22428         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
22429         (xrealloc): Comment fix.
22430
22431         * lib/userspec.c (parse_user_spec):
22432         Don't translate a message until just before returning,
22433         to avoid unnecessary translation.
22434
22435 2000-08-07  Jim Meyering  <meyering@lucent.com>
22436
22437         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
22438         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
22439         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
22440         getgroups.c, gethostname.c, getopt.h, group-member.c,
22441         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
22442         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
22443         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
22444         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
22445         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
22446         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
22447         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
22448         yesno.c: Back out Copyright date changes for each file with no change
22449         this year.  This eases coordination with other programs using the same
22450         source code modules.  From Paul Eggert.
22451
22452 2000-08-06  Paul Eggert  <eggert@twinsun.com>
22453
22454         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
22455         not char, for compatibility with glibc 2.1.3 strftime.c.
22456
22457 2000-08-03  Greg McGary  <greg@mcgary.org>
22458
22459         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
22460         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
22461         (EXTEND_BUFFER): Use them.
22462
22463 2000-08-01  Jim Meyering  <meyering@lucent.com>
22464
22465         * lib/dirname.c (ISSLASH): Define.
22466         (BACKSLASH_IS_PATH_SEPARATOR): Define.
22467         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
22468         both `\' and `/' may be use as path separators.
22469         Based on a patch from Prashant TR.
22470
22471 2000-07-31  Paul Eggert  <eggert@twinsun.com>
22472
22473         * lib/quotearg.c (quotearg_n_options): Don't make the initial
22474         slot vector a constant, since it might get modified.
22475
22476 2000-07-31  Jim Meyering  <meyering@lucent.com>
22477
22478         * lib/xmalloc.c: Use `virtual memory exhausted', not
22479         `Memory exhausted'.
22480         * lib/obstack.c (print_and_abort): Likewise.
22481
22482 2000-07-30  Paul Eggert  <eggert@twinsun.com>
22483
22484         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
22485         buffer, so that the caller can always quote one small
22486         component of a "memory exhausted" message in slot 0.
22487         From a suggestion by Jim Meyering.
22488
22489 2000-07-30  Jim Meyering  <meyering@lucent.com>
22490
22491         * lib/makepath.c (make_path): Quote the other instance, too.
22492
22493         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
22494         (STATIC_BUF_SIZE): Define.
22495         (quotearg_n_options): Use only statically allocated storage when
22496         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
22497         than STATIC_BUF_SIZE.
22498
22499 2000-07-29  Jim Meyering  <meyering@lucent.com>
22500
22501         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
22502         * lib/dirname.c (dir_name): Likewise.
22503
22504         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
22505         `/'.
22506
22507         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
22508         (dir_name): Assert that there are no trailing slashes.
22509
22510 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
22511
22512         * lib/mbswidth.h (mbswidth): Add a flags argument.
22513         (mbswidth): New declaration.
22514         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
22515         * lib/mbswidth.c (mbswidth): Add a flags argument.
22516         (mbsnwidth): New function.
22517
22518 2000-07-24  Jim Meyering  <meyering@lucent.com>
22519
22520         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
22521
22522 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22523
22524         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
22525
22526 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22527
22528         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
22529         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
22530         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
22531         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
22532         invoke multibyte primitives.
22533
22534 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22535
22536         * lib/quotearg.c:
22537         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
22538         so that mbstate_t is always defined.
22539
22540         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
22541         be 1 in at least one GCC installation, and this configuration
22542         error is likely to be common.  Ignoring MB_LEN_MAX hurts
22543         performance on hosts that have mbrtowc but have only unibyte
22544         locales, but I assume these hosts are rare.
22545
22546 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22547
22548         * lib/mbswidth.c (_XOPEN_SOURCE):
22549         Don't define; this causes problems on Solaris 7.
22550         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
22551
22552 2000-07-23  Jim Meyering  <meyering@lucent.com>
22553
22554         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
22555         too: getgrgid, getpwuid, getuid.
22556
22557 2000-07-23  Jim Meyering  <meyering@lucent.com>
22558
22559         * lib/basename.c (base_name): Add an assertion.
22560
22561 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
22562
22563         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
22564         shadow its mbsinit function.
22565
22566 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
22567
22568         * lib/mbswidth.h: New file.
22569         * lib/mbswidth.c: New file.
22570         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
22571         (noinst_HEADERS): Add mbswidth.h.
22572
22573 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
22574
22575         * lib/config.charset: Add support for FreeBSD. Improve support for
22576         HP-UX and IRIX 6.
22577
22578 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
22579
22580         * m4/mbswidth.m4: New file.
22581         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
22582
22583 2000-07-15  Jim Meyering  <meyering@lucent.com>
22584
22585         * lib/makepath.c: Include quote.h.
22586         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
22587         corresponding argument in a `quote (...)' call.
22588         Give better diagnostics.
22589
22590         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
22591         (noinst_HEADERS): Add quote.h.
22592
22593         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
22594         from tar's src/misc.c.
22595         * lib/quote.h: New file.  Prototypes for same.
22596
22597 2000-07-14  Paul Eggert  <eggert@twinsun.com>
22598
22599         From a suggestion by Bruno Haible.
22600         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
22601         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
22602         to decide whether to define the BeOS workaround macro;
22603         this adjusts to the change to AC_MBSTATE_T.
22604
22605 2000-07-14  Jim Meyering  <meyering@lucent.com>
22606
22607         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
22608         jm_AC_TYPE_UINTMAX_T.
22609
22610 2000-07-13  Paul Eggert  <eggert@twinsun.com>
22611
22612         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
22613
22614         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
22615         quotearg_buffer_restyled): Add support for
22616         clocale_quoting_style.  Undo previous change to
22617         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
22618         and "{RIGHT QUOTATION MARK}" msgids.
22619
22620 2000-07-10  Paul Eggert  <eggert@twinsun.com>
22621
22622         From a suggestion by Bruno Haible.
22623         * m4/mbstate_t.m4 (AC_MBSTATE_T):
22624         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
22625         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
22626         and mbstate_t, to a single-part test that simply defines mbstate_t.
22627         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
22628         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
22629
22630 2000-07-10  Jim Meyering  <meyering@lucent.com>
22631
22632         * m4/strerror_r.m4: Mirror the correction made in autoconf.
22633
22634         * m4/gnu-source.m4: Output to confdefs.h directly.
22635         Suggestion from Akim Demaille.
22636
22637 2000-07-09  Paul Eggert  <eggert@twinsun.com>
22638
22639         The old behavior of quoting `like this' doesn't look good with
22640         newer, ISO-style fonts.  See:
22641         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
22642
22643         Instead, quote "like this" by default.  Let the translator
22644         tailor the locale-specific quoting behavior by providing
22645         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
22646
22647         * lib/quotearg.c (N_): New macro.
22648         (gettext_default): New function.
22649         (quotearg_buffer_restyled): Use
22650         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
22651         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
22652
22653 2000-07-09  Jim Meyering  <meyering@lucent.com>
22654
22655         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
22656         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
22657
22658         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
22659         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
22660
22661 2000-07-09  Jim Meyering  <meyering@lucent.com>
22662
22663         * lib/Most files: Update copyright dates to include 2000.
22664
22665 2000-07-08  Jim Meyering  <meyering@lucent.com>
22666
22667         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
22668         if not defined.
22669         (xgethostname): Remove now-unnecessary #ifdef.
22670         Move declaration of `err' into loop where it's used.
22671
22672 2000-07-05  Paul Eggert  <eggert@twinsun.com>
22673         and Bruno Haible  <haible@clisp.cons.org>
22674
22675         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
22676         only if the test for an object-type mbstate_t fails.  This
22677         prevents us from mistakenly reporting that mbstate_t is a
22678         system object type after we "#define mbstate_t int" to work
22679         around its lack.
22680
22681 2000-07-05  Paul Eggert  <eggert@twinsun.com>
22682         and Bruno Haible  <haible@clisp.cons.org>
22683
22684         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
22685
22686 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22687
22688         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
22689         to strerror_r.
22690         Include <ctype.h> for use of isalpha.
22691
22692 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22693
22694         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
22695         by allocating a larger buffer. Test the gethostname return value for
22696         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
22697         returns an error and ENAMETOOLONG isn't defined.
22698
22699 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22700
22701         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
22702         dimension.
22703
22704 2000-07-04  Jim Meyering  <meyering@lucent.com>
22705
22706         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
22707         of the deprecated AC_CHECKING.
22708
22709 2000-07-04  Jim Meyering  <meyering@lucent.com>
22710
22711         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
22712         Reported by Bruno Haible.
22713
22714 2000-07-04  Jim Meyering  <meyering@lucent.com>
22715
22716         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
22717         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
22718         lacks mbrtowc.
22719
22720 2000-07-03  Paul Eggert  <eggert@twinsun.com>
22721
22722         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
22723         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
22724
22725 2000-07-03  Paul Eggert  <eggert@twinsun.com>
22726         and Bruno Haible  <haible@clisp.cons.org>
22727
22728         * lib/quotearg.c (mbrtowc):
22729         Assign to *pwc, and return 1 only if result is nonzero.
22730         (iswprint): Use ISPRINT when substituting our own mbrtowc.
22731
22732 2000-07-03  Jim Meyering  <meyering@lucent.com>
22733
22734         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
22735
22736 2000-07-03  Jim Meyering  <meyering@lucent.com>
22737
22738         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
22739         This is necessary to get a definition of e.g., UTMP_FILE on
22740         HP-UX 10.20.
22741         From Bob Proulx.
22742
22743 2000-07-02  Jim Meyering  <meyering@lucent.com>
22744
22745         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
22746
22747         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
22748         AC_LIBOBJ(function_name).
22749         * m4/chown.m4: Likewise.
22750         * m4/fnmatch.m4: Likewise.
22751         * m4/ftruncate.m4: Likewise.
22752         * m4/getgroups.m4: Likewise.
22753         * m4/getline.m4: Likewise.
22754         * m4/group-member.m4: Likewise.
22755         * m4/jm-macros.m4: Likewise.
22756         * m4/lstat.m4: Likewise.
22757         * m4/malloc.m4: Likewise.
22758         * m4/memcmp.m4: Likewise.
22759         * m4/nanosleep.m4: Likewise.
22760         * m4/putenv.m4: Likewise.
22761         * m4/realloc.m4: Likewise.
22762         * m4/regex.m4: Likewise.
22763         * m4/stat.m4: Likewise.
22764         * m4/strftime.m4: Likewise.
22765
22766 2000-07-02  Jim Meyering  <meyering@lucent.com>
22767
22768         * lib/quotearg.c (mbstate_t): Don't define here.
22769
22770 2000-07-02  Jim Meyering  <meyering@lucent.com>
22771
22772         * lib/nanosleep.c (SIGCONT): Define if not already defined.
22773
22774 2000-07-01  Jim Meyering  <meyering@lucent.com>
22775
22776         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
22777
22778 2000-07-01  Jim Meyering  <meyering@lucent.com>
22779
22780         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
22781         problem.
22782
22783 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22784
22785         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
22786         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
22787
22788 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22789
22790         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
22791         per change in ../m4/ls-mntd-fs.m4.
22792         (read_filesystem_list): Ignore symbolic links.
22793
22794 2000-06-29  Jim Meyering  <meyering@lucent.com>
22795
22796         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
22797         for declaration of strcmp.
22798
22799         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
22800
22801         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
22802         Avoid warning by casting result to `char *' to remove `const'.
22803
22804 2000-06-28  Jim Meyering  <meyering@lucent.com>
22805
22806         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
22807         included by quotearg.c, for which we perform this test.  From
22808         Bruno Haible.
22809
22810 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22811
22812         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
22813         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
22814         <utmpx.h> exists, put readutmp.o into LIBOBJS.
22815
22816 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22817
22818         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
22819
22820 2000-06-26  Paul Eggert  <eggert@twinsun.com>
22821
22822         savedir now sets errno on failure and invokes xmalloc to get memory.
22823         Fix a couple of other minor bugs while we're at it.
22824
22825         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
22826         (NAMLEN): Remove macro.
22827         (malloc, realloc): Remove decls.
22828         (stpcpy): Likewise.
22829         ("xalloc.h"): Include.
22830         (NAME_SIZE_DEFAULT): New macro.
22831         (savedir): Use xmalloc / xrealloc to allocate memory.
22832         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
22833         Skip "" directory entries.
22834         Use strlen to calculate directory entry length, since the old method
22835         is rarely used these days and isn't worth supporting.
22836         Don't use a pointer after freeing it.
22837         Check for integer overflow when calculating allocation size.
22838         Use memcpy to copy entries, instead of stpcpy.
22839         Set errno properly when returning NULL.
22840         Check for readdir error.
22841
22842 2000-06-26  Jim Meyering  <meyering@lucent.com>
22843
22844         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
22845
22846 2000-06-25  Jim Meyering  <meyering@lucent.com>
22847
22848         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
22849         Linux header bug when _XOPEN_SOURCE is defined to 500.
22850
22851 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22852
22853         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
22854         deficiency.
22855
22856 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22857
22858         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
22859         Include xalloc.h.
22860         Don't include <stdlib.h>.  Don't declare malloc, realloc.
22861
22862 2000-06-24  Jim Meyering  <meyering@lucent.com>
22863
22864         * m4/strerror_r.m4: Revive this file -- to try out an experimental
22865         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
22866         for which strerror does return char*, but which lacks a conveniently
22867         accessible declaration of the function.  If the compile-test says
22868         strerror_r doesn't work, then resort to a `run'-test that works on
22869         BeOS and segfaults on DEC Unix.
22870
22871 2000-06-24  Jim Meyering  <meyering@lucent.com>
22872
22873         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
22874
22875 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22876
22877         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
22878         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
22879
22880 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22881
22882         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
22883         (mbrtowc, mbstate_t): Define substitutes if
22884         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
22885         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
22886         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
22887
22888 2000-06-23  Jim Meyering  <meyering@lucent.com>
22889
22890         * m4/afs.m4: Add missing AC_MSG_RESULT.
22891         Reported by Bruno Haible.
22892
22893         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
22894         Suggestion from Bruno Haible.
22895
22896 2000-06-23  Jim Meyering  <meyering@lucent.com>
22897
22898         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
22899
22900 2000-06-21  Jim Meyering  <meyering@lucent.com>
22901
22902         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
22903
22904 2000-06-21  Jim Meyering  <meyering@lucent.com>
22905
22906         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
22907         (noinst_HEADERS): Add getstr.h.
22908
22909         * lib/getline.c (getstr): Move into a separate file.
22910         * lib/getstr.c (getstr): New file, extracted from getline.c, with
22911         the following changes: new parameter, delim2; both delim[12]
22912         parameters have type `int', not `char'.  The latter would lose
22913         with 8-bit delimiters.
22914         * lib/getstr.h: New file.
22915
22916 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22917
22918         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
22919         than 1024, return a memory chunk of least possible size, instead
22920         of size PATH_MAX + 2. In the loop, increment the size proportionally.
22921         Use free/xmalloc instead of xrealloc to avoid copying for very long
22922         paths.
22923
22924 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22925
22926         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
22927         the empty string.
22928
22929 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22930
22931         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
22932         address, not strdup.  Include <stdlib.h> and don't declare free().
22933
22934 2000-06-19  Jim Meyering  <meyering@lucent.com>
22935
22936         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
22937
22938 2000-06-18  Jim Meyering  <meyering@lucent.com>
22939
22940         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
22941
22942         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
22943         `checking whether...' message to be consistent with that of the
22944         lstat test.
22945
22946 2000-06-18  Jim Meyering  <meyering@lucent.com>
22947
22948         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
22949         Besides, these days every porting target provides a mkdir function.
22950
22951         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
22952         needed. (this snippet comes from src/system.h).
22953
22954 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
22955
22956         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
22957
22958 2000-06-15  Paul Eggert  <eggert@twinsun.com>
22959
22960         * lib/human.c (adjust_value): New function.
22961         (human_readable_inexact): Apply rounding style even when
22962         printing approximate values.
22963
22964 2000-06-14  Paul Eggert  <eggert@twinsun.com>
22965
22966         * lib/human.c (human_readable_inexact): Allow an input block
22967         size that is not a multiple of the output block size, and vice versa.
22968         Reported by Piergiorgio Sartor.
22969
22970 2000-06-14  Paul Eggert  <eggert@twinsun.com>
22971
22972         * lib/getdate.y (get_date): Apply relative times after time
22973         zone indicator, not before.  Reported by Todd A. Jacobs.
22974
22975 2000-06-13  Jim Meyering  <meyering@lucent.com>
22976
22977         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
22978
22979         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
22980
22981 2000-06-12  Paul Eggert  <eggert@twinsun.com>
22982
22983         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
22984
22985 2000-06-12  Jim Meyering  <meyering@lucent.com>
22986
22987         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
22988         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
22989         optional argument.
22990         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
22991         the optional argument, `lib'.
22992
22993 2000-06-08  Jim Meyering  <meyering@lucent.com>
22994
22995         * m4/largefile.m4: Remove file (now that it's part of autoconf).
22996
22997 2000-06-04  Paul Eggert  <eggert@twinsun.com>
22998
22999         Rewrite largefile configuration so that we don't need to run
23000         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
23001         AC_CANONICAL_HOST in configure.in -- jmm]
23002
23003         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
23004         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
23005         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
23006         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
23007         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
23008         All uses changed.
23009         Instead of inspecting the output of getconf, try to compile the
23010         test program without and with the macro definition.
23011         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
23012         for getconf.  Instead, check for the needed flags by compiling
23013         test programs.
23014
23015 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23016
23017         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
23018
23019 2000-06-04  Jim Meyering  <meyering@lucent.com>
23020
23021         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
23022         SunOS 4.1.4 for which gid_t is an unsigned type.
23023
23024 2000-06-03  Jim Meyering  <meyering@lucent.com>
23025
23026         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
23027         now that autoconf requires that.
23028
23029         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
23030         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
23031         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
23032
23033 2000-06-03  Jim Meyering  <meyering@lucent.com>
23034
23035         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
23036
23037 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
23038
23039         * m4/glibc21.m4: New file.
23040         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
23041
23042 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
23043
23044         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
23045         newer, don't install charset.alias.
23046         * lib/config.charset: Change the Linux/glibc rules so they become empty
23047         on glibc-2.1 or newer.
23048
23049 2000-06-02  Jim Meyering  <meyering@lucent.com>
23050
23051         * lib/mountlist.c: Back out last change.  Instead, do this...
23052         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
23053         me_dummy member using the same `ignore'-testing code.
23054         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
23055         fs_type strings.
23056         From Mark D. Roth.
23057
23058 2000-05-29  Jim Meyering  <meyering@lucent.com>
23059
23060         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
23061         mounts with the `ignore' attribute.  Based on a patch from
23062         Mark D. Roth.
23063
23064 2000-05-28  Jim Meyering  <meyering@lucent.com>
23065
23066         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
23067         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23068         * m4/stat.m4: Likewise.
23069         * m4/lstat.m4: Likewise.
23070         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
23071
23072         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
23073         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
23074
23075 2000-05-26  Jim Meyering  <meyering@lucent.com>
23076
23077         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
23078
23079 2000-05-24  Jim Meyering  <meyering@lucent.com>
23080
23081         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
23082         autoconf requires that.
23083         * m4/lib-check.m4: Likewise.
23084         * m4/jm-macros.m4: Likewise.
23085         * m4/strftime.m4: Likewise.
23086
23087         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
23088         AC_CHECK_DECLS, now that autoconf requires that.
23089
23090 2000-05-22  Jim Meyering  <meyering@lucent.com>
23091
23092         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23093         * m4/lstat.m4: Likewise.
23094
23095 2000-05-22  Jim Meyering  <meyering@lucent.com>
23096
23097         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
23098
23099 2000-05-20  Jim Meyering  <meyering@lucent.com>
23100
23101         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
23102         (jm_PREREQ): Use it.
23103
23104 2000-05-18  Jim Meyering  <meyering@lucent.com>
23105
23106         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
23107         back, too, since it may have been modified by allocate_entry.
23108         (hash_delete): Rewrite to use neither the assignment operator
23109         nor the comma operator in an if-expression.
23110
23111 2000-05-15  Paul Eggert  <eggert@twinsun.com>
23112
23113         * lib/closeout.c:
23114         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
23115         Remove; no longer needed.
23116         "quotearg.h": Add include.
23117         (file_name): Do not bother to explicitly initialize to NULL; it's less
23118         efficient on some hosts.
23119         (close_stdout_status): Remove test as to whether stdout was already
23120         closed; it breaks for the case "echo x | sort >&-".
23121         Quote file name colons.
23122         Do not assume that _("write error") lacks format strings.
23123
23124 2000-05-15  Jim Meyering  <meyering@lucent.com>
23125
23126         * lib/version-etc.c (version_etc_copyright): Update the copyright
23127         string used in all --version output.
23128
23129 2000-05-14  Jim Meyering  <meyering@lucent.com>
23130
23131         * lib/closeout.c (close_stdout_set_file_name): New function.
23132         (close_stdout_status): Use new file-scoped global.
23133         Return right away if fstat says the stdout file descriptor is invalid.
23134         * lib/closeout.h (close_stdout_set_file_name): Declare.
23135
23136 2000-05-10  Jim Meyering  <meyering@lucent.com>
23137
23138         * lib/closeout.c [default_exit_status]: New file-scoped variable.
23139         (close_stdout_set_status): New function.
23140         * lib/closeout.h (close_stdout_set_status): Declare.
23141
23142 2000-05-09  Jim Meyering  <meyering@lucent.com>
23143
23144         * m4/gettext.m4: Rename this...
23145         * m4/libintl.m4: ...to this.
23146
23147 2000-05-08  Jim Meyering  <meyering@lucent.com>
23148
23149         * lib/long-options.c: Don't include closeout.h.
23150         (parse_long_options): Don't call close_stdout for --version.
23151
23152 2000-05-06  Paul Eggert  <eggert@twinsun.com>
23153
23154         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
23155         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
23156         2.1.3 bug.  This avoids a clash when files like regex.c define
23157         _GNU_SOURCE.
23158
23159 2000-05-06  Jim Meyering  <meyering@lucent.com>
23160
23161         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
23162         (AC_REPLACE_FUNCS): Add strnlen.
23163
23164         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
23165         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
23166
23167         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
23168         AC_SEARCH_LIBS call for nanosleep.
23169         (LIB_NANOSLEEP): Set and AC_SUBST.
23170
23171 2000-05-06  Jim Meyering  <meyering@lucent.com>
23172
23173         * lib/strnlen.c: Undefine __strnlen and strnlen.
23174         [!weak_alias]: Define __strnlen to strnlen.
23175
23176         * lib/atexit.c: New file, from libiberty.
23177
23178 2000-05-06  Jim Meyering  <meyering@lucent.com>
23179
23180         * lib/closeout.c (close_stdout_status): Also check for errors on the
23181         stderr stream.
23182
23183 2000-05-05  Jim Meyering  <meyering@lucent.com>
23184
23185         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
23186         AC_SEARCH_LIBS call for clock_gettime.
23187         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
23188
23189         * m4/search-libs.m4: Update from autoconf.
23190
23191         su doesn't work on Solaris 2.6.
23192         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
23193         <shadow.h>.  Reported by Dragos Harabor.
23194
23195 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
23196
23197         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
23198         memcpy instead of xmalloc, xrealloc, path_concat.
23199         (locale_charset): Treat empty environment variables as absent.
23200         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
23201
23202 2000-05-04  Jim Meyering  <meyering@lucent.com>
23203
23204         * lib/getopt.c: Update from glibc.
23205         * lib/obstack.c: Likewise.
23206         * lib/obstack.h: Likewise.
23207         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
23208         file
23209
23210         * lib/regex.h: Likewise.
23211         * lib/strndup.c: Likewise.
23212         * lib/strnlen.c: New file, from glibc.
23213
23214 2000-05-03  Jim Meyering  <meyering@lucent.com>
23215
23216         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
23217
23218 2000-05-02  Paul Eggert  <eggert@twinsun.com>
23219
23220         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
23221         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
23222         compile-time test, rather than inspecting host and OS, to
23223         decide whether to define _LARGEFILE_SOURCE.
23224
23225 2000-05-01  Jim Meyering  <meyering@lucent.com>
23226
23227         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
23228
23229         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
23230         Based on a patch from Bruno Haible.
23231
23232 2000-05-01  Jim Meyering  <meyering@lucent.com>
23233
23234         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
23235
23236 2000-04-29  Jim Meyering  <meyering@lucent.com>
23237
23238         * lib/path-concat.c: Declare strdup only if it's not defined.
23239         * lib/canon-host.c: Likewise.
23240
23241 2000-04-28  Jim Meyering  <meyering@lucent.com>
23242
23243         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
23244         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
23245         is included first, then limits.h is included by locale.h by libintl.h.
23246         From John David Anglin.
23247
23248 2000-04-25  Jim Meyering  <meyering@lucent.com>
23249
23250         * lib/makepath.c (S_IRWXUGO): Define.
23251         (make_path): Always perform explicit chmod if MODE specifies any
23252         of the `special' permission bits.  Prompted by a bug report against
23253         install from Mate Wierdl and Joost van Baal.
23254
23255 2000-04-18  Jim Meyering  <meyering@lucent.com>
23256
23257         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
23258         (jm_PREREQ): Use it.
23259
23260 2000-04-18  Jim Meyering  <meyering@lucent.com>
23261
23262         * lib/README: New file.
23263
23264         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
23265         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
23266
23267 2000-04-17  Jim Meyering  <meyering@lucent.com>
23268
23269         Get it right :-)
23270         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
23271         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
23272         Suggestion from Akim Demaille.
23273
23274 2000-04-17  Jim Meyering  <meyering@lucent.com>
23275
23276         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
23277         the definition of it to rpl_strftime also defined-away the system's
23278         declaration.
23279
23280 2000-04-15  Jim Meyering  <meyering@lucent.com>
23281
23282         Use `C' to denote so-called `contiguous' files, the same way
23283         that tar does.
23284         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
23285         (ftypelet): Use S_ISCTG.
23286         From Michael Deutschmann.
23287
23288 2000-04-14  Jim Meyering  <meyering@lucent.com>
23289
23290         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
23291         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
23292         clobbered.
23293
23294 2000-04-14  Jim Meyering  <meyering@lucent.com>
23295
23296         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
23297
23298 2000-04-13  Jim Meyering  <meyering@lucent.com>
23299
23300         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
23301         AH_VERBATIM to insert required #ifndef into config.h.in.
23302         Suggestion from Akim Demaille.
23303
23304 2000-04-12  Jim Meyering  <meyering@lucent.com>
23305
23306         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
23307         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
23308         Christian Krackowizer.
23309
23310         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
23311         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
23312         (AC_SYS_LARGEFILE): Require.
23313         (AM_C_PROTOTYPES): Require.
23314
23315 2000-04-08  Jim Meyering  <meyering@lucent.com>
23316
23317         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
23318         names don't conflict.  Reported by Eli Zaretskii.
23319
23320 2000-04-07  Jim Meyering  <meyering@lucent.com>
23321
23322         * lib/putenv.c: Move inclusion of errno.h so it follows that of
23323         sys/types.h, to work around system header problems on AIX 3.2.5.
23324         From Bruno Haible.
23325
23326 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
23327
23328         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
23329         bug.  Deal with the different error behavior of Irix iconv.
23330
23331 2000-04-05  Paul Eggert  <eggert@twinsun.com>
23332
23333         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
23334         IRIX if the installer said otherwise.
23335
23336 2000-04-05  Jim Meyering  <meyering@lucent.com>
23337
23338         Portability tweaks required for ultrix4.3.
23339         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
23340         (jm_CHECK_DECLS): Add getutent to the list of functions.
23341         (_jm_DECL_HEADERS): Add utmpx.h.
23342         From John David Anglin.
23343
23344         * m4/strftime.m4: Back out the 2000-04-02 change.
23345         Instead of that change, simply undefine putenv in the test program.
23346
23347 2000-04-05  Jim Meyering  <meyering@lucent.com>
23348
23349         Portability tweaks required for ultrix4.3.
23350         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
23351         getutent.
23352         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
23353         * lib/canon-host.c: Declare strdup.
23354         * lib/path-concat.c: Likewise.
23355         From John David Anglin.
23356
23357 2000-04-04  Jim Meyering  <meyering@lucent.com>
23358
23359         Be more DOS 8.3-friendly.
23360         * lib/ref-add.sin: Renamed from ref-add.sed.in.
23361         * lib/ref-del.sin: Renamed from ref-del.sed.in.
23362         * lib/Makefile.am: Reflect renaming.
23363         Reported by Eli Zaretskii.
23364
23365         Use a temporary file name that won't clash with `charset.alias'
23366         in the DOS 8.3 name space.
23367         * lib/Makefile.am (charset_tmp): Define.
23368         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
23369         (uninstall-local): Likewise.
23370         Reported by Eli Zaretskii.
23371
23372 2000-04-03  Jim Meyering  <meyering@lucent.com>
23373
23374         * m4/gettext.m4: Fix typo in comment.
23375
23376         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
23377         textutils/configure.in).  Suggestion from Paul Eggert.
23378         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
23379
23380 2000-04-02  Paul Eggert  <eggert@twinsun.com>
23381
23382         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
23383         variable in the shell rather than using putenv, which isn't
23384         portable.  This avoids the configure-time inter-test dependency
23385         on the potentially-renamed putenv function.
23386
23387 2000-03-30  Paul Eggert  <eggert@twinsun.com>
23388
23389         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
23390         before checking struct stat.st_blksize, so that
23391         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
23392
23393 2000-03-29  Paul Eggert  <eggert@twinsun.com>
23394
23395         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
23396         since strftime.c uses HAVE_STRFTIME to decide whether to use
23397         the underlying strftime.
23398
23399 2000-03-29  Paul Eggert  <eggert@twinsun.com>
23400
23401         * lib/time/strftime.c (my_strftime): Make sure we call the system
23402         strftime, not ourselves, when invoking the underlying strftime.
23403
23404 2000-03-24  Jim Meyering  <meyering@lucent.com>
23405
23406         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
23407         (charset_alias): Define.
23408         (install-exec-local): Factor out common code.
23409         (uninstall-local): Split lines longer than 80.
23410         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
23411         (SUFFIXES): Define.
23412         (.sed.in.sed): New rule.  Don't redirect directly to $@.
23413         (CLEANFILES): Add ref-add.sed and ref-del.sed.
23414
23415 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
23416
23417         * lib/config.charset: Output a line containing "Packages using this
23418         file".
23419         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
23420         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
23421         ref-del.sed): New rules.
23422
23423 2000-03-17  Jim Meyering  <meyering@lucent.com>
23424
23425         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
23426         Otherwise, include <strings.h>
23427
23428 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
23429
23430         * lib/unicodeio.c (utf8_wctomb): New function.
23431         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
23432         format instead of in UCS-4 with platform dependent endianness.
23433
23434 2000-03-10  Jim Meyering  <meyering@lucent.com>
23435
23436         * m4/lib-check.m4: Look for getspnam in -lgen, too.
23437         From Marco Franzen.
23438
23439 2000-03-07  Paul Eggert  <eggert@twinsun.com>
23440
23441         * lib/savedir.c (savedir): Work even if directory size is
23442         negative; this can happen with some screwy NFS configurations.
23443
23444 2000-03-06  Jim Meyering  <meyering@lucent.com>
23445
23446         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
23447         if it's NULL (because we ran out of memory).  From Bruno Haible.
23448
23449 2000-03-05  Jim Meyering  <meyering@lucent.com>
23450
23451         * lib/localcharset.c ("path-concat.h"): Include.
23452         (get_charset_aliases): Use path_concat instead of ANSI string
23453         concatenation.
23454
23455         * lib/unicodeio.h (PARAMS): Define.
23456         Use it to guard prototype.
23457
23458 2000-03-04  Jim Meyering  <meyering@lucent.com>
23459
23460         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
23461         for lib/localcharset.c.
23462
23463 2000-03-04  Jim Meyering  <meyering@lucent.com>
23464
23465         * lib/Makefile.am (install-exec-local): Create $(libdir) before
23466         installing into it.
23467         (uninstall-local): Uncomment this rule so `make distcheck' works
23468         once again.
23469
23470         * lib/unicodeio.c (<errno.h>): Include it.
23471         (errno): Declare if not defined.
23472
23473         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
23474
23475         * lib/config.charset: New version, incorporating remarks from a linux
23476         i18n mailing list.  From Bruno Haible.
23477
23478 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
23479
23480         * m4/codeset.m4: New file.
23481         * m4/iconv.m4: New file.
23482         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
23483
23484 2000-03-03  Jim Meyering  <meyering@lucent.com>
23485
23486         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
23487
23488 2000-03-02  Jim Meyering  <meyering@lucent.com>
23489
23490         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
23491         the messages come out on separate lines.
23492
23493         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
23494         rather than jm_CHECK_DECLARATIONS.
23495         * m4/decl.m4: Remove now-unused file.
23496
23497         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
23498         geteuid.
23499
23500 2000-03-02  Jim Meyering  <meyering@lucent.com>
23501
23502         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
23503
23504 2000-03-01  Jim Meyering  <meyering@lucent.com>
23505
23506         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
23507         * lib/unicodeio.c: Likewise.
23508
23509 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
23510
23511         * lib/config.charset: New file.
23512         * lib/localcharset.c: New file.
23513         * lib/unicodeio.h, lib/unicodeio.c: New files.
23514         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
23515         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
23516         (noinst_HEADERS): Add unicodeio.h.
23517         (all-local, install-exec-local, charset.alias): New targets.
23518
23519 2000-02-28  Paul Eggert  <eggert@twinsun.com>
23520
23521         * lib/quotearg.c (ALERT_CHAR): New macro.
23522         (quotearg_buffer_restyled): Use it.
23523
23524 2000-02-27  Jim Meyering  <meyering@lucent.com>
23525
23526         * m4/check-decl.m4: Add getenv to the list.
23527
23528 2000-02-27  Jim Meyering  <meyering@lucent.com>
23529
23530         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
23531         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
23532
23533         * lib/backupfile.c: Guard inclusion of stdlib.h with
23534         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
23535         Declare malloc if needed.
23536
23537         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
23538         `#ifndef HAVE_DECL..'
23539         now that autoconf always defines the HAVE_DECL_ symbols.
23540         * lib/human.c: Likewise.
23541         * lib/same.c: Likewise.
23542         * lib/strtoumax.c: Likewise.
23543
23544         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
23545         declaration check was not run.
23546         * lib/hash.c: Likewise.
23547         * lib/human.c: Likewise.
23548         * lib/same.c: Likewise.
23549         * lib/strtoumax.c: Likewise.
23550
23551         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
23552         `.', then first look up the entire `.'-containing string as a login
23553         name.
23554
23555 2000-02-23  Jim Meyering  <meyering@lucent.com>
23556
23557         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
23558         in place of my hack.
23559
23560 2000-02-18  Paul Eggert  <eggert@twinsun.com>
23561
23562         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
23563         (textint): New typedef.
23564         (parser_control): Member year changed from int to textint.
23565         All uses changed.
23566         (YYSTYPE): Removed; replaced by %union with int and textint members.
23567         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
23568         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
23569         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
23570         (tSNUMBER, tUNUMBER): Now of type <textintval>.
23571         (date, number, to_year): Use width of number in digits, not its value,
23572         to determine whether it's a 2-digit year, or a 2-digit time.
23573         (yylex): Store number of digits of numeric tokens.
23574         Reported by John Kendall.
23575
23576         (parser_control): Changed from struct parser_control to typedef (for
23577         consistency).  All uses changed.
23578
23579         (tID): Removed; not used.
23580         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
23581
23582 2000-02-14  Paul Eggert  <eggert@twinsun.com>
23583
23584         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
23585         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
23586
23587 2000-02-12  Jim Meyering  <meyering@lucent.com>
23588
23589         * lib/userspec.c (ISDIGIT): Define it.
23590         (isdigit): Remove definition.
23591         (is_number): Use ISDIGIT, not isdigit.
23592         <libintl.h>: Include.
23593         (_ and N_): Define.
23594         (parse_user_spec): Mark translatable strings.
23595
23596 2000-02-10  Jim Meyering  <meyering@lucent.com>
23597
23598         With these changes, nanosleep.[ch] are finally enough like the other
23599         lib/* replacement files to compile on a few more losing systems.
23600
23601         * lib/nanosleep.h: Don't include config.h.
23602         Remove prototype from declaration of nanosleep.
23603         (PARAMS): Remove now-unneeded definition.
23604         * lib/nanosleep.c: #undef nanosleep.
23605         (rpl_nanosleep): Rename from nanosleep.
23606
23607 2000-02-10  Jim Meyering  <meyering@lucent.com>
23608
23609         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
23610         gnu_nanosleep to rpl_nanosleep.
23611
23612 2000-02-09  Jim Meyering  <meyering@lucent.com>
23613
23614         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
23615         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
23616
23617 2000-02-08  Akim Demaille  <akim@epita.fr>
23618
23619         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
23620         `[' and `]' and remove uses of `changequote'.
23621         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
23622         (AC_SYS_LARGEFILE): Likewise.
23623         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
23624         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
23625         of changequote.
23626         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
23627         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
23628         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
23629         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
23630
23631 2000-02-05  Jim Meyering  <meyering@lucent.com>
23632
23633         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
23634         Remove explicit use of AC_HEADER_TIME.  It is required by
23635         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
23636         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
23637         in autoconf whereby the expansion of the latter ended up preceding
23638         the expansion of its prerequisite, AC_HEADER_TIME.
23639         Reported by Volker Borchert.
23640
23641 2000-02-03  Jim Meyering  <meyering@lucent.com>
23642
23643         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
23644
23645 2000-02-03  Jim Meyering  <meyering@lucent.com>
23646
23647         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
23648         rather than with `#if HAVE_UTMPNAME'.
23649
23650 2000-02-02  Jim Meyering  <meyering@lucent.com>
23651
23652         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
23653         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
23654         Reported by Eli Zaretskii.
23655
23656 2000-02-01  Jim Meyering  <meyering@lucent.com>
23657
23658         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
23659
23660 2000-01-31  Jim Meyering  <meyering@lucent.com>
23661
23662         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
23663         functions.  Add the time.h and sys/time.h headers along with the
23664         AC_REQUIRE'ment of AC_HEADER_TIME.
23665
23666 2000-01-31  Jim Meyering  <meyering@lucent.com>
23667
23668         * lib/nanosleep.h (nanosleep): Guard declaration with
23669         `#if ! HAVE_DECL_NANOSLEEP'.
23670         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
23671         the declaration in that vendor's sys/timers.h.
23672         Reported by Christian Krackowizer.
23673
23674         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
23675         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
23676         (ISPRINT): Likewise.
23677         Reported by Tom Tromey.
23678
23679 2000-01-30  Jim Meyering  <meyering@lucent.com>
23680
23681         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
23682
23683         * m4/prereq.m4 (utmp_includes): Define.
23684         Check for ut_user and ut_name members in both struct utmpx
23685         and struct utmp.
23686
23687 2000-01-30  Jim Meyering  <meyering@lucent.com>
23688
23689         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
23690         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
23691         header files where only utmpx.ut_user is declared.
23692
23693         * lib/readutmp.h (UT_USER): Define.
23694
23695 2000-01-29  Jim Meyering  <meyering@lucent.com>
23696
23697         * m4/lib-check.m4: New file containing library-related checks from
23698         fileutils and sh-utils (textutils had none).
23699
23700 2000-01-28  Jim Meyering  <meyering@lucent.com>
23701
23702         * m4/perl.m4: Change format of warning message to look more like that
23703         from the missing script.  Suggestion from François Pinard.
23704
23705 2000-01-25  Jim Meyering  <meyering@lucent.com>
23706
23707         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
23708         well as time.h in the compile check.
23709         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
23710         Fix typo in cross-compiling case: s/yes/no/.
23711
23712 2000-01-23  Jim Meyering  <meyering@lucent.com>
23713
23714         * m4/jm-macros.m4: Move df-related tests here from
23715         fileutils/configure.in
23716
23717         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
23718         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
23719
23720         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
23721         s/space/ac_fsusage_space/.
23722         (jm_FILE_SYSTEM_USAGE): Take two parameters.
23723
23724         * m4/ftruncate.m4: New file (derived from part of
23725         fileutils/configure.in).
23726         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
23727         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
23728
23729         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
23730         AC_SUBST these here, rather than just in sh-util/configure.in, so
23731         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
23732         all the same.
23733         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
23734         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
23735         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
23736         (AC_SUBST(POW_LIBM)): Likewise.
23737         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
23738
23739 2000-01-23  Jim Meyering  <meyering@lucent.com>
23740
23741         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
23742         obstack.c.
23743
23744 2000-01-22  Jim Meyering  <meyering@lucent.com>
23745
23746         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
23747
23748         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
23749
23750         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
23751         configure.in
23752         (AC_CHECK_HEADERS): Likewise for sh-utils.
23753         (AC_CHECK_HEADERS): Likewise for textutils.
23754         Merge the three lists of headers.
23755
23756         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
23757         from fileutils' configure.in.
23758
23759         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
23760         code. Moved tests into their own function (_jm_DECL_HEADERS) in
23761         check-decl.m4.
23762
23763         * m4/check-decl.m4: Use #if rather than #ifdef.
23764         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
23765         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
23766         (_jm_DECL_HEADERS): Define new function.
23767         (jm_CHECK_DECLARATIONS): Require it.
23768
23769 2000-01-22  Jim Meyering  <meyering@lucent.com>
23770
23771         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
23772         [! HAVE_DECL_STRTOULL]: Declare strtoull.
23773         Required for some AIX systems.  Reported by Christian Krackowizer.
23774         [TESTING] (main): New function.
23775
23776         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
23777         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
23778         letters.
23779
23780         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
23781         iswprint.
23782
23783         * lib/strverscmp.c (ISDIGIT): Define.
23784         (strverscmp): Use ISDIGIT, not isdigit.
23785
23786 2000-01-19  Jim Meyering  <meyering@lucent.com>
23787
23788         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
23789         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
23790         defines `struct timespec' in <sys/time.h>
23791
23792         * m4/c-bs-a.m4: Remove uses of changequote altogether.
23793         Thanks to Akim for explaining.
23794
23795 2000-01-17  Paul Eggert  <eggert@twinsun.com>
23796
23797         * lib/nanosleep.c (nanosleep):
23798         Don't use SA_INTERRUPT to decide whether to call sigaction, as
23799         POSIX.1 doesn't require SA_INTERRUPT and some systems
23800         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
23801         it's been part of POSIX.1 since day 1 (in 1988).
23802
23803 2000-01-17  Jim Meyering  <meyering@lucent.com>
23804
23805         * lib/interlock: Remove unused file.  Reported by François Pinard.
23806
23807 2000-01-16  Paul Eggert  <eggert@twinsun.com>
23808
23809         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
23810         alert, backslash, formfeed, and vertical tab unnecessarily in
23811         shell quoting style.
23812
23813 2000-01-16  Jim Meyering  <meyering@lucent.com>
23814
23815         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
23816         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
23817         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
23818         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
23819
23820 2000-01-16  Jim Meyering  <meyering@lucent.com>
23821
23822         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
23823         because the latter didn't work.
23824
23825 2000-01-15  Jim Meyering  <meyering@lucent.com>
23826
23827         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
23828         (AC_REPLACE_FUNCS): Add memcpy and memset.
23829         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
23830         Add strpbrk.
23831         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
23832
23833 2000-01-12  Jim Meyering  <meyering@lucent.com>
23834
23835         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
23836         (jm_PREREQ): Use it.
23837         (jm_PREREQ_READUTMP): New macro.
23838         (jm_PREREQ): Use it.
23839
23840 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23841
23842         Quote multibyte characters correctly.
23843         * m4/c-bs-a.m4: New file.
23844         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
23845         (jm_PREREQ): Use it.
23846
23847 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23848
23849         * m4/uintmax_t.m4: Port to autoconf 2.13.
23850
23851 2000-01-08  Jim Meyering  <meyering@ascend.com>
23852
23853         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
23854         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
23855
23856 2000-01-04  Jim Meyering  <meyering@ascend.com>
23857
23858         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
23859         jm_STRUCT_DIRENT_D_TYPE.
23860         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
23861         jm_STRUCT_DIRENT_D_INO.
23862         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
23863         jm_STRUCT_UTIMBUF.
23864         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
23865         renamings.
23866         * m4/utime.m4: Likewise.
23867
23868         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
23869         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
23870
23871 2000-01-03  Paul Eggert  <eggert@twinsun.com>
23872
23873         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
23874         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
23875
23876 2000-01-02  Jim Meyering  <meyering@ascend.com>
23877
23878         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
23879         remember if this is necessary.
23880
23881 1999-12-26  Jim Meyering  <meyering@ascend.com>
23882
23883         * m4/jm-macros.m4: Use it here.
23884         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
23885
23886 1999-12-23  Jim Meyering  <meyering@ascend.com>
23887
23888         * m4/jm-macros.m4: Check for clock_gettime (moved from
23889         fileutils/configure.in)
23890         Check for gettimeofday.
23891
23892 1999-12-20  Jim Meyering  <meyering@ascend.com>
23893
23894         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
23895         autoconf-2.14a-1999-12-20.
23896
23897 1999-12-19  Jim Meyering  <meyering@ascend.com>
23898
23899         * m4/lstat-slash.m4: New file.
23900         * m4/jm-macros.m4: Use the new macro:
23901         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23902
23903 1999-12-07  Jim Meyering  <meyering@ascend.com>
23904
23905         * m4/perl.m4: Require that File::Compare be available, too.
23906         Too many systems seem to lack it.
23907
23908         * m4/strftime.m4: Add checks for most of the cpp macros tested in
23909         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
23910
23911 1999-11-18  Paul Eggert  <eggert@twinsun.com>
23912
23913         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
23914         problem with the QNX 4.25 shell, which doesn't propagate exit
23915         status of failed commands inside shell assignments.
23916
23917 1999-11-17  Jim Meyering  <meyering@ascend.com>
23918
23919         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
23920
23921 1999-11-07  Jim Meyering  <meyering@ascend.com>
23922
23923         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
23924
23925 1999-11-06  Jim Meyering  <meyering@ascend.com>
23926
23927         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
23928         * m4/jm-macros.m4 (jm_MACROS): Use it here.
23929
23930 1999-11-05  Jim Meyering  <meyering@ascend.com>
23931
23932         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
23933         configure.in of textutils, fileutils, and sh-utils into this one
23934         (shared between those packages) file.
23935         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
23936         AC_STRUCT_ST_BLKSIZE.
23937
23938 1999-11-03  Jim Meyering  <meyering@ascend.com>
23939
23940         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
23941         of AC_CHECK_TYPE checks includes unistd.h.
23942         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
23943         Suggestion from Akim Demaille.
23944
23945 1999-10-30  Jim Meyering  <meyering@ascend.com>
23946
23947         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
23948         m4-quoted string.
23949         * m4/ls-mntd-fs.m4: Likewise.
23950         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
23951         * m4/jm-winsz1.m4: Likewise.
23952
23953         * m4/const.m4: Remove file, since the fix made it into the experimental
23954         version of autoconf.
23955         * m4/mktime.m4: Likewise.
23956
23957         * m4/check-type.m4: Remove file, now that the latest version of
23958         AC_CHECK_TYPE takes a third arg to specify additional #includes.
23959
23960         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
23961         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
23962         AC_CHECK_TYPE.
23963
23964 1999-10-04  Jim Meyering  <meyering@ascend.com>
23965
23966         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
23967
23968 1999-09-22  Paul Eggert  <eggert@twinsun.com>
23969
23970         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
23971         2.95.1 bug with HP-UX 10.20.
23972
23973 1999-09-17  Jim Meyering  <meyering@ascend.com>
23974
23975         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
23976         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
23977         due to missing strdup (against sh-utils-2.0).
23978
23979 1999-08-29  Jim Meyering  <meyering@ascend.com>
23980
23981         * m4/jm-macros.m4: Require jm_BISON.
23982         * m4/bison.m4: New file.
23983
23984 1999-08-17  Paul Eggert  <eggert@twinsun.com>
23985
23986         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
23987         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
23988
23989 1999-08-05  Jim Meyering  <meyering@ascend.com>
23990
23991         * m4/getline.m4: Rename test file from conftestdata to conftest.data
23992         to avoid conflicts with `conftest' on 8+3 filesystems.
23993         Suggestion from Eli Zaretskii.
23994
23995 1999-08-04  Jim Meyering  <meyering@ascend.com>
23996
23997         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
23998         fileutils and sh-utils (textutils's getline test was inadequate).
23999         (AM_FUNC_GETLINE): Run this test.
24000         (AC_CHECK_FUNCS): Check for getdelim.
24001         Reported by Bob Proulx.
24002
24003 1999-08-02  Jim Meyering  <meyering@ascend.com>
24004
24005         * m4/jm-macros.m4: Add a comment.
24006
24007 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24008
24009         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
24010         <inttypes.h> defines strtoumax as a macro (and not as a
24011         function).
24012
24013 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24014
24015         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
24016         that we can shift, multiply and divide unsigned long long
24017         values; Ultrix cc can't do it.
24018
24019 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24020
24021         * m4/mktime.m4: New file, which is a preview of what should appear
24022         in the next public autoconf release.
24023
24024 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24025
24026         * m4/lfs.m4: Remove this file.
24027         * m4/largefile.m4: New file.  It contains the old contents of
24028         lfs.m4, except that all names with prefix AC_LFS have been
24029         changed to use the prefix AC_SYS_LARGEFILE instead, to be
24030         compatible with future autoconf versions.  Also, some minor m4
24031         quoting problems have been fixed.
24032
24033 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24034
24035         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
24036         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
24037         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
24038         and simplify the shell code.
24039
24040 1999-08-01  Jim Meyering  <meyering@ascend.com>
24041
24042         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
24043         m4.
24044
24045 1999-07-20  Jim Meyering  <meyering@ascend.com>
24046
24047         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
24048
24049 1999-07-15  Jim Meyering  <meyering@ascend.com>
24050
24051         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
24052
24053 1999-05-22  Jim Meyering  <meyering@ascend.com>
24054
24055         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
24056
24057 1999-05-20  Jim Meyering  <meyering@ascend.com>
24058
24059         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
24060         Add a colon after each `then' in case $4 is empty.
24061
24062 1999-05-16  Jim Meyering  <meyering@ascend.com>
24063
24064         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
24065
24066 1999-05-10  Jim Meyering  <meyering@ascend.com>
24067
24068         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
24069
24070         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
24071         AC_FUNC_MKTIME.
24072
24073 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
24074
24075         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
24076
24077 1999-05-04  Paul Eggert  <eggert@twinsun.com>
24078
24079         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
24080         not CPPFLAGS, so that linking works correctly in IRIX.
24081
24082 1999-04-30  Paul Eggert  <eggert@twinsun.com>
24083
24084         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
24085
24086 1999-04-20  Paul Eggert  <eggert@twinsun.com>
24087
24088         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
24089         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
24090         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
24091         jm_AC_TYPE_UNSIGNED_LONG_LONG.
24092         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
24093
24094         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
24095
24096 1999-04-20  Jim Meyering  <meyering@ascend.com>
24097
24098         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
24099         AC_REPLACE xstroull if necessary.  From Paul Eggert.
24100         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
24101
24102 1999-04-18  Jim Meyering  <meyering@ascend.com>
24103
24104         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
24105         * m4/jm-macros.m4: Use it.
24106
24107 1999-04-06  Jim Meyering  <meyering@ascend.com>
24108
24109         * m4/strftime.m4: Remove test for %f.
24110
24111 1999-03-29  Jim Meyering  <meyering@ascend.com>
24112
24113         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
24114         superset of the AC_TYPE_* checks in the textutils, fileutils,
24115         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
24116         AC_TYPE_PID_T.
24117
24118 1999-03-28  Jim Meyering  <meyering@ascend.com>
24119
24120         * m4/jm-macros.m4: Define GNU_PACKAGE here.
24121         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
24122         replaced e.g., in the *.sh files of the sh-utils.
24123
24124 1999-03-20  Jim Meyering  <meyering@ascend.com>
24125
24126         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
24127         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
24128         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
24129
24130 1999-03-19  Jim Meyering  <meyering@ascend.com>
24131
24132         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
24133
24134 1999-03-12  Jim Meyering  <meyering@ascend.com>
24135
24136         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
24137
24138 1999-03-07  Jim Meyering  <meyering@ascend.com>
24139
24140         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
24141         declared.
24142
24143 1999-02-17  Jim Meyering  <meyering@ascend.com>
24144
24145         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
24146         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
24147
24148 1999-02-07  Jim Meyering  <meyering@ascend.com>
24149
24150         * m4/group-member.m4: New file -- extracted from sh-utils'
24151         configure.in.
24152
24153         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
24154         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
24155
24156 1999-02-06  Jim Meyering  <meyering@ascend.com>
24157
24158         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
24159         * m4/fnmatch.m4: Likewise.
24160         * m4/getgroups.m4: Likewise.
24161         * m4/lstat.m4: Likewise.
24162         * m4/malloc.m4: Likewise.
24163         * m4/putenv.m4: Likewise.
24164         * m4/realloc.m4: Likewise.
24165         * m4/regex.m4: Likewise.
24166         * m4/stat.m4: Likewise.
24167         * m4/strftime.m4: Likewise.
24168         Suggestion from Alain Magloire.
24169
24170         * m4/chown.m4: Use `.$ac_objext', not `.o'.
24171         * m4/fnmatch.m4: Likewise.
24172         * m4/getgroups.m4: Likewise.
24173         * m4/getline.m4: Likewise.
24174         * m4/lstat.m4: Likewise.
24175         * m4/malloc.m4: Likewise.
24176         * m4/memcmp.m4: Likewise.
24177         * m4/putenv.m4: Likewise.
24178         * m4/realloc.m4: Likewise.
24179         * m4/regex.m4: Likewise.
24180         * m4/stat.m4: Likewise.
24181         * m4/strftime.m4: Likewise.
24182         Suggestion from Alain Magloire.
24183
24184         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
24185         an argument.
24186
24187         * m4/regex.m4: Add a run-time Test for proper operation of
24188         re_compile_pattern.
24189
24190 1999-01-31  Jim Meyering  <meyering@ascend.com>
24191
24192         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
24193
24194 1999-01-30  Jim Meyering  <meyering@ascend.com>
24195
24196         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
24197
24198         * m4/jm-mktime.m4: Make this a wrapper around the official
24199         AM_FUNC_MKTIME rather than my private copy, now that the official one
24200         is up to date.
24201         * m4/mktime.m4: Remove file.
24202
24203         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
24204         * m4/uptime.m4: Likewise.
24205         * m4/uintmax_t.m4: Likewise.
24206
24207 1999-01-28  Jim Meyering  <meyering@ascend.com>
24208
24209         * m4/jm-macros.m4: Use jm_AFS.
24210         * m4/afs.m4: New file (from fileutils' configure.in).
24211
24212         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
24213         * m4/chown.m4: Likewise.
24214         * m4/d-ino.m4: Likewise.
24215         * m4/d-type.m4: Likewise.
24216         * m4/fnmatch.m4: Likewise.
24217         * m4/getgroups.m4: Likewise.
24218         * m4/gettext.m4: Likewise.
24219         * m4/jm-mktime.m4: Likewise.
24220         * m4/jm-winsz2.m4: Likewise.
24221         * m4/lcmessage.m4: Likewise.
24222         * m4/ls-mntd-fs.m4: Likewise.
24223         * m4/malloc.m4: Likewise.
24224         * m4/memcmp.m4: Likewise.
24225         * m4/putenv.m4: Likewise.
24226         * m4/realloc.m4: Likewise.
24227         * m4/st_mtim.m4: Likewise.
24228         * m4/strftime.m4: Likewise.
24229
24230 1999-01-16  Jim Meyering  <meyering@ascend.com>
24231
24232         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
24233         (ARGMATCH_DIE_DECL): Define.
24234
24235 1999-01-12  Jim Meyering  <meyering@ascend.com>
24236
24237         * m4/Makefile.am.in: Rewrite to avoid using fmt.
24238         Reported by Lars Hecking.
24239
24240 1999-01-10  Jim Meyering  <meyering@ascend.com>
24241
24242         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
24243         gross kludge.
24244         * m4/inttypes_h.m4: Likewise.
24245         * m4/lstat.m4: Likewise.
24246         * m4/malloc.m4: Likewise.
24247         * m4/readdir.m4: Likewise.
24248         * m4/realloc.m4: Likewise.
24249         * m4/st_dm_mode.m4: Likewise.
24250         * m4/stat.m4: Likewise.
24251         * m4/utimbuf.m4: Likewise.
24252         * m4/utimes.m4: Likewise.
24253
24254         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
24255         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
24256         comments in config.h.in are meaningful.
24257
24258         * m4/jm-macros.m4: Require autoconf-2.13 here.
24259
24260         * m4/regex.m4: By default, don't use the included regex.c on systems
24261         with glibc 2.  Suggestion from Uli Drepper.
24262
24263 1999-01-02  Jim Meyering  <meyering@ascend.com>
24264
24265         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
24266
24267 1998-12-18  Jim Meyering  <meyering@ascend.com>
24268
24269         * m4/Makefile.am.in (Makefile.am): Simplify rule.
24270         Based on a suggestion from Lars Hecking.
24271
24272 1998-11-16  Paul Eggert  <eggert@twinsun.com>
24273
24274         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
24275
24276 1998-11-16  Jim Meyering  <meyering@ascend.com>
24277
24278         * m4/lfs.m4: Double-quote the `uname...` expression.
24279
24280 1998-11-14  Jim Meyering  <meyering@ascend.com>
24281
24282         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
24283         * m4/stat.m4: Likewise.
24284
24285 1998-11-03  Jim Meyering  <meyering@ascend.com>
24286
24287         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
24288         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
24289
24290 1998-10-18  Jim Meyering  <meyering@ascend.com>
24291
24292         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
24293
24294 1998-10-17  Jim Meyering  <meyering@ascend.com>
24295
24296         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
24297         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
24298         calls for those previously hard-coded headers.  Instead, take a new
24299         parameter.
24300         (jm_CHECK_DECLARATIONS): Reflect interface change.
24301         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
24302         (jm_CHECK_DECL_LOCALTIME_R): New macro.
24303
24304         * m4/mktime.m4: Test for spring-forward gap before long-running test.
24305
24306 1998-10-14  Jim Meyering  <meyering@ascend.com>
24307
24308         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
24309         instead of "TZ=America/Vancouver".  From Paul Eggert.
24310
24311 1998-10-11  Jim Meyering  <meyering@ascend.com>
24312
24313         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
24314         This adds a test for a recently added compatibility fix for mktime.c.
24315         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
24316
24317 1998-09-27  Jim Meyering  <meyering@ascend.com>
24318
24319         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
24320
24321         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
24322         ../configure.in, including a change from Gordon Matzigkeit to allow
24323         cross-compiling for the Hurd.
24324
24325         * m4/glibc.m4: New file/macro to test for the GNU C Library
24326         versions 1 and 2.  From Gordon Matzigkeit.
24327         Indent.
24328
24329 1998-09-21  Jim Meyering  <meyering@ascend.com>
24330
24331         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
24332
24333 1998-08-18  Paul Eggert  <eggert@twinsun.com>
24334
24335         Port nanosecond-resolution times to UnixWare 2.1.2 and
24336         pedantic Solaris 2.6.
24337
24338         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
24339         AC_STRUCT_ST_MTIM.
24340         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
24341         Generate name of ns member, instead of just 1 or undef.
24342         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
24343
24344 1998-08-15  Jim Meyering  <meyering@ascend.com>
24345
24346         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
24347         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
24348         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
24349         instead of jm_TYPE_SSIZE_T.
24350
24351 1998-08-12  Jim Meyering  <meyering@ascend.com>
24352
24353         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
24354
24355 1998-08-02  Jim Meyering  <meyering@ascend.com>
24356
24357         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
24358         in acconfig.h manually.
24359
24360 1998-07-31  Paul Eggert  <eggert@twinsun.com>
24361
24362         * m4/st_mtim.m4: New file.
24363
24364 1998-07-28  Jim Meyering  <meyering@ascend.com>
24365
24366         * m4/utimes.m4: Undef stat.
24367
24368 1998-07-25  Jim Meyering  <meyering@ascend.com>
24369
24370         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
24371         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
24372
24373 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
24374
24375         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
24376         uid and gid actually remain unchanged.
24377
24378 1998-07-07  Jim Meyering  <meyering@ascend.com>
24379
24380         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
24381
24382 1998-07-04  Jim Meyering  <meyering@ascend.com>
24383
24384         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
24385         to prove that this macro can be used in packages without regex.c.
24386
24387 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
24388
24389         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
24390         is to be used.
24391
24392 1998-07-03  Jim Meyering  <meyering@ascend.com>
24393
24394         * m4/gettext.m4: Add -lintl if it's found to be necessary.
24395
24396         * m4/gettext.m4: New file -- from gettext-0.10.35.
24397         * m4/lcmessage.m4: Likewise.
24398         * m4/progtest.m4: Likewise.
24399
24400         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
24401         * m4/jm-macros.m4: Require the new macro.
24402
24403 1998-06-29  Jim Meyering  <meyering@ascend.com>
24404
24405         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
24406         for the definition of NGROUPS (used in a system header included
24407         by sys/mount.h).
24408
24409 1998-06-28  Jim Meyering  <meyering@ascend.com>
24410
24411         * m4/ls-mntd-fs.m4: New file.
24412         * m4/fstypename.m4: New file.
24413
24414         * m4/jm-macros.m4: Require the new macro.
24415         * m4/jm-glibc-io.m4: New file.
24416
24417 1998-05-19  Jim Meyering  <meyering@ascend.com>
24418
24419         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
24420         * m4/lchown.m4: New file.
24421
24422         * m4/Makefile.am.in: New file.
24423         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
24424
24425 1998-05-14  Jim Meyering  <meyering@ascend.com>
24426
24427         * m4/Makefile.am (EXTRA_DIST): Add them.
24428         * m4/jm-macros.m4: New file.
24429         * m4/utimbuf.m4: New file.
24430
24431 1998-05-12  Jim Meyering  <meyering@ascend.com>
24432
24433         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
24434
24435 1998-05-11  Jim Meyering  <meyering@ascend.com>
24436
24437         * m4/isc-posix.m4: New file.
24438
24439 1998-05-10  Jim Meyering  <meyering@ascend.com>
24440
24441         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
24442
24443 1998-05-09  Jim Meyering  <meyering@ascend.com>
24444
24445         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
24446         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
24447         with automake.
24448
24449         * m4/ssize_t.m4: New file.
24450         * m4/mktime.m4: Remove file -- the new automake has this now.
24451
24452 1998-04-26  Jim Meyering  <meyering@ascend.com>
24453
24454         * m4/assert.m4: New file.
24455         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
24456
24457 1998-04-05  Jim Meyering  <meyering@ascend.com>
24458
24459         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
24460         (jm_PREREQ): Use it here.
24461
24462 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
24463
24464         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
24465         in acconfig.h.
24466
24467 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
24468
24469         * m4/prereq.m4: New file.
24470         * m4/error.m4: New file.
24471         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
24472
24473 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
24474
24475         * m4/getline.m4: Don't set am_cv_func_working_getline before the
24476         cache-check for the same variable -- that defeated the purpose of
24477         the test; the test program was never run.  This was a problem only
24478         on systems with losing getline functions -- HP-UX 10.20 is one.
24479         Reported by Bjorn Helgaas.
24480
24481 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
24482
24483         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
24484
24485 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
24486
24487         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
24488
24489         * m4/const.m4: New file.  Use an initializer in this declaration
24490         typedef int charset[2]; const charset x;
24491         Reported by Bob Glickstein.
24492
24493 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
24494
24495         * m4/chown.m4: Fix reversed types on -1 args to chown.
24496         From Kaveh Ghazi.
24497
24498 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
24499
24500         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
24501         Add lseek and memchr.
24502
24503         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
24504         T.E.Dickey <dickey@clark.net> said that some older preprocessors
24505         have a 20-character limit on names.
24506
24507 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
24508
24509         * m4/inttypes_h.m4: New file.
24510         * m4/uintmax_t.m4: New file.
24511         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
24512
24513 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
24514   Free Software Foundation, Inc.
24515 Copying and distribution of this file, with or without modification,
24516 are permitted provided the copyright notice and this notice are preserved.