Add announce-gen module file.
[gnulib.git] / ChangeLog
1 2006-12-28  Simon Josefsson  <simon@josefsson.org>
2
3         * modules/announce-gen: New file.
4
5 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
6
7         * lib/mbchar.h: Just include <wctype.h>; the wctype module
8         handles its gotchas now.
9         * lib/mbswidth.c: Likewise.
10         * lib/wcwidth.h: Likewise.
11         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
12         and iswcntrl; the wctype module does this stuff now.
13         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
14         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
15         * modules/mbchar (Depends-on): Add wctype.
16         * modules/mbswidth (Depends-on): Likewise.
17         * modules/wcwidth (Depends-on): Likewise.
18
19 2006-12-27  Eric Blake  <ebb9@byu.net>
20
21         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
22         module uses more than what <wctype.h> is required to provide.
23
24 2006-12-26  Eric Blake  <ebb9@byu.net>
25
26         * gnulib-tool (sed_extract_prog): Avoid space-tab.
27
28 2006-12-26  Eric Blake  <ebb9@byu.net>
29
30         * modules/absolute-header: New module.
31         * modules/fcntl (Depends-on): Depend on it.
32         * modules/inttypes (Depends-on): Likewise.
33         * modules/stdint (Depends-on): Likewise.
34         * modules/sys_stat (Depends-on): Likewise.
35         * modules/wctype (Depends-on): Likewise.
36         * MODULES.html.sh (Support for building libraries and
37         executables): Document it.
38
39 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
40
41         * gnulib-tool (SED): Remove, undoing previous change.
42         The problem was that it broke coreutils on Solaris, because
43         "sed --posix" leaked into a makefile.
44         (sed): New alias, if 'alias' and GNU sed.
45
46 2006-12-24  Jim Meyering  <jim@meyering.net>
47
48         Work around an fchownat bug in glibc-2.4:
49         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
50         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
51         in spite of the -P option.
52         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
53         New macros.
54         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
55         * modules/openat (Files): Add lib/fchownat.c.
56         * lib/openat.c (fchownat): Don't define here.  Move to...
57         * lib/fchownat.c: ...this new file.
58
59 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
60
61         Fix bug reported by Bruno Haible in
62         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
63         where quotearg.c didn't compile on Mac OS X 10.2 because it
64         lacks <wchar.h> and wint_t.
65         * lib/wctype_.h (__wctype_wint_t): New type.
66         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
67         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
68         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
69         Arg is now of type __wctype_wint_t, not wint_t.
70         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
71         substitute HAVE_WINT_T.
72         * modules/wctype (Files): Add m4/wint_t.m4.
73         (wctype.h): Substitute HAVE_WINT_T.
74
75 2006-12-23  Bruno Haible  <bruno@clisp.org>
76
77         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
78
79 2006-12-23  Bruno Haible  <bruno@clisp.org>
80
81         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
82         S_ISLNK.
83         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
84         mingw.
85
86 2006-12-22  Bruno Haible  <bruno@clisp.org>
87
88         * lib/copy-file.c: Include acl.h.
89         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
90         Close the file descriptors only after being done with copy_acl.
91         * modules/copy-file (Depends-on): Add acl.
92
93 2006-12-22  Bruno Haible  <bruno@clisp.org>
94
95         * gnulib-tool (SED): New variable.
96         Use $SED instead of sed everywhere.
97
98 2006-12-22  Bruno Haible  <bruno@clisp.org>
99
100         * modules/no-c++: New file.
101         * m4/no-c++.m4: New file.
102         * MODULES.html.sh (Support for building libraries and executables):
103         Add no-c++.
104
105 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
106
107         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
108         Include <limits.h>, and use its INT_MAX to rewrite the
109         j loop so that it does not overflow 'int'.  Problem reported by
110         Ralf Wildenhues in
111         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
112         Play it safe by shifting left by 1 rather than multiplying by 2,
113         as GCC is less likely to optimize this away when the value
114         is signed (when it assumes overflow leads to undefined behavior).
115         Also, don't assume time_t uses two's complement.
116
117 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
118
119         * MODULES.html.sh: New module wctype.
120         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
121         * lib/fnmatch.c: Don't bother to include <wchar.h> before
122         <wctype.h>, since the new wctype module should fix this.
123         * lib/quotearg.c: Include <wctype.h> unconditionally, since
124         the wctype module should arrange for it.
125         * lib/regex_internal.h: Likewise.
126         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
127         since the wctype module should handle this now.
128         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
129         * modules/fnmatch (Depends-on): Add wctype.
130         * modules/quotearg (Depends-on): Likewise.
131         * modules/regex (Depends-on): Likewise.
132
133 2006-12-19  Bruno Haible  <bruno@clisp.org>
134
135         * lib/strdup.h [C++]: Wrap definitions in extern "C".
136         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
137
138 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
139
140         * modules/savewd (Depends-on): Fix dependency on fcntl.
141
142 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
143
144         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
145         conforms to C99, rather than relying on the user's environment
146         setting of STDINT_H.
147
148 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
149         and Eric Blake  <ebb9@byu.net>
150
151         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
152         This is more consistent with the other defines here.
153         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
154         Port to z/OS.  Problem reported by Paul Gilmartin.
155         Change local vars to use gl_ prefix rather than ac_.
156         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
157         with other defines.
158         * modules/double-slash-root: New module.
159         * modules/dirname (Files): Remove m4/double-slash-root.m4.
160         (Depends-on): Add double-slash-root.
161         * MODULES.html.sh (File system functions): Mention new module.
162
163 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
164
165         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
166         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
167         This is for the benefit of gzip, which doesn't do i18n.
168
169 2006-12-12  Jim Meyering  <jim@meyering.net>
170
171         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
172         Reported by Andreas Schwab <schwab@suse.de>.
173
174 2006-12-12  Bruno Haible  <bruno@clisp.org>
175
176         Merge these changes.
177         2006-09-05  Bruno Haible  <bruno@clisp.org>
178         * lib/iconvme.c (iconv_string): No need to save and restore errno when
179         iconv_alloc succeeded.
180         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
181         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
182         test for " && dest " at the end - dest is always != NULL there. Call
183         iconv with 4xNULL arguments initially, to reset the state. Call iconv
184         with 2xNULL arguments, also to flush the state storage. Handle the
185         IRIX iconv behaviour. Realloc the final result, to throw away unused
186         memory.
187
188 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
189
190         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
191         and fchmodat unconditionally, since glibc 2.4 has them.
192         Problem reported by Arkadiusz Miskiewicz.
193
194 2006-12-10  Bruno Haible  <bruno@clisp.org>
195
196         * gnulib-tool (func_import): Show the include files only for those
197         modules that are copied and specified.
198         Reported by Karl Berry.
199
200 2006-12-08  Jim Meyering  <jim@meyering.net>
201
202         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
203         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
204
205         * build-aux/announce-gen: Add two new options, both optional:
206         --bootstrap-tools=TOOL_LIST
207               a comma-separated list of tools, e.g.,
208               autoconf,automake,bison,gnulib
209         --gnulib-snapshot-date=DATE
210               if gnulib is in the bootstrap tool list,
211               then report this as the snapshot date.
212               If not specified, use the current date/time.
213               If you specify a date here, be sure it's UTC.
214
215 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
216
217         * tests/test-argp-2.sh: Fix test to match actual output.
218         (func_compare): Fix sed script to be portable.
219
220 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
221
222         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
223         workaround for this case.  It is not autoconfigured now; offhand
224         it's hard to see how to autoconfigure it.
225
226 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
227
228         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
229         a directory that is about to be chowned.  Such a directory's
230         initial file permissions should permit the owner only and this
231         should not be changed until after the chown, since the group and
232         other bits would be incorrect if they granted permission before
233         the chown.
234
235         Fix porting problem for iswctype reported by Georg Schwarz in:
236         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
237         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
238         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
239         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
240         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
241
242 2006-12-03  Jim Meyering  <jim@meyering.net>
243
244         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
245         p->fts_statp may not yet be defined.
246         (fts_read): Instead, set it in the caller, once p->fts_statp is
247         sure to be defined, and corresponds to a top-level directory.
248         This bug made du -x fail.  Here's the coreutils test case:
249         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
250         Reported by Mike Frysinger.
251
252 2006-12-01  Jim Meyering  <jim@meyering.net>
253
254         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
255         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
256         Reported by Simon Josefsson.
257
258 2006-11-30  Jim Meyering  <jim@meyering.net>
259
260         * m4/warning.m4: Use the all-permissive copyright notice
261         recommended by RMS (rather than LGPL).
262         * m4/vararrays.m4: Likewise.
263         * m4/flexmember.m4: Likewise.
264
265 2006-11-29  Bruno Haible  <bruno@clisp.org>
266
267         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
268         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
269         using +=.
270         Reported by Simon Josefsson <simon@josefsson.org>.
271
272 2006-11-28  James Youngman <jay@gnu.org>
273
274         * README: Advise users that they might find the bug-gnulib@gnu.org
275         and autotools-announce@gnu.org mailing lists useful.
276
277 2006-11-28  Bruno Haible  <bruno@clisp.org>
278
279         * m4/ptrdiff_max.m4: Remove file.
280
281 2006-11-21  Bruno Haible  <bruno@clisp.org>
282
283         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
284         _AC_COMPUTE_INT.
285         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
286         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
287         _AC_COMPUTE_INT.
288         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
289         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
290         _AC_COMPUTE_INT.
291         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
292
293 2006-11-28  Jim Meyering  <jim@meyering.net>
294
295         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
296         warning from "gcc -Wshadow" about shadowing the builtin.
297
298 2006-11-27  Bruno Haible  <bruno@clisp.org>
299
300         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
301         _AC_COMPUTE_INT.
302         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
303
304 2006-11-27  Bruno Haible  <bruno@clisp.org>
305             Paul Eggert  <eggert@cs.ucla.edu>
306
307         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
308
309 2006-11-26  Bruno Haible  <bruno@clisp.org>
310
311         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
312         noinst_LTLIBRARIES.
313
314 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
315             Bruno Haible  <bruno@clisp.org>
316
317         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
318         if compiling with "gcc -ansi".
319
320 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
321
322         Fix some incompatibilities with gcc -ansi -pedantic.
323         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
324         if compiling pedantically with GCC, unless it's C99 or later.
325         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
326         it mishandles gcc -ansi -pedantic as well.
327         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
328         if gcc -pedantic.
329         * lib/regexec.c (check_node_accept_bytes): Don't use auto
330         initializers for struct if -pedantic, unless it's C99 or later.
331
332 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
333
334         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
335         Don't close an fd more than once. Identical atimes indicate
336         success, not failure.
337
338 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
339
340         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
341
342 2006-11-23  Jim Meyering  <jim@meyering.net>
343
344         * build-aux/announce-gen: New file.  From coreutils.
345
346 2006-11-22  Jim Meyering  <jim@meyering.net>
347
348         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
349         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
350         (fts_read): Use a temporary to narrow the overused st_size member
351         before using it in a switch statement.  Reported by Matthew Woehlke.
352
353         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
354         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
355
356 2006-11-20  Bruno Haible  <bruno@clisp.org>
357
358         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
359         changequote instead of pairs of brackets.
360         Reported by Andreas Schwab <schwab@suse.de>.
361
362 2006-11-21  Jim Meyering  <jim@meyering.net>
363
364         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
365         so as to remain compatible with older compilers.
366         Patch from Michael Deutschmann.
367
368 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
369
370         * MODULES.html.sh (File system functions): Add openat.
371
372         * lib/openat.h (rpl_fstatat): New macro, if
373         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
374         (fstatat): Define to rpl_fstatat under the same conditions,
375         unless COMPILING_FSTATAT.
376         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
377         seems to have the bug.
378         * lib/fstatat.c: New file.
379         * modules/openat (Files): Add it.
380
381 2006-11-20  Bruno Haible  <bruno@clisp.org>
382
383         * Makefile: New file.
384
385 2006-11-20  Jim Meyering  <jim@meyering.net>
386
387         The beginnings of syntax-related checks for gnulib.
388         * lib/Makefile: New file.
389         * lib/t-idcache: New script.  Ensure that the two halves of
390         idcache.c stay in sync.
391
392         * lib/idcache.c: Adjust comments in user- and group- portions to
393         be more accurate, and to be consistent with one another.
394
395 2006-11-20  Jim Meyering  <jim@meyering.net>
396
397         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
398         continue using the flexible array member (thus, this module performs
399         half as many malloc calls), with the addition that...
400         (getgroup, getuser): Consistently record a non-match via an empty
401         "name" string, and map an empty string match to a NULL return value.
402         * modules/idcache (Depends-on): Re-add flexmember.
403
404         * lib/idcache.c (getuser): Remove all uses of the register keyword.
405         (getuidbyname, getgroup, getgidbyname): Likewise.
406
407         Use cleaner syntax: NULL rather than 0.
408         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
409
410 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
411
412         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
413         It mishandled the case where the group was missing.
414         Problem reported by Greg Schafer.
415         * modules/idcache: Likewise.
416
417 2006-11-18  Jim Meyering  <jim@meyering.net>
418
419         * check-module (%exempt_header): Add exception for some
420         conditionally-included headers.
421
422         * modules/i-ring (Depends-on): Add verify.
423         (License): Change to LGPL.
424
425 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
426
427         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
428         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
429         and inttostr.h.  Use snprintf rather than uinttostr, so that
430         LGPLed code doesn't depend on GPLed.
431
432 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
433
434         * modules/inline (License): Change from GPL to LGPL.
435
436 2006-11-17  Jim Meyering  <jim@meyering.net>
437
438         * modules/d-type (License): Switch to LGPL.
439
440 2006-11-15  Bruno Haible  <bruno@clisp.org>
441
442         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
443
444 2006-11-15  Eric Blake  <ebb9@byu.net>
445
446         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
447         the module dependency.
448
449 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
450             Bruno Haible  <bruno@clisp.org>
451
452         * gnulib-tool (func_create_testdir): Add license consistency check.
453
454 2006-11-15  Eric Blake  <ebb9@byu.net>
455
456         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
457         random "(cached)" in configure output.
458
459 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
460
461         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
462         test for conforming inttypes.h is both announced and cached.
463
464         * MODULES.html.sh (seen_modules, seen_files): New variables.
465         (func_module): Rewrite to use a few less gnulib-tool and sed
466         invocations.  Avoid a couple of quadratic algorithms for ...
467         (missed_modules, missed_files): ... these, with ...
468         (func_append, func_tmpdir): ... these new functions, from
469         gnulib-tool.  Analogously, install traps for cleanup.
470
471         * tests/test-gc.c (main): Remove unused variables.
472         * tests/test-read-file.c: Include stdlib.h, for 'free'.
473
474 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
475
476         * modules/inttostr (License): Change to LGPL.
477
478 2006-11-14  Eric Blake  <ebb9@byu.net>
479
480         * modules/tempname (License): Change to LGPL.
481
482 2006-11-14  Eric Blake  <ebb9@byu.net>
483
484         * doc/functions.texi (Function Portability): *printf functions on
485         Cygwin now understand all POSIX size specifiers.
486
487 2006-11-14  Bruno Haible  <bruno@clisp.org>
488
489         * modules/c-ctype (License): Change to LGPL.
490
491 2006-11-12  Bruno Haible  <bruno@clisp.org>
492
493         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
494         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
495         for GNOME libraries, for which the include files are installed in
496         subdirectories of $prefix/include.
497
498 2006-11-12  Bruno Haible  <bruno@clisp.org>
499
500         * m4/lib-link.m4: Require at least autoconf-2.54.
501         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
502         name to underscores for the --with option.
503
504 2006-11-13  Bruno Haible  <bruno@clisp.org>
505
506         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
507         the tests directory.
508         Reported by Ralf Wildenhues.
509
510 2006-11-13  Bruno Haible  <bruno@clisp.org>
511
512         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
513         (func_emit_initmacro_end): Undo the override here.
514         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
515         Works around the famous automake error in coreutils.
516
517 2006-11-13  Eric Blake  <ebb9@byu.net>
518
519         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
520         element, not its node.
521
522 2006-11-12  Bruno Haible  <bruno@clisp.org>
523
524         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
525         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
526
527 2006-11-12  Bruno Haible  <bruno@clisp.org>
528
529         * gnulib-tool: New option --local-symlink.
530         (func_usage): Document it.
531         (lsymbolic): New variable.
532         (func_import, func_create_testdir): If --symlink was not specified,
533         test whether --local-symlink was specified and the file comes from
534         the local_gnulib_dir.
535
536 2006-11-12  Bruno Haible  <bruno@clisp.org>
537
538         * gnulib-tool (func_ln): New function.
539         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
540
541 2006-11-12  Bruno Haible  <bruno@clisp.org>
542
543         Finish support for source files in subdirectories.
544         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
545         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
546         AUTOMAKE_OPTIONS.
547         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
548
549 2006-11-12  Bruno Haible  <bruno@clisp.org>
550
551         * gnulib-tool (func_get_automake_snippet): Synthesize also an
552         EXTRA_lib_SOURCES augmentation.
553         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
554
555 2006-11-12  Jim Meyering  <jim@meyering.net>
556
557         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
558         file descriptors.  This also averts a failure on systems with
559         native openat support when a traversed directory lacks "x" access.
560         * lib/fts_.h: Include "i-ring.h"
561         (struct FTS) [fts_fd_ring]: New member.
562         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
563         (FCHDIR): Add parentheses.
564         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
565         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
566         When descending, rather than simply closing the previous
567         fts_cwd_fd value, push that file descriptor onto the ring.
568         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
569         (fts_open): Initialize the new fd_ring member.
570         (fts_close): Clear the ring.
571         (fts_safe_changedir): When possible, use our new fd_ring to skip
572         the diropen and fstat and dev/ino comparison that would normally
573         accompany a virtual `chdir ("..")'.
574
575         * modules/fts (Depends-on): Add i-ring.
576         * modules/i-ring: New module.
577         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
578         * m4/i-ring.m4: New file.
579
580 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
581
582         * gnulib-tool (func_create_testdir): Fix replacement of
583         `build-aux' in configure.ac.  Run autotools in gltests
584         subdirectory.
585         (func_create_testdir, func_create_megatestdir, test): There is
586         no need for '--force' in most autotool invocations in a new
587         tree.  Actually fail the whole test if any of the tools, or the
588         configure or make stages fail.
589
590         Sync from Automake.
591         * build-aux/gnupload: Revert last change.  Add pointer to upload
592         instructions of the GNU Maintenance Instructions.
593         Suggestion by Karl Berry.
594
595 2006-11-10  Jim Meyering  <jim@meyering.net>
596
597         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
598
599 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
600
601         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
602         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
603         (bind_textdomain_codeset) [! ENABLE_NLS]:
604         Evaluate all the arguments.  That way, callers get compatible behavior
605         if the arguments have side effects.  Also, it avoids some GCC
606         diagnostics in some cases; Joel E. Denny reported problems when Bison
607         was configured with --enable-gcc-warnigs.
608
609 2006-11-10  Jim Meyering  <jim@meyering.net>
610
611         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
612         relevant options in CFLAGS (like -O, -fno-inline) are taken into
613         account.
614
615 2006-11-10  Jim Meyering  <jim@meyering.net>
616
617         * modules/inline: New file/module.
618         * modules/xalloc (Files): Remove m4/inline.m4.
619         (Depends-on): Add inline, instead.
620         * modules/oset: Likewise.
621         * modules/list: Likewise.
622
623 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
624
625         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
626         Problem reported by Matthew Woehlke.
627
628 2006-11-09  Bruno Haible  <bruno@clisp.org>
629
630         * lib/tempname.c (gen_tempname): Remove variant that invokes
631         __gen_tempname.
632         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
633         __gen_tempname.
634
635 2006-11-08  Bruno Haible  <bruno@clisp.org>
636
637         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
638         to 'yes' instead of 'cross-compiling'.
639
640 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
641
642         * lib/quotearg.h (quotearg_free): New decl.
643         * lib/quotearg.c (quotearg_free): New function.
644         (slot0, nslots, slotvec0, slotvec):
645         Now file-scope so that quotearg_free can get at them.
646
647 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
648
649         Sync from Automake.
650         * build-aux/gnupload: Add missing 'gnu' to example URL.
651         Report by Karl Berry.
652
653 2006-11-08  Bruno Haible  <bruno@clisp.org>
654
655         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
656         Suggested by Paul Eggert.
657
658 2006-11-08  Jim Meyering  <jim@meyering.net>
659
660         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
661         It's already included if !_LIBC.
662         (fts_safe_changedir): Add a comment.
663
664 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
665
666         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
667         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
668         Matthew Woehlke.
669
670         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
671         definitions up, to avoid colliding with change below.
672         (static_inline) [HAVE_INLINE]: New macro.
673         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
674         Provide extern decls when !HAVE_INLINE.  Do not define unless
675         static_inline is defined, either by us or by xmalloc.c.  Use
676         static_inline rather than static inline.
677         (XCALLOC): Optimize sizeof(T) = 1 case.
678         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
679
680 2006-11-07  Bruno Haible  <bruno@clisp.org>
681
682         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
683         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
684         AC_C_INLINE.
685         * modules/xalloc (Files): Add m4/inline.m4.
686
687 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
688
689         * README: Fix typo.
690         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
691         (Miscellanous Notes): ...from this.
692
693 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
694
695         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
696         Mention that offsetof should be used instead of sizeof.
697         From Bruno Haible.
698
699 2006-11-07  Bruno Haible  <bruno@clisp.org>
700
701         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
702
703 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
704
705         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
706         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
707         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
708         (gl_tree_add_before, gl_tree_add_after):
709         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
710         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
711         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
712         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
713         (gl_linked_add_after, gl_linked_add_at): Likewise.
714         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
715         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
716         (gl_tree_add_before, gl_tree_add_after): Likewise.
717         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
718         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
719         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
720
721 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
722
723         * lib/gl_oset.h: Use C comment style, not C++ comment style.
724
725 2006-11-06  Bruno Haible  <bruno@clisp.org>
726
727         * m4/inline.m4: New file.
728         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
729         * modules/list (Files): Add m4/inline.m4.
730         * modules/oset (Files): Likewise.
731
732 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
733
734         * lib/idcache.c: Include <stddef.h>, for offsetof.
735         (struct userid.name): Change from char * to a flexible array member.
736         All uses changed.
737         * modules/idcache (Depends-on): Add flexmember.
738
739         * MODULES.html.sh (Core language properties): New module flexmember.
740         * modules/flexmember, m4/flexmember.m4: New files.
741
742         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
743         inline functions that are identical with the old xnmalloc_inline,
744         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
745         that we can avoid some unnecessary integer multiplications and
746         divisions in the common case where the element size is known at
747         compile time.
748         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
749         needed.
750         (xnboundedmalloc): Remove.
751         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
752         arguments, for consistency with rest of this header.
753         (xcharalloc): Rewrite using XNMALLOC.
754         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
755         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
756         versions have been moved to lib/xalloc.h and renamed to be the
757         non-*_inline versions.
758         (xmalloc, xrealloc): Implement without reference to the xnmalloc
759         and xnrealloc functions, since those functions are now inline and
760         now call us.
761         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
762         renaming described above.
763         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
764         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
765         captures the dependency in AC_C_INLINE.
766
767         New module canonicalize-lgpl, proposed by Charles Wilson in
768         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
769         with a few small changes afterwards.
770         * MODULES.html.sh (File system functions): New module
771         canonicalize-lgpl.
772         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
773         and canonicalize_file_name.
774         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
775         * modules/canonicalize-lgpl: New files.
776
777 2006-11-05  Bruno Haible  <bruno@clisp.org>
778
779         * gnulib-tool (func_import, func_create_testdir): Create directories
780         also for files in subdirectories of lib/.
781
782 2006-11-05  Bruno Haible  <bruno@clisp.org>
783
784         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
785         ANSI C compliant.
786
787 2006-11-03  Bruno Haible  <bruno@clisp.org>
788
789         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
790         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
791         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
792         (xnboundedmalloc): New inline function.
793         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
794         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
795         xmalloc.
796         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
797         xmalloc.
798         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
799         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
800         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
801         xmalloc.
802         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
803         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
804         xmalloc.
805         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
806         gl_tree_add_after): Use XMALLOC instead of xmalloc.
807         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
808         xmalloc.
809         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
810         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
811         gl_tree_add_after): Use XMALLOC instead of xmalloc.
812         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
813         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
814         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
815         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
816
817 2006-11-03  Bruno Haible  <bruno@clisp.org>
818
819         * lib/c-ctype.h [C++]: Define functions without name mangling.
820         * lib/fwriteerror.h [C++]: Likewise.
821         * lib/gcd.h [C++]: Likewise.
822         * lib/linebreak.h [C++]: Likewise.
823
824 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
825
826         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
827         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
828         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
829         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
830         Check for functions and headers just once.
831         Check for declaration of canonicalize_file_name.
832         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
833
834 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
835
836         * gnulib-tool (func_import): Fix typo in actioncmd.
837
838 2006-11-02  Bruno Haible  <bruno@clisp.org>
839
840         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
841         newline sequence in the Makefile.am snippet as a space, like "make"
842         does.
843         Reported by Roger Persson <perrog@gmail.com>.
844
845 2006-11-01  Bruno Haible  <bruno@clisp.org>
846
847         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
848         already declared in <string.h>.
849         * lib/strcase.h (strncasecmp): Don't declare it if yes.
850
851 2006-11-01  Bruno Haible  <bruno@clisp.org>
852
853         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
854         * lib/strcase.h: Include <string.h>.
855         (strcasecmp): Define to rpl_strcasecmp here.
856
857 2006-11-01  Bruno Haible  <bruno@clisp.org>
858
859         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
860
861 2006-11-01  Eric Blake  <ebb9@byu.net>
862
863         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
864
865         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
866
867 2006-10-29  Bruno Haible  <bruno@clisp.org>
868
869         Make it compile in C++ mode.
870         * lib/full-write.c (full_rw): Add a cast.
871
872 2006-11-01  Bruno Haible  <bruno@clisp.org>
873
874         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
875         be POSIX compliant.
876         Reported by Roger Persson <perrog@gmail.com>.
877
878 2006-11-01  Eric Blake  <ebb9@byu.net>
879
880         * lib/getopt_.h: Fix comments.
881
882 2006-10-31  Eric Blake  <ebb9@byu.net>
883
884         * modules/tmpdir (Depends-on): Add sys_stat.
885         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
886         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
887         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
888         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
889         tempname.
890
891 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
892
893         Avoid some C++ diagnostics reported by Bruno Haible.
894         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
895         xmalloc.
896         (quotearg_alloc): Use xcharalloc rather than xmalloc.
897         (struct slotvec): Move to top level.
898         (quotearg_n_options): Rewrite to avoid xmalloc.
899         * lib/xalloc.h (xcharalloc): New function.
900         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
901         [defined __cplusplus]: Add function template that provides result
902         type propagation.  This part of the change is from Bruno Haible.
903
904 2006-10-29  Bruno Haible  <bruno@clisp.org>
905
906         Make it compile in C++ mode.
907         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
908         * lib/strnlen1.c (strnlen1): Cast memchr result.
909         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
910         * lib/clean-temp.c (string_equals, string_hash): Add casts.
911         (create_temp_dir): Rename local variable 'template'.
912         (compile_csharp_using_sscli): Add cast.
913         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
914         * lib/findprog.c (find_in_path): Likewise.
915         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
916         * lib/wait-process.c (register_slave_subprocess): Likewise.
917
918 2006-10-22  Bruno Haible  <bruno@clisp.org>
919
920         * modules/tsearch: New file.
921         * lib/tsearch.h: New file.
922         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
923         * m4/tsearch.m4: New file.
924         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
925
926 2006-10-29  Eric Blake  <ebb9@byu.net>
927
928         * lib/arcfour.c: Assume config.h.
929         * lib/arctwo.c: Likewise.
930         * lib/base64.c: Likewise.
931         * lib/check-version.c: Likewise.
932         * lib/crc.c: Likewise.
933         * lib/des.c: Likewise.
934         * lib/gc-gnulib.c: Likewise.
935         * lib/gc-libgcrypt.c: Likewise.
936         * lib/gc-pbkdf2-sha1.c: Likewise.
937         * lib/getaddrinfo.c: Likewise.
938         * lib/getdelim.c: Likewise.
939         * lib/getline.c: Likewise.
940         * lib/hmac-md5.c: Likewise.
941         * lib/hmac-sha1.c: Likewise.
942         * lib/iconvme.c: Likewise.
943         * lib/md2.c: Likewise.
944         * lib/md4.c: Likewise.
945         * lib/memxor.c: Likewise.
946         * lib/read-file.c: Likewise.
947         * lib/readline.c: Likewise.
948         * lib/rijndael-alg-fst.c: Likewise.
949         * lib/rijndael-api-fst.c: Likewise.
950         * lib/xgetdomainname.c: Likewise.
951
952 2006-10-28  Eric Blake  <ebb9@byu.net>
953
954         * lib/xstrndup.c: Assume config.h.
955
956 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
957
958         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
959         stat-macros.h is now for our own macros, whereas stat_h is for
960         macros in the <sys/stat.h> name space.
961         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
962         (STAT_MACROS_H): Remove.
963         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
964         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
965         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
966         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
967         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
968         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
969         Move these macros to ...
970         * lib/stat_.h: here.  Don't include stat-macros.h.
971         * lib/canonicalize.c: Don't include stat-macros.h.
972         * lib/chown.c: Likewise.
973         * lib/euidaccess.c: Likewise.
974         * lib/file-type.c: Likewise.
975         * lib/filemode.c: Likewise.
976         * lib/glob.c: Likewise.
977         * lib/isapipe.c: Likewise.
978         * lib/lchown.c: Likewise.
979         * lib/lstat.c: Likewise.
980         * lib/mkdir-p.c: Likewise.
981         * lib/rmdir.c: Likewise.
982         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
983         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
984         unless mkdir isn't declared, to speed up 'configure'.
985         Always create sys/stat.h, since it's unlikely any real sys/stat.h
986         would define all the S_* symbols.
987         * modules/canonicalize (Depends-on):
988         Depend on sys_stat, not stat-macros.
989         * modules/chown: Likewise.
990         * modules/euidaccess: Likewise.
991         * modules/filemode: Likewise.
992         * modules/file-type: Likewise.
993         * modules/glob: Likewise.
994         * modules/isapipe: Likewise.
995         * modules/lchown: Likewise.
996         * modules/lstat: Likewise.
997         * modules/mkancesdirs: Likewise.
998         * modules/rmdir: Likewise.
999         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
1000         * modules/modechange: Likewise.
1001         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
1002         (configure.ac): Remove gl_STAT_MACROS.
1003         * modules/sys_stat (Depends-on): Remove stat-macros.
1004
1005 2006-10-27  Bruno Haible  <bruno@clisp.org>
1006
1007         * m4/signed.m4: Remove file.
1008         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
1009         invocation.
1010         * modules/vasnprintf (Files): Remove m4/signed.m4.
1011
1012 2006-10-27  Bruno Haible  <bruno@clisp.org>
1013
1014         Update to GNU gettext 0.16.
1015         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
1016         m4/inttypes-h.m4, m4/signed.m4.
1017         * m4/gettext.m4: Update to GNU gettext 0.16.
1018         * m4/intl.m4: New file, from GNU gettext.
1019         * m4/intldir.m4: New file, from GNU gettext.
1020         * config/srclist.txt: Update
1021
1022 2006-10-27  Eric Blake  <ebb9@byu.net>
1023
1024         * MODULES.html.sh: Document tempname.
1025         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
1026         dependencies.
1027         (Files): Move lib/tempname.c...
1028         * modules/tempname: ...to this new module.
1029         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
1030         (gl_PREREQ_TEMPNAME): Move...
1031         * m4/tempname.m4: ...to this new file.
1032         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
1033         * modules/sys_stat (Depends-on): Add stat-macros.
1034         * lib/stat_.h (includes): Pick up stat macros.
1035         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
1036         if stat macros are broken.
1037         * lib/tempname.c (includes): No need to include "stat-macros.h".
1038         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
1039         (direxists, __path_search) [!_LIBC]: Don't compile these in
1040         gnulib; the tmpdir module covers that.
1041         * lib/tempname.h: New file.
1042
1043 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
1044
1045         * COPYING: Explain how gnulib-tool converts licence headers.
1046         Almost all wording by Eric Blake.
1047
1048 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
1049
1050         * lib/mbchar.h (is_basic_table): Make read-only.
1051         * lib/mbchar.c (is_basic_table): Likewise.
1052         Reported by John Darrington.
1053
1054 2006-10-25  Bruno Haible  <bruno@clisp.org>
1055
1056         * lib/progname.h (set_program_name): Undefine before defining.
1057
1058 2006-10-25  Bruno Haible  <bruno@clisp.org>
1059
1060         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
1061         false for non-gcc C++ compilers.
1062         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
1063
1064 2006-10-24  Bruno Haible  <bruno@clisp.org>
1065
1066         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
1067         iconv implementations like Irix iconv.
1068
1069 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1070
1071         * modules/vararrays: New file.
1072         * m4/vararrays.m4: New file, taken from diffutils.
1073         * MODULES.html.sh: New module vararrays.
1074
1075 2006-10-24  Karl Berry  <karl@gnu.org>
1076
1077         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
1078         Don't call GNU Unix.
1079
1080 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1081
1082         * users.txt: Add Libtool.
1083
1084         Sync from Libtool:
1085
1086         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1087
1088         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
1089         to gnulib's policy of including config.h unconditionally.
1090
1091 2006-10-24  Bruno Haible  <bruno@clisp.org>
1092
1093         * modules/wcwidth (Files): Add m4/wint_t.m4.
1094         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
1095         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
1096
1097 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1098
1099         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
1100         to pacify GCC with some -W flags enabled.  Problem reported by
1101         Bruno Haible.
1102
1103 2006-10-24  Jim Meyering  <jim@meyering.net>
1104
1105         * MODULES.html.sh: Remove uinttostr.  It's not a module.
1106         Reported by Karl Berry.
1107
1108 2006-10-23  Bruno Haible  <bruno@clisp.org>
1109
1110         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
1111
1112 2006-10-24  Bruno Haible  <bruno@clisp.org>
1113
1114         * lib/gl_list.h: Use C comment style, not C++ comment style.
1115
1116 2006-10-23  Eric Blake  <ebb9@byu.net>
1117
1118         * lib/getaddrinfo.c (includes): Add missing include.
1119
1120 2006-10-23  Bruno Haible  <bruno@clisp.org>
1121             Paul Eggert  <eggert@cs.ucla.edu>
1122
1123         Ability to rename obstack_free.
1124         * lib/obstack.h (__obstack_free): New macro. Declare instead of
1125         obstack_free.
1126         (obstack_free): Invoke the __obstack_free macro.
1127         * lib/obstack.c (obstack_free): Use __obstack_free macro.
1128
1129 2006-10-23  Bruno Haible  <bruno@clisp.org>
1130             Paul Eggert  <eggert@cs.ucla.edu>
1131
1132         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
1133         __argc, __argv from the declaration. (They are defined as macros on
1134         mingw.)
1135
1136 2006-10-22  Bruno Haible  <bruno@clisp.org>
1137
1138         * doc/gnulib-intro.texi: New file.
1139         * doc/gnulib.texi: Include it.
1140
1141 2006-10-21  Bruno Haible  <bruno@clisp.org>
1142
1143         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
1144         "Introduction", "Miscellanous Notes", "Particular Modules".
1145
1146 2006-10-21  Bruno Haible  <bruno@clisp.org>
1147
1148         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1149         Change mostlyclean-local rule to avoid sh syntax error from bash
1150         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
1151
1152 2006-10-23  Jim Meyering  <jim@meyering.net>
1153
1154         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
1155         in place of snprintf.
1156
1157         * modules/inttostr (Files): Add lib/uinttostr.c.
1158         * lib/uinttostr.c (inttostr): New file/function.
1159         * lib/inttostr.h (uinttostr): Declare.
1160         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
1161         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
1162         Add uinttostr.
1163         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
1164
1165 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
1166
1167         * lib/canonicalize.c (ELOOP): Define if not already defined.
1168         Problem reported by Bruno Haible in
1169         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
1170
1171 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
1172
1173         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
1174         Problem reported by Perry Smith and Ville Laurikari.
1175
1176         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
1177         uses.
1178
1179 2006-10-19  Bruno Haible  <bruno@clisp.org>
1180
1181         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
1182         for mingw.
1183
1184 2006-10-19  Bruno Haible  <bruno@clisp.org>
1185
1186         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
1187         Needed for mingw.
1188
1189 2006-10-19  Bruno Haible  <bruno@clisp.org>
1190
1191         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
1192
1193 2006-10-19  Bruno Haible  <bruno@clisp.org>
1194
1195         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
1196         it.
1197
1198 2006-10-19  Bruno Haible  <bruno@clisp.org>
1199
1200         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
1201         invocation.
1202
1203 2006-10-19  Bruno Haible  <bruno@clisp.org>
1204
1205         * gnulib-tool (func_create_testdir): Don't include ftruncate and
1206         mountlist by default.
1207
1208 2006-10-16  Bruno Haible  <bruno@clisp.org>
1209
1210         * lib/c-strstr.c: Include c-strstr.h.
1211
1212 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1213
1214         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
1215         in a slash.
1216
1217 2006-10-18  Bruno Haible  <bruno@clisp.org>
1218
1219         * lib/lock.h [C++]: Wrap definitions in extern "C".
1220
1221 2006-10-18  Bruno Haible  <bruno@clisp.org>
1222
1223         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
1224         gl_LIBOBJS list.
1225
1226 2006-10-18  Bruno Haible  <bruno@clisp.org>
1227
1228         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
1229
1230 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
1231
1232         * lib/xstrtol.h: Include gettext.h.
1233         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
1234         Problem reported by Eric Blake.
1235         * modules/xstrtol (Depends-on): Add gettext-h.
1236
1237 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
1238
1239         * lib/strftime.c (advance): New macro.
1240         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
1241         incomplete type, so you can't add 0 to it.  Problem and patch
1242         reported by Eelco Dolstra for dietlibc.
1243
1244 2006-10-18  Jim Meyering  <jim@meyering.net>
1245
1246         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
1247         type for a local, and rename it: s/up/user_proc/.
1248
1249 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
1250
1251         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
1252         READ_UTMP_USER_PROCESS.
1253         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
1254
1255 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
1256
1257         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
1258         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
1259
1260 2006-10-17  Eric Blake  <ebb9@byu.net>
1261
1262         * lib/sigprocmask.c (sigprocmask): Fix typo.
1263
1264         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
1265
1266         * modules/clean-temp (Makefile.am): Don't add to make output...
1267         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
1268         config.h.
1269
1270 2006-10-17  Bruno Haible  <bruno@clisp.org>
1271
1272         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
1273         differently if DEFAULT_TEXT_DOMAIN is set.
1274
1275 2006-10-16  Bruno Haible  <bruno@clisp.org>
1276
1277         * lib/clean-temp.c: Include fwriteerror.h.
1278
1279 2006-10-16  Bruno Haible  <bruno@clisp.org>
1280
1281         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
1282
1283 2006-10-16  Bruno Haible  <bruno@clisp.org>
1284
1285         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
1286         * lib/sigprocmask.h: Include <sys/types.h>.
1287         (sigset_t): Use the system's definition if present.
1288
1289 2006-10-17  Eric Blake  <ebb9@byu.net>
1290
1291         * lib/xvasprintf.c (includes): Assume config.h.
1292         * lib/xasprintf.c (includes): Likewise.
1293
1294 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
1295
1296         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
1297         at least as wide as intmax_t.
1298
1299 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
1300
1301         (Imported from Automake.)
1302         * build-aux/gnupload: Update to version 1.1 of directive file.
1303
1304 2006-10-16  Eric Blake  <ebb9@byu.net>
1305
1306         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
1307         match Automake 1.10a.
1308
1309 2006-10-14  Bruno Haible  <bruno@clisp.org>
1310
1311         * modules/sigprocmask: New file.
1312         * lib/sigprocmask.h: New file.
1313         * lib/sigprocmask.c: New file.
1314         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
1315         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
1316         request sigprocmask.o.
1317         (gl_PREREQ_SIGPROCMASK): New macro.
1318         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
1319         (Depends-on): Add sigprocmask.
1320         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
1321         gt_SIGNALBLOCKING. Test for 'raise' only once.
1322         * lib/fatal-signal.c: Include sigprocmask.h.
1323         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
1324         unblock_fatal_signals): Define always.
1325         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1326         sigprocmask.
1327
1328 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
1329
1330         Sync from Automake.
1331         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
1332         which incorrectly sets the mode of an existing destination
1333         directory.  In some cases the unpatched install-sh could do the
1334         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
1335         system.  We hope this is rare in practice, but it's clearly worth
1336         fixing.  Problem reported by Alex Unleashed in
1337         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
1338         Also, don't bother to check for -m bugs unless we're using -m;
1339         suggested by Stepan Kasal.
1340
1341 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1342
1343         Sync from Automake.
1344         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
1345         `-c' flag, so they appear at the same position as in %FASTDEP%
1346         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
1347         which ignores unknown options only after the first non-option.
1348         Bug report against M4 by Nelson H. F. Beebe.
1349
1350 2006-10-13  Jim Meyering  <jim@meyering.net>
1351
1352         Fix a bug in yesterday's change.
1353         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
1354         p->fts_statp->st_dev would be used uninitialized.
1355         Ensures that we always call fts_stat on the very first entry.
1356         Miklos Szeredi reported that find -xdev stopped working.
1357
1358 2006-10-12  Bruno Haible  <bruno@clisp.org>
1359
1360         * gnulib-tool (func_get_automake_snippet): Append an automatically
1361         computed EXTRA_DIST augmentation.
1362         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
1363         * modules/alloca-opt (Makefile.am): Likewise.
1364         * modules/allocsa (Makefile.am): Likewise.
1365         * modules/arcfour (Makefile.am): Likewise.
1366         * modules/arctwo (Makefile.am): Likewise.
1367         * modules/argmatch (Makefile.am): Likewise.
1368         * modules/argz (Makefile.am): Likewise.
1369         * modules/atexit (Makefile.am): Likewise.
1370         * modules/backupfile (Makefile.am): Likewise.
1371         * modules/byteswap (Makefile.am): Likewise.
1372         * modules/c-strtod (Makefile.am): Likewise.
1373         * modules/c-strtold (Makefile.am): Likewise.
1374         * modules/calloc (Makefile.am): Likewise.
1375         * modules/canon-host (Makefile.am): Likewise.
1376         * modules/canonicalize (Makefile.am): Likewise.
1377         * modules/chdir-long (Makefile.am): Likewise.
1378         * modules/chdir-safer (Makefile.am): Likewise.
1379         * modules/check-version (Makefile.am): Likewise.
1380         * modules/chown (Makefile.am): Likewise.
1381         * modules/cloexec (Makefile.am): Likewise.
1382         * modules/close-stream (Makefile.am): Likewise.
1383         * modules/closeout (Makefile.am): Likewise.
1384         * modules/crc (Makefile.am): Likewise.
1385         * modules/csharpexec (Makefile.am): Likewise.
1386         * modules/cycle-check (Makefile.am): Likewise.
1387         * modules/des (Makefile.am): Likewise.
1388         * modules/dev-ino (Makefile.am): Likewise.
1389         * modules/dirfd (Makefile.am): Likewise.
1390         * modules/dirname (Makefile.am): Likewise.
1391         * modules/dup2 (Makefile.am): Likewise.
1392         * modules/eealloc (Makefile.am): Likewise.
1393         * modules/error (Makefile.am): Likewise.
1394         * modules/euidaccess (Makefile.am): Likewise.
1395         * modules/exclude (Makefile.am): Likewise.
1396         * modules/exitfail (Makefile.am): Likewise.
1397         * modules/fcntl-safer (Makefile.am): Likewise.
1398         * modules/fcntl (Makefile.am): Likewise.
1399         * modules/file-type (Makefile.am): Likewise.
1400         * modules/fileblocks (Makefile.am): Likewise.
1401         * modules/filemode (Makefile.am): Likewise.
1402         * modules/filenamecat (Makefile.am): Likewise.
1403         * modules/fnmatch (Makefile.am): Likewise.
1404         * modules/fopen-safer (Makefile.am): Likewise.
1405         * modules/fpending (Makefile.am): Likewise.
1406         * modules/fprintftime (Makefile.am): Likewise.
1407         * modules/free (Makefile.am): Likewise.
1408         * modules/fsusage (Makefile.am): Likewise.
1409         * modules/ftruncate (Makefile.am): Likewise.
1410         * modules/fts (Makefile.am): Likewise.
1411         * modules/gc-arcfour (Makefile.am): Likewise.
1412         * modules/gc-des (Makefile.am): Likewise.
1413         * modules/gc-hmac-md5 (Makefile.am): Likewise.
1414         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
1415         * modules/gc-md4 (Makefile.am): Likewise.
1416         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
1417         * modules/gc-sha1 (Makefile.am): Likewise.
1418         * modules/gc (Makefile.am): Likewise.
1419         * modules/getaddrinfo (Makefile.am): Likewise.
1420         * modules/getcwd (Makefile.am): Likewise.
1421         * modules/getdelim (Makefile.am): Likewise.
1422         * modules/getdomainname (Makefile.am): Likewise.
1423         * modules/getgroups (Makefile.am): Likewise.
1424         * modules/gethostname (Makefile.am): Likewise.
1425         * modules/gethrxtime (Makefile.am): Likewise.
1426         * modules/getline (Makefile.am): Likewise.
1427         * modules/getloadavg (Makefile.am): Likewise.
1428         * modules/getlogin_r (Makefile.am): Likewise.
1429         * modules/getndelim2 (Makefile.am): Likewise.
1430         * modules/getopt (Makefile.am): Likewise.
1431         * modules/getpagesize (Makefile.am): Likewise.
1432         * modules/getpass-gnu (Makefile.am): Likewise.
1433         * modules/getpass (Makefile.am): Likewise.
1434         * modules/getsubopt (Makefile.am): Likewise.
1435         * modules/gettime (Makefile.am): Likewise.
1436         * modules/gettimeofday (Makefile.am): Likewise.
1437         * modules/getugroups (Makefile.am): Likewise.
1438         * modules/getusershell (Makefile.am): Likewise.
1439         * modules/glob (Makefile.am): Likewise.
1440         * modules/group-member (Makefile.am): Likewise.
1441         * modules/hard-locale (Makefile.am): Likewise.
1442         * modules/hash (Makefile.am): Likewise.
1443         * modules/hmac-md5 (Makefile.am): Likewise.
1444         * modules/hmac-sha1 (Makefile.am): Likewise.
1445         * modules/human (Makefile.am): Likewise.
1446         * modules/idcache (Makefile.am): Likewise.
1447         * modules/imaxabs (Makefile.am): Likewise.
1448         * modules/imaxdiv (Makefile.am): Likewise.
1449         * modules/inet_ntop (Makefile.am): Likewise.
1450         * modules/inet_pton (Makefile.am): Likewise.
1451         * modules/intprops (Makefile.am): Likewise.
1452         * modules/inttostr (Makefile.am): Likewise.
1453         * modules/inttypes (Makefile.am): Likewise.
1454         * modules/isapipe (Makefile.am): Likewise.
1455         * modules/javaversion (Makefile.am): Likewise.
1456         * modules/lchmod (Makefile.am): Likewise.
1457         * modules/lchown (Makefile.am): Likewise.
1458         * modules/localcharset (Makefile.am): Likewise.
1459         * modules/long-options (Makefile.am): Likewise.
1460         * modules/lstat (Makefile.am): Likewise.
1461         * modules/malloc (Makefile.am): Likewise.
1462         * modules/mathl (Makefile.am): Likewise.
1463         * modules/mbchar (Makefile.am): Likewise.
1464         * modules/md2 (Makefile.am): Likewise.
1465         * modules/md4 (Makefile.am): Likewise.
1466         * modules/md5 (Makefile.am): Likewise.
1467         * modules/memcasecmp (Makefile.am): Likewise.
1468         * modules/memchr (Makefile.am): Likewise.
1469         * modules/memcmp (Makefile.am): Likewise.
1470         * modules/memcoll (Makefile.am): Likewise.
1471         * modules/memcpy (Makefile.am): Likewise.
1472         * modules/memmem (Makefile.am): Likewise.
1473         * modules/memmove (Makefile.am): Likewise.
1474         * modules/mempcpy (Makefile.am): Likewise.
1475         * modules/memrchr (Makefile.am): Likewise.
1476         * modules/memset (Makefile.am): Likewise.
1477         * modules/memxor (Makefile.am): Likewise.
1478         * modules/mkancesdirs (Makefile.am): Likewise.
1479         * modules/mkdir-p (Makefile.am): Likewise.
1480         * modules/mkdir (Makefile.am): Likewise.
1481         * modules/mkdtemp (Makefile.am): Likewise.
1482         * modules/mkstemp (Makefile.am): Likewise.
1483         * modules/mktime (Makefile.am): Likewise.
1484         * modules/modechange (Makefile.am): Likewise.
1485         * modules/mountlist (Makefile.am): Likewise.
1486         * modules/nanosleep (Makefile.am): Likewise.
1487         * modules/obstack (Makefile.am): Likewise.
1488         * modules/openat (Makefile.am): Likewise.
1489         * modules/pagealign_alloc (Makefile.am): Likewise.
1490         * modules/pathmax (Makefile.am): Likewise.
1491         * modules/physmem (Makefile.am): Likewise.
1492         * modules/poll (Makefile.am): Likewise.
1493         * modules/posixtm (Makefile.am): Likewise.
1494         * modules/posixver (Makefile.am): Likewise.
1495         * modules/putenv (Makefile.am): Likewise.
1496         * modules/quote (Makefile.am): Likewise.
1497         * modules/quotearg (Makefile.am): Likewise.
1498         * modules/raise (Makefile.am): Likewise.
1499         * modules/read-file (Makefile.am): Likewise.
1500         * modules/readline (Makefile.am): Likewise.
1501         * modules/readlink (Makefile.am): Likewise.
1502         * modules/readtokens (Makefile.am): Likewise.
1503         * modules/readutmp (Makefile.am): Likewise.
1504         * modules/realloc (Makefile.am): Likewise.
1505         * modules/regex (Makefile.am): Likewise.
1506         * modules/rename-dest-slash (Makefile.am): Likewise.
1507         * modules/rename (Makefile.am): Likewise.
1508         * modules/rijndael (Makefile.am): Likewise.
1509         * modules/rmdir (Makefile.am): Likewise.
1510         * modules/rpmatch (Makefile.am): Likewise.
1511         * modules/safe-read (Makefile.am): Likewise.
1512         * modules/safe-write (Makefile.am): Likewise.
1513         * modules/same-inode (Makefile.am): Likewise.
1514         * modules/same (Makefile.am): Likewise.
1515         * modules/save-cwd (Makefile.am): Likewise.
1516         * modules/savedir (Makefile.am): Likewise.
1517         * modules/setenv (Makefile.am): Likewise.
1518         * modules/settime (Makefile.am): Likewise.
1519         * modules/sha1 (Makefile.am): Likewise.
1520         * modules/sig2str (Makefile.am): Likewise.
1521         * modules/snprintf (Makefile.am): Likewise.
1522         * modules/stat-macros (Makefile.am): Likewise.
1523         * modules/stat-time (Makefile.am): Likewise.
1524         * modules/stdbool (Makefile.am): Likewise.
1525         * modules/stdint (Makefile.am): Likewise.
1526         * modules/stdlib-safer (Makefile.am): Likewise.
1527         * modules/stpcpy (Makefile.am): Likewise.
1528         * modules/stpncpy (Makefile.am): Likewise.
1529         * modules/strcase (Makefile.am): Likewise.
1530         * modules/strcasestr (Makefile.am): Likewise.
1531         * modules/strchrnul (Makefile.am): Likewise.
1532         * modules/strcspn (Makefile.am): Likewise.
1533         * modules/strdup (Makefile.am): Likewise.
1534         * modules/strerror (Makefile.am): Likewise.
1535         * modules/strftime (Makefile.am): Likewise.
1536         * modules/strndup (Makefile.am): Likewise.
1537         * modules/strnlen (Makefile.am): Likewise.
1538         * modules/strpbrk (Makefile.am): Likewise.
1539         * modules/strsep (Makefile.am): Likewise.
1540         * modules/strstr (Makefile.am): Likewise.
1541         * modules/strtod (Makefile.am): Likewise.
1542         * modules/strtoimax (Makefile.am): Likewise.
1543         * modules/strtok_r (Makefile.am): Likewise.
1544         * modules/strtol (Makefile.am): Likewise.
1545         * modules/strtoll (Makefile.am): Likewise.
1546         * modules/strtoul (Makefile.am): Likewise.
1547         * modules/strtoull (Makefile.am): Likewise.
1548         * modules/strtoumax (Makefile.am): Likewise.
1549         * modules/strverscmp (Makefile.am): Likewise.
1550         * modules/sys_socket (Makefile.am): Likewise.
1551         * modules/sys_stat (Makefile.am): Likewise.
1552         * modules/sysexits (Makefile.am): Likewise.
1553         * modules/time_r (Makefile.am): Likewise.
1554         * modules/timegm (Makefile.am): Likewise.
1555         * modules/timespec (Makefile.am): Likewise.
1556         * modules/tmpfile-safer (Makefile.am): Likewise.
1557         * modules/trim (Makefile.am): Likewise.
1558         * modules/unistd-safer (Makefile.am): Likewise.
1559         * modules/unlinkdir (Makefile.am): Likewise.
1560         * modules/unlocked-io (Makefile.am): Likewise.
1561         * modules/userspec (Makefile.am): Likewise.
1562         * modules/utime (Makefile.am): Likewise.
1563         * modules/utimecmp (Makefile.am): Likewise.
1564         * modules/utimens (Makefile.am): Likewise.
1565         * modules/vasnprintf (Makefile.am): Likewise.
1566         * modules/vasprintf (Makefile.am): Likewise.
1567         * modules/vsnprintf (Makefile.am): Likewise.
1568         * modules/xalloc (Makefile.am): Likewise.
1569         * modules/xgetcwd (Makefile.am): Likewise.
1570         * modules/xnanosleep (Makefile.am): Likewise.
1571         * modules/xreadlink (Makefile.am): Likewise.
1572         * modules/xstrtod (Makefile.am): Likewise.
1573         * modules/xstrtol (Makefile.am): Likewise.
1574         * modules/xstrtold (Makefile.am): Likewise.
1575         * modules/yesno (Makefile.am): Likewise.
1576         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
1577
1578 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
1579
1580         * modules/error (Makefile.am): Distribute files through
1581         EXTRA_DIST, not lib_SOURCES.
1582
1583 2006-10-12  Eric Blake  <ebb9@byu.net>
1584
1585         * modules/error (Makefile.am): Distribute files in /lib.
1586         * modules/obstack (Makefile.am): Likewise.
1587
1588 2006-10-12  Bruno Haible  <bruno@clisp.org>
1589
1590         * modules/acl (Makefile.am): Distribute all files in lib/ through
1591         EXTRA_DIST.
1592         * modules/arcfour (Makefile.am): Likewise.
1593         * modules/arctwo (Makefile.am): Likewise.
1594         * modules/argmatch (Makefile.am): Likewise.
1595         * modules/argz (Makefile.am): Likewise.
1596         * modules/atexit (Makefile.am): Likewise.
1597         * modules/backupfile (Makefile.am): Likewise.
1598         * modules/c-strtod (Makefile.am): Likewise.
1599         * modules/c-strtold (Makefile.am): Likewise.
1600         * modules/calloc (Makefile.am): Likewise.
1601         * modules/canon-host (Makefile.am): Likewise.
1602         * modules/canonicalize (Makefile.am): Likewise.
1603         * modules/chdir-long (Makefile.am): Likewise.
1604         * modules/chdir-safer (Makefile.am): Likewise.
1605         * modules/check-version (Makefile.am): Likewise.
1606         * modules/chown (Makefile.am): Likewise.
1607         * modules/cloexec (Makefile.am): Likewise.
1608         * modules/close-stream (Makefile.am): Likewise.
1609         * modules/closeout (Makefile.am): Likewise.
1610         * modules/crc (Makefile.am): Likewise.
1611         * modules/cycle-check (Makefile.am): Likewise.
1612         * modules/des (Makefile.am): Likewise.
1613         * modules/dirfd (Makefile.am): Likewise.
1614         * modules/dirname (Makefile.am): Likewise.
1615         * modules/dup2 (Makefile.am): Likewise.
1616         * modules/euidaccess (Makefile.am): Likewise.
1617         * modules/exclude (Makefile.am): Likewise.
1618         * modules/exitfail (Makefile.am): Likewise.
1619         * modules/fcntl-safer (Makefile.am): Likewise.
1620         * modules/file-type (Makefile.am): Likewise.
1621         * modules/fileblocks (Makefile.am): Likewise.
1622         * modules/filemode (Makefile.am): Likewise.
1623         * modules/filenamecat (Makefile.am): Likewise.
1624         * modules/fnmatch (Makefile.am): Likewise.
1625         * modules/fopen-safer (Makefile.am): Likewise.
1626         * modules/fpending (Makefile.am): Likewise.
1627         * modules/fprintftime (Makefile.am): Likewise.
1628         * modules/free (Makefile.am): Likewise.
1629         * modules/fsusage (Makefile.am): Likewise.
1630         * modules/ftruncate (Makefile.am): Likewise.
1631         * modules/fts (Makefile.am): Likewise.
1632         * modules/gc (Makefile.am): Likewise.
1633         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
1634         * modules/getaddrinfo (Makefile.am): Likewise.
1635         * modules/getcwd (Makefile.am): Likewise.
1636         * modules/getdelim (Makefile.am): Likewise.
1637         * modules/getdomainname (Makefile.am): Likewise.
1638         * modules/getgroups (Makefile.am): Likewise.
1639         * modules/gethostname (Makefile.am): Likewise.
1640         * modules/gethrxtime (Makefile.am): Likewise.
1641         * modules/getline (Makefile.am): Likewise.
1642         * modules/getloadavg (Makefile.am): Likewise.
1643         * modules/getlogin_r (Makefile.am): Likewise.
1644         * modules/getopt (Makefile.am): Likewise.
1645         * modules/getpass (Makefile.am): Likewise.
1646         * modules/getpass-gnu (Makefile.am): Likewise.
1647         * modules/getsubopt (Makefile.am): Likewise.
1648         * modules/gettime (Makefile.am): Likewise.
1649         * modules/gettimeofday (Makefile.am): Likewise.
1650         * modules/getugroups (Makefile.am): Likewise.
1651         * modules/getusershell (Makefile.am): Likewise.
1652         * modules/glob (Makefile.am): Likewise.
1653         * modules/group-member (Makefile.am): Likewise.
1654         * modules/hard-locale (Makefile.am): Likewise.
1655         * modules/hash (Makefile.am): Likewise.
1656         * modules/hmac-md5 (Makefile.am): Likewise.
1657         * modules/hmac-sha1 (Makefile.am): Likewise.
1658         * modules/human (Makefile.am): Likewise.
1659         * modules/idcache (Makefile.am): Likewise.
1660         * modules/imaxabs (Makefile.am): Likewise.
1661         * modules/imaxdiv (Makefile.am): Likewise.
1662         * modules/inet_ntop (Makefile.am): Likewise.
1663         * modules/inet_pton (Makefile.am): Likewise.
1664         * modules/inttostr (Makefile.am): Likewise.
1665         * modules/isapipe (Makefile.am): Likewise.
1666         * modules/lchown (Makefile.am): Likewise.
1667         * modules/long-options (Makefile.am): Likewise.
1668         * modules/lstat (Makefile.am): Likewise.
1669         * modules/malloc (Makefile.am): Likewise.
1670         * modules/mathl (Makefile.am): Likewise.
1671         * modules/mbchar (Makefile.am): Likewise.
1672         * modules/md2 (Makefile.am): Likewise.
1673         * modules/md4 (Makefile.am): Likewise.
1674         * modules/md5 (Makefile.am): Likewise.
1675         * modules/memcasecmp (Makefile.am): Likewise.
1676         * modules/memchr (Makefile.am): Likewise.
1677         * modules/memcmp (Makefile.am): Likewise.
1678         * modules/memcoll (Makefile.am): Likewise.
1679         * modules/memcpy (Makefile.am): Likewise.
1680         * modules/memmem (Makefile.am): Likewise.
1681         * modules/memmove (Makefile.am): Likewise.
1682         * modules/mempcpy (Makefile.am): Likewise.
1683         * modules/memrchr (Makefile.am): Likewise.
1684         * modules/memset (Makefile.am): Likewise.
1685         * modules/memxor (Makefile.am): Likewise.
1686         * modules/mkancesdirs (Makefile.am): Likewise.
1687         * modules/mkdir (Makefile.am): Likewise.
1688         * modules/mkdir-p (Makefile.am): Likewise.
1689         * modules/mkdtemp (Makefile.am): Likewise.
1690         * modules/mkstemp (Makefile.am): Likewise.
1691         * modules/mktime (Makefile.am): Likewise.
1692         * modules/modechange (Makefile.am): Likewise.
1693         * modules/mountlist (Makefile.am): Likewise.
1694         * modules/nanosleep (Makefile.am): Likewise.
1695         * modules/openat (Makefile.am): Likewise.
1696         * modules/pagealign_alloc (Makefile.am): Likewise.
1697         * modules/physmem (Makefile.am): Likewise.
1698         * modules/poll (Makefile.am): Likewise.
1699         * modules/posixtm (Makefile.am): Likewise.
1700         * modules/posixver (Makefile.am): Likewise.
1701         * modules/putenv (Makefile.am): Likewise.
1702         * modules/quote (Makefile.am): Likewise.
1703         * modules/quotearg (Makefile.am): Likewise.
1704         * modules/raise (Makefile.am): Likewise.
1705         * modules/read-file (Makefile.am): Likewise.
1706         * modules/readline (Makefile.am): Likewise.
1707         * modules/readlink (Makefile.am): Likewise.
1708         * modules/readtokens (Makefile.am): Likewise.
1709         * modules/readutmp (Makefile.am): Likewise.
1710         * modules/realloc (Makefile.am): Likewise.
1711         * modules/regex (Makefile.am): Likewise.
1712         * modules/rename (Makefile.am): Likewise.
1713         * modules/rename-dest-slash (Makefile.am): Likewise.
1714         * modules/rijndael (Makefile.am): Likewise.
1715         * modules/rmdir (Makefile.am): Likewise.
1716         * modules/rpmatch (Makefile.am): Likewise.
1717         * modules/safe-read (Makefile.am): Likewise.
1718         * modules/safe-write (Makefile.am): Likewise.
1719         * modules/same (Makefile.am): Likewise.
1720         * modules/save-cwd (Makefile.am): Likewise.
1721         * modules/savedir (Makefile.am): Likewise.
1722         * modules/setenv (Makefile.am): Likewise.
1723         * modules/settime (Makefile.am): Likewise.
1724         * modules/sha1 (Makefile.am): Likewise.
1725         * modules/sig2str (Makefile.am): Likewise.
1726         * modules/snprintf (Makefile.am): Likewise.
1727         * modules/stdlib-safer (Makefile.am): Likewise.
1728         * modules/stpcpy (Makefile.am): Likewise.
1729         * modules/stpncpy (Makefile.am): Likewise.
1730         * modules/strcase (Makefile.am): Likewise.
1731         * modules/strcasestr (Makefile.am): Likewise.
1732         * modules/strchrnul (Makefile.am): Likewise.
1733         * modules/strcspn (Makefile.am): Likewise.
1734         * modules/strdup (Makefile.am): Likewise.
1735         * modules/strerror (Makefile.am): Likewise.
1736         * modules/strftime (Makefile.am): Likewise.
1737         * modules/strndup (Makefile.am): Likewise.
1738         * modules/strnlen (Makefile.am): Likewise.
1739         * modules/strpbrk (Makefile.am): Likewise.
1740         * modules/strsep (Makefile.am): Likewise.
1741         * modules/strstr (Makefile.am): Likewise.
1742         * modules/strtod (Makefile.am): Likewise.
1743         * modules/strtoimax (Makefile.am): Likewise.
1744         * modules/strtok_r (Makefile.am): Likewise.
1745         * modules/strtol (Makefile.am): Likewise.
1746         * modules/strtoll (Makefile.am): Likewise.
1747         * modules/strtoul (Makefile.am): Likewise.
1748         * modules/strtoull (Makefile.am): Likewise.
1749         * modules/strtoumax (Makefile.am): Likewise.
1750         * modules/strverscmp (Makefile.am): Likewise.
1751         * modules/time_r (Makefile.am): Likewise.
1752         * modules/timegm (Makefile.am): Likewise.
1753         * modules/tmpfile-safer (Makefile.am): Likewise.
1754         * modules/unistd-safer (Makefile.am): Likewise.
1755         * modules/unlinkdir (Makefile.am): Likewise.
1756         * modules/userspec (Makefile.am): Likewise.
1757         * modules/utime (Makefile.am): Likewise.
1758         * modules/utimecmp (Makefile.am): Likewise.
1759         * modules/utimens (Makefile.am): Likewise.
1760         * modules/vasnprintf (Makefile.am): Likewise.
1761         * modules/vasprintf (Makefile.am): Likewise.
1762         * modules/vsnprintf (Makefile.am): Likewise.
1763         * modules/xalloc (Makefile.am): Likewise.
1764         * modules/xgetcwd (Makefile.am): Likewise.
1765         * modules/xnanosleep (Makefile.am): Likewise.
1766         * modules/xreadlink (Makefile.am): Likewise.
1767         * modules/xstrtod (Makefile.am): Likewise.
1768         * modules/xstrtol (Makefile.am): Likewise.
1769         * modules/xstrtold (Makefile.am): Likewise.
1770         * modules/yesno (Makefile.am): Likewise.
1771
1772 2006-10-12  Jim Meyering  <jim@meyering.net>
1773
1774         * m4/getloadavg.m4: Revert the change below.
1775
1776         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
1777         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
1778         fail with a symlink, which is what coreutils' ./bootstrap now
1779         creates by default.
1780
1781 2006-10-12  Bruno Haible  <bruno@clisp.org>
1782
1783         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
1784         mingw.
1785         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
1786         MSVC and mingw explicitly.
1787
1788 2006-10-11  Simon Josefsson  <jas@extundo.com>
1789             Bruno Haible  <bruno@clisp.org>
1790
1791         Add support for multiple gnulib-tool invocations in the scope of a
1792         single configure.ac file.
1793         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
1794         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
1795         with the same contents as the _LIBADD variable.
1796         (func_emit_initmacro_start, func_emit_initmacro_end,
1797         func_emit_initmacro_done): New functions.
1798         (func_import, func_create_testdir): Invoke them. Allow the identifiers
1799         gl_LIBOBJS and gl_LTLIBOBJS.
1800
1801 2006-10-11  Bruno Haible  <bruno@clisp.org>
1802
1803         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
1804         (func_create_testdir): Don't create po/Makefile.am, don't invoke
1805         autoreconf. Instead, invoke autopoint explicitly but move back the
1806         *.m4 files from gnulib.
1807
1808 2006-10-11  Bruno Haible  <bruno@clisp.org>
1809
1810         * gnulib-tool (func_usage): Make module names after --create-testdir
1811         optional.
1812         (func_create_testdir): If no module was specified, use nearly all
1813         modules.
1814
1815 2006-10-12  Jim Meyering  <jim@meyering.net>
1816
1817         Big performance improvement for fts-based tools that use FTS_NOSTAT.
1818         Avoid spurious inode-mismatch problems on non-POSIX file systems.
1819         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
1820         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
1821         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
1822         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
1823         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
1824         (fts_set_stat_required): New function.
1825         (fts_open): Defer the calls to fts_stat, if possible or requested.
1826         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
1827         into fts_stat itself.
1828         (fts_read): Perform any required (deferred) fts_stat call.
1829         (fts_build): Likewise, for the directory we're about to open and read.
1830         In the readdir loop, carefully decide whether each entry will require
1831         an eventual call to fts_stat, using dirent.d_type info if available.
1832         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
1833         a command line argument into this function.  Update all callers.
1834         Map a return value of FTS_DOT to FTS_D for a command line argument.
1835         * modules/fts (Depends-on): Add d-type.  Alphabetize.
1836         Thanks to Miklos Szeredi for his tenacity and for the initial
1837         bug report about "find" failing on a FUSE-based file system.
1838
1839         * lib/fts.c (fts_open): Use consistent indentation.
1840
1841 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
1842
1843         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
1844         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
1845         reported by Jim Meyering.  All uses of cache variables renamed
1846         to match Autoconf's.
1847         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
1848         the other one.
1849
1850         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
1851         Fix misspelling in diagnostic.
1852
1853 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1854
1855         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
1856         defined.  Problem reported by Matthew Woehlke.
1857
1858         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
1859         Add support for Tandem NonStop R series.
1860         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
1861         Use new macro.
1862
1863         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
1864         (has_trailing_slash): Omit size arg; all callers changed.
1865         Omit 'inline', since it doesn't help performance and we'd
1866         need to configure it.
1867         Don't count //, ///, etc. as having a trailing slash.
1868         As a side effect, this removes a C99ism reported by Matthew Woehlke.
1869         (rpl_rename_dest_slash): On failure, use rename's errno rather
1870         than (in some cases) an incorrect or junk errno.
1871         Simplify code by removing need to compute length; this does
1872         cause it to make two passes instead of one over the file name,
1873         but it's worth it.
1874
1875         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
1876         change, since Autoconf's version may no longer be appropriate now
1877         that we are using CVS Autoconf's version.  Add support for Tandem.
1878
1879 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1880             Bruno Haible  <bruno@clisp.org>
1881
1882         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
1883         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
1884         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
1885         gl_AC_TYPE_LONG_LONG.
1886
1887         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
1888         instead of HAVE_LONG_LONG.
1889         * lib/printf-args.c (printf_fetchargs): Likewise.
1890         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
1891         * lib/vasnprintf.c (VASNPRINTF): Likewise.
1892         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
1893         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
1894         gl_AC_TYPE_LONG_LONG.
1895
1896 2006-10-11  Bruno Haible  <bruno@clisp.org>
1897
1898         * m4/longlong.m4: Add comments.
1899         * m4/ulonglong.m4: Likewise.
1900
1901 2006-10-10  Bruno Haible  <bruno@clisp.org>
1902
1903         Make it possible to #define stpcpy, strdup to aliases.
1904         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
1905         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
1906
1907 2006-10-10  Bruno Haible  <bruno@clisp.org>
1908
1909         Make it possible to #define gcd to an alias.
1910         * lib/gcd.c: Include config.h.
1911
1912 2006-10-10  Bruno Haible  <bruno@clisp.org>
1913
1914         Make it possible to #define c_isascii to an alias.
1915         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
1916         defined. Undefine the macros before defining them, to avoid gcc
1917         warnings.
1918         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
1919         define NO_C_CTYPE_MACROS early.
1920
1921 2006-10-10  Bruno Haible  <bruno@clisp.org>
1922
1923         Make it possible to #define set_program_name to an alias.
1924         * lib/progname.c: Don't undefine set_program_name; instead, undefine
1925         ENABLE_RELOCATABLE early.
1926
1927 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
1928
1929         Port to Tandem NSK OSS, which has 64-bit signed int but at most
1930         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
1931         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
1932         More generally, don't assume that 64-bit signed int is available
1933         if unsigned int is, and vice versa.
1934         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
1935         unsigned symbols, not on their signed counterparts.
1936         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
1937         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
1938         (UINT64_C, UINTMAX_C):
1939         Likewise.
1940         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
1941         unsigned counterparts.
1942         (Have_long_long, Unsigned): New macros.
1943         (Int): Renamed from INT.
1944         (strtoimax): Use the new macros.
1945         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
1946         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
1947         * modules/inttypes (inttypes.h): Substitute
1948         HAVE_UNSIGNED_LONG_LONG_INT.
1949         * modules/stdint (stdint.h): Likewise.
1950         (Files): Add m4/ulonglong.m4.
1951
1952 2006-10-10  Bruno Haible  <bruno@clisp.org>
1953
1954         Fix a gcc -Wshadow warning.
1955         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
1956         to 'bucket'.
1957         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
1958         gl_linked_indexof_from_to): Likewise.
1959         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
1960         Likewise.
1961         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
1962         Likewise.
1963         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
1964         Reported by Eric Blake.
1965
1966 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
1967
1968         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
1969         for NetBSD.  Problem reported by Bruno Haible.
1970
1971 2006-10-09  Jim Meyering  <jim@meyering.net>
1972
1973         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
1974         Patch from Bruno Haible.
1975
1976 2006-10-09  Jim Meyering  <jim@meyering.net>
1977
1978         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
1979         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
1980         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
1981
1982 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1983
1984         Don't include <config.h> twice; this doesn't work in some cases,
1985         e.g., when config.h has "#define intmax_t long long int" and
1986         we include <config.h>, <inttypes.h>, <config.h> in that order.
1987         Problem reported by Matthew Woehlke in:
1988         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
1989         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
1990         * lib/fts-cycle.c: Don't include config.h.
1991         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
1992         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
1993         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
1994         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
1995         inttypes.h.
1996         * lib/xstrtoumax.c: Likewise.
1997         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
1998         __strtol and the like, so that this module is more like its siblings.
1999         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
2000         Remove; no longer needed now that we assume gnulib inttypes.h.
2001
2002 2006-10-08  Bruno Haible  <bruno@clisp.org>
2003
2004         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
2005         option.
2006
2007 2006-10-07  Jim Meyering  <jim@meyering.net>
2008
2009         * modules/inttypes (inttypes.h): Revert what seems to have been
2010         an inadvertent part of today's change: use "|", not "/" in the
2011         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
2012
2013 2006-10-07  Bruno Haible  <bruno@clisp.org>
2014
2015         * modules/sublist: New file.
2016
2017 2006-10-07  Bruno Haible  <bruno@clisp.org>
2018
2019         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
2020         * modules/argz (argz.h): Likewise.
2021         * modules/arpa_inet (arpa/inet.h): Likewise.
2022         * modules/byteswap (byteswap.h): Likewise.
2023         * modules/configmake (configmake.h): Likewise.
2024         * modules/fcntl (fcntl.h): Likewise.
2025         * modules/fnmatch (fnmatch.h): Likewise.
2026         * modules/getopt (getopt.h): Likewise.
2027         * modules/glob (glob.h): Likewise.
2028         * modules/inttypes (inttypes.h): Likewise.
2029         * modules/netinet_in (netinet/in.h): Likewise.
2030         * modules/poll (poll.h): Likewise.
2031         * modules/stdbool (stdbool.h): Likewise.
2032         * modules/stdint (stdint.h): Likewise.
2033         * modules/sys_select (sys/select.h): Likewise.
2034         * modules/sys_socket (sys/socket.h): Likewise.
2035         * modules/sys_stat (sys/stat.h): Likewise.
2036         * modules/sysexits (sysexits.h): Likewise.
2037         * modules/unistd (unistd.h): Likewise.
2038         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2039         Add a "DO NOT EDIT" comment to the generated file.
2040         (func_import): Likewise for gnulib-comp.m4.
2041
2042 2006-10-07  Bruno Haible  <bruno@clisp.org>
2043
2044         * lib/gl_sublist.h: New file.
2045         * lib/gl_sublist.c: New file.
2046
2047 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
2048
2049         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
2050         name (relative to the original working directory) and the file
2051         name component (relative to the temporary working directory).  All
2052         callers changed.
2053         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
2054         * lib/mkdir-p.c (make_dir_parents): Likewise.
2055         * lib/mkdir-p.h (make_dir_parents): Likewise.
2056
2057 2006-10-06  Eric Blake  <ebb9@byu.net>
2058
2059         Define several macros for use by the clean-temp module.
2060         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
2061         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
2062         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
2063
2064         * lib/clean-temp.h (close_stream_temp): New declaration.
2065         * lib/clean-temp.c (includes): Pull in headers according to what
2066         other modules are in use.
2067         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
2068
2069 2006-10-06  Bruno Haible  <bruno@clisp.org>
2070
2071         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
2072         instead of fopen, fwriteerror.
2073
2074 2006-10-06  Bruno Haible  <bruno@clisp.org>
2075
2076         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
2077         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
2078         int.
2079         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
2080         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
2081         Return an error indicator.
2082         Suggested by Eric Blake.
2083
2084 2006-10-06  Bruno Haible  <bruno@clisp.org>
2085
2086         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
2087         Reported by Eric Blake.
2088
2089 2006-10-06  Bruno Haible  <bruno@clisp.org>
2090
2091         * modules/closeout (Description): Mention stderr too.
2092
2093 2006-10-06  Bruno Haible  <bruno@clisp.org>
2094         and Paul Eggert  <eggert@cs.ucla.edu>
2095
2096         * lib/closeout.c (close_stdout): Also close stderr.
2097         * lib/closeout.h: Update comment.
2098
2099 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
2100
2101         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
2102         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
2103         * lib/dirchownmod.c: Include lchown.h.
2104         * lib/lchown.c: Don't include files that lchown.h now includes.
2105         Don't declare chown, since lchown.h now does that.
2106         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
2107         (lchown): Define to rpl_chown if lchown is declared but
2108         does not exist.  Declare using a prototype if lchown is not
2109         declared.  Add a copyright notice.
2110         * lib/mkstemp.h: Include <unistd.h>.
2111         * lib/openat.c: Include lchown.h.
2112
2113         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
2114         we now test for that separately.
2115         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
2116         rather than O_NOFOLLOW, when testing whether it's possible to
2117         avoid a race condition reliably.
2118         * lib/savewd.c (savewd_chdir): Likewise.
2119
2120         Remove macros that are no longer needed now that stdint.h is
2121         reliable.
2122         * lib/fsusage.c (UINTMAX_MAX): Remove.
2123         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
2124         * lib/utimecmp.c (SIZE_MAX): Remove.
2125
2126         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
2127
2128         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
2129         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
2130         O_NOATIME works.
2131
2132 2006-10-05  Bruno Haible  <bruno@clisp.org>
2133
2134         * lib/gl_list.h (gl_sortedlist_search_from_to,
2135         gl_sortedlist_indexof_from_to): New declarations.
2136         (gl_list_implementation): New fields sortedlist_search_from_to,
2137         sortedlist_indexof_from_to.
2138         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
2139         inline functions.
2140         * lib/gl_list.c (gl_sortedlist_search_from_to,
2141         gl_sortedlist_indexof_from_to): New functions.
2142         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
2143         function.
2144         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
2145         (gl_array_sortedlist_search_from_to): New function.
2146         (gl_array_list_implementation): Update.
2147         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
2148         function.
2149         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
2150         (gl_carray_sortedlist_search_from_to): New function.
2151         (gl_carray_list_implementation): Update.
2152         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
2153         gl_linked_sortedlist_indexof_from_to): New functions.
2154         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
2155         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
2156         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
2157         gl_tree_sortedlist_indexof_from_to): New functions.
2158         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
2159         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
2160         Update.
2161         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
2162         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
2163         Update.
2164
2165 2006-10-05  Bruno Haible  <bruno@clisp.org>
2166
2167         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
2168         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
2169         (struct gl_list_implementation): Add fields search_from_to,
2170         indexof_from_to. Remove fields search, indexof.
2171         (gl_list_search): Use the search_from_to method.
2172         (gl_list_search_from, gl_list_search_from_to): New functions.
2173         (gl_list_indexof): Use the indexof_from_to method.
2174         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
2175         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
2176         (gl_list_search_from, gl_list_search_from_to): New functions.
2177         (gl_list_indexof): Use the indexof_from_to method.
2178         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
2179         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
2180         gl_array_indexof. Add start_index, end_index arguments.
2181         (gl_array_search_from_to): Renamed from gl_array_search. Add
2182         start_index, end_index arguments.
2183         (gl_array_remove, gl_array_list_implementation): Update.
2184         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
2185         gl_carray_indexof. Add start_index, end_index arguments.
2186         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
2187         start_index, end_index arguments.
2188         (gl_carray_remove, gl_carray_list_implementation): Update.
2189         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
2190         gl_linked_search. Add start_index, end_index arguments.
2191         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
2192         start_index, end_index arguments.
2193         (gl_linked_remove): Update.
2194         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
2195         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
2196         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
2197         field to 'size_t'.
2198         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
2199         gl_tree_search. Add start_index, end_index arguments.
2200         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
2201         start_index, end_index arguments.
2202         (gl_tree_remove): Update.
2203         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
2204         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
2205         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
2206         function.
2207         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
2208         gl_tree_search. Add start_index, end_index arguments.
2209         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
2210         start_index, end_index arguments.
2211         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
2212         Update.
2213         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
2214
2215 2006-10-05  Bruno Haible  <bruno@clisp.org>
2216
2217         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
2218
2219         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
2220         fwriteerror_temp): New declarations.
2221         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
2222         (descriptors): New variable.
2223         (cleanup): First, close the descriptors.
2224         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
2225         fclose_temp, fwriteerror_temp): New functions.
2226
2227 2006-10-04  Jim Meyering  <jim@meyering.net>
2228
2229         * lib/fts.c (fts_open): Tiny comment change.
2230
2231 2006-10-04  Bruno Haible  <bruno@clisp.org>
2232
2233         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
2234         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
2235         gl_LOCK_BODY.
2236         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
2237         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
2238         gl_LOCK_EARLY_BODY.
2239         (gl_LOCK): Require gl_LOCK_BODY.
2240
2241 2006-10-04  Bruno Haible  <bruno@clisp.org>
2242
2243         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
2244         (gl_oset_search_atleast): New declaration.
2245         (struct gl_oset_implementation): Add field 'search_atleast'.
2246         (gl_oset_search_atleast): New inline function.
2247         * lib/gl_oset.c (gl_oset_search_atleast): New function.
2248         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
2249         (gl_array_oset_implementation): Update.
2250         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
2251         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
2252         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
2253
2254 2006-10-04  Bruno Haible  <bruno@clisp.org>
2255
2256         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
2257
2258 2006-10-03  Bruno Haible  <bruno@clisp.org>
2259
2260         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
2261         from gl_avltreehash_list_implementation.
2262
2263 2006-10-03  Bruno Haible  <bruno@clisp.org>
2264
2265         * lib/gl_oset.c (gl_oset_add): Fix return type.
2266
2267 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
2268
2269         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
2270
2271 2006-10-02  Eric Blake  <ebb9@byu.net>
2272
2273         * modules/strnlen (Depends-on): Add extensions.
2274
2275 2006-10-02  Eric Blake  <ebb9@byu.net>
2276
2277         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
2278         definition in 2.60+.
2279
2280 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
2281
2282         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
2283         checks.
2284
2285 2006-10-02  Bruno Haible  <bruno@clisp.org>
2286
2287         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
2288         to the AUTOMAKE_OPTIONS.
2289         Reported by Jim Meyering.
2290
2291 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
2292
2293         Work around bug in Solaris 10 /proc file system:
2294         /proc/self/fd/NNN/.. isn't the parent directory of
2295         the directory whose file descriptor is NNN.  This needs to
2296         be worked around at run time, not compile time, since a
2297         program might be built on Solaris 8, where things work, and
2298         run on Solaris 10.
2299         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
2300         to use the following interface instead:
2301         (OPENAT_BUFFER_SIZE): New macro.
2302         (openat_proc_name): New function.
2303         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
2304         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
2305         Likewise.
2306         * lib/openat-proc.c: New file.
2307         * modules/openat (Files): Add lib/openat-proc.c.
2308         (Depends-on): Add same-inode, stdbool.
2309         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
2310
2311 2006-09-29  Bruno Haible  <bruno@clisp.org>
2312
2313         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
2314         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
2315         argument. Set stdout_closed before testing for ferror, not after.
2316         (fwriteerror, fwriteerror_no_ebadf): New functions.
2317
2318 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2319
2320         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
2321
2322 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
2323
2324         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
2325         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
2326
2327 2006-09-28  Jim Meyering  <jim@meyering.net>
2328
2329         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
2330         Include <unistd.h>.
2331
2332 2006-09-28  Bruno Haible  <bruno@clisp.org>
2333
2334         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
2335         * modules/linkedhash-list (Depends-on): Likewise.
2336         * modules/rbtreehash-list (Depends-on): Likewise.
2337
2338 2006-09-28  Bruno Haible  <bruno@clisp.org>
2339
2340         * lib/strndup.h: Simplify the redefinition of strndup.
2341         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
2342         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
2343
2344 2006-09-28  Bruno Haible  <bruno@clisp.org>
2345
2346         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
2347         * lib/gl_linkedhash_list.c: Likewise.
2348         * lib/gl_rbtreehash_list.c: Likewise.
2349
2350 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
2351
2352         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
2353         getaddrinfo.
2354
2355         * lib/__fpending.h: Don't include <stdio_ext.h> unless
2356         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
2357         it causes <stdio_ext.h> to cause a compile-time error.
2358         Problem reported by Nelson H. F. Beebe.
2359         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
2360         of HAVE_DECL___PENDING.
2361
2362         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
2363         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
2364         declaration.
2365
2366 2006-09-27  Jim Meyering  <jim@meyering.net>
2367
2368         This file could end up with a definition for a function
2369         named __strndup, rather than rpl_strndup on a system with
2370         incomplete weak_alias support.
2371         * lib/strndup.c (strndup): Rename from __strndup.
2372         Remove #defines that used to map __strndup to strndup.
2373         Don't use K&R prototypes.
2374         Remove LIBC-related code, since this file is not sync'd with glibc.
2375         * lib/strndup.h: Revamp, accordingly.
2376         * m4/strndup.m4: Modernize.
2377
2378 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
2379
2380         * modules/savewd (Depends-on): Add 'raise'.
2381         * lib/savewd.c: Include <signal.h>, for 'raise'.
2382
2383 2006-09-26  Jim Meyering  <jim@meyering.net>
2384
2385         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
2386         when we detect Darwin 8.7.0's acl_get_file bug.
2387         Rearrange to perform the new (below) run-test while $LIBS
2388         contains any acl-related library.  Set USE_ACL at the end.
2389         (gl_ACL_GET_FILE): New function.
2390
2391 2006-09-26  Eric Blake  <ebb9@byu.net>
2392
2393         * lib/verror.c: Include <config.h> unconditionally.
2394
2395 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
2396
2397         * modules/clock-time (Maintainer): Add self.
2398         * modules/getlogin_r (Depends-on): Add extensions.
2399
2400 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2401
2402         * modules/clock-time: New module.
2403         * modules/nanosleep (Depends-on): Add clock-time.
2404         * modules/gethrxtime (Depends-on): Likewise.
2405         * modules/gettime (Depends-on): Likewise.
2406         * modules/settime (Depends-on): Likewise.
2407
2408         * modules/fts-lgpl: Depend on openat.
2409         * modules/mkancesdirs: Depend on savewd.
2410         * modules/mkdir-p: Likewise.
2411
2412 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2413
2414         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
2415
2416         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
2417         `gl_have_arbitrary_file_name_length_limit' to
2418         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
2419         actually works between configure runs.
2420
2421 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2422             Bruno Haible  <bruno@clisp.org>
2423
2424         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
2425
2426 2006-09-25  Jim Meyering  <jim@meyering.net>
2427
2428         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
2429         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
2430
2431 2006-09-25  Eric Blake  <ebb9@byu.net>
2432
2433         * gnulib-tool (func_import, func_create_testdir): Fix typos in
2434         exec's in 2006-09-18 patch when shuffling fds.
2435
2436 2006-09-25  Bruno Haible  <bruno@clisp.org>
2437
2438         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
2439         Reported by Jim Meyering.
2440
2441 2006-09-24  Jim Meyering  <jim@meyering.net>
2442
2443         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
2444         compare a pointer against a literal "0".  That caused failures with
2445         at least HP-UX's hpcc.
2446
2447 2006-09-22  Simon Josefsson  <jas@extundo.com>
2448
2449         * modules/gc-sha1:
2450         * modules/gc-md4:
2451         * modules/gc-hmac-sha1:
2452         * modules/gc-hmac-md5:
2453         * modules/gc-des:
2454         * modules/gc-arcfour: Distribute more files.
2455
2456 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2457
2458         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
2459         (gl_linked_iterator_from_to): Initialize struct completely.
2460         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
2461         (gl_tree_iterator_from_to): Likewise
2462         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
2463         * lib/gl_array_list.c [lint] (gl_array_iterator)
2464         (gl_array_iterator_from_to): Likewise.
2465         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
2466         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
2467         (gl_carray_iterator_from_to): Likewise.
2468
2469         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
2470         * lib/md4.c (md4_process_block): Remove unused variable.
2471         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
2472         parentheses for clarity.
2473
2474 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2475
2476         * modules/bison-i18n (Depends-on): Add gettext.
2477
2478 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2479
2480         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
2481         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
2482         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
2483         also add missing comma that caused broken test.
2484         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
2485         stdlib.h, for `abort'.
2486         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
2487         variables.
2488         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
2489         include unistd.h if present, for `rmdir'.
2490         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
2491         variables.
2492         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
2493         in the process include standard headers for prototypes.
2494         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
2495         gets declared on GNU/Linux.
2496         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
2497         unistd.h, for `rmdir'.
2498         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
2499
2500         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
2501         always true.
2502         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
2503
2504         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
2505
2506 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2507
2508         * gnulib-tool (func_version): Create output all at once.  This
2509         may help avoid triggering unnecessary SIGPIPEs, and at any
2510         rate it doesn't hurt.
2511
2512 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2513             Bruno Haible  <bruno@clisp.org>
2514
2515         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
2516         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2517         * m4/signed.m4 (bh_C_SIGNED): Likewise.
2518
2519         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
2520         (gl_FUNC_VASPRINTF): Invoke it.
2521
2522 2006-09-22  Bruno Haible  <bruno@clisp.org>
2523
2524         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
2525         getloadavg.c as first argument.
2526
2527 2006-09-22  Bruno Haible  <bruno@clisp.org>
2528
2529         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
2530         at the beginning of the gl_INIT macro.
2531         * modules/getloadavg (configure.ac): Pass $gl_source_base to
2532         gl_GETLOADAVG.
2533
2534 2006-09-22  Bruno Haible  <bruno@clisp.org>
2535
2536         * gnulib-tool (func_create_megatestdir): Don't include the config-h
2537         module.
2538         Suggested by Ralf Wildenhues.
2539
2540 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
2541
2542         Import this patch from libc:
2543
2544         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
2545
2546         * lib/regex_internal.c (re_string_reconstruct): Handle
2547         offset < pstr->valid_raw_len && pstr->offsets_needed case.
2548         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
2549         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
2550         re_string_context_at.
2551
2552         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
2553         now requires it.
2554         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
2555         gl_REGEX now does it for us.
2556         (gl_REGEX): Add test taken from
2557         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
2558
2559         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
2560         Check that large offsets work.  Modernize Autoconf usages.
2561         Prefer "yes" to mean a good thing rather than a bad.
2562         Don't put "#define mkstemp" in config.h, as this might interfere
2563         with standard system headers that "#define mkstemp mkstemp64".
2564
2565         * modules/mkstemp (Depends-on): Add extensions, so that
2566         mkstemp is visible on some platforms.
2567         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
2568         (Include): Change to "mkstemp.h" from <stdlib.h>.
2569         (Files): Add mkstemp.h.
2570
2571         * lib/mkstemp.h: New file, since some standard headers
2572         #define mkstemp.
2573         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
2574         Include "mkstemp.h".
2575         Make the _LIBC code resemble glibc original more,
2576         e.g., use K&R style.
2577         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
2578         (mkstemp): Remove, since mkstemp.h does this for us.
2579         * lib/stdlib--.h: Include mkstemp.h.
2580
2581         Import this patch from libc:
2582
2583         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
2584
2585         * lib/tempname.c (__gen_tempname): Change attempts_min
2586         into a macro.  Use preprocessor to decide how to initialize
2587         attempts [Coverity CID 67].
2588
2589 2006-09-20  Bruno Haible  <bruno@clisp.org>
2590
2591         * lib/mkdtemp.c: Import from libc.
2592         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
2593                 * sysdeps/posix/tempname.c (__gen_tempname): Change
2594                 attempts_min into a macro.  Use preprocessor to decide how to
2595                 initialize attempts [Coverity CID 67].
2596         2001-11-27  Paul Eggert  <eggert@twinsun.com>
2597                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
2598                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
2599
2600 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2601
2602         * gnulib-tool (func_exit): New function, to allow to pass the
2603         exit status portably through the trap.  Use everywhere.
2604         (--help, --version): Signal a write error.
2605         (trap): catch SIGPIPE, for write errors.
2606         Exit at the end of the trap, with the correct exit status.
2607
2608 2006-09-19  Karl Berry  <karl@gnu.org>
2609
2610         * doc/gnulib.texi: note about the license texinfo files.
2611
2612 2006-09-19  Eric Blake  <ebb9@byu.net>
2613
2614         * gnulib-tool: Avoid space-tab.
2615
2616 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
2617
2618         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
2619         that prevented coreutils 6.1 from building.  Problem reported
2620         by Petter Reinholdtsen.
2621
2622 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
2623
2624         * gnulib-tool (avoidlist): Fix typo that broke options like
2625         --avoid=lock that are used by coreutils bootstrap.
2626
2627 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
2628
2629         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
2630         more systematically.
2631
2632 2006-09-18  Jim Meyering  <jim@meyering.net>
2633
2634         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
2635
2636 2006-09-18  Bruno Haible  <bruno@clisp.org>
2637
2638         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
2639
2640 2006-09-18  Bruno Haible  <bruno@clisp.org>
2641
2642         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
2643         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
2644         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
2645         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
2646         * m4/gettext.m4: Require autoconf >= 2.52.
2647         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
2648         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
2649         of gl_cv_header_inttypes_h.
2650
2651 2006-09-18  Bruno Haible  <bruno@clisp.org>
2652
2653         * lib/javaversion.c: Include configmake.h.
2654
2655 2006-09-18  Bruno Haible  <bruno@clisp.org>
2656
2657         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
2658         avoid that the while loops be executed in a subshell.
2659
2660 2006-09-18  Bruno Haible  <bruno@clisp.org>
2661
2662         * MODULES.html.sh (func_module): Break long lines.
2663         Suggested by Bruce Korb <bkorb@gnu.org>.
2664
2665 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2666
2667         Speed up by a factor of 1.12.
2668         * gnulib-tool (nl): New variable.
2669         (func_import): Rewrite include directive extraction to only read each
2670         directive once.
2671
2672 2006-09-17  Bruno Haible  <bruno@clisp.org>
2673
2674         * modules/javaversion (Makefile.am): Remove DEFS setting.
2675         (Depends-on): Add configmake, for PKGDATADIR definition.
2676
2677 2006-09-17  Bruno Haible  <bruno@clisp.org>
2678
2679         * gnulib-tool (func_create_testdir): Rewrite all files at once.
2680
2681 2006-09-17  Bruno Haible  <bruno@clisp.org>
2682
2683         * gnulib-tool (func_append): New function, stolen from libtool.m4.
2684         (func_modules_transitive_closure, func_modules_add_dummy,
2685         func_modules_to_filelist, func_import, func_create_testdir,
2686         func_create_megatestdir, ...): Use it wherever possible.
2687         Suggested by Ralf Wildenhues.
2688
2689 2006-09-16  Karl Berry  <karl@gnu.org>
2690
2691         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
2692         to avoid sectioning errors.
2693         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
2694         [ifinfo]: blank line after @center-ed titles.
2695         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
2696         Spell FSF address consistently with others.
2697         (These changes approved by rms.)
2698
2699 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2700
2701         Speed up by a factor of 1.61.
2702         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
2703         already checked module names again.
2704
2705 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2706
2707         Speed up by a factor of 1.13.
2708         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
2709         for new_files, and the input to func_add_or_update.
2710
2711 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2712
2713         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
2714         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
2715
2716 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2717
2718         * modules/mkancesdirs (Depends-on): Add fcntl.
2719         * modules/savewd: New file.
2720         * MODULES.html.sh (File system functions): Add savewd.
2721
2722         * modules/configmake (Makefile.am): Add support for the
2723         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
2724
2725 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2726
2727         * m4/savewd.m4: New file.
2728
2729 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2730
2731         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
2732         (dirchownmod): New arg FD.  All callers changed.
2733         Use FD rather than opening the directory ourself, as opening is
2734         now the caller's responsibility.
2735         * lib/dirchownmod.h: Likewise.
2736         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
2737         hosts that require <sys/types.h> before <sys/stat.h>.  Include
2738         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
2739         (test_dir): Remove.
2740         (mkancesdirs): Return length of prefix of FILE that has already
2741         been made, or -2 if there is a child doing the work.  Redo
2742         algorithm so that it is O(N) rather than O(N**2).  Optimize away
2743         ".", and treat ".." specially since it might stray back into
2744         already-created areas.  Use a subprocess if necessary.  New arg
2745         WD; all users changed.  MAKE_DIR function should now return 1
2746         if it creates a directory that is not readable.  Return -2 if
2747         a child process is spun off.
2748         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
2749         Adjust signature to match code.
2750         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
2751         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
2752         all users changed.
2753         * lib/savewd.c, lib/savewd.h: New files.
2754
2755 2006-09-15  Jim Meyering  <jim@meyering.net>
2756
2757         * modules/rename-dest-slash: New module.
2758         * MODULES.html.sh (posix_compat): Add it here.
2759
2760         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
2761
2762 2006-09-15  Jim Meyering  <jim@meyering.net>
2763
2764         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
2765         file.
2766
2767         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
2768
2769 2006-09-15  Jim Meyering  <jim@meyering.net>
2770
2771         * lib/rename-dest-slash.c (has_trailing_slash): Use
2772         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
2773         (rpl_rename_dest_slash): Perform the cheaper trailing slash
2774         test before testing whether SRC is a directory.
2775         Suggestions from Bruno Haible.
2776
2777         Avoid a warning about an unused variable.
2778         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
2779         into the #ifdef block where it's used.
2780
2781         * lib/rename-dest-slash.c: New file.
2782
2783 2006-09-14  Bruno Haible  <bruno@clisp.org>
2784
2785         * lib/allocsa.c: Include <config.h> unconditionally.
2786         * lib/asnprintf.c: Likewise.
2787         * lib/asprintf.c: Likewise.
2788         * lib/c-strcasecmp.c: Likewise.
2789         * lib/c-strcasestr.c: Likewise.
2790         * lib/c-strncasecmp.c: Likewise.
2791         * lib/c-strstr.c: Likewise.
2792         * lib/classpath.c: Likewise.
2793         * lib/clean-temp.c: Likewise.
2794         * lib/concatpath.c: Likewise.
2795         * lib/copy-file.c: Likewise.
2796         * lib/csharpcomp.c: Likewise.
2797         * lib/csharpexec.c: Likewise.
2798         * lib/execute.c: Likewise.
2799         * lib/fatal-signal.c: Likewise.
2800         * lib/findprog.c: Likewise.
2801         * lib/fwriteerror.c: Likewise.
2802         * lib/gl_array_list.c: Likewise.
2803         * lib/gl_array_oset.c: Likewise.
2804         * lib/gl_avltree_list.c: Likewise.
2805         * lib/gl_avltree_oset.c: Likewise.
2806         * lib/gl_avltreehash_list.c: Likewise.
2807         * lib/gl_carray_list.c: Likewise.
2808         * lib/gl_linked_list.c: Likewise.
2809         * lib/gl_linkedhash_list.c: Likewise.
2810         * lib/gl_list.c: Likewise.
2811         * lib/gl_oset.c: Likewise.
2812         * lib/gl_rbtree_list.c: Likewise.
2813         * lib/gl_rbtree_oset.c: Likewise.
2814         * lib/gl_rbtreehash_list.c: Likewise.
2815         * lib/imaxabs.c: Likewise.
2816         * lib/imaxdiv.c: Likewise.
2817         * lib/javacomp.c: Likewise.
2818         * lib/javaexec.c: Likewise.
2819         * lib/javaversion.c: Likewise.
2820         * lib/linebreak.c: Likewise.
2821         * lib/localcharset.c: Likewise.
2822         * lib/lock.c: Likewise.
2823         * lib/mbchar.c: Likewise.
2824         * lib/mbswidth.c: Likewise.
2825         * lib/mkdtemp.c: Likewise.
2826         * lib/pipe.c: Likewise.
2827         * lib/printf-args.c: Likewise.
2828         * lib/printf-parse.c: Likewise.
2829         * lib/progname.c: Likewise.
2830         * lib/progreloc.c: Likewise.
2831         * lib/readlink.c: Likewise.
2832         * lib/sh-quote.c: Likewise.
2833         * lib/stpcpy.c: Likewise.
2834         * lib/stpncpy.c: Likewise.
2835         * lib/strcasecmp.c: Likewise.
2836         * lib/strcasestr.c: Likewise.
2837         * lib/strcspn.c: Likewise.
2838         * lib/striconv.c: Likewise.
2839         * lib/strncasecmp.c: Likewise.
2840         * lib/strnlen1.c: Likewise.
2841         * lib/strstr.c: Likewise.
2842         * lib/strtok_r.c: Likewise.
2843         * lib/tls.c: Likewise.
2844         * lib/tmpdir.c: Likewise.
2845         * lib/unicodeio.c: Likewise.
2846         * lib/unsetenv.c: Likewise.
2847         * lib/vasnprintf.c: Likewise.
2848         * lib/vasprintf.c: Likewise.
2849         * lib/wait-process.c: Likewise.
2850         * lib/xallocsa.c: Likewise.
2851         * lib/xsetenv.c: Likewise.
2852         * lib/xstriconv.c: Likewise.
2853
2854 2006-09-13  Simon Josefsson  <jas@extundo.com>
2855
2856         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
2857         that internally, suggested by Ralf Wildenhues
2858         <Ralf.Wildenhues@gmx.de>.
2859
2860 2006-09-13  Simon Josefsson  <jas@extundo.com>
2861
2862         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
2863         @LIBOBJS@.
2864         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2865
2866 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
2867
2868         * lib/_fpending.c: Include <config.h> unconditionally, since we no
2869         longer worry about uses that don't define HAVE_CONFIG_H.
2870         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
2871         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
2872         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
2873         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
2874         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
2875         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
2876         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
2877         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
2878         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
2879         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
2880         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
2881         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
2882         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
2883         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
2884         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
2885         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
2886         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
2887         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
2888         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
2889         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
2890         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
2891         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
2892         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
2893         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
2894         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
2895         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
2896         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
2897         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
2898         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
2899         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
2900         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
2901         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
2902         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
2903         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
2904         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
2905         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
2906         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
2907         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
2908         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
2909         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
2910         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
2911         Likewise.
2912
2913 2006-09-13  Eric Blake  <ebb9@byu.net>
2914
2915         * lib/getopt.c: Fix typo in last commit.
2916
2917 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2918
2919         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
2920         dgettext.
2921
2922 2006-09-12  Jim Meyering  <jim@meyering.net>
2923
2924         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
2925         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
2926         Reported by Nelson H. F. Beebe.
2927
2928 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
2929
2930         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
2931         program_invocation_name and program_invocation_short_name are
2932         initialized.
2933         * lib/argp-namefrob.h: Move declarations of program_invocation_name
2934         and program_invocation_short_name to argp.h, so they are visible
2935         to user programs.
2936         * lib/argp.h: Likewise
2937
2938 2006-09-10  Bruno Haible  <bruno@clisp.org>
2939
2940         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
2941         m4/inttypes_h.m4, m4/uintmax_t.m4.
2942
2943 2006-09-10  Bruno Haible  <bruno@clisp.org>
2944
2945         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
2946         gl_AC_TYPE_UINTMAX_T.
2947
2948 2006-09-10  Bruno Haible  <bruno@clisp.org>
2949
2950         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
2951
2952 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
2953
2954         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
2955         convention.  Text proposed by Bruno Haible.
2956         (struct argp_option): Document the use of N_() wrappers.
2957
2958         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
2959         '\v', and translate the two parts separately, instead of feeding
2960         the whole string to gettext.  This allows to exclude
2961         '\v' from the strings visible to the translator by writing doc
2962         strings as N_("..") "\v" N_("..").
2963
2964 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
2965
2966         * config/srclist.txt: Undo latest change; the bug was fixed.
2967
2968 2006-09-09  Bruno Haible  <bruno@clisp.org>
2969
2970         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
2971         assignments if building a library without libtool.
2972         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
2973         in func_emit_lib_Makefile_am.
2974         (func_import): When building a static library libfoo.a, arrange to
2975         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
2976         (func_create_testdir): Likewise.
2977         * modules/gc (configure.ac, Makefile.am): If building statically,
2978         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
2979         * modules/iconvme (configure.ac, Makefile.am): Likewise.
2980         * modules/striconv (configure.ac, Makefile.am): Likewise.
2981         Based on a suggestion by Ralf Wildenhues.
2982
2983 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2984
2985         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2986         Check for unistd.h too, since Autoconf doesn't assume POSIX.
2987         Also:
2988
2989         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2990         Add year_2050_test to catch glibc bug 2821
2991         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
2992
2993         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
2994         Prefer #ifdef to #if.
2995
2996         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
2997         Return from 'main' instead of calling 'exit'.
2998
2999 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3000
3001         * lib/mktime.c (guess_time_tm): Fix bug where mktime
3002         returned the maximum time_t value rather than (time_t) -1.
3003         Problem originally reported by William Bardwell
3004         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3005
3006         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3007         Moved to here ...
3008         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3009         ... from here.
3010
3011 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3012
3013         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
3014         2821 is fixed.
3015
3016 2006-09-08  Jim Meyering  <jim@meyering.net>
3017
3018         Don't make generated files read-only.  That would bother too many
3019         people.  However, do retain the ability to work when targets are
3020         read-only: remove the destination and temporary files before writing
3021         them (when generated via sed or echo), or by using the -f option for
3022         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
3023         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3024         * modules/byteswap, modules/configmake, modules/fcntl:
3025         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3026         * modules/localcharset, modules/netinet_in, modules/poll:
3027         * modules/stdbool, modules/stdint, modules/sys_select:
3028         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3029
3030 2006-09-08  Jim Meyering  <jim@meyering.net>
3031
3032         Avoid new build failure on FreeBSD 6.0.
3033         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
3034         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
3035         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
3036
3037 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3038
3039         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
3040
3041 2006-09-07  Jim Meyering  <jim@meyering.net>
3042
3043         Fix global typo in last change: use chmod u-w, not chmod u-x.
3044         Spotted by Paul Eggert and Bruce Korb.
3045         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3046         * modules/byteswap, modules/configmake, modules/fcntl:
3047         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3048         * modules/localcharset, modules/netinet_in, modules/poll:
3049         * modules/stdbool, modules/stdint, modules/sys_select:
3050         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3051
3052 2006-09-06  Jim Meyering  <jim@meyering.net>
3053
3054         Make generated files be read-only.
3055         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
3056         Ensure that each generated file is now read-only.
3057         * modules/argz: Likewise.
3058         * modules/arpa_inet: Likewise.
3059         * modules/byteswap: Likewise.
3060         * modules/configmake: Likewise.
3061         * modules/fcntl: Likewise.
3062         * modules/fnmatch: Likewise.
3063         * modules/getopt: Likewise.
3064         * modules/glob: Likewise.
3065         * modules/inttypes: Likewise.
3066         * modules/netinet_in: Likewise.
3067         * modules/poll: Likewise.
3068         * modules/stdbool: Likewise.
3069         * modules/stdint: Likewise.
3070         * modules/sys_select: Likewise.
3071         * modules/sys_socket: Likewise.
3072         * modules/sys_stat: Likewise.
3073         * modules/sysexits: Likewise.
3074         * modules/localcharset: Same as above, but continue using temporary
3075         file named "t-$@" (why different?) rather than the "$@-t" used
3076         everywhere else.
3077
3078         * modules/sysexits (Makefile.am): Replace literal occurrences
3079         of "sysexit.h" more readable, and more consistent, "$@".
3080
3081 2006-09-06  Bruno Haible  <bruno@clisp.org>
3082
3083         * modules/striconv: New file.
3084         * modules/xstriconv: New file.
3085         * MODULES.html.sh (Internationalization functions): Add striconv,
3086         xstriconv.
3087
3088 2006-09-06  Bruno Haible  <bruno@clisp.org>
3089
3090         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
3091         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
3092         not using libtool correctly.
3093
3094 2006-09-06  Bruno Haible  <bruno@clisp.org>
3095
3096         * lib/striconv.h: New file.
3097         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
3098         iconvstring.c.
3099         * lib/xstriconv.h: New file.
3100         * lib/xstriconv.c: New file.
3101
3102 2006-09-06  Bruno Haible  <bruno@clisp.org>
3103
3104         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3105         lib_..._LDFLAGS.
3106
3107 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3108
3109         * lib/argz_.h: Sync from Libtool.
3110
3111         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
3112                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3113
3114         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
3115
3116 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
3117
3118         * modules/trim: New file.
3119
3120 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
3121
3122         * lib/trim.h: New file.
3123         * lib/trim.c: New file.
3124
3125 2006-09-05  Bruno Haible  <bruno@clisp.org>
3126
3127         * MODULES.html.sh (String handling): Add trim.
3128
3129 2006-09-04  Karl Berry  <karl@gnu.org>
3130
3131         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
3132         until next release.
3133
3134 2006-09-03  Bruno Haible  <bruno@clisp.org>
3135
3136         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
3137         correctly.
3138
3139 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3140
3141         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
3142         not gl_GETLOADAVG.  Omit unneeded semicolons.
3143         Problems reported by Ralf Wildenhues in
3144         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
3145         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
3146         at the end, which is the usual gnulib style.
3147
3148         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
3149         of doing all the work ourselves.
3150         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
3151         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
3152
3153 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3154
3155         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
3156         Problem reported by Ralf Wildenhues in
3157         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
3158
3159         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
3160         HAVE_STRUCT_STATFS_F_FSTYPENAME.
3161
3162 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3163
3164         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
3165         yesterday's patch by changing test -n to test -z.
3166
3167 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3168
3169         * modules/getloadavg (Files): Add m4/getloadavg.m4.
3170         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
3171         the former is now obsolescent.
3172
3173         * modules/chdir-long (Depends-on): Add fcntl.
3174
3175 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3176
3177         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
3178         obsolescent, and programs should use gnulib instead.
3179         * m4/getloadavg.m4: New file, with contents taken from Autoconf
3180         but with prefixes changed.
3181
3182 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3183
3184         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
3185         or stdbool.h, because they might not exist while configuring.
3186
3187         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
3188         Don't include unistd.h or limits.h; not needed, since chdir-long.h
3189         does that for us.
3190         (O_DIRECTORY): Remove.
3191
3192 2006-08-31  Eric Blake  <ebb9@byu.net>
3193
3194         * gnulib-tool: Don't let emacs change spaces to TAB.
3195
3196 2006-08-31  Bruno Haible  <bruno@clisp.org>
3197
3198         * gnulib-tool: When calling func_import more than once, do it in a
3199         subshell.
3200         Reported by Eric Blake <ebb9@byu.net>.
3201
3202 2006-08-31  Bruno Haible  <bruno@clisp.org>
3203
3204         * gnulib-tool (nl): Remove variable.
3205         (sed_transform_lib_file): Use more robust test for config-h module.
3206         (func_import): Fix typo in 2006-08-25 patch.
3207
3208 2006-08-31  Bruno Haible  <bruno@clisp.org>
3209
3210         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
3211         specified, augment Makefile.am variables instead of assigning them.
3212
3213 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3214
3215         Work around a bug in both the Linux and SunOS 64-bit kernels:
3216         nanosleep mishandles sleeps for longer than 2**31 seconds.
3217         Problem reported by Frank v Waveren in
3218         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
3219         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
3220         Check for nanosleep bug.
3221         (LIB_NANOSLEEP): Append clock_gettime library if needed.
3222
3223 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3224
3225         Work around a bug in both the Linux and SunOS 64-bit kernels:
3226         nanosleep mishandles sleeps for longer than 2**31 seconds.
3227         Problem reported by Frank v Waveren in
3228         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
3229         * lib/nanosleep.c (BILLION): New constant.
3230         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
3231         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
3232         implementation.
3233
3234 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3235
3236         * modules/nanosleep (Depends-on): Add gettime.
3237
3238 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3239         and Simon Josefsson  <jas@extundo.com>
3240         and Oskar Liljeblad  <oskar@osk.mine.nu>
3241
3242         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
3243         * gnulib-tool (func_import): New license type 'unmodifiable license
3244         text'.
3245         * modules/fdl: Use it.  Longer description.
3246         * module/gpl, module/lgpl: New files.
3247
3248 2006-08-30  Jim Meyering  <jim@meyering.net>
3249
3250         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
3251         shadowing the parameter.
3252
3253 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3254
3255         Sync from Libtool:
3256
3257         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3258
3259         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
3260         sharing with gnulib.  Report by Eric Blake.
3261
3262 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3263
3264         * modules/isapipe: New file.
3265         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
3266
3267 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3268
3269         * modules/configmake (Makefile.am): Add a comment, and omit
3270         the CONFIGMAKE_ prefix from generated macro names.  Suggested
3271         by Bruno Haible.
3272
3273 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3274
3275         * m4/isapipe.m4: New file.
3276
3277 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3278
3279         * lib/isapipe.c, lib/isapipe.h: New files.
3280
3281 2006-08-29  Jim Meyering  <jim@meyering.net>
3282
3283         * modules/configmake (Makefile.am): Make configmake.h depend on
3284         Makefile.  Otherwise, a stale configmake.h could hang around.
3285
3286 2006-08-29  Eric Blake  <ebb9@byu.net>
3287
3288         * lib/error.c (error_at_line, print_errno_message): Match libc, after
3289         resolution of upstream bug 3044.
3290
3291 2006-08-29  Bruno Haible  <bruno@clisp.org>
3292
3293         * modules/localcharset (Depends-on): Add configmake.
3294         (Makefile.am): Remove setting of LIBDIR through DEFS.
3295
3296 2006-08-29  Bruno Haible  <bruno@clisp.org>
3297
3298         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
3299         defined.
3300
3301 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3302
3303         * modules/fcntl: New file.
3304         * modules/chdir-safer (Depends-on): Add fcntl.
3305         * modules/fts: Likewise.
3306         * modules/mkdir-p: Likewise.
3307
3308         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
3309         This undoes the most recent change, since we're now addressing the
3310         problem in a different way.
3311
3312         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
3313         into output, since the output might be called Makefile.am even
3314         if $makefile_name is something different.
3315         (func_import): Use $makefile_am rather than
3316         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
3317         empty.
3318
3319         * modules/inttypes (Files): Add m4/inttypes-h.m4.
3320
3321 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3322
3323         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
3324         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
3325         recent change to stdint.m4, since we're now addressing the problem in a
3326         different way.
3327
3328 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3329
3330         * m4/fcntl_h.m4: New file.
3331
3332 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3333
3334         * lib/fcntl_.h: New file.
3335         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
3336         the fcntl module.
3337         * lib/dirchownmod.c: Likewise.
3338         * lib/fts.c: Likewise.
3339
3340         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
3341         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
3342         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
3343         just before including <inttypes.h>, to avoid circular inclusion.
3344
3345 2006-08-28  Jim Meyering  <jim@meyering.net>
3346
3347         * doc/visibility.texi: Actually read and correct the grammar of the
3348         sentence affected by yesterday's change.
3349
3350 2006-08-28  Eric Blake  <ebb9@byu.net>
3351
3352         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
3353         needs wrapper.
3354
3355 2006-08-28  Eric Blake  <ebb9@byu.net>
3356
3357         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
3358
3359 2006-08-28  Eric Blake  <ebb9@byu.net>
3360
3361         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
3362
3363 2006-08-28  Bruno Haible  <bruno@clisp.org>
3364
3365         * modules/c-strstr: New file, from GNU gettext.
3366         * MODULES.html.sh (String handling): Add c-strstr.
3367
3368 2006-08-28  Bruno Haible  <bruno@clisp.org>
3369
3370         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
3371         macros.
3372         Reported by Eric Blake.
3373
3374 2006-08-28  Bruno Haible  <bruno@clisp.org>
3375
3376         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
3377         (VASNPRINTF): Return a string of length > INT_MAX without failing.
3378         * lib/vasprintf.c: Include errno.h, limits.h.
3379         (EOVERFLOW): New fallback definition.
3380         (vasprintf): Test here whether the string length is > INT_MAX.
3381         * lib/vsnprintf.c: Include errno.h, limits.h.
3382         (EOVERFLOW): New fallback definition.
3383         (vsnprintf): Fix bug when generated string was too long for the buffer.
3384         Test here whether the string length is > INT_MAX.
3385
3386 2006-08-28  Bruno Haible  <bruno@clisp.org>
3387
3388         * lib/inttypes_.h (SCNX*): Remove definitions.
3389         Reported by Eric Blake.
3390
3391 2006-08-28  Bruno Haible  <bruno@clisp.org>
3392
3393         * lib/c-strstr.h: New file, from GNU gettext.
3394         * lib/c-strstr.c: New file, from GNU gettext.
3395
3396 2006-08-28  Bruno Haible  <bruno@clisp.org>
3397
3398         * gnulib-tool: Reorder some statements.
3399
3400 2006-08-28  Bruno Haible  <bruno@clisp.org>
3401
3402         * gnulib-tool: New option --makefile-name.
3403         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
3404         $makefile_name.
3405         (func_import): Write $makefile_name to the cache file, and read it from
3406         there unless explicitly specified. Use $makefile_name as file name
3407         instead of Makefile.am. Adjust the recommendations accordingly.
3408
3409 2006-08-28  Bruno Haible  <bruno@clisp.org>
3410
3411         * gnulib-tool (func_verify_module): Check against misapplying patch.
3412
3413 2006-08-28  Bruno Haible  <bruno@clisp.org>
3414
3415         * gnulib-tool (func_relativize, func_relconcat): New functions.
3416         Give an error if --local-dir is given with --update.
3417         Remove trailing slashes from $local_gnulib_dir.
3418         (func_import): Store the relativized $local_gnulib_dir in
3419         gnulib-cache.m4, and read it from there if not specified explicitly.
3420
3421 2006-08-28  Bruno Haible  <bruno@clisp.org>
3422
3423         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
3424         is the current directory. Respect also $local_gnulib_dir.
3425
3426 2006-08-28  Bruno Haible  <bruno@clisp.org>
3427             Simon Josefsson  <jas@extundo.com>
3428
3429         BeOS portability.
3430         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
3431
3432 2006-08-27  Jim Meyering  <jim@meyering.net>
3433
3434         * doc/visibility.texi: Remove duplicate word: "pointer".
3435
3436 2006-08-26  Bruno Haible  <bruno@clisp.org>
3437
3438         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
3439         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
3440         (Makefile.am): Create inttypes.h from inttypes_.h.
3441         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
3442
3443         * modules/imaxabs: New file.
3444
3445         * modules/imaxdiv: New file.
3446
3447 2006-08-26  Bruno Haible  <bruno@clisp.org>
3448
3449         * m4/inttypes.m4: New file.
3450         * m4/_inttypes_h.m4: Remove file.
3451         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
3452         PRI_MACROS_BROKEN.
3453         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
3454
3455         * m4/imaxabs.m4: New file.
3456
3457         * m4/imaxdiv.m4: New file.
3458
3459 2006-08-26  Bruno Haible  <bruno@clisp.org>
3460
3461         * lib/inttypes_.h: New file.
3462         * lib/inttypes.h: Remove file.
3463         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
3464
3465         * lib/imaxabs.c: New file.
3466
3467         * lib/imaxdiv.c: New file.
3468
3469 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
3470
3471         New config-h module, so that "make" output needn't be cluttered
3472         by -DHAVE_CONFIG_H.
3473         * MODULES.html.sh (Support for building libraries and executables):
3474         Add config-h.
3475         * modules/config-h: New file.
3476         * gnulib-tool (nl, sed_transform_lib_file): New vars.
3477         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
3478         the config-h module is used.
3479
3480         New configmake module, so that "make" output needn't be cluttered
3481         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
3482         * MODULES.html.sh (Support for building libraries and executables):
3483         Add configmake.
3484         * modules/configmake: New file.
3485
3486 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
3487
3488         * m4/config-h.m4: New file.
3489
3490 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
3491
3492         * config/srclist.txt: Add elisp-comp.
3493
3494 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
3495
3496         * MODULES.html.sh (Support for building libraries and executables):
3497         Add elisp-comp.
3498         * build-aux/elisp-comp: New file.
3499         * modules/elisp-comp: New file.
3500
3501 2006-08-24  Bruno Haible  <bruno@clisp.org>
3502
3503         * gnulib-tool (func_create_testdir): Use non-default values of
3504         sourcebase and m4base.
3505
3506 2006-08-24  Bruno Haible  <bruno@clisp.org>
3507
3508         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
3509         HTML structure.
3510
3511 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
3512
3513         * modules/openat (Depends-on): Add lchown.
3514
3515 2006-08-23  Bruno Haible  <bruno@clisp.org>
3516
3517         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
3518         of gl_LOCK_EARLY instead of gl_LOCK.
3519
3520 2006-08-23  Bruno Haible  <bruno@clisp.org>
3521
3522         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
3523         on OSF/1 to no.
3524         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
3525
3526 2006-08-23  Bruno Haible  <bruno@clisp.org>
3527
3528         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
3529         as unusable.
3530
3531         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
3532         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
3533         (gl_LOCK): New macro.
3534
3535 2006-08-22  Simon Josefsson  <jas@extundo.com>
3536
3537         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
3538         to md5 module.
3539
3540 2006-08-22  Simon Josefsson  <jas@extundo.com>
3541
3542         * MODULES.html.sh: Add "Support for maintaining and release
3543         projects".
3544
3545         * build-aux/gnupload: New file, from coreutils.
3546
3547 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3548
3549         Avoid the need for AC_LIBSOURCES in m4 macros.
3550         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
3551         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
3552         * modules/check-version (EXTRA_DIST): Add check-version.h.
3553         * modules/crc (EXTRA_DIST): Add crc.h.
3554         * modules/des (EXTRA_DIST): Add des.h.
3555         * modules/gc (EXTRA_DIST): Add gc.h.
3556         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
3557         * modules/getline (EXTRA_DIST): Add getline.h.
3558         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
3559         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
3560         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
3561         * modules/md2 (EXTRA_DIST): Add md2.h.
3562         * modules/md4 (EXTRA_DIST): Add md4.h.
3563         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
3564         * modules/read-file (EXTRA_DIST): Add read-file.h.
3565         * modules/readline (EXTRA_DIST): Add readline.h.
3566         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
3567         rijndael-api-fst.h.
3568
3569 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3570
3571         * m4/rijndael.m4 (gl_ARCFOUR):
3572         * m4/arctwo.m4 (gl_ARCTWO):
3573         * m4/check-version.m4 (gl_CHECK_VERSION):
3574         * m4/crc.m4 (gl_CRC):
3575         * m4/des.m4 (gl_DES):
3576         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
3577         * m4/gc.m4 (gl_GC):
3578         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
3579         * m4/getline.m4 (gl_FUNC_GETLINE):
3580         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
3581         * m4/hmac-md5.m4 (gl_HMAC_MD5):
3582         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
3583         * m4/md2.m4 (gl_MD2):
3584         * m4/md4.m4 (gl_MD4):
3585         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
3586         * m4/read-file.m4 (gl_FUNC_READ_FILE):
3587         * m4/readline.m4 (gl_FUNC_READLINE):
3588         * m4/rijndael.m4 (gl_RIJNDAEL):
3589         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
3590         to get the necessary .h files and whatnot.
3591
3592 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3593
3594         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
3595         gnulib rather than the other way around.
3596         * config/srclistvars.sh (COREUTILS): Remove.
3597
3598 2006-08-22  Jim Meyering  <jim@meyering.net>
3599
3600         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
3601
3602         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
3603
3604 2006-08-22  Eric Blake  <ebb9@byu.net>
3605
3606         * modules/regexprops-generic: New file.
3607         * MODULES.html.sh (Support for building documentation): List it.
3608
3609 2006-08-22  Eric Blake  <ebb9@byu.net>
3610
3611         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
3612         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
3613         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
3614         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
3615
3616 2006-08-22  Bruno Haible  <bruno@clisp.org>
3617
3618         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
3619         and lib_LTLIBRARIES like the other lib_* variables.
3620
3621 2006-08-22  Bruno Haible  <bruno@clisp.org>
3622
3623         * build-aux/x-to-1.in: New file, from GNU gettext.
3624
3625 2006-08-22  Bruno Haible  <bruno@clisp.org>
3626
3627         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
3628         <utmpx.h> exists.
3629
3630 2006-08-22  Bruno Haible  <bruno@clisp.org>
3631
3632         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
3633         <utmpx.h> exists.
3634
3635 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3636
3637         BeOS portability.
3638         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
3639         exist.
3640         Problem reported by Bruno Haible.
3641
3642 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3643
3644         Avoid the need for AC_LIBSOURCES in m4 macros.
3645         * modules/acl (EXTRA_DIST): Add acl.h.
3646         * modules/argmatch (Files): Add m4/argmatch.m4.
3647         (configure.ac): Add gl_ARGMATCH.
3648         (EXTRA_DIST): Renamed from lib_SOURCES, for
3649         consistency with the other modules.  Remove argmatch.c.
3650         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
3651         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
3652         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
3653         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
3654         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
3655         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
3656         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
3657         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
3658         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
3659         * modules/closeout (EXTRA_DIST): Add closeout.h.
3660         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
3661         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
3662         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
3663         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
3664         dirname.h; remove basename.c and stripslash.c.
3665         * modules/exclude (EXTRA_DIST): Add exclude.h.
3666         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
3667         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
3668         * modules/file-type (EXTRA_DIST): Add file-type.h.
3669         * modules/filemode (EXTRA_DIST): Add filemode.h.
3670         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
3671         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
3672         * modules/fpending (EXTRA_DIST): Add __fpending.h.
3673         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
3674         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
3675         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
3676         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
3677         * modules/getdate (EXTRA_DIST): Add getdate.c.
3678         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
3679         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
3680         * modules/getpass (EXTRA_DIST): Add getpass.h.
3681         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
3682         * modules/group-member (EXTRA_DIST): Add group-member.h.
3683         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
3684         * modules/hash (EXTRA_DIST): Add hash.h.
3685         * modules/human (EXTRA_DIST): Add human.h.
3686         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
3687         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
3688         * modules/lchown (EXTRA_DIST): Add lchown.h.
3689         * modules/long-options (EXTRA_DIST): Add long-options.h.
3690         * modules/lstat (EXTRA_DIST): Add lstat.h.
3691         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
3692         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
3693         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
3694         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
3695         * modules/memxor (EXTRA_DIST): Add memxor.h.
3696         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
3697         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
3698         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
3699         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
3700         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
3701         * modules/physmem (EXTRA_DIST): Add physmem.h.
3702         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
3703         * modules/posixver (EXTRA_DIST): Add posixver.h.
3704         * modules/quote (EXTRA_DIST): Add quote.h.
3705         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
3706         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
3707         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
3708         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
3709         regex_internal.h regexec.c.
3710         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
3711         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
3712         * modules/same (EXTRA_DIST): Add same.h.
3713         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
3714         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
3715         * modules/savedir (EXTRA_DIST): Add savedir.h.
3716         * modules/sha1 (EXTRA_DIST): Add sha1.h.
3717         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
3718         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
3719         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
3720         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
3721         * modules/strdup (EXTRA_DIST): Add strdup.h.
3722         * modules/strftime (EXTRA_DIST): Add strftime.h.
3723         * modules/strndup (EXTRA_DIST): Add strndup.h.
3724         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
3725         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
3726         * modules/time_r (EXTRA_DIST): Add time_r.h.
3727         * modules/timespec (EXTRA_DIST): Add timespec.h.
3728         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
3729         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
3730         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
3731         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
3732         * modules/userspec (EXTRA_DIST): Add userspec.h.
3733         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
3734         * modules/utimens (EXTRA_DIST): Add utimens.h.
3735         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
3736         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
3737         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
3738         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
3739         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
3740         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
3741         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
3742         * modules/yesno (EXTRA_DIST): Add yesno.h.
3743
3744 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3745
3746         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
3747
3748         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
3749         * m4/dev-ino.m4, same-inode.m4: Remove.
3750
3751         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
3752         * m4/acl.m4 (AC_FUNC_ACL):
3753         * m4/backupfile.m4 (gl_BACKUPFILE):
3754         * m4/c-strtod.m4 (gl_C99_STRTOLD):
3755         * m4/canon-host.m4 (gl_CANON_HOST):
3756         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3757         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
3758         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
3759         * m4/cloexec.m4 (gl_CLOEXEC):
3760         * m4/close-stream.m4 (gl_CLOSE_STREAM):
3761         * m4/closeout.m4 (gl_CLOSEOUT):
3762         * m4/dirfd.m4 (gl_FUNC_DIRFD):
3763         * m4/dirname.m4 (gl_DIRNAME):
3764         * m4/exclude.m4 (gl_EXCLUDE):
3765         * m4/exitfail.m4 (gl_EXITFAIL):
3766         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
3767         * m4/file-type.m4 (gl_FILE_TYPE):
3768         * m4/filemode.m4 (gl_FILEMODE):
3769         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
3770         * m4/fpending.m4 (gl_FUNC_FPENDING):
3771         * m4/fprintftime.m4 (gl_FPRINTFTIME):
3772         * m4/fts.m4 (gl_FUNC_FTS):
3773         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
3774         * m4/getdate.m4 (gl_GETDATE):
3775         * m4/gethrxtime.m4 (gl_GETHRXTIME):
3776         * m4/getpagesize.m4 (gl_GETPAGESIZE):
3777         * m4/getpass.m4 (gl_FUNC_GETPASS):
3778         * m4/gettime.m4 (gl_GETTIME):
3779         * m4/getugroups.m4 (gl_GETUGROUPS):
3780         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
3781         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
3782         * m4/hard-locale.m4 (gl_HARD_LOCALE):
3783         * m4/hash.m4 (gl_HASH):
3784         * m4/idcache.m4 (gl_IDCACHE):
3785         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
3786         * m4/lchown.m4 (gl_FUNC_LCHOWN):
3787         * m4/long-options.m4 (gl_LONG_OPTIONS):
3788         * m4/lstat.m4 (gl_FUNC_LSTAT):
3789         * m4/md5.m4 (gl_MD5):
3790         * m4/memcasecmp.m4 (gl_MEMCASECMP):
3791         * m4/memcoll.m4 (gl_MEMCOLL):
3792         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
3793         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
3794         * m4/memxor.m4 (gl_MEMXOR):
3795         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
3796         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
3797         * m4/modechange.m4 (gl_MODECHANGE):
3798         * m4/mountlist.m4 (gl_MOUNTLIST):
3799         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
3800         * m4/openat.m4 (gl_FUNC_OPENAT):
3801         * m4/pathmax.m4 (gl_PATHMAX):
3802         * m4/physmem.m4 (gl_PHYSMEM):
3803         * m4/posixtm.m4 (gl_POSIXTM):
3804         * m4/posixver.m4 (gl_POSIXVER):
3805         * m4/quote.m4 (gl_QUOTE):
3806         * m4/quotearg.m4 (gl_QUOTEARG):
3807         * m4/readtokens.m4 (gl_READTOKENS):
3808         * m4/readutmp.m4 (gl_READUTMP):
3809         * m4/regex.m4 (gl_REGEX):
3810         * m4/safe-read.m4 (gl_SAFE_READ):
3811         * m4/safe-write.m4 (gl_SAFE_WRITE):
3812         * m4/same.m4 (gl_SAME):
3813         * m4/save-cwd.m4 (gl_SAVE_CWD):
3814         * m4/savedir.m4 (gl_SAVEDIR):
3815         * m4/settime.m4 (gl_SETTIME):
3816         * m4/sha1.m4 (gl_SHA1):
3817         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
3818         * m4/stat-macros.m4 (gl_STAT_MACROS):
3819         * m4/stat-time.m4 (gl_STAT_TIME):
3820         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
3821         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
3822         * m4/strdup.m4 (gl_FUNC_STRDUP):
3823         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
3824         * m4/strndup.m4 (gl_FUNC_STRNDUP):
3825         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
3826         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
3827         * m4/time_r.m4 (gl_TIME_R):
3828         * m4/timespec.m4 (gl_TIMESPEC):
3829         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
3830         * m4/unlinkdir.m4 (gl_UNLINKDIR):
3831         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
3832         * m4/userspec.m4 (gl_USERSPEC):
3833         * m4/utimecmp.m4 (gl_UTIMECMP):
3834         * m4/utimens.m4 (gl_UTIMENS):
3835         * m4/xalloc.m4 (gl_XALLOC):
3836         * m4/xgetcwd.m4 (gl_XGETCWD):
3837         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
3838         * m4/xreadlink.m4 (gl_XREADLINK):
3839         * m4/xstrtod.m4 (gl_XSTRTOD):
3840         * m4/yesno.m4 (gl_YESNO):
3841         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
3842         to get the necessary .h files and whatnot.
3843
3844 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
3845             Bruno Haible  <bruno@clisp.org>
3846
3847         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
3848         /bin/sh understanding of '!' conditional negation.
3849
3850 2006-08-21  Jim Meyering  <jim@meyering.net>
3851
3852         * modules/openat (Depends-on): Really alphabetize.
3853
3854         * modules/acl (Depends-on): Add error and quote.
3855
3856         * check-module (find_included_lib_files): Add at-func.c to the
3857         ok-to-include-more-than-once white list.
3858
3859         * modules/openat (Depends-on): Add lstat.  Alphabetize.
3860
3861 2006-08-21  Bruno Haible  <bruno@clisp.org>
3862
3863         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3864         Emit a pkgdata_DATA variable only if some snippets add contents to it.
3865         Reported by Martin Lambers <marlam@marlam.de>.
3866
3867 2006-08-21  Bruno Haible  <bruno@clisp.org>
3868
3869         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
3870         specify an installation location, don't emit a noinst_LIBRARIES or
3871         noinst_LTLIBRARIES assignment.
3872
3873 2006-08-21  Bruno Haible  <bruno@clisp.org>
3874
3875         BeOS portability.
3876         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
3877         BeOS has mbrtowc() but no <wctype.h>.
3878
3879 2006-08-21  Bruno Haible  <bruno@clisp.org>
3880
3881         BeOS portability.
3882         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
3883         exist.
3884
3885 2006-08-21  Bruno Haible  <bruno@clisp.org>
3886
3887         BeOS portability.
3888         * lib/mbchar.h: Include <wctype.h> only if it exists.
3889
3890 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3891
3892         Remove files that are no longer needed by their respective modules.
3893         * m4/obstack.m4: Remove.
3894         * m4/strerror_r.m4: Remove.
3895         * m4/uint32_t.m4: Remove.
3896         * m4/uintptr_t.m4: Remove.
3897         * m4/ullong_max.m4: Remove.
3898         * m4/xstrtoimax.m4: Remove.
3899         * m4/xstrtoumax.m4: Remove.
3900
3901         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
3902         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
3903         dependencies now capture this.
3904
3905         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
3906         Do not use AC_LIBSOURCES, since gnulib modules now do this.
3907         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
3908         * m4/human.m4 (gl_HUMAN): Likewise.
3909         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
3910         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
3911
3912         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
3913
3914         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
3915         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
3916         stdint.
3917         * m4/human.m4 (gl_HUMAN): Likewise.
3918         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
3919         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
3920         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3921         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3922         * m4/xstrtol (gl_XSTRTOL): Likewise.
3923
3924         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
3925         AC_TYPE_LONG_LONG_INT.
3926         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3927         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
3928         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
3929         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3930
3931         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
3932         on stdbool.
3933
3934         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
3935         (gl_PREREQ_XSTRTOUL): Remove.
3936
3937         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
3938
3939         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
3940         mode.
3941
3942 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3943
3944         Add and change modules to make it easier for coreutils to use
3945         gnulib-tool.
3946         * modules/backupfile (Files): Remove m4/d-ino.m4.
3947         (Depends-on): Add d-ino.
3948         * modules/cycle-check (Depends-on): Add stdint.
3949         (lib_SOURCES): Add cycle-check.h.
3950         * modules/d-ino: New module.
3951         * modules/d-type: New module.
3952         * modules/error (Files): Remove m4/strerror_r.m4.
3953         * modules/filemode (Files): Add m4/st_dm_mode.m4.
3954         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
3955         m4/inttypes_h.m4, m4/uintmax_t.m4.
3956         (Depends-on): Add stdint.
3957         (lib_SOURCES): Add fsusage.h.
3958         * modules/getcwd (Files): Remove d-ino.m4.
3959         (Depends-on): Add d-ino.
3960         * modules/getndelim2 (Depends-on): Add stdint.
3961         * modules/glob (Files): Remove m4/d-type.m4.
3962         (Depends-on): Add d-type.
3963         * modules/host-os: New module.
3964         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
3965         m4/inttypes_h.m4, m4/uintmax_t.m4.
3966         * Depends-on: Add stdint.
3967         (lib_SOURCES): Add human.h.
3968         * modules/inttostr (Files): Remove m4/intmax_t.m4,
3969         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
3970         m4/uintmax_t.m4, m4/ulonglong.m4.
3971         (Depends-on): Add stdint.
3972         (EXTRA_DIST): Add inttostr.h.
3973         * modules/lchmod: New module.
3974         * modules/link-follow: New module.
3975         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
3976         (Depends-on): Add lchmod.
3977         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
3978         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
3979         (Depends-on): Add stdint.
3980         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
3981         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3982         (Depends-on): Add stdint.
3983         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
3984         * modules/perl: New module.
3985         * modules/regex (Depends-on): Add stdint.
3986         * modules/rmdir-errno: New module.
3987         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
3988         m4/intmax_t.m4.
3989         (Depends-on): Add stdint.
3990         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
3991         m4/uintmax_t.m4.
3992         (Depends-on): Add stdint.
3993         * modules/unlink-busy: New module.
3994         * modules/utimecmp (Depends-on): Add stdint.
3995         * modules/uptime: New module.
3996         * modules/winsz-ioctl: New module.
3997         * modules/winsz-termios: New module.
3998         * modules/xnanosleep (Depends-on): Add nanosleep.
3999         * modules/ullong_max: Remove.
4000         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
4001         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
4002         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
4003         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
4004         (Depends-on): Add inttypes.
4005         (lib_SOURCES): Add xstrtol.h.
4006         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
4007         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
4008         * MODULES.html.sh: Move 'assert' into the assert section.
4009         Move 'dummy' into the linking section.
4010         Remove ullong_max.
4011         Add section for compatibility checks for POSIX:2001 functions,
4012         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
4013         winsz-ioctl, and winsz-termios into it.
4014         Add lchmod.
4015         Add top-level Misc section and put host-os, perl, and uptime
4016         into it.
4017
4018 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4019
4020         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
4021         now assume the stdint module.  Do not include inttypes.h.
4022         * lib/fsusage.h: Likewise.
4023         * lib/getndelim2.c: Likewise.
4024         * lib/human.h: Likewise.
4025         * lib/inttostr.h: Likewise.
4026         * lib/obstack.c: Likewise.
4027         * lib/regex_internal.h: Likewise.
4028         * lib/tempname.c: Likewise.
4029         * lib/utimecmp.c: Likewise.
4030         * lib/xstrtol.h: Likewise.
4031
4032         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
4033
4034         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
4035         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
4036         * lib/xtime.h: Likewise.
4037
4038 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4039
4040         * modules/openat (Files): Add lib/fchmodat.c.
4041         Fixes problem reported by Jay Youngman.
4042
4043 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4044
4045         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
4046         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
4047
4048 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
4049             Bruno Haible  <bruno@clisp.org>
4050
4051         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4052         and is a script that invokes bison. Tighten the code. Add comments.
4053
4054 2006-08-18  Jim Meyering  <jim@meyering.net>
4055
4056         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
4057         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
4058         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
4059         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
4060
4061 2006-08-18  Bruno Haible  <bruno@clisp.org>
4062
4063         * modules/bison-i18n: New file.
4064         * MODULES.html.sh (Internationalization functions): Add it.
4065
4066 2006-08-18  Bruno Haible  <bruno@clisp.org>
4067
4068         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
4069         sys/statvfs.h. When getmntinfo was found, check its declaration and
4070         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
4071
4072 2006-08-18  Bruno Haible  <bruno@clisp.org>
4073
4074         * m4/bison-i18n.m4: New file, from bison.
4075
4076 2006-08-18  Bruno Haible  <bruno@clisp.org>
4077
4078         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
4079         (ME_DUMMY): Treat "kernfs" as a dummy.
4080         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
4081
4082 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
4083
4084         Update from coreutils.
4085
4086         2006-08-15  Jim Meyering  <jim@meyering.net>
4087
4088         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
4089
4090         2006-01-17  Jim Meyering  <jim@meyering.net>
4091
4092         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
4093
4094         2006-01-11  Jim Meyering  <jim@meyering.net>
4095
4096         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
4097         Check for the lchmod function.
4098
4099 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
4100
4101         Update from coreutils.
4102
4103         * lib/__fpending.h: Add copyright notice.
4104         * lib/fprintftime.h: Likewise.
4105         * lib/savedir.c: Use (C) in copyright notice.
4106         * lib/savedir.h: Likewise.
4107
4108         2006-08-15  Jim Meyering  <jim@meyering.net>
4109
4110         * lib/at-func.c: New file, with the logic of all emulated at-functions.
4111         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
4112         in support of the EXPECTED_ERRNO macro.
4113         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
4114         definitions.  Instead, define the appropriate symbols and include
4115         "at-func.c".
4116         * lib/mkdirat.c (mkdirat): Likewise.
4117         * lib/fchmodat.c (fchmodat): Likewise.
4118         (ENOSYS): Remove definition.
4119         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
4120         it.  Don't include "unistd--.h" -- it wasn't ever used.
4121
4122         2006-01-17  Jim Meyering  <jim@meyering.net>
4123
4124         Rewrite fts.c not to change the current working directory,
4125         by using openat, fstatat, fdopendir, etc..
4126
4127         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
4128         (HAVE_OPENAT_SUPPORT): Define.
4129         [_LIBC] (fchdir): Don't undef or define; no longer used.
4130         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
4131         Now, this `function' always succeeds, and consumes its file descriptor
4132         parameter -- so callers must not close such FDs.  Update callers.
4133         (diropen_fd, opendirat, cwd_advance_fd): New functions.
4134         (diropen): Add parameter, SP.  Adjust all callers.
4135         Implement using diropen_fd, rather than open.
4136         (fts_open): Initialize new member, fts_cwd_fd.
4137         Remove fts_rft-setting code.
4138         (fts_close): Close fts_cwd_fd, if necessary.
4139         (__opendir2): Define in terms of opendir or opendirat,
4140         depending on whether the FST_NOCHDIR flag is set.
4141         (fts_build): Since fts_safe_changedir consumes its FD, and since
4142         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
4143         and close the dup'd file descriptor upon failure.
4144         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
4145         (fts_safe_changedir): Tweak semantics to reflect that this function
4146         now calls cwd_advance_fd and hence consumes its FD argument.
4147         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
4148         [struct FTS] (fts_rft): Remove now-unused member.
4149         [struct FTS] (fts_cycle.state): Improve comment.
4150
4151         * lib/openat.c (openat_needs_fchdir): New function.
4152         * lib/openat.h (openat_needs_fchdir): Declare it.
4153
4154 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
4155
4156         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
4157         Problem and fix reported by Pádraig Brady in
4158         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
4159
4160 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4161
4162         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
4163
4164 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4165
4166         * lib/memcoll.c (memcoll): Optimize for the common case where the
4167         arguments are bytewise equal.
4168
4169 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4170
4171         * doc/regexprops-generic.texi: Add a copyright notice.
4172
4173 2006-08-15  Bruno Haible  <bruno@clisp.org>
4174
4175         * modules/tmpdir (License): Change to LGPL.
4176
4177 2006-08-15  Bruno Haible  <bruno@clisp.org>
4178
4179         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
4180         module.
4181
4182 2006-08-14  Simon Josefsson  <jas@extundo.com>
4183
4184         * config/srclist.txt: Add gnupload.
4185
4186 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4187
4188         Change copyright notice from LGPL 2 to GPL 2, since that's the
4189         standard form used in the gnulib repository.
4190         * tests/test-lock.c: Likewise.
4191         * tests/test-stdint.c: Likewise.
4192         * tests/test-tls.c: Likewise.
4193
4194         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
4195         prelude-manager.  User shorter URLs for GNU projects, without '?'.
4196         Add copyright notice.
4197
4198         * check-module: Add copyright notice.  Output a copyright
4199         notice if "--version" is specified.
4200         * modules/COPYING: New file.
4201         * tests/test-getaddrinfo.c: Add copyright notice.
4202         * tests/test-verify.c: Likewise.
4203
4204 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4205
4206         Change copyright notice from LGPL 2 to GPL 2, since that's the
4207         standard form used in the gnulib repository.
4208         * lib/lock.c: LGPL -> GPL.
4209         * lib/lock.h: Likewise.
4210         * lib/strnlen1.c: Likewise.
4211         * lib/strnlen1.h: Likewise.
4212         * lib/tls.c: Likewise.
4213         * lib/tls.h: Likewise.
4214         * lib/tmpdir.c: Likewise.
4215
4216         * lib/TODO: Remove; this belongs only in coreutils.
4217
4218 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4219
4220         Add copyright notices to long-enough files that lack them, since
4221         otherwise the files aren't clearly free.  Use the same notice that
4222         getdate.texi already uses.
4223         * doc/alloca-opt.texi: Add copyright notice.
4224         * doc/alloca.texi: Likewise.
4225         * doc/ctime.texi: Likewise.
4226         * doc/functions.texi: Likewise.
4227         * doc/gcd.texi: Likewise.
4228         * doc/gnulib-tool.texi: Likewise.
4229         * doc/inet_ntoa.texi: Likewise.
4230         * doc/visibility.texi: Likewise.
4231
4232         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
4233         * doc/quote.texi: Add copyright notice.
4234
4235         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
4236         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
4237         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
4238         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
4239         is now obsolete, and give a pointer to the Sun list.
4240         Add copyright notice.
4241
4242 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4243
4244         * config/srclistvars.sh: Add copyright notice.
4245
4246 2006-08-14  Eric Blake  <ebb9@byu.net>
4247
4248         Import the following change from libc:
4249
4250         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4251
4252         Upstream bug 2997.
4253         * lib/misc/error.c: Add space between program name and message if file
4254         name is missing.
4255
4256 2006-08-12  Karl Berry  <karl@gnu.org>
4257
4258         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
4259         remove, these originate in gnulib now.
4260
4261 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4262
4263         * doc/Makefile (standards.info standards.html standards.dvi):
4264         Also depend on make-stds.texi.
4265
4266 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
4267
4268         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
4269         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
4270
4271         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
4272         in wchar_t.  Problem reported by Eric Blake.
4273
4274         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
4275         LEN is smaller than SIZE.  Suggested by Bruno Haible.
4276         Also, help the compiler to keep LEN in a register.
4277
4278 2006-08-11  Eric Blake  <ebb9@byu.net>
4279
4280         * users.txt: Sort.  Add tar.
4281
4282 2006-08-11  Bruno Haible  <bruno@clisp.org>
4283
4284         * users.txt: New file.
4285
4286 2006-08-11  Bruno Haible  <bruno@clisp.org>
4287
4288         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
4289         before <wchar.h>. Needed for OSF/1 and BSD/OS.
4290
4291 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
4292
4293         * modules/snprintf (Depends-on): Remove minmax.
4294         (Maintainer): Add self and Bruno.
4295
4296 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
4297
4298         * lib/.cppi-disable: Add snprintf.h, socket_.h.
4299         * lib/snprintf.c: Include <errno.h> and <limits.h>.
4300         (EOVERFLOW): Define if the system does not.
4301         Do not include "minmax.h"; it wasn't used.
4302         (snprintf): Don't assume size_t promotes to an unsigned type.
4303         Fix bug when generated string was too long for the buffer: the
4304         buffer's contents are supposed to be the initial prefix of the
4305         output.  Don't assume vasnprintf returns EOVERFLOW if the size
4306         exceeds INT_MAX; do the check ourselves.
4307
4308         Import the following changes from libc:
4309
4310         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
4311
4312         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
4313         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
4314         set wc to the byte which couldn't be converted.
4315         (re_string_reconstruct): Don't clear valid_raw_len before calling
4316         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
4317         tip_context using re_string_context_at.
4318
4319         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
4320
4321         * lib/posix/regex.h: g++ still cannot handled [restrict].
4322
4323         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
4324
4325         * lib/posix/regex.h: Remove special handling for VMS.
4326
4327 2006-08-10  Jim Meyering  <jim@meyering.net>
4328
4329         * modules/same-inode: New module.
4330         * modules/dev-ino: New module.
4331         * modules/cycle-check: Depend on these modules, rather than simply
4332         including their .h files.
4333         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
4334         required via m4/cycle-check.m4.
4335         * modules/same: Depend on new same-inode module, rather than
4336         including same-inode.h.
4337         * modules/chdir-safer: New file.
4338
4339         * modules/chown (Depends-on): Add stat-macros.
4340
4341 2006-08-10  Jim Meyering  <jim@meyering.net>
4342
4343         * m4/cycle-check.m4: New file.
4344         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
4345         * m4/dev-ino.m4, m4/same-inode.m4: New files.
4346
4347 2006-08-10  Eric Blake  <ebb9@byu.net>
4348
4349         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
4350         in from original proposal.
4351
4352 2006-08-10  Eric Blake  <ebb9@byu.net>
4353         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4354
4355         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
4356         namespace.
4357
4358 2006-08-10  Bruno Haible  <bruno@clisp.org>
4359
4360         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
4361         as well.
4362
4363 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4364
4365         Sync from coreutils.
4366
4367         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
4368
4369         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
4370         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
4371
4372 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4373
4374         * modules/restrict: Remove; no longer needed now that we assume
4375         Autoconf 2.59 or later.
4376         * MODULES.html.sh: Remove 'restrict'.
4377         * modules/argp (Depends-on): Remove 'restrict'.
4378         * modules/base64 (Depends-on): Likewise.
4379         * modules/gc (Depends-on): Likewise.
4380         * modules/getaddrinfo (Depends-on): Likewise.
4381         * modules/glob (Depends-on): Likewise.
4382         * modules/inet_ntop (Depends-on): Likewise.
4383         * modules/inet_pton (Depends-on): Likewise.
4384         * modules/memxor (Depends-on): Likewise.
4385         * modules/regex (Depends-on): Likewise.
4386         * modules/strtok_r (Depends-on): Likewise.
4387         * modules/time_r (Depends-on): Likewise.
4388
4389 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4390
4391         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
4392         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
4393         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
4394         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
4395         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
4396         * m4/memxor.m4 (gl_MEMXOR): Likewise.
4397         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
4398         gl_C_RESTRICT replaced by AC_C_RESTRICT.
4399
4400         Merge from coreutils.
4401         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
4402         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
4403         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
4404         * m4/time_r.m4 (gl_TIME_R): Likewise.
4405
4406 2006-08-09  Karl Berry  <karl@gnu.org>
4407
4408         * config/srclist.txt: no more gettext-tools, per Bruno.
4409
4410 2006-08-08  Eric Blake  <ebb9@byu.net>
4411
4412         * modules/verror: New module.
4413         * MODULES.html.sh: Document it.
4414
4415 2006-08-08  Eric Blake  <ebb9@byu.net>
4416
4417         * lib/verror.h, lib/verror.c: New files.
4418
4419 2006-08-08  Eric Blake  <ebb9@byu.net>
4420
4421         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
4422         verror_at_line output complies with GNU Coding Standards even when
4423         file is NULL.
4424
4425 2006-08-07  Bruno Haible  <bruno@clisp.org>
4426
4427         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
4428         versions of AIX.
4429         Reported by Ralf Wildenhues.
4430
4431 2006-08-07  Bruno Haible  <bruno@clisp.org>
4432
4433         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
4434         in an AC_DEFUN. Needed so that the autoconf snippets can use
4435         AC_REQUIRE.
4436
4437 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4438
4439         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4440         Initialize pkgdata_DATA.
4441         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
4442         overriding it.
4443
4444 2006-08-06  Eric Blake  <ebb9@byu.net>
4445
4446         * lib/error.h: Fold in some upstream changes from glibc.
4447         * lib/error.c: Likewise.
4448
4449 2006-08-04  Bruno Haible  <bruno@clisp.org>
4450
4451         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4452         Make the mostlyclean-local rule depend on mostlyclean-generic.
4453         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
4454
4455 2006-07-31  Bruno Haible  <bruno@clisp.org>
4456
4457         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
4458         <stdlib.h>, <string.h>.
4459
4460 2006-07-30  Bruno Haible  <bruno@clisp.org>
4461
4462         * modules/readlink (License): Change to LGPL.
4463
4464 2006-07-30  Bruno Haible  <bruno@clisp.org>
4465
4466         * modules/javaversion (Makefile.am): Distribute javaversion.java and
4467         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
4468         set PKGDATADIR to point to it.
4469
4470 2006-07-30  Bruno Haible  <bruno@clisp.org>
4471
4472         * modules/csharpexec (configure.ac): Comment out macro invocation.
4473         * modules/javaexec (configure.ac): Likewise.
4474         * modules/javacomp-script (configure.ac): Likewise.
4475
4476         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
4477
4478 2006-07-30  Bruno Haible  <bruno@clisp.org>
4479
4480         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
4481         linked-list.
4482
4483 2006-07-30  Bruno Haible  <bruno@clisp.org>
4484
4485         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
4486
4487 2006-07-30  Bruno Haible  <bruno@clisp.org>
4488
4489         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4490         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
4491         get removed.
4492
4493 2006-07-29  Bruno Haible  <bruno@clisp.org>
4494
4495         Make it possible for gnulib-tool to work with locally modified or
4496         augmented gnulib repositories.
4497         * gnulib-tool (func_usage): Document --local-dir option.
4498         (local_gnulib_dir): New variable.
4499         Handle --local-dir option.
4500         (func_lookup_file): New function.
4501         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
4502         (func_get_description, func_get_filelist, func_get_description,
4503         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
4504         func_get_automake_snippet, func_get_include_directive,
4505         func_get_license, func_get_maintainer): Use func_lookup_file.
4506         (func_import, func_create_testdir): Use func_lookup_file.
4507
4508 2006-07-29  Bruno Haible  <bruno@clisp.org>
4509
4510         * modules/setenv (Depends-on): Add unistd.
4511
4512 2006-07-29  Bruno Haible  <bruno@clisp.org>
4513
4514         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
4515
4516 2006-07-29  Bruno Haible  <bruno@clisp.org>
4517
4518         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
4519
4520 2006-07-29  Bruno Haible  <bruno@clisp.org>
4521
4522         * gnulib-tool (import, update): If there is no Makefile.am, look at
4523         aclocal.m4, instead of bailing out.
4524
4525 2006-07-29  Bruno Haible  <bruno@clisp.org>
4526
4527         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
4528         Categorize the options by when they are useful.
4529
4530 2006-07-29  Bruno Haible  <bruno@clisp.org>
4531
4532         * gnulib-tool (func_usage): Document option --no-libtool.
4533         Handle option --no-libtool.
4534         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
4535         for changed semantics of $libtool variable.
4536         (func_import): Likewise. If libtool is not used, show this through
4537         an option --no-libtool.
4538         (func_create_testdir): Update.
4539
4540 2006-07-29  Bruno Haible  <bruno@clisp.org>
4541
4542         * gnulib-tool (func_import): Extend error message about missing
4543         --doc-base.
4544
4545 2006-07-29  Bruno Haible  <bruno@clisp.org>
4546
4547         * gnulib-tool (func_import): Don't create the $docbase directory if
4548         there is no file to store there.
4549
4550 2006-07-29  Bruno Haible  <bruno@clisp.org>
4551
4552         * gnulib-tool (autoconf_minversion): If a --dir option is given and
4553         relevant, look for configure.ac there, not in the current directory.
4554         Also use a simple search for AC_PREREQ, not "autoconf --trace".
4555
4556 2006-07-29  Bruno Haible  <bruno@clisp.org>
4557
4558         * gnulib-tool (SORT): New variable.
4559         (func_usage): Undocument --assume-autoconf option.
4560         Remove --assume-autoconf option handling.
4561         (autoconf_minversion): Determine from the contents of configure.ac.
4562         (func_import): Remove autoconf_minversion handling.
4563         Suggested by Eric Blake.
4564
4565 2006-07-29  Bruno Haible  <bruno@clisp.org>
4566
4567         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
4568
4569 2006-07-29  Bruno Haible  <bruno@clisp.org>
4570
4571         * config/srclist.txt (*setenv.[ch]): Remove rules.
4572
4573 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4574
4575         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
4576
4577 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4578
4579         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
4580         arpa/inet.h.
4581
4582 2006-07-28  Simon Josefsson  <jas@extundo.com>
4583
4584         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
4585         * modules/inet_pton (Depends-on): Likewise.
4586
4587 2006-07-28  Simon Josefsson  <jas@extundo.com>
4588
4589         * m4/netinet_in_h.m4: New file.
4590
4591 2006-07-28  Simon Josefsson  <jas@extundo.com>
4592
4593         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
4594         #include's.
4595
4596 2006-07-28  Simon Josefsson  <jas@extundo.com>
4597
4598         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
4599         #include's.
4600
4601 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
4602
4603         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
4604         setgid on directories only if they set these bits.
4605         * lib/modechange.h: Remove obsolete comment about masks.
4606
4607 2006-07-28  Eric Blake  <ebb9@byu.net>
4608
4609         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
4610         macro expansion.
4611
4612 2006-07-28  Bruno Haible  <bruno@clisp.org>
4613
4614         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
4615
4616 2006-07-28  Bruno Haible  <bruno@clisp.org>
4617
4618         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
4619
4620 2006-07-28  Bruno Haible  <bruno@clisp.org>
4621
4622         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
4623         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
4624         Define fallbacks.
4625         Avoids link error on FreeBSD 4.x.
4626         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
4627
4628         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
4629         encoding.
4630         * lib/mbswidth.c (iswcntrl): Likewise.
4631
4632 2006-07-27  Bruno Haible  <bruno@clisp.org>
4633
4634         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
4635         test.
4636
4637 2006-07-27  Bruno Haible  <bruno@clisp.org>
4638
4639         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
4640         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
4641         defined.
4642
4643 2006-07-26  Eric Blake  <ebb9@byu.net>
4644
4645         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
4646
4647 2006-07-26  Eric Blake  <ebb9@byu.net>
4648
4649         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
4650         like mingw that lack mkstemp.
4651         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
4652         avoid compilation warning on mingw.
4653
4654 2006-07-26  Bruno Haible  <bruno@clisp.org>
4655
4656         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
4657         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
4658         INT_FAST*_MIN, INTPTR_MIN.
4659
4660 2006-07-25  Bruno Haible  <bruno@clisp.org>
4661
4662         * modules/version-etc (Depends-on): Add stdarg.
4663
4664 2006-07-25  Bruno Haible  <bruno@clisp.org>
4665
4666         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
4667         complex commands.
4668
4669 2006-07-25  Bruno Haible  <bruno@clisp.org>
4670
4671         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
4672         defined in <stdarg.h> or config.h.
4673
4674 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
4675
4676         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
4677         (gl_STDIO_SAFER): Remove.
4678
4679 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
4680
4681         * MODULES.html.sh (File stream based Input/Output):
4682         Add fopen-safer, tmpfile-safer; remove stdio-safer.
4683         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
4684         * modules/fopen-safer, modules/tmpfile-safer: New files.
4685         * modules/stdio-safer: Remove.
4686
4687 2006-07-24  Bruno Haible  <bruno@clisp.org>
4688
4689         * modules/tmpdir: New file.
4690         * MODULES.html.sh (File system functions): Add it.
4691
4692 2006-07-24  Bruno Haible  <bruno@clisp.org>
4693
4694         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
4695         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
4696
4697 2006-07-24  Bruno Haible  <bruno@clisp.org>
4698
4699         * modules/clean-temp: New file.
4700
4701 2006-07-24  Bruno Haible  <bruno@clisp.org>
4702
4703         * m4/tmpdir.m4: New file, from GNU gettext.
4704
4705 2006-07-24  Bruno Haible  <bruno@clisp.org>
4706
4707         * lib/tmpdir.h: New file, from GNU gettext.
4708         * lib/tmpdir.c: New file, from GNU gettext.
4709
4710 2006-07-24  Bruno Haible  <bruno@clisp.org>
4711
4712         * lib/clean-temp.h: New file, from GNU gettext.
4713         * lib/clean-temp.c: New file, from GNU gettext.
4714
4715 2006-07-23  Eric Blake  <ebb9@byu.net>
4716
4717         * modules/stdio-safer (Files): Add tmpfile-safer.c.
4718         (Depends-on): Add binary-io.
4719
4720 2006-07-23  Eric Blake  <ebb9@byu.net>
4721
4722         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
4723
4724 2006-07-23  Eric Blake  <ebb9@byu.net>
4725
4726         * lib/tmpfile-safer.c: New file.
4727         * lib/stdio-safer.h (fopen_safer): Add prototype.
4728         * lib/stdio--.h (tmpfile): Make safer.
4729
4730 2006-07-23  Bruno Haible  <bruno@clisp.org>
4731
4732         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
4733         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
4734         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
4735         gl_linked_remove_at): Use it.
4736
4737 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4738         and Simon Josefsson <jas@extundo.com>
4739
4740         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
4741
4742         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
4743
4744 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4745
4746         * modules/close-stream: New file.
4747         * modules/closeout (Description): Make it clear that it exits
4748         with a diagnostic on error.
4749         (Depends-on): Add close-stream.  Remove fpending, stdbool.
4750         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
4751
4752 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4753
4754         * m4/close-stream.m4: New file.
4755
4756 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4757
4758         * lib/close-stream.c, lib/close-stream.h: New files.
4759
4760 2006-07-22  Bruno Haible  <bruno@clisp.org>
4761
4762         Merge from GNU gettext 0.15.
4763
4764         2006-05-01  Bruno Haible  <bruno@clisp.org>
4765
4766                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
4767
4768         2006-07-22  Bruno Haible  <bruno@clisp.org>
4769
4770                 * modules/javaversion: New file.
4771                 * MODULES.html.sh (Java): Add javaversion.
4772
4773         2006-03-12  Bruno Haible  <bruno@clisp.org>
4774
4775                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
4776
4777         2005-12-04  Bruno Haible  <bruno@clisp.org>
4778
4779                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
4780                 (untested).
4781
4782         2006-06-21  Bruno Haible  <bruno@clisp.org>
4783
4784                 Avoid warnings from recent versions of mcs.
4785                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
4786                 -o, -L, -r any more. Use options documented since mcs-1.0
4787                 instead. Similarly for -g.
4788
4789         2005-12-04  Bruno Haible  <bruno@clisp.org>
4790
4791                 * build-aux/csharpcomp.sh.in: Suffix for resources is
4792                 .resources, not .resource.
4793
4794         2005-07-09  Bruno Haible  <bruno@clisp.org>
4795
4796                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
4797                 add a .dll suffix.
4798                 Reported by Mark Junker <mjscod@gmx.de>.
4799
4800         2006-07-22  Bruno Haible  <bruno@clisp.org>
4801
4802                 * modules/gettext: Upgrade to gettext-0.15.
4803                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
4804                 m4/visibility.m4.
4805                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
4806
4807 2006-07-22  Bruno Haible  <bruno@clisp.org>
4808
4809         Merge from GNU gettext 0.15.
4810
4811         2006-03-25  Bruno Haible  <bruno@clisp.org>
4812
4813                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
4814
4815         2006-07-21  Bruno Haible  <bruno@clisp.org>
4816
4817                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
4818                 "1.1".
4819
4820         2006-05-09  Bruno Haible  <bruno@clisp.org>
4821
4822                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
4823                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
4824                 for the conftestver execution.
4825
4826         2006-05-01  Bruno Haible  <bruno@clisp.org>
4827
4828                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
4829                 optional target-version argument. Verify that the compiler
4830                 groks source of the specified source-version, or add -source
4831                 option as necessary. Verify that the compiler produces
4832                 bytecode in the specified target-version, or add -target and
4833                 -source options as necessary. Make the result of the test
4834                 available as variable CONF_JAVAC. Also log error output in
4835                 config.log.
4836
4837         2006-03-11  Bruno Haible  <bruno@clisp.org>
4838
4839                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
4840
4841         2006-05-09  Bruno Haible  <bruno@clisp.org>
4842
4843                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
4844                 CLASSPATH_SEPARATOR to a semicolon.
4845
4846         2006-03-12  Bruno Haible  <bruno@clisp.org>
4847
4848                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
4849                 available as variable CONF_JAVA, for subsequent autoconf
4850                 tests. Also log error output in config.log.
4851
4852         2006-07-19  Bruno Haible  <bruno@clisp.org>
4853
4854                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
4855                 that getline works on glibc2 systems. Needed to avoid trouble
4856                 in relocatable.c.
4857                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
4858
4859         2005-12-04  Bruno Haible  <bruno@clisp.org>
4860
4861                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
4862                 launcher (untested).
4863
4864         2005-12-04  Bruno Haible  <bruno@clisp.org>
4865
4866                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
4867
4868         2006-07-22  Bruno Haible  <bruno@clisp.org>
4869
4870                 * gettext.m4: Update from GNU gettext-0.15.
4871                 * nls.m4: Likewise.
4872                 * po.m4: Likewise.
4873                 * inttypes-pri.m4: Likewise.
4874                 * inttypes-h.m4: Renamed from inttypes.m4.
4875                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
4876
4877 2006-07-22  Bruno Haible  <bruno@clisp.org>
4878
4879         Merge from GNU gettext 0.15.
4880
4881         2005-07-05  Bruno Haible  <bruno@clisp.org>
4882
4883                 * printf-args.c (printf_fetchargs): Work around broken
4884                 definition of wint_t on mingw.
4885
4886         2005-02-12  Bruno Haible  <bruno@clisp.org>
4887
4888                 * xallocsa.h: Add extern "C" for C++.
4889
4890         2006-05-17  Bruno Haible  <bruno@clisp.org>
4891
4892                 Cygwin portability.
4893                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
4894
4895         2006-04-30  Bruno Haible  <bruno@clisp.org>
4896
4897                 * progreloc.c: Include <mach-o/dyld.h> if available.
4898                 (find_executable): Use _NSGetExecutablePath when possible.
4899
4900         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4901
4902                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
4903                 function.
4904
4905         2005-12-29  Bruno Haible  <bruno@clisp.org>
4906
4907                 * progreloc.c (set_program_name_and_installdir): Fix
4908                 compilation error.
4909
4910         2005-12-04  Bruno Haible  <bruno@clisp.org>
4911
4912                 Cygwin portability.
4913                 * progreloc.c: Include <windows.h> also on Cygwin.
4914                 (find_executable): Add support for Cygwin.
4915                 (set_program_name_and_installdir): Handle also platforms with
4916                 nonempty EXEEXT.
4917
4918         2006-07-11  Bruno Haible  <bruno@clisp.org>
4919
4920                 * javacomp.c: Fix a comment.
4921                 Reported by Jim Meyering.
4922
4923         2006-04-30  Bruno Haible  <bruno@clisp.org>
4924
4925                 * javacomp.h (compile_java_class): Add source_version,
4926                 target_version arguments.
4927                 * javacomp.c: Rewritten to choose only a compiler that
4928                 respects the specified source_version and target_version.
4929
4930         2006-06-27  Bruno Haible  <bruno@clisp.org>
4931
4932                 Assume correct S_ISDIR macro.
4933                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
4934
4935         2006-07-22  Bruno Haible  <bruno@clisp.org>
4936
4937                 * javaversion.h: New file, from GNU gettext.
4938                 * javaversion.c: New file, from GNU gettext.
4939                 * javaversion.java: New file, from GNU gettext.
4940                 * javaversion.class: New file, from GNU gettext.
4941
4942         2006-05-17  Bruno Haible  <bruno@clisp.org>
4943
4944                 Cygwin portability.
4945                 * javaexec.c (execute_java_class): Test for jview program
4946                 also on Cygwin.
4947
4948         2006-04-09  Bruno Haible  <bruno@clisp.org>
4949
4950                 * fatal-signal.c: Don't include string.h.
4951                 (at_fatal_signal): Use a copying loop instead of memcpy.
4952
4953         2005-12-04  Bruno Haible  <bruno@clisp.org>
4954
4955                 * csharpexec.c: Add support for 'clix' launcher (untested).
4956                 (execute_csharp_using_sscli): New function.
4957                 (execute_csharp_program): Call it.
4958
4959         2006-06-21  Bruno Haible  <bruno@clisp.org>
4960
4961                 Avoid warnings from recent versions of mcs.
4962                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
4963                 -o, -L, -r any more. Use options documented since mcs-1.0
4964                 instead. Similarly for -g.
4965
4966         2005-07-09  Bruno Haible  <bruno@clisp.org>
4967
4968                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
4969                 add a .dll suffix.
4970                 Reported by Mark Junker <mjscod@gmx.de>.
4971
4972         2006-06-17  Bruno Haible  <bruno@clisp.org>
4973
4974                 * config.charset: Update for NetBSD 3.0.
4975
4976         2006-05-17  Bruno Haible  <bruno@clisp.org>
4977
4978                 Cygwin portability.
4979                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
4980
4981         2006-05-16  Bruno Haible  <bruno@clisp.org>
4982
4983                 * localcharset.c [CYGWIN]: Include <windows.h>.
4984                 (get_charset_aliases): For Cygwin, return the same CPxxx
4985                 aliases list as under WIN32.
4986                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
4987                 the environment variables. Fall back to GetACP().
4988
4989         2006-04-05  Bruno Haible  <bruno@clisp.org>
4990
4991                 * config.charset: Update Juan Manuel Guerrero's address.
4992
4993         2005-02-12  Bruno Haible  <bruno@clisp.org>
4994
4995                 * allocsa.h: Add extern "C" for C++.
4996
4997         2005-02-10  Bruno Haible  <bruno@clisp.org>
4998
4999                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
5000                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
5001
5002         2006-07-22  Bruno Haible  <bruno@clisp.org>
5003
5004                 * gettext.h: Update to GNU gettext-0.15.
5005
5006 2006-07-22  Bruno Haible  <bruno@clisp.org>
5007
5008         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
5009         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
5010         lib-prefix.m4, longdouble.m4, ssize_t.m4.
5011
5012 2006-07-21  Eric Blake  <ebb9@byu.net>
5013
5014         * modules/stdlib-safer: New file.
5015         * MODULES.html.sh (File stream based Input/Output): Add
5016         stdlib-safer.
5017
5018 2006-07-21  Eric Blake  <ebb9@byu.net>
5019
5020         * lib/stdlib-safer.h: New file from coreutils, required by
5021         stdlib--.h.
5022
5023 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
5024
5025         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
5026
5027 2006-07-20  Bruno Haible  <bruno@clisp.org>
5028
5029         * gnulib-tool: Recognize new option --assume-autoconf.
5030         (autoconf_minversion): New variable.
5031         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
5032
5033 2006-07-20  Bruno Haible  <bruno@clisp.org>
5034
5035         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
5036
5037 2006-07-19  Derek R. Price  <derek@ximbiot.com>
5038
5039         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
5040         Reindent and repaginate.
5041
5042 2006-07-19  Derek Price  <derek@ximbiot.com>
5043
5044         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
5045         Correct grammar.
5046
5047 2006-07-17  Bruno Haible  <bruno@clisp.org>
5048
5049         * modules/list: New file.
5050         * modules/array-list: New file.
5051         * modules/carray-list, modules/carray-list-tests: New files.
5052         * modules/linked-list, modules/linked-list-tests: New files.
5053         * modules/avltree-list, modules/avltree-list-tests: New files.
5054         * modules/rbtree-list, modules/rbtree-list-tests: New files.
5055         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
5056         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
5057         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
5058         * modules/oset: New file.
5059         * modules/array-oset: New file.
5060         * modules/avltree-oset, modules/avltree-oset-tests: New files.
5061         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
5062         * tests/test-carray_list.c: New file.
5063         * tests/test-linked_list.c: New file.
5064         * tests/test-avltree_list.c: New file.
5065         * tests/test-rbtree_list.c: New file.
5066         * tests/test-linkedhash_list.c: New file.
5067         * tests/test-avltreehash_list.c: New file.
5068         * tests/test-rbtreehash_list.c: New file.
5069         * tests/test-avltree_oset.c: New file.
5070         * tests/test-rbtree_oset.c: New file.
5071         * MODULES.html.sh (Container data structures): New section.
5072
5073 2006-07-17  Bruno Haible  <bruno@clisp.org>
5074
5075         * m4/gl_list.m4: New file.
5076
5077 2006-07-17  Bruno Haible  <bruno@clisp.org>
5078
5079         * lib/gl_list.h: New file.
5080         * lib/gl_list.c: New file.
5081         * lib/gl_array_list.h: New file.
5082         * lib/gl_array_list.c: New file.
5083         * lib/gl_carray_list.h: New file.
5084         * lib/gl_carray_list.c: New file.
5085         * lib/gl_linked_list.h: New file.
5086         * lib/gl_linked_list.c: New file.
5087         * lib/gl_anylinked_list1.h: New file.
5088         * lib/gl_anylinked_list2.h: New file.
5089         * lib/gl_avltree_list.h: New file.
5090         * lib/gl_avltree_list.c: New file.
5091         * lib/gl_anyavltree_list1.h: New file.
5092         * lib/gl_anyavltree_list2.h: New file.
5093         * lib/gl_rbtree_list.h: New file.
5094         * lib/gl_rbtree_list.c: New file.
5095         * lib/gl_anyrbtree_list1.h: New file.
5096         * lib/gl_anyrbtree_list2.h: New file.
5097         * lib/gl_anytree_list1.h: New file.
5098         * lib/gl_anytree_list2.h: New file.
5099         * lib/gl_linkedhash_list.h: New file.
5100         * lib/gl_linkedhash_list.c: New file.
5101         * lib/gl_anyhash_list1.h: New file.
5102         * lib/gl_anyhash_list2.h: New file.
5103         * lib/gl_avltreehash_list.h: New file.
5104         * lib/gl_avltreehash_list.c: New file.
5105         * lib/gl_rbtreehash_list.h: New file.
5106         * lib/gl_rbtreehash_list.c: New file.
5107         * lib/gl_anytreehash_list1.h: New file.
5108         * lib/gl_anytreehash_list2.h: New file.
5109
5110         * lib/gl_oset.h: New file.
5111         * lib/gl_oset.c: New file.
5112         * lib/gl_array_oset.h: New file.
5113         * lib/gl_array_oset.c: New file.
5114         * lib/gl_avltree_oset.h: New file.
5115         * lib/gl_avltree_oset.c: New file.
5116         * lib/gl_rbtree_oset.h: New file.
5117         * lib/gl_rbtree_oset.c: New file.
5118         * lib/gl_anytree_oset.h: New file.
5119
5120 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5121
5122         * m4/mkancesdirs.m4: New file.
5123         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
5124         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
5125         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
5126         it.
5127
5128 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5129
5130         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
5131         * lib/mkancesdirs.h: New files.
5132         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
5133         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
5134         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
5135         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
5136         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
5137         callers changed.  Revamp internals significantly, by not
5138         attempting to create directories that are temporarily more
5139         permissive than the final results.  Do not attempt to use
5140         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
5141         This removes some race conditions, fixes some bugs, and simplifies
5142         things.  Use new dirchownmod function to do owner and mode changes.
5143         * lib/mkdir-p.h: Likewise.
5144         * lib/modechange.c (octal_to_mode): New function.
5145         (struct mode_change): New member mentioned.
5146         (make_node_op_equals): New arg mentioned.  All callers changed.
5147         (mode_compile): Keep track of which mode bits the user has explicitly
5148         mentioned.
5149         (mode_adjust): New arg DIR, so that we implement the X op correctly.
5150         New arg PMODE_BITS, to keep track of which mode bits the user
5151         mentioned; it treats S_ISUID and S_ISGID speciall.
5152         All callers changed.
5153         * lib/modechange.h: Likewise.
5154
5155 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5156
5157         * MODULES.html.sh: Add mkancestors.
5158         * modules/mkancesdirs: New module.
5159         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
5160         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
5161         The chdir-safer and afs files are now orphans; I'll remove them
5162         unless someone speaks up.
5163         Add lib/dirchownmod.c, lib/dirchownmod.h.
5164         (Depends-on): Remove alloca, chown, save-cwd, dirname.
5165         Add lchown, mkancesdirs.
5166         (Maintainer): Add self.
5167
5168 2006-07-15  Karl Berry  <karl@gnu.org>
5169
5170         * gnulib-tool: help message wording/arrangement.
5171
5172 2006-07-14  Simon Josefsson  <jas@extundo.com>
5173
5174         * doc/gnulib.texi (Libtool and Windows): New section.
5175
5176 2006-07-12  Simon Josefsson  <jas@extundo.com>
5177
5178         * modules/gendocs (License): Fix license, approved by Karl.
5179
5180 2006-07-12  Eric Blake  <ebb9@byu.net>
5181
5182         * MODULES.html.sh: Add gendocs.
5183
5184 2006-07-11  Eric Blake  <ebb9@byu.net>
5185
5186         * modules/fdl: New module, to install doc/fdl.texi.
5187         * MODULES.html.sh: Add new section for documentation modules.
5188         * gnulib-tool: Avoid space-tab.
5189         (--doc-base): New option, to manage files from doc.
5190
5191 2006-07-11  Eric Blake  <ebb9@byu.net>
5192
5193         * m4/absolute-header.m4: Fix comments to match recent change.
5194
5195 2006-07-11  Eric Blake  <ebb9@byu.net>
5196
5197         * gnulib-tool: List --doc-base before --tests-base.
5198
5199 2006-07-11  Derek R. Price  <derek@ximbiot.com>
5200
5201         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
5202
5203 2006-07-11  Bruno Haible  <bruno@clisp.org>
5204
5205         * README: Mention where to put documentation.
5206
5207 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5208
5209         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
5210
5211 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
5212
5213         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
5214         to stdint.m4.
5215
5216 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
5217
5218         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
5219         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
5220         "no/such/file/stdint.h" when there is no such file, so that
5221         the resulting C code can be parsed by dodgy compilers.
5222         Problems reported by Bob Proulx.
5223
5224 2006-07-10  Derek R. Price  <derek@ximbiot.com>
5225
5226         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
5227         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
5228         macros into the GNU _D_EXACT_NAMLEN.
5229         * lib/savedir.c:  Likewise.
5230         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
5231
5232 2006-07-10  Derek R. Price  <derek@ximbiot.com>
5233         and Paul Eggert  <eggert@cs.ucla.edu>
5234
5235         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
5236         * m4/savedir.m4:
5237         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
5238         macros into the GNU _D_EXACT_NAMLEN.
5239
5240 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5241
5242         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
5243         around the absolute name, to work around a problem with the HP-UX
5244         11.23 native C compiler, reported by Bob Proulx.
5245
5246 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5247
5248         * doc/maintain.texi, make-stds.texi: Sync from
5249         <http://savannah.gnu.org/projects/gnustandards>.
5250
5251 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5252
5253         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
5254
5255 2006-07-09  Jim Meyering  <jim@meyering.net>
5256
5257         * m4/glob.m4: Remove a doubled word in a comment.
5258
5259 2006-07-09  Jim Meyering  <jim@meyering.net>
5260
5261         * lib/argp-pv.c: Remove a doubled word in a comment.
5262         * lib/check-version.c (check_version): Likewise.
5263         * lib/javacomp.c (compile_java_class): Likewise.
5264
5265 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
5266
5267         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
5268         for the benefit of people using Autoconf 2.60.  If you want to
5269         support older Autoconf versions you can copy m4/onceonly_2_57.m4
5270         (or m4/onceonly.m4, if pre-2.57) manually.
5271
5272 2006-07-08  Jim Meyering  <jim@meyering.net>
5273
5274         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
5275         comment.
5276         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
5277         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
5278         comment.
5279
5280 2006-07-08  Jim Meyering  <jim@meyering.net>
5281
5282         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
5283
5284 2006-07-07  Simon Josefsson  <jas@extundo.com>
5285
5286         * tests/test-crc.c: Change expected crc value, the test vector
5287         were probably computed using the old broken crc.c?
5288
5289 2006-07-06  Simon Josefsson  <jas@extundo.com>
5290
5291         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
5292         now the canonical place for the M4 file).
5293
5294         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
5295         from the sys_socket dependency now.
5296
5297         * modules/inet_pton (Files): Ditto.
5298
5299         * modules/inet_ntop (Files): Ditto.
5300
5301 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
5302
5303         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
5304         not gl_PREREQ_GETUSERSHELL.
5305
5306 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5307
5308         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
5309         with only one argument, for Autoconf 2.60.
5310         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
5311         expand to nothing, so add a shell command to avoid syntax error.
5312         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
5313
5314 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5315
5316         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
5317
5318 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5319
5320         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
5321         no longer needed.  Check for isblank decl.
5322         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
5323         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
5324         of existence.
5325
5326 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5327
5328         * lib/getloadavg.c: Use __VMS, not VMS.
5329         * lib/getopt.c: Likewise.
5330         * lib/getpagesize.h: Likewise.
5331         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
5332         and probably does not work.
5333
5334 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5335
5336         * lib/.cppi-disable: Add wcwidth.
5337         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
5338         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
5339         (ISGRAPH): Remove.  All uses changed to isgraph.
5340         (FOLD) [!defined _LIBC]: Remove special case.
5341         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
5342         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
5343         HAVE_ISBLANK.
5344         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
5345         case.
5346
5347 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
5348
5349         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
5350         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
5351         brackets.  Other minor changes to suppress some compiler
5352         warnings.
5353
5354 2006-07-06  Derek R. Price  <derek@ximbiot.com>
5355         and Paul Eggert  <eggert@cs.ucla.edu>
5356
5357         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
5358         of invoking obsolescent AC_HEADER_DIRENT macro.
5359         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
5360         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
5361         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
5362         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
5363         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
5364         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5365         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
5366         * m4/readdir.m4: Remove; no longer needed.
5367
5368 2006-07-06  Derek R. Price  <derek@ximbiot.com>
5369         and Paul Eggert  <eggert@cs.ucla.edu>
5370
5371         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
5372         Don't worry about this obsolete case any more.
5373         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
5374         directories.
5375         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
5376         worry about this obsolete case any more.
5377         * lib/fts.c: Likewise.
5378         * lib/getcwd.c: Likewise.
5379         * lib/glob.h: Likewise.
5380         * lib/savedir.c: Likewise.
5381
5382 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
5383
5384         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
5385         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
5386         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
5387         needed.
5388         All uses removed.
5389         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5390         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
5391         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
5392         needed.
5393         * m4/getdate.m4 (gl_GETDATE): Likewise.
5394         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
5395         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
5396         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
5397         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5398         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
5399         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
5400         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
5401         needed.
5402
5403 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
5404
5405         * lib/memcasecmp.c: Include <limits.h>.
5406         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
5407         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
5408         Don't assume isdigit succeeds only on '0' through '9'.
5409
5410 2006-07-05  Eric Blake  <ebb9@byu.net>
5411
5412         * modules/getaddrinfo (Depends-on): Add snprintf.
5413
5414 2006-07-05  Eric Blake  <ebb9@byu.net>
5415
5416         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
5417         to avoid 'header present but could not be compiled' on cygwin.
5418
5419 2006-07-05  Eric Blake  <ebb9@byu.net>
5420
5421         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
5422         missing from netdb.h.
5423         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
5424
5425 2006-07-05  Derek R. Price  <derek@ximbiot.com>
5426
5427         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
5428         no longer needed.
5429         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
5430         * m4/getdate.m4 (gl_GETDATE): Likewise.
5431         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
5432         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
5433         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
5434         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5435         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
5436
5437 2006-07-05  Derek R. Price  <derek@ximbiot.com>
5438
5439         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
5440         All uses of is_space replaced by isspace.
5441         * lib/exit.h: Don't talk about STDC_HEADERS.
5442         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
5443         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
5444         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
5445         replaced by isprint etc.
5446         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
5447         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
5448         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
5449         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
5450         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
5451         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
5452
5453 2006-07-05  Bruno Haible  <bruno@clisp.org>
5454
5455         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
5456         the function exists, before testing against AIX.
5457         Reported by Martin Lambers <marlam@marlam.de>.
5458
5459 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
5460
5461         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
5462         From Mark D. Baushke.
5463
5464 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
5465
5466         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
5467         to the absolute name, not just one, to bypass Sun C 5.8's
5468         "warning: #include of /usr/include/... may be non-portable".
5469
5470 2006-07-04  Eric Blake  <ebb9@byu.net>
5471
5472         * modules/dirname-tests: New test module.
5473         * tests/test-dirname.c: New file, replacing dirname.c
5474         TEST_DIRNAME section that was recently deleted.
5475
5476 2006-07-04  Bruno Haible  <bruno@clisp.org>
5477
5478         Assume ANSI C header files and <ctype.h> functions.
5479         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
5480         (mbsnwidth): Use isprint, iscntrl instead.
5481
5482 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5483
5484         Merge from coreutils.
5485         * MODULES.html.sh: Add xstrtold.
5486         * modules/xstrtold: New file.
5487         * modules/cycle-check (Files): Add lib/same-inode.h.
5488         * modules/dirname (Files): Add m4/double-slash-root.m4.
5489         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
5490         * modules/mkdir-p (Files): Add lib/same-inode.h.
5491         * modules/same (Files): Add lib/same-inode.h.
5492
5493 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5494
5495         * m4/absolute-header.m4: Renamed from full-header-path.m4.
5496         This is to keep the terminology clean; POSIX talks about
5497         "absolute pathnames", not "full pathnames", but the GNU
5498         Coding Standards say to use "path" for something else;
5499         so use "absolute" to keep both sides happy.
5500         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
5501         Set gl_absolute_header, not gl_full_header_path.
5502         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
5503         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
5504         All uses changed.
5505
5506         Merge from coreutils.
5507
5508         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
5509
5510         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
5511         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
5512         want to require the building of c-strtod.o.
5513         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
5514         needs -lm directly.
5515         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
5516
5517         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
5518
5519         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
5520         --as-needed option if available.  Problem reported by Albert Chin in
5521         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
5522         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
5523         cc merely issues a bunch of annoying warnings for --as-needed
5524         (this problem was reported by Bob Proulx).  Also, try linking with
5525         -lm to detect a bug in binutils 2.16 (this problem was reported
5526         by Ralf Wildenhues).
5527
5528         2006-06-18  Jim Meyering  <jim@meyering.net>
5529
5530         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
5531         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
5532         macro.
5533         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
5534         also check for glibc-2.4's abort-inducing bug.
5535
5536         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
5537         Low-probability clean-up should be to use rmdir to get rid of
5538         the just-created directory, not unlink.
5539
5540         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
5541         configure fail, and request a bug report to inform us about it.
5542         Add a comment that, barring reports to the contrary, in 2007 we'll
5543         assume ftruncate is universally available.
5544
5545         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
5546
5547         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
5548
5549         2006-03-12  Jim Meyering  <jim@meyering.net>
5550
5551         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
5552         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
5553         * m4/same.m4 (gl_SAME): Likewise.
5554         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
5555
5556         2006-03-11  Eric Blake  <ebb9@byu.net>
5557
5558         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
5559         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
5560         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
5561         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
5562
5563 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5564
5565         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
5566         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
5567         reported by Mark D. Baushke, one in
5568         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
5569
5570         Merge from coreutils.
5571
5572         * lib/.cppi-disable: Add stdint_.h.
5573         * lib/.cvsignore: Add stdint.h.
5574
5575         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
5576
5577         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
5578         both double and long double versions.
5579         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
5580         * lib/xstrtold.c: New file.
5581         * lib/xstrtod.h (xstrtold): New decl.
5582
5583         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
5584
5585         * lib/filemode.c (setst): Remove.
5586         (strmode): Rewrite to avoid setst.  This makes the code shorter,
5587         (arguably) clearer, and the generated code is a bit smaller on my
5588         Debian GNU/Linux stable x86 host.
5589
5590         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
5591
5592         * lib/filemode.c: Include "filemode.h" first, to test the interface.
5593         Assume that filemode.h includes sys/types.h and sys/stat.h.
5594         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
5595         (ftypelet): Reorder to put common cases first, for efficiency.
5596         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
5597         to do 'M'.
5598         (strmode): Renamed from mode_string, and now stores 12 bytes instead
5599         of 10, for compatibility with FreeBSD.  All callers changed.
5600         (filemodestring): Now stores 12 bytes instead of 10, and sets file
5601         types that can't be deduced solely from st_mode.  First arg is now a
5602         const pointer.
5603         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
5604         (strmode): Renamed from mode_string.
5605         (filemodestring): New decl.
5606         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
5607         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
5608         needed.
5609         (S_ISPORT, S_ISWHT): New macros, if not already defined.
5610
5611         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
5612
5613         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
5614         fsusage.h now does that.  Include fsusage.h first, to test interface.
5615         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
5616         at most one method (the old code could have generated decls that
5617         didn't conform to C89, not that this was ever exercised).
5618         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
5619
5620         2006-03-19  Jim Meyering  <jim@meyering.net>
5621
5622         Work even in a chroot where d_ino values for entries in "/"
5623         don't match the stat.st_ino values for the same names.
5624         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
5625         number, iterate through all entries again, using lstat instead.
5626         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
5627         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
5628
5629         * lib/getcwd.c (__getcwd): Clarify a comment.
5630         Use memcpy in place of a call to strcpy.
5631
5632         2006-03-12  Jim Meyering  <jim@meyering.net>
5633
5634         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
5635         matches that of the current directory (which we're about to chdir ".."
5636         out of), then save the dev-ino of the parent, instead.
5637
5638         * lib/same-inode.h (SAME_INODE): New file/macro.
5639         * lib/chdir-safer.c (SAME_INODE): Remove definition.
5640         Include "same-inode.h", instead.
5641         * lib/same.c: Likewise.
5642         * lib/cycle-check.h: Include "same-inode.h".
5643         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
5644         * lib/cycle-check.c (SAME_INODE): Remove definition.
5645         * lib/root-dev-ino.h: Include "same-inode.h".
5646
5647         2006-03-11  Eric Blake  <ebb9@byu.net>
5648
5649         * lib/same.c (same_name): s/base_name/last_component/
5650         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
5651         * lib/filenamecat.c (file_name_concat): Likewise.
5652
5653         2006-03-11  Eric Blake  <ebb9@byu.net>,
5654                     Paul Eggert  <eggert@cs.ucla.edu>
5655
5656         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
5657         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
5658         drive prefix.
5659         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
5660         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
5661         (last_component): New method.
5662         * lib/dirname.c (dir_len): Determine when drive letters need a
5663         subsequent slash.  Preserve // when it is special.
5664         (dir_name): Don't append dot when drive letter is absolute.
5665         [TEST_DIRNAME]: Move into a full-blown gnulib test.
5666         * lib/basename.c (base_name): New semantics - malloc the result.
5667         Preserve // when it is special.  Preserve relative files that look
5668         like drive letters.
5669         (base_len): Preserve // when it is special.
5670         (last_component): New method, similar to old base_name semantics.
5671         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
5672         base_name.  Strip redundant slashes from ///.
5673
5674 2006-07-03  Jim Meyering  <jim@meyering.net>
5675
5676         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
5677         macro is used before the first cycle_check call.
5678
5679 2006-07-03  Eric Blake  <ebb9@byu.net>
5680
5681         * modules/dirname (Depends-on): Add xstrndup.
5682
5683 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
5684
5685         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
5686         test cases, so that config.log is a bit easier to follow.
5687
5688 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
5689
5690         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
5691         both are 64 bits, since this seems to be the tradition, and this
5692         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
5693         we ever run into a host that prefers long long to long in this
5694         case, we'll need another configure-time test.  Problem reported by
5695         Jim Meyering.
5696
5697 2006-07-02  Eric Blake  <ebb9@byu.net>
5698
5699         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
5700
5701 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5702
5703         * modules/inttypes (Depends-on): No longer depends on stdint.
5704         * modules/stdint (Description): Say more about assumptions.
5705         Say that the fast types might differ.  Say macros are used.
5706         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
5707         (Makefile.am): Revise list of substituted symbols to match
5708         new stdint.m4.
5709         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
5710         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
5711         * tests/test-stdint.c (verify_same_types)
5712         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
5713         the code conforms to C99/C89.
5714         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
5715         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
5716
5717 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5718
5719         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
5720         but fix a bug, by requiring at least 64 bits.
5721         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
5722         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
5723         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
5724         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
5725
5726         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
5727         changes.  Make 2.59 a prerequisite.  Check and substitute for
5728         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
5729         inttypes.h.  Do not use special include files; just use the
5730         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
5731         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
5732         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
5733         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
5734         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
5735         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
5736         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
5737         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
5738         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
5739         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
5740         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
5741         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
5742         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
5743         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
5744         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
5745         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
5746         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
5747         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
5748         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
5749         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
5750         WINT_MAX.  Check for C99 conformance more strictly, by detecting
5751         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
5752         not check for things that C99 does not require, e.g., int8_t.  If
5753         a test isn't needed unless <stdint.h> isn't working, and is
5754         unlikely to be needed for any other reason, then don't do it
5755         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
5756         size_t, since we assume C89 freestanding at least.  Do not check
5757         for sig_atomic_t, wchar_t, or wint_t, since the code now does
5758         the right thing even if the types are not defined.  Instead use:
5759         (gl_STDINT_TYPE_PROPERTIES): New macro.
5760         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
5761         testing whether <sys/types.h> clashes, as Autoconf does this for
5762         us now.  All uses removed.
5763         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
5764         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
5765         (gl_CHECK_TYPE_SAME):
5766         Remove; no longer needed.
5767         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
5768         exists, since we'll return 0 anyway in that case.
5769         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
5770
5771 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5772
5773         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
5774         possible collision with system files.
5775         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
5776         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
5777         WCHAR_MIN and WCHAR_MAX in this case.
5778         (<stddef.h>): Do not include; no longer needed.
5779         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
5780         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
5781         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
5782         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
5783         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
5784         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
5785         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
5786         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
5787         !defined(__c99))]: Include in this case too, since it's harmless
5788         now.
5789         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
5790         dangerous to do so.
5791         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
5792         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
5793         (_STDINT_MIN, _STDINT_MAX): New macros.
5794         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
5795         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
5796         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
5797         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
5798         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
5799         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
5800         macros, not typedefs; this simplifies things quite a bit.
5801         Use long int for all types narrower than int64_t.
5802         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
5803         Define in terms of long long int or int64_t or long int,
5804         not int64_t or int32_t.  This saves some compile-time testing.
5805         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
5806         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
5807         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
5808         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
5809         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
5810         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
5811         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
5812         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
5813         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
5814         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
5815         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
5816         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
5817         undef any previous version and define our own version, for
5818         simplicity and consistency with the new macros for types.
5819         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
5820         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
5821         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
5822         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
5823         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
5824         @WINT_T_SUFFIX@ to keep things simple here.
5825         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
5826         Simplify by assuming typical 8/16/32/64 host, since we're
5827         already doing that elsewhere anyway.
5828         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
5829         and assume long long int is 64 bits if available.  This
5830         speeds up 'configure'.
5831
5832 2006-07-01  Eric Blake  <ebb9@byu.net>
5833
5834         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
5835         Reported by Andreas Buening.
5836
5837 2006-07-01  Eric Blake  <ebb9@byu.net>
5838
5839         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
5840
5841 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
5842
5843         * lib/getaddrinfo.c: fixed typo
5844
5845 2006-06-29  Jim Meyering  <jim@meyering.net>
5846
5847         * modules/strftime (Maintainer): Add my name, since with the
5848         FPRINTFTIME changes strftime.c has forked from glibc.
5849
5850 2006-06-29  Eric Blake  <ebb9@byu.net>
5851
5852         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
5853
5854 2006-06-29  Eric Blake  <ebb9@byu.net>
5855
5856         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
5857
5858 2006-06-29  Eric Blake  <ebb9@byu.net>
5859
5860         * lib/stat_.h: New file.
5861
5862 2006-06-29  Eric Blake  <ebb9@byu.net>
5863
5864         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
5865         unused static function.
5866
5867 2006-06-29  Eric Blake  <ebb9@byu.net>
5868
5869         * doc/functions.texi (Function Portability): Document missing lstat
5870         on mingw.
5871
5872 2006-06-29  Eric Blake  <ebb9@byu.net>
5873
5874         * MODULES.html.sh: Add sys_stat.
5875         * modules/sys_stat: New module.
5876         * modules/mkstemp (Depends-on): Add sys_stat.
5877
5878 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5879
5880         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
5881
5882 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5883
5884         * m4/c-bs-a.m4: Removed.
5885
5886 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5887
5888         * lib/strftime.c: Assume strftime() exists.
5889
5890 2006-06-29  Derek Price  <derek@ximbiot.com>
5891
5892         * modules/c-bs-a: Removed - \a is C89.
5893         * MODULES.html.sh: Remove c-bs-a.
5894
5895 2006-06-29  Bruno Haible  <bruno@clisp.org>
5896
5897         * modules/wcwidth (License): Change to LGPL.
5898
5899 2006-06-28  Simon Josefsson  <jas@extundo.com>
5900
5901         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
5902         on _WIN32.
5903
5904         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
5905         getnameinfo.
5906
5907 2006-06-28  Simon Josefsson  <jas@extundo.com>
5908
5909         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
5910
5911 2006-06-28  Simon Josefsson  <jas@extundo.com>
5912
5913         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
5914         functions there.  It will succeed on Windows XP, but on Windows
5915         2000 and (presumably) earlier, it will fail, and use the internal
5916         re-implementation.
5917         (use_win32_p): New function.
5918         (getaddrinfo): Use strtoul on servname, to support numeric ports.
5919         Support AI_NUMERICSERV to disable getservbyname.
5920         (getnameinfo): New function, only supports
5921         NI_NUMERICHOST|NI_NUMERICSERV for now.
5922
5923         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
5924         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
5925         getnameinfo.
5926
5927 2006-06-28  Eric Blake  <ebb9@byu.net>
5928
5929         * modules/wcwidth: New file.
5930         * modules/mbchar (Depends-on): Add wcwidth.
5931         * modules/mbswidth (Depends-on): Add wcwidth.
5932         * MODULES.html.sh: Add wcwidth.
5933
5934 2006-06-28  Eric Blake  <ebb9@byu.net>
5935
5936         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
5937         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
5938
5939 2006-06-28  Eric Blake  <ebb9@byu.net>
5940
5941         * lib/xvasprintf.h: Fix comments.
5942
5943 2006-06-28  Eric Blake  <ebb9@byu.net>
5944
5945         * lib/mbchar.h (wcwidth): Include wcwidth.h.
5946         * lib/mbswidth.c (wcwidth): Move from here...
5947         * lib/wcwidth.h: ...to this new file.
5948
5949 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5950
5951         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
5952
5953         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
5954         it's obsolete.
5955         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
5956
5957 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5958
5959         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
5960         Autoconf 2.60 says this stuff was obsolete.
5961
5962 2006-06-28  Bruno Haible  <bruno@clisp.org>
5963
5964         * modules/wcwidth (Files): Add m4/wchar_t.m4.
5965
5966 2006-06-28  Bruno Haible  <bruno@clisp.org>
5967
5968         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
5969         gt_TYPE_WCHAR_T.
5970
5971 2006-06-28  Bruno Haible  <bruno@clisp.org>
5972
5973         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
5974         declaration for wcwidth.
5975         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
5976
5977 2006-06-28  Bruno Haible  <bruno@clisp.org>
5978
5979         * lib/mkdtemp.c [MINGW]: Include <io.h>.
5980         (mkdir): Define using _mkdir.
5981
5982 2006-06-28  Bruno Haible  <bruno@clisp.org>
5983
5984         * lib/getaddrinfo.h: Fix POSIX URL.
5985         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
5986         _WIN32.
5987         (use_win32_p): Make static.
5988         (getaddrinfo): Reject service name if it is empty or does not consist
5989         solely of decimal digits, or if its value is > 65535.
5990         (getnameinfo): Remove useless casts.
5991
5992 2006-06-27  Simon Josefsson  <jas@extundo.com>
5993
5994         * modules/sys_select: New file, suggested by Bruno Haible, Paul
5995         Eggert and Martin Lambers.
5996
5997 2006-06-27  Simon Josefsson  <jas@extundo.com>
5998
5999         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
6000         Eggert and Martin Lambers.
6001
6002 2006-06-27  Bruno Haible  <bruno@clisp.org>
6003
6004         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
6005         result to 0, not to empty.
6006         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
6007
6008 2006-06-27  Bruno Haible  <bruno@clisp.org>
6009
6010         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
6011
6012 2006-06-26  Simon Josefsson  <jas@extundo.com>
6013
6014         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
6015         present.
6016
6017 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
6018
6019         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
6020         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
6021         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
6022
6023 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
6024
6025         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
6026
6027 2006-06-26  Bruno Haible  <bruno@clisp.org>
6028
6029         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
6030
6031 2006-06-26  Bruno Haible  <bruno@clisp.org>
6032
6033         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
6034
6035 2006-06-26  Bruno Haible  <bruno@clisp.org>
6036
6037         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
6038         SGI C compiler in pre-C99 mode.
6039         Suggested by Mark D. Baushke and Larry Jones.
6040
6041 2006-06-26  Bruno Haible  <bruno@clisp.org>
6042
6043         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
6044         WCHAR_MAX.
6045         Reported by Mark D. Baushke and Larry Jones.
6046
6047 2006-06-26  Bruno Haible  <bruno@clisp.org>
6048
6049         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
6050         in pre-C99 mode.
6051         Suggested by Mark D. Baushke and Larry Jones.
6052
6053 2006-06-23  Simon Josefsson  <jas@extundo.com>
6054             Bruno Haible  <bruno@clisp.org>
6055
6056         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
6057         Emit mostlyclean-local rule.
6058         (func_emit_tests_Makefile_am): Likewise.
6059         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
6060
6061 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
6062
6063         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
6064
6065 2006-06-23  Bruno Haible  <bruno@clisp.org>
6066
6067         * tests/test-stdint.c: Update to match ISO C 99 Technical
6068         Corrigendum 1.
6069
6070 2006-06-23  Bruno Haible  <bruno@clisp.org>
6071
6072         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
6073
6074 2006-06-23  Bruno Haible  <bruno@clisp.org>
6075
6076         * lib/stdint_.h: Treat IRIX like OpenBSD.
6077
6078 2006-06-23  Bruno Haible  <bruno@clisp.org>
6079
6080         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
6081         ISO C 99 Technical Corrigendum 1.
6082
6083 2006-06-22  Simon Josefsson  <jas@extundo.com>
6084
6085         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
6086         MinGW.
6087
6088 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
6089
6090         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
6091         needed.  Some compiler complained about some of them.  Problem reported
6092         by Larry Jones in
6093         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
6094
6095 2006-06-21  Simon Josefsson  <jas@extundo.com>
6096
6097         * tests/test-getaddrinfo.c: New file.
6098
6099         * modules/getaddrinfo-tests: New file.
6100
6101         * MODULES.html.sh: Add inet_pton.
6102
6103         * modules/inet_pton: New file.
6104
6105 2006-06-21  Simon Josefsson  <jas@extundo.com>
6106
6107         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
6108         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
6109         of using the (limited) gnulib implementation on Windows XP.
6110
6111         * m4/inet_pton.m4: New file.
6112
6113 2006-06-21  Simon Josefsson  <jas@extundo.com>
6114
6115         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
6116         variable.
6117
6118         * lib/socket_.h: Don't define WINVER.
6119
6120         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
6121         slightly modified to work in gnulib.
6122
6123 2006-06-21  Simon Josefsson  <jas@extundo.com>
6124
6125         * doc/gnulib.texi (Windows sockets): Add.
6126
6127 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
6128
6129         * lib/read-file.c (fread_file): Start with buffer allocation of
6130         0 bytes rather than 1 byte; this simplifies the code.
6131         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
6132         code to free buffer and save/restore errno.
6133         (internal_read_file): Remove unused local.
6134
6135 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
6136
6137         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
6138         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
6139         Problem reported by Denis Excoffier in
6140         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
6141
6142 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6143
6144         * modules/sys_socket, modules/socklen: Include sys/types since
6145         FreeBSD 4.x's sys/socket.h needs it.
6146
6147 2006-06-19  Simon Josefsson  <jas@extundo.com>
6148
6149         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
6150
6151 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6152
6153         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
6154
6155 2006-06-19  Bruno Haible  <bruno@clisp.org>
6156
6157         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
6158         and FULL_PATH_INTTYPES_H in angle brackets.
6159         Reported by Mark D. Baushke <mdb@gnu.org>.
6160
6161 2006-06-17  Eric Blake  <ebb9@byu.net>
6162
6163         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
6164         errno.
6165
6166 2006-06-17  Bruno Haible  <bruno@clisp.org>
6167
6168         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
6169         <sys/inttypes.h>.
6170
6171 2006-06-17  Bruno Haible  <bruno@clisp.org>
6172
6173         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
6174         whether errno is declared. Assume <errno.h> declares errno.
6175
6176 2006-06-17  Bruno Haible  <bruno@clisp.org>
6177
6178         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
6179
6180 2006-06-17  Bruno Haible  <bruno@clisp.org>
6181
6182         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
6183         problem on Solaris 2.5.1.
6184
6185 2006-06-16  Eric Blake  <ebb9@byu.net>
6186
6187         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
6188         * lib/unicodeio.c [!defined errno]: Likewise.
6189         * lib/strtol.c [!defined errno]: Likewise.
6190         * lib/strtod.c [!defined errno]: Likewise.
6191
6192 2006-06-15  Eric Blake  <ebb9@byu.net>
6193
6194         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
6195
6196 2006-06-15  Eric Blake  <ebb9@byu.net>
6197
6198         * config/srclist.txt (ssize_t.m4): Lose sync.
6199
6200 2006-06-15  Bruno Haible  <bruno@clisp.org>
6201
6202         * modules/stdint (Files): Include m4/full-header-path.m4,
6203         m4/size_max.m4, m4/wchar_t.m4.
6204         (Makefile.am): Many more substitutions.
6205         * modules/stdint-tests: New file.
6206         * tests/test-stdint.c: New file.
6207
6208 2006-06-15  Bruno Haible  <bruno@clisp.org>
6209
6210         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
6211         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
6212         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
6213         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
6214         gl_CHECK_TYPE_SAME): New macros.
6215
6216 2006-06-15  Bruno Haible  <bruno@clisp.org>
6217
6218         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
6219
6220 2006-06-15  Bruno Haible  <bruno@clisp.org>
6221
6222         * lib/stdint_.h: Rewritten to be fully auto-configured.
6223         Fixes bug on HP-UX/IA64.
6224
6225 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
6226
6227         * lib/getdate.y (__attribute__): Don't define if already defined.
6228         Problem reported by Larry Jones.
6229         * lib/utimens.c (__attribute__): Likewise.
6230
6231 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
6232
6233         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
6234         reported by Andreas Schwab.
6235
6236 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6237             Bruno Haible  <bruno@clisp.org>
6238
6239         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
6240         check for the declaration of strnlen and a run test that exposes the
6241         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
6242         rpl_strndup.
6243
6244 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6245             Bruno Haible  <bruno@clisp.org>
6246
6247         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
6248
6249 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6250
6251         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
6252         compile test, for Tru64 4.0D.
6253
6254 2006-05-28  Karl Berry  <karl@gnu.org>
6255
6256         * config/srclist.txt (printf-args.c): lose sync.
6257
6258 2006-05-26  Martin Lambers  <marlam@marlam.de>
6259
6260         * lib/getpass.c: Updates the test for the native W32 API, and adds
6261         missing includes, thus fixing compilation warnings.
6262
6263 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
6264
6265         * lib/exclude.c (exclude_fnmatch): New function.
6266         (excluded_file_name): Call exclude_fnmatch.
6267         * lib/exclude.h (excluded_file_name): New prototype
6268
6269 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
6270
6271         * lib/tempname.c (small_open, large_open): New macros.
6272         (__open, __open64) [!_LIBC]: Remove.
6273         (__gen_tempname): Use small_open and large_open instead of __open
6274         and __open64.  This fixes a portability bug on HP-UX 11.11i
6275         reported by Simon Wing-Tang in
6276         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
6277
6278 2006-05-24  Bruno Haible  <bruno@clisp.org>
6279
6280         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
6281         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
6282         Reported by Thorsten Maerz <torte@netztorte.de> via
6283         Aaron Stone <aaron@serendipity.cx>.
6284
6285 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
6286
6287         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
6288         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
6289         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
6290         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
6291         not really conditional on the cache.
6292         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
6293
6294 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
6295
6296         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
6297         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
6298         (my_usleep): Don't mishandle maximum value.
6299
6300 2006-05-19  Jim Meyering  <jim@meyering.net>
6301
6302         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
6303
6304 2006-05-17  Bruno Haible  <bruno@clisp.org>
6305
6306         Cygwin portability.
6307         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
6308
6309 2006-05-17  Bruno Haible  <bruno@clisp.org>
6310
6311         * lib/stdint_.h: Fix recognition of Cygwin.
6312
6313 2006-05-15  Bruno Haible  <bruno@clisp.org>
6314
6315         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
6316         on libtool patch by Ralf Wildenhues.
6317
6318 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
6319
6320         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
6321         test for C99 conformance; (bool) 0.5 is an integer constant
6322         expression, but (bool) -0.5 is not.  Problem reported by Fedor
6323         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
6324
6325 2006-05-11  Simon Josefsson  <jas@extundo.com>
6326
6327         * m4/xvasprintf.m4: Fix obvious typo.
6328
6329 2006-05-11  Jim Meyering  <jim@meyering.net>
6330
6331         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
6332         James Lemley.
6333
6334 2006-05-10  Simon Josefsson  <jas@extundo.com>
6335
6336         * lib/md4.c: Typo fix, update copyright years.
6337         (K1, K2): Don't use L because it turn computations into 64-bit on
6338         64-bit platforms.
6339
6340 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
6341
6342         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
6343         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
6344         unwanted sign propagation, e.g., on hosts with 64-bit int.
6345         There still are some problems with reeelly weird theoretical hosts
6346         (e.g., 33-bit int) but it's not worth worrying about now.
6347         * lib/sha1.c (rol): Likewise.
6348         (K1, K2, K3, K4): Remove unnecessary L suffix.
6349
6350 2006-05-10  Bruno Haible  <bruno@clisp.org>
6351
6352         * lib/des.c: Cast to avoid warnings.
6353
6354 2006-05-09  Bruno Haible  <bruno@clisp.org>
6355
6356         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
6357         (Depends-on): Depend also on xsize, stdarg.
6358         (configure.ac): Add gl_XVASPRINTF.
6359
6360 2006-05-09  Bruno Haible  <bruno@clisp.org>
6361
6362         * m4/xvasprintf.m4: New file.
6363
6364 2006-05-09  Bruno Haible  <bruno@clisp.org>
6365
6366         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
6367         (EOVERFLOW): Define fallback value.
6368         (xstrcat): New function.
6369         (xvasprintf): Recognize the special case of a string concatenation.
6370
6371 2006-05-08  Eric Blake  <ebb9@byu.net>
6372
6373         * gnulib-tool (func_version): Base copyright year on CVS date.
6374         (func_emit_copyright_notice): New function.
6375         (func_emit_lib_Makefile_am): Use it.
6376         (func_emit_tests_Makefile_am): Likewise.
6377         (func_import): Likewise.
6378
6379 2006-05-08  Bruno Haible  <bruno@clisp.org>
6380
6381         * modules/stdarg: New file.
6382         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
6383
6384 2006-05-08  Bruno Haible  <bruno@clisp.org>
6385
6386         * m4/stdarg.m4: New file, from GNU gettext.
6387
6388 2006-05-08  Bruno Haible  <bruno@clisp.org>
6389
6390         * config/srclist.txt (build-aux/config.rpath): different from latest
6391         release.
6392
6393 2006-05-08  Bruno Haible  <bruno@clisp.org>
6394
6395         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
6396
6397 2006-05-05  Jim Meyering  <jim@meyering.net>
6398
6399         * m4/warning.m4: New file, derived from bison's file by the same name.
6400
6401 2006-05-03  Bruno Haible  <bruno@clisp.org>
6402
6403         * lib/stdint_.h: Shorter URL.
6404         * lib/inttypes.h: Likewise.
6405
6406 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6407
6408         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
6409
6410 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6411
6412         * lib/verify.h: Document the internals better.  Most of this change
6413         was written by Bruno Haible.
6414
6415 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6416
6417         * doc/verify.texi: New file, partly based on a proposal by
6418         Bruno Haible.
6419
6420 2006-05-02  Bruno Haible  <bruno@clisp.org>
6421
6422         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
6423         test from here...
6424         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
6425
6426 2006-04-29  Bruno Haible  <bruno@clisp.org>
6427
6428         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
6429         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
6430
6431 2006-04-29  Bruno Haible  <bruno@clisp.org>
6432
6433         * gnulib-tool: Make --update option actually work.
6434
6435 2006-04-29  Bruno Haible  <bruno@clisp.org>
6436
6437         * doc/gcd.texi: New file.
6438         * doc/gnulib.texi: Include it.
6439
6440 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
6441
6442         * lib/getdate.y (get_date): When adding relative date, start with the
6443         initial time, not with the result of the first mktime call.
6444
6445 2006-04-25  Bruno Haible  <bruno@clisp.org>
6446
6447         * gnulib-tool (func_import): Output the include directives in three
6448         blocks, sorted separately.
6449         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6450
6451 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
6452
6453         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
6454         to define main with arguments, for C++.  Reported by Eric Blake.
6455         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
6456         Prefer 'int main ()' to 'int main (void)', for C++.
6457         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
6458         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
6459         for 'main', for C99 and C++.
6460
6461 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
6462
6463         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
6464         Don't assume that exit status -1 is valid.
6465         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6466         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
6467         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
6468         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
6469         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
6470         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
6471         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
6472         functions can be used without declaring them, or that you can
6473         exit with status -1.
6474         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
6475
6476 2006-04-24  Karl Berry  <karl@gnu.org>
6477
6478         * config/srclist.txt (longdouble.m4): sync lost.
6479
6480 2006-04-24  Eric Blake  <ebb9@byu.net>
6481
6482         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
6483
6484 2006-04-24  Bruno Haible  <bruno@clisp.org>
6485
6486         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
6487         poll() implementation in AIX.
6488         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6489
6490 2006-04-24  Bruno Haible  <bruno@clisp.org>
6491
6492         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
6493         assigned exactly once.
6494
6495 2006-04-23  Claudio Fontana  <claudio@gnu.org>
6496             Bruno Haible  <bruno@clisp.org>
6497
6498         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
6499         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
6500         for AM_CPPFLAGS.
6501
6502 2006-04-23  Bruno Haible  <bruno@clisp.org>
6503
6504         * modules/copy-file: Depend on unistd.
6505         * modules/execute: Likewise.
6506         * modules/fatal-signal: Likewise.
6507         * modules/findprog: Likewise.
6508         * modules/mkdtemp : Likewise.
6509         * modules/pipe: Likewise.
6510         * modules/wait-process: Likewise.
6511
6512 2006-04-23  Bruno Haible  <bruno@clisp.org>
6513
6514         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
6515         condition was already detected.
6516         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6517
6518 2006-04-23  Bruno Haible  <bruno@clisp.org>
6519
6520         * lib/copy-file.c: Include <unistd.h> unconditionally.
6521         * lib/execute.c: Likewise.
6522         * lib/fatal-signal.c: Likewise.
6523         * lib/findprog.c: Likewise.
6524         * lib/mkdtemp.c: Likewise.
6525         * lib/pipe.h: Likewise.
6526         * lib/pipe.c: Likewise.
6527         * lib/wait-process.h: Likewise.
6528
6529 2006-04-23  Bruno Haible  <bruno@clisp.org>
6530
6531         * gnulib-tool (func_usage): Fix --import description. Document
6532         --update.
6533         (func_import): Create temporary file in a temporary directory, if
6534         --dry-run is specified. Silence errors from 'grep' when there are no
6535         m4 files in $m4dir.
6536         (func_create_testdir): Silence errors from 'grep' when there are no
6537         m4 files in $m4dir.
6538         Reported by Karl Berry <karl@freefriends.org>.
6539
6540 2006-04-20  Bruno Haible  <bruno@clisp.org>
6541
6542         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
6543         one argument, so that the code will be portable to Autoconf 2.60.
6544         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
6545         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6546         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
6547
6548 2006-04-19  Derek Price  <derek@ximbiot.com>
6549             Eric Blake  <ebb9@byu.net>
6550
6551         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
6552         rather than "/full/path.h".  Update comment to match.  Shorten &
6553         generalize m4_translit call via AS_TR_CPP.
6554
6555 2006-04-19  Derek Price  <derek@ximbiot.com>
6556             Eric Blake  <ebb9@byu.net>
6557
6558         * lib/inttypes.h: Correct grammar in comment.
6559
6560 2006-04-18  Derek Price  <derek@ximbiot.com>
6561             Paul Eggert  <eggert@cs.ucla.edu>
6562
6563         * modules/inttypes: New file.
6564         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
6565
6566 2006-04-18  Derek Price  <derek@ximbiot.com>
6567             Paul Eggert  <eggert@cs.ucla.edu>
6568
6569         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
6570         New files.
6571
6572 2006-04-18  Derek Price  <derek@ximbiot.com>
6573             Paul Eggert  <eggert@cs.ucla.edu>
6574
6575         * lib/inttypes.h: New file.
6576         * lib/strtoimax.c: Assume <inttypes.h>.
6577
6578 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
6579
6580         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
6581         isn't mounted.  Problem reported by Kir Kolyshkin.
6582
6583 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
6584
6585         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
6586         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
6587         Derek R. Price.
6588         * lib/regex.h (RE_DUP_MAX): Update comment to match current
6589         implementation.
6590
6591 2006-04-12  Eric Blake  <ebb9@byu.net>
6592
6593         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
6594         is now done automatically by the corresponding Autoconf macro.
6595
6596 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
6597
6598         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
6599         time_r.h.
6600
6601 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6602
6603         Merge regex changes from libc, removing some of our
6604         POSIX-conformance changes that were rejected and redoing them in a
6605         less-intrusive way.
6606
6607         * lib/regcomp.c (re_compile_internal, init_dfa):
6608         Length arg is now size_t, not Idx.  All uses changed.
6609         (peek_token): Forward decl now says internal_function.
6610         (__re_error_msgid, __re_error_msgid_idx):
6611         Now static rather than extern with attribute_hidden.
6612         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
6613         For some reason libc prefers K&R style defns for external functions.
6614         (regerror) [!defined _LIBC]: Likewise.
6615         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
6616         (seek_collating_symbol_entry, lookup_collation_sequence_value):
6617         (build_range_exp, build_collating_symbol):
6618         Use K&R-style defn.
6619         (re_compile_fastmap): Use '\0' to memset, not 0.
6620         (utf8_sb_map): Make the calculations more obvious.
6621         (init_dfa, parse_bracket_exp, build_charclass_op):
6622         Call calloc and cast result, as glibc does.
6623         (init_word_char, fetch_token, peek_token, peek_token_bracket):
6624         (build_range_exp, build_collating_symbol):
6625         Now internal functions.
6626
6627         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
6628
6629         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
6630         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
6631         Don't depend on VMS; depend on __VMS instead, for POSIX
6632         namespace cleanness.
6633         (regoff_t): Define to ssize_t, not long int.
6634
6635         Remove the REG_ macros named below.  Instead, make the old names
6636         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
6637         __USE_GNU_REGEX.
6638         (REG_BACKSLASH_ESCAPE_IN_LISTS):
6639         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
6640         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
6641         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
6642         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
6643         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
6644         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
6645         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
6646         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
6647         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
6648         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
6649         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
6650         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
6651         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
6652         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
6653         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
6654         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
6655         (REG_NREGS):
6656         Remove.  All uses replaced by the old RE_* names.
6657         (RE_BACKSLASH_ESCAPE_IN_LISTS):
6658         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
6659         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
6660         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
6661         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
6662         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
6663         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
6664         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
6665         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
6666         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
6667         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
6668         Don't bother having these macros be independent of each others'
6669         values, since they no longer exist in the POSIX name space.
6670
6671         Rename the following member names back to their old names,
6672         unless !__USE_GNU_REGEX.  All uses changed back.
6673         (buffer): Renamed from re_buffer.
6674         (allocated): Renamed from re_allocated.
6675         (used): Renamed from re_used.
6676         (syntax): Renamed from re_syntax.
6677         (fastmap): Renamed from re_fastmap.
6678         (translate): Renamed from re_translate.
6679         (can_be_null): Renamed from re_can_be_null.
6680         (regs_allocated): Renamed from re_regs_allocated.
6681         (fastmap_accurate): Renamed from re_fastmap_accurate.
6682         (no_sub): Renamed from re_no_sub.
6683         (not_bol): Renamed from re_not_bol.
6684         (not_eol): Renamed from re_not_eol.
6685         (newline_anchor): Renamed from re_newline_anchor.
6686         (num_regs): Renamed from rm_num_regs.
6687         (start): Renamed from rm_start.
6688         (end): Renamed from rm_end.
6689
6690         (free_state): Move up a bit.
6691
6692         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
6693         #define to be empty.
6694         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
6695         when that is what is intended.
6696         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
6697         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
6698         (MAX): New macro.
6699         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
6700         All uses changed back to re_malloc, etc.  It's now the caller's
6701         responsibility to check for overflow; all callers changed.
6702         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
6703         (re_x2nrealloc): Remove.
6704         (free_state): Remove decl.
6705
6706         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
6707         (re_set_registers, re_exec):
6708         Use K&R-style defn.
6709
6710         2006-01-31  Roland McGrath  <roland@redhat.com>
6711
6712         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
6713         Reported by Mike Frysinger <vapier@gentoo.org>.
6714
6715         2006-01-15  Andreas Jaeger  <aj@suse.de>
6716
6717         [BZ #1950]
6718         * lib/regex_internal.c (re_string_reconstruct): Adjust for
6719         build_wcs_upper_buffer change.
6720         (build_wcs_upper_buffer): Change return type.
6721
6722         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
6723
6724         * lib/regex_internal.h: Include <stdint.h> if available.
6725
6726         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
6727
6728         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
6729
6730         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
6731
6732         * lib/regcomp.c: Adjust for changed secondary hash function.
6733
6734         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
6735
6736         * lib/regex.h: Pretty printing.
6737         Clean up namespace a bit.
6738
6739         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
6740
6741         * lib/regexec.c (update_cur_sifted_state, check_arrival,
6742         check_arrival_add_next_nodes): Avoid using uninitialized variable.
6743
6744         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
6745                     Ulrich Drepper  <drepper@redhat.com>
6746
6747         [BZ #1302]
6748         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
6749         changed.
6750         (bitset_word_t): Renamed from bitset_word.  All uses changed.
6751
6752         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
6753
6754         [BZ #281]
6755         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
6756         * lib/regcomp.c: Remove unnecessary uses of
6757         unsigned RE_TRANSLATE_TYPE.
6758         * lib/regex_internal.h: Likewise.
6759         * lib/regex_internal.c: Likewise.
6760         * lib/regexec.c: Likewise.
6761         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
6762
6763         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
6764
6765         * lib/regexec.c (find_recover_state): Remove unnecessary
6766         initialization.
6767         (transit_state_bkref): Make DFA a const pointer.
6768         (get_subexp): Likewise.
6769         (check_arrival): Likewise.
6770         (update_cur_sifted_state): Likewise.
6771         (re_search_internal): Likewise.
6772         (prune_impossible_nodes): Likewise.
6773         (acquire_init_state_context): Likewise.
6774         (proceed_next_node): Likewise.
6775         (set_regs): Likewise.
6776         (free_fail_stack_return): Likewise.
6777         (check_arrival_expand_ecl): Mark DFA parameter as const.
6778         (check_arrival_expand_ecl_sub): Likewise.
6779         (check_subexp_limits): Likewise.
6780         (sub_epsilon_src_nodes):  Likewise.
6781         (add_epsilon_src_nodes):  Likewise.
6782         (merge_state_array): Likewise.
6783         (update_regs): Likewise.
6784         (build_trtable): Likewise.
6785         (sift_states_backward): Mark MCTX parameter as const.
6786         (build_sifted_states): Likewise.
6787         (update_cur_sifted_state): Likewise.
6788         (sift_states_mkref): Likewise.
6789         (check_arrival_expand_ecl): Mark eclosure as const.
6790         (check_dst_limits_calc_pos_1): Likewise.
6791         * lib/regex_internal.h (re_match_context_t): Make dfa a const
6792         pointer.
6793
6794         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
6795
6796         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
6797         (transit_state_sb): Likewise.
6798         (transit_state_mb): Likewise.
6799         (sift_states_iter_mb): Likewise.
6800         (check_arrival_add_next_nodes): Likewise.
6801         (check_node_accept_bytes): Change first parameter to pointer-to-const.
6802         [_LIBC] (re_search_2_stub): Use mempcpy.
6803
6804         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
6805         mbrtowc for very simple UTF-8 case.
6806
6807         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
6808         a pointer-to-const.
6809         (re_acquire_state_context): Likewise.
6810         * lib/regex_internal.h: Adjust prototypes.
6811
6812         * lib/regex.c: Prevent using C++ compilers.
6813
6814         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
6815         (re_acquire_state_context): Likewise.
6816
6817 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6818
6819         * modules/regex (Depends-on): Add ssize_t.
6820
6821 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6822
6823         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
6824         translation table.
6825
6826 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6827
6828         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
6829
6830 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
6831             Bruno Haible  <bruno@clisp.org>
6832
6833         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
6834         <sys/types.h> and <inttypes.h>.
6835
6836 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6837
6838         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
6839         `__error_t_defined', so argp.h will not typedef the former.
6840
6841 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
6842
6843         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
6844         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
6845         glibc names.  Even if glibc is changed to conform to POSIX, the
6846         traditional names will be available anyway, since regex depends on
6847         the extensions module.  Also, fix a longstanding typo in the
6848         implementation of Spencer ERE test #75 from grep 2.3.  Problems
6849         reported by Emanuele Giaquinta.  Also, change sense of cached
6850         variable, so that the message makes sense.
6851
6852 2006-03-24  Simon Josefsson  <jas@extundo.com>
6853
6854         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
6855         including some doc fixes.
6856         (base64_encode_alloc): Fix +1 bug on allocation failures.
6857
6858 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6859
6860         * lib/base64.c (base64_encode): Do not read past end of array with
6861         unsanitized input on systems with CHAR_BIT > 8.
6862
6863 2006-03-24  Eric Blake  <ebb9@byu.net>
6864
6865         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
6866
6867 2006-03-22  Karl Berry  <karl@gnu.org>
6868
6869         * config/srclist.txt (*setenv.[ch]): get from coreutils.
6870         * config/srclistvars.sh (COREUTILS): new var.
6871
6872 2006-03-17  Jim Meyering  <jim@meyering.net>
6873
6874         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
6875         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
6876
6877 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6878
6879         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
6880         no longer needs it.  Instead, check that regoff_t is as least
6881         as wide as ptrdiff_t.
6882
6883         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
6884         so that our regex.h stays compatible with the installed regex.
6885         This is helpful for installers who configure --without-included-regex.
6886         Problem reported by Emanuele Giaquinta.
6887
6888 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6889
6890         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
6891         Typedef to long int, not to off_, as POSIX will likely change
6892         in that direction.
6893
6894 2006-03-15  Eric Blake  <ebb9@byu.net>
6895
6896         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
6897
6898 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6899
6900         * lib/argp-help.c (validate_uparams): Fix typo
6901         * lib/argp-parse.c (argp_default_options): Consistently begin help
6902         messages with a lowercase letter.
6903
6904 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
6905
6906         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
6907         overrun buffers and shouldn't be used (much as gets shouldn't be
6908         used).
6909         * lib/time_r.c (asctime_r, ctime_r): Likewise.
6910
6911 2006-03-08  Simon Josefsson  <jas@extundo.com>
6912
6913         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
6914         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6915
6916 2006-03-08  Simon Josefsson  <jas@extundo.com>
6917
6918         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
6919         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6920
6921 2006-03-08  Simon Josefsson  <jas@extundo.com>
6922
6923         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
6924         signal that configure disabled the device.
6925
6926 2006-03-08  Simon Josefsson  <jas@extundo.com>
6927
6928         * build-aux/maint.mk: Fix refresh-po, to handle no translated
6929         languages.
6930
6931 2006-03-07  Simon Josefsson  <jas@extundo.com>
6932
6933         * modules/getopt (Depends-on): Add unistd.
6934
6935         * modules/unistd: New file.
6936
6937 2006-03-07  Simon Josefsson  <jas@extundo.com>
6938
6939         * modules/gc-random: New file.
6940
6941 2006-03-07  Simon Josefsson  <jas@extundo.com>
6942
6943         * m4/unistd_h.m4: New file.
6944
6945 2006-03-07  Simon Josefsson  <jas@extundo.com>
6946
6947         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
6948         test to be side-effect free by storing the result in the cache
6949         variable gl_cv_lib_readline, and moving the assignment of
6950         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
6951         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6952
6953 2006-03-07  Simon Josefsson  <jas@extundo.com>
6954
6955         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
6956         error on missing devices (the functions will return an error).
6957
6958         * m4/gc.m4: Move random stuff to gc-random.m4
6959
6960 2006-03-07  Simon Josefsson  <jas@extundo.com>
6961
6962         * lib/unistd_.h: New file.
6963
6964 2006-03-07  Simon Josefsson  <jas@extundo.com>
6965
6966         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
6967
6968 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6969
6970         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
6971         Problem reported by Juan Manuel Guerrero.
6972
6973 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6974
6975         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
6976         the unistd module.
6977         * lib/getlogin_r.c: Likewise.
6978         * lib/getlogin_r.h: Likewise.
6979         * lib/glob.c: Likewise.
6980         * lib/pagealign_alloc.c: Likewise.
6981         * lib/unistd_.h: Remove; no longer needed.
6982
6983 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6984
6985         * MODULES.html.sh (Support for systems lacking POSIX:2001):
6986         Add unistd.
6987         * modules/c-stack (Depends-on): Add unistd.
6988         * modules/getlogin_r: Likewise.
6989         * modules/glob: Likewise.
6990         * modules/pagealign_alloc: Likewise.
6991         * modules/unistd (Files): Remove lib/unistd_.h.
6992         (EXTRA_DIST): Remove.
6993         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
6994         need unistd_.h.
6995         (MOSTLYCLEANFILES): Remove unistd.h-t.
6996
6997 2006-03-03  Simon Josefsson  <jas@extundo.com>
6998
6999         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
7000
7001 2006-03-03  Simon Josefsson  <jas@extundo.com>
7002
7003         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
7004         libidn and bison.
7005
7006 2006-03-03  Simon Josefsson  <jas@extundo.com>
7007
7008         * build-aux/maint.mk: Add indent target.
7009
7010 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
7011
7012         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
7013         our replacement poll.h in any case, to avoid a differing
7014         declaration from a system header.  Seen on AIX.
7015
7016 2006-03-01  Simon Josefsson  <jas@extundo.com>
7017
7018         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
7019         <kasal@ucw.cz>.
7020
7021 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7022
7023         * modules/gettime (Depends-on): Add extensions module.
7024         * modules/nanosleep (Depends-on): Likewise.
7025         * modules/settime (Depends-on): Likewise.
7026
7027 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7028
7029         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
7030         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
7031         pedantically.
7032         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7033         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
7034
7035         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
7036         not "==".  Reported by Ralf Wildenhues.
7037
7038 2006-03-01  Karl Berry  <karl@gnu.org>
7039
7040         * doc/Copyright/request-*: new files, synced from gnuorg.
7041
7042 2006-03-01  Karl Berry  <karl@gnu.org>
7043
7044         * config/srclist.txt (Copyright/*): new entries.
7045
7046 2006-02-28  Simon Josefsson  <jas@extundo.com>
7047
7048         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
7049
7050 2006-02-27  Simon Josefsson  <jas@extundo.com>
7051
7052         * lib/base64.h: Indent #define's.  From Jim Meyering
7053         <jim@meyering.net>.
7054
7055 2006-02-27  Jim Meyering  <jim@meyering.net>
7056
7057         Revert the change of 2006-02-24, so these files can continue
7058         to be sync'd from gettext.
7059         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
7060         of `config.h'.
7061
7062 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
7063
7064         * modules/intprops: New file.
7065         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
7066         Add intprops.
7067         * modules/getloadavg (Files): Remove lib/intprops.h.
7068         (Depends-on): Add intprops.
7069         * modules/human: Likewise.
7070         * modules/inttostr: Likewise.
7071         * modules/openat: Likewise.
7072         * modules/sig2str: Likewise.
7073         * modules/userspec: Likewise.
7074         * modules/utimecmp: Likewise.
7075         * modules/xnanosleep: Likewise.
7076         * modules/xstrtol: Likewise.
7077
7078 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
7079
7080         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
7081         * modules/lock-tests (TESTS): Use $(EXEEXT).
7082         * modules/tls-tests: Likewise.
7083         * modules/argp-tests: Likewise.
7084         (check_PROGRAMS): New var, replacing...
7085         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
7086
7087 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7088
7089         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
7090         `config.h'.
7091
7092 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
7093
7094         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
7095
7096 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7097
7098         Sync from coreutils.
7099         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
7100         gl_CHDIR_SAFER.
7101
7102 2006-02-22  Jim Meyering  <jim@meyering.net>
7103
7104         Sync from coreutils.
7105         * m4/chdir-safer.m4: New file.
7106
7107 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
7108
7109         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
7110         AT_FDCWD exceeds INT_MAX.
7111         * lib/openat.h (AT_FDCWD): Likewise.
7112
7113 2006-02-17  Eric Blake  <address@hidden>
7114
7115         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
7116
7117 2006-02-16  Simon Josefsson  <jas@extundo.com>
7118
7119         * modules/getaddrinfo (Depends-on): Add sys_socket.
7120
7121 2006-02-15  Simon Josefsson  <jas@extundo.com>
7122
7123         * build-aux/maint.mk: Add dsyntax-check rule.
7124
7125 2006-02-15  Eric Blake  <ebb9@byu.net>
7126
7127         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
7128         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
7129         'present but cannot compile' warnings on cygwin.
7130         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
7131         use ws2tcpip.h if sys/socket.h works.
7132         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
7133         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
7134
7135 2006-02-14  Simon Josefsson  <jas@extundo.com>
7136
7137         * modules/maintainer-makefile (Files): Rename.
7138
7139         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
7140         and (the local) Makefile.cfg to maint-cfg.mk.
7141
7142         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
7143         to the latter.
7144
7145         * modules/maintainer-makefile: New module.
7146
7147         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
7148         severaly stripped to make it possible to build it up from scratch
7149         with reliable tests.
7150
7151         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
7152         fixes to permit overriding the default actions when configure and
7153         makefile are not available.
7154
7155 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
7156
7157         Sync from coreutils.
7158         * modules/lstat (Depends-on): Don't depend on xalloc.
7159         (License): Change from GPL to LGPL, since this is now simply a
7160         replacement for a libc function.
7161
7162 2006-02-14  Jim Meyering  <jim@meyering.net>
7163
7164         Sync from coreutils.
7165
7166         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
7167         failure on deficient systems, and simplify gnulib lgpl dependencies.
7168         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
7169         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
7170
7171         * lib/xalloc-die.c: Remove unused definition of N_.
7172
7173 2006-02-14  Jim Meyering  <jim@meyering.net>
7174
7175         Sync from coreutils.
7176         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
7177         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
7178         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
7179         double-quote uses of that variable, to accommodate the rare case in
7180         which getmntent is available in none of the libraries checked.  This
7181         happens at least on FreeBSD 5.0.
7182
7183 2006-02-13  Simon Josefsson  <jas@extundo.com>
7184
7185         * gnulib-tool (Usage): Fix --import, from
7186         karl@freefriends.org (Karl Berry).
7187
7188 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7189
7190         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
7191
7192 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
7193
7194         * lib/argp-namefrob.h: Restore changes accidentally lost during the
7195         "autoupdate" on 2005-12-12.
7196
7197 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
7198
7199         * modules/closeout (Depends-on): Remove atexit.
7200
7201 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
7202
7203         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
7204         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
7205
7206 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
7207
7208         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
7209         __EXTENSIONS__ if this causes compilation to fail.  Problem
7210         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
7211         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
7212
7213 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
7214
7215         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
7216         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
7217         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
7218         All uses changed.
7219
7220 2006-01-26  Simon Josefsson  <jas@extundo.com>
7221
7222         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
7223         prototype is visible on mingw32.
7224
7225         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
7226         for mingw32.
7227
7228         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
7229         mingw32).
7230
7231 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
7232
7233         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
7234         attempt to open for write; this always fails, at least on POSIX
7235         hosts.  This reinstates the 2006-01-09 change, which was
7236         inadvertently removed.
7237
7238 2006-01-26  Bruno Haible  <bruno@clisp.org>
7239
7240         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
7241         Reported by Paul Eggert.
7242
7243 2006-01-26  Bruno Haible  <bruno@clisp.org>
7244             Paul Eggert  <eggert@cs.ucla.edu>
7245
7246         * lib/stdbool_.h (_Bool)
7247         [(! (defined __cplusplus || defined __BEOS__)
7248           && !defined __GNUC__
7249           && !(defined __HP_cc || defined __xlc__
7250                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
7251                || defined __sgi))]:
7252         #define to signed char in these cases too; this simplifies
7253         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
7254         etc., separately) and makes it more conservative.
7255
7256 2006-01-25  Simon Josefsson  <jas@extundo.com>
7257
7258         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
7259         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
7260         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
7261
7262 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7263
7264         * lib/argp-namefrob.h: Bugfix. Remove stray #
7265
7266 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
7267
7268         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
7269         so that we test the test.
7270         Check for yet another HP-UX cc bug involving *bool |= bool.
7271
7272 2006-01-25  Karl Berry  <karl@gnu.org>
7273
7274         * config/srclist.txt (vasnprintf.c): sync lost.
7275
7276 2006-01-25  Jim Meyering  <jim@meyering.net>
7277
7278         Sync from the stable (b5) branch of coreutils:
7279
7280         * lib/fts.c (fts_children): Don't let close() clobber errno from
7281         failed fchdir().
7282
7283         * lib/fts.c (fts_stat): When following a symlink-to-directory,
7284         don't necessarily interpret stat-fails+lstat-succeeds as indicating
7285         a dangling symlink.  That can also happen at least for ELOOP.
7286         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
7287         FYI, this bug predates the inclusion of fts.c in coreutils.
7288
7289         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
7290         in their own block, so pre-c99 compilers don't object.
7291
7292         Avoid the double-free (first in fts_read, second in fts_close) that
7293         would occur when an `active' directory is made inaccessible (e.g.,
7294         via chmod a-x) during a traversal.
7295         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
7296         before returning.  Reproduce this failure by
7297         mkdir -p a/b; cd a; chmod a-x . b
7298         Reported by Stavros Passas.
7299
7300 2006-01-25  Jim Meyering  <jim@meyering.net>
7301
7302         * lib/fileblocks.c: Remove more useless parentheses.
7303         * lib/readutmp.h: Likewise.
7304
7305 2006-01-25  Bruno Haible  <bruno@clisp.org>
7306
7307         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
7308         warnings.
7309         Reported by Paul Eggert.
7310
7311 2006-01-25  Bruno Haible  <bruno@clisp.org>
7312
7313         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
7314         rid of a trap command. For Solaris sh.
7315         Reported by Mark D. Baushke <mdb@gnu.org>.
7316
7317 2006-01-24  Simon Josefsson  <jas@extundo.com>
7318
7319         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
7320         Bruno.
7321
7322 2006-01-24  Karl Berry  <karl@gnu.org>
7323
7324         * config/srclist.txt (argp-namefrob.h): sync lost.
7325
7326 2006-01-24  Jim Meyering  <jim@meyering.net>
7327
7328         * modules/openat (Files): Add lib/intprops.h.
7329         From Mark D. Baushke.
7330
7331 2006-01-24  Jim Meyering  <jim@meyering.net>
7332
7333         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
7334         Reported by Mark D. Baushke.
7335
7336 2006-01-24  Jim Meyering  <jim@meyering.net>
7337
7338         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
7339
7340 2006-01-24  Bruno Haible  <bruno@clisp.org>
7341
7342         * modules/strnlen (Maintainer): Change from glibc to all.
7343
7344 2006-01-24  Bruno Haible  <bruno@clisp.org>
7345
7346         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
7347         Patch by Paul Eggert.
7348
7349 2006-01-24  Bruno Haible  <bruno@clisp.org>
7350
7351         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
7352         already has it.
7353         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
7354         2005-11-26.
7355
7356         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
7357         'signed char' to avoid problems with the built-in _Bool type.
7358         Reported by Paul Eggert on 2005-11-26.
7359
7360 2006-01-24  Bruno Haible  <bruno@clisp.org>
7361
7362         * gnulib-tool (func_import): Avoid constructing complicated sed
7363         expressions inside backquote.
7364         Report and solution by Mark D. Baushke <mdb@gnu.org>.
7365
7366 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
7367
7368         These changes imported from libc.
7369         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
7370         test and two separate function calls.
7371         * lib/strndup.c (__strndup): Add libc_hidden_def.
7372
7373 2006-01-23  Simon Josefsson  <jas@extundo.com>
7374
7375         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
7376         Remove the test_*_SOURCES variable: automake infers it by default.
7377         * modules/tls-tests: Likewise.
7378
7379 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7380
7381         Work around porting bugs reported by Dieter in
7382         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
7383         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
7384         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
7385         Include "getopt.h" first, to check interface.
7386         (getenv): Declare only if defined HAVE_DECL_GETENV &&
7387         !HAVE_DECL_GETENV.
7388         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
7389         (__strndup): Revert to K&R-style function dfns, the glibc style.
7390         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
7391         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
7392         Include strnlen.h first, to get prototype properly.
7393         (strnlen): Renamed from __strnlen.
7394         Remove weak alias.
7395
7396 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7397
7398         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
7399
7400 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7401
7402         * config/srclist.txt: Adjust to reflect glibc reorganization.
7403         This affects only comments.
7404
7405 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7406
7407          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
7408          Reported by Bruce Korb <bkorb@gnu.org>.
7409
7410 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7411
7412         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
7413         to pacify gcc -Wswitch-default.
7414
7415 2006-01-22  Bruno Haible  <bruno@clisp.org>
7416
7417         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
7418         temporary buffer for sprintf, take into account the precision also
7419         for 'd', 'i', 'u', 'o', 'x', 'X'.
7420
7421 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7422
7423         * modules/argp-tests: New module
7424         * tests/test-argp.c: New file
7425         * tests/test-argp-2.sh: New file
7426
7427 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7428
7429         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
7430         (__argp_base_name): Removed
7431         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
7432         typo.
7433         (__argp_base_name): Provide macro definition or extern declaration
7434         depending on the configuration
7435
7436 2006-01-20  Simon Josefsson  <jas@extundo.com>
7437
7438         * modules/inet_ntop (Depends-on): Depend on sys_socket.
7439
7440 2006-01-20  Simon Josefsson  <jas@extundo.com>
7441
7442         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
7443
7444 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
7445
7446         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
7447         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
7448         Suggested by Bruno Haible.
7449
7450 2006-01-20  Karl Berry  <karl@gnu.org>
7451
7452         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
7453         until changes propagate, I guess.
7454
7455 2006-01-19  Simon Josefsson  <jas@extundo.com>
7456
7457         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
7458
7459 2006-01-19  Simon Josefsson  <jas@extundo.com>
7460
7461         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
7462
7463 2006-01-19  Simon Josefsson  <jas@extundo.com>
7464
7465         * gnulib-tool: Set check_PROGRAMS.
7466
7467         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
7468         modules/des-tests, modules/gc-arcfour-tests,
7469         modules/gc-arctwo-tests, modules/gc-des-tests,
7470         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
7471         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
7472         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
7473         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
7474         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
7475         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
7476         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
7477         test_*_SOURCES.
7478
7479 2006-01-18  Simon Josefsson  <jas@extundo.com>
7480
7481         * modules/socklen (Depends-on): Depend on sys_socket.
7482
7483 2006-01-18  Simon Josefsson  <jas@extundo.com>
7484
7485         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
7486         modules/des-tests, modules/gc-arcfour-tests,
7487         modules/gc-arctwo-tests, modules/gc-des-tests,
7488         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
7489         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
7490         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
7491         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
7492         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
7493         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
7494         $(EXEEXT) to automake TESTS variable, for mingw32.
7495
7496 2006-01-17  Simon Josefsson  <jas@extundo.com>
7497
7498         * modules/socklen (Include): Need sys/socket.h.
7499
7500 2006-01-17  Bruno Haible  <bruno@clisp.org>
7501
7502         * modules/ssize_t (Include): Add <sys/types.h>.
7503
7504 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
7505
7506         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
7507         it's not portable and it doesn't work with cross-compiles.
7508         Problem reported by Bruno Haible.  Fix missing-$ typo in
7509         'test "gl_cv_ignore_unused_libraries" ...' that prevented
7510         -zignore from being used with Sun's C compiler.
7511
7512 2006-01-12  Simon Josefsson  <jas@extundo.com>
7513
7514         * lib/base64.c: Fix warning, reported by Bruno Haible
7515         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
7516
7517 2006-01-12  Bruno Haible  <bruno@clisp.org>
7518
7519         * modules/ldd: New file.
7520         * build-aux/ldd.sh.in: New file.
7521         * MODULES.html.sh (Support for building libraries and executables): Add
7522         ldd.
7523
7524 2006-01-12  Bruno Haible  <bruno@clisp.org>
7525
7526         * m4/ldd.m4: New file.
7527
7528 2006-01-12  Bruno Haible  <bruno@clisp.org>
7529
7530         * gnulib-tool (func_import, func_create_testdir): Don't go into an
7531         endless loop while replacing $auxdir with build-aux.
7532
7533 2006-01-11  Simon Josefsson  <jas@extundo.com>
7534
7535         * lib/stdint_.h (SIZE_MAX): Add missing (.
7536
7537 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
7538
7539         Sync from coreutils.
7540         * lib/md5.c: Fix commentary typos.
7541         (alignof, UNALIGNED_P): No need for a GCC-specific version.
7542         * lib/md5.h (__attribute__): Remove; unused.
7543         * lib/sha1.c: Fix commentary to match md5 better.
7544         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
7545         so that we don't need to worry about alignment.  All uses changed.
7546         This merges the 2005-10-28 md5 change into sha1.
7547
7548 2006-01-11  Jim Meyering  <jim@meyering.net>
7549
7550         Sync from coreutils.
7551         * lib/md5.c (OP): Fix spacing.
7552
7553 2006-01-11  Bruno Haible  <bruno@clisp.org>
7554
7555         Ensure automatic ordering between gl_LOCK and gl_ARGP.
7556         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
7557         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
7558
7559 2006-01-11  Bruno Haible  <bruno@clisp.org>
7560
7561         Ensure automatic ordering between gl_LOCK and gl_ARGP.
7562         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
7563         the "early" section as well.
7564
7565 2006-01-11  Bruno Haible  <bruno@clisp.org>
7566
7567         Avoid "ar: no archive members specified" error on MacOS X.
7568         * gnulib-tool (func_modules_add_dummy): New function.
7569         (func_import, func_create_testdir): Invoke it.
7570
7571 2006-01-11  Bruno Haible  <bruno@clisp.org>
7572
7573         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
7574         with $auxdir in AC_CONFIG_FILES statements.
7575
7576 2006-01-11  Bruno Haible  <bruno@clisp.org>
7577
7578         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7579         Initialize also noinst_HEADERS to empty.
7580
7581 2006-01-11  Bruno Haible  <bruno@clisp.org>
7582
7583         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
7584         variables.
7585         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
7586         autoreconf.
7587
7588 2006-01-11  Bruno Haible  <bruno@clisp.org>
7589
7590         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
7591         overridable by the user.
7592         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7593
7594 2006-01-10  Simon Josefsson  <jas@extundo.com>
7595
7596         * modules/sys_socket: New file.
7597
7598 2006-01-10  Simon Josefsson  <jas@extundo.com>
7599
7600         * m4/sys_socket_h.m4: New file.
7601
7602 2006-01-10  Simon Josefsson  <jas@extundo.com>
7603
7604         * lib/socket_.h: New file.
7605
7606 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7607
7608         * modules/readutmp (Maintainer): Add myself.
7609
7610 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7611
7612         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
7613         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
7614         People who are still concerned with buggy memcmp implementations
7615         can invoke gl_FUNC_MEMCMP themselves.
7616
7617 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7618
7619         * lib/regex_internal.h (BITSET_WORD_BITS):
7620         Work around a bug in 64-bit PGC (before version 6.1-2), where the
7621         preprocessor mishandles large unsigned values as if they were signed.
7622         Problem reported by Claudio Fontana in
7623         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
7624
7625 2006-01-10  Jim Meyering  <jim@meyering.net>
7626
7627         Avoid the double-free (first in fts_read, second in fts_close) that
7628         would occur when an `active' directory is made inaccessible (e.g.,
7629         via chmod a-x) during a traversal.
7630         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
7631         before returning.  Reproduce this failure by
7632         mkdir -p a/b; cd a; chmod a-x . b
7633         Reported by Stavros Passas.
7634
7635         Sync from coreutils.
7636         * lib/sha1.c: Tweak grammar in a comment.
7637
7638 2006-01-10  Jim Meyering  <jim@meyering.net>
7639
7640         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
7641         Patch by Joerg Sonnenberger.
7642
7643 2006-01-10  Bruno Haible  <bruno@clisp.org>
7644
7645         * modules/readutmp: Depend on module free.
7646         * modules/strtok_r: Depend on module restrict.
7647
7648 2006-01-10  Bruno Haible  <bruno@clisp.org>
7649
7650         * modules/gettext (configure.ac): Add an invocation of
7651         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
7652
7653 2006-01-10  Bruno Haible  <bruno@clisp.org>
7654
7655         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
7656         Reported by Werner Lemberg <wl@gnu.org>.
7657
7658 2006-01-10  Bruno Haible  <bruno@clisp.org>
7659
7660         * lib/localcharset.c: Update from GNU gettext.
7661
7662 2006-01-10  Bruno Haible  <bruno@clisp.org>
7663
7664         * lib/argp.h (__const): Remove macro. Use const instead.
7665         * lib/argp-fmtstream.h (__const): Likewise.
7666         * lib/glob_.h (__const): Remove macro.
7667         * lib/glob-libc.h: Use const instead of __const.
7668
7669 2006-01-10  Bruno Haible  <bruno@clisp.org>
7670
7671         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
7672         variable.
7673         Needed to avoid an automake error regarding the 'gettext' module.
7674
7675 2006-01-09  Simon Josefsson  <jas@extundo.com>
7676
7677         * modules/inet_ntop (Depends-on): Add restrict.
7678
7679 2006-01-09  Simon Josefsson  <jas@extundo.com>
7680
7681         * modules/gc-rijndael-tests (License): Put under LGPL.
7682
7683         * modules/gc-des-tests (License): Likewise.
7684
7685         * modules/gc-arcfour-tests (License): Likewise.
7686
7687         * modules/gc-arctwo-tests (License): Likewise.
7688
7689         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
7690
7691         * modules/gc-hmac-sha1-tests (Files): Likewise.
7692
7693         * modules/gc-hmac-md5-tests (License): Likewise.
7694
7695         * modules/gc-sha1-tests (License): Likewise.
7696
7697         * modules/gc-md5-tests (License): Likewise.
7698
7699         * modules/gc-md4-tests (License): Likewise.
7700
7701         * modules/gc-md2-tests (License): Likewise.
7702
7703         * modules/gc-tests (License): Likewise.
7704
7705         * modules/des-tests (License): Likewise.
7706
7707         * modules/md4-tests (License): Likewise.
7708
7709         * modules/md2-tests (License): Likewise.
7710
7711 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7712
7713         Sync from coreutils:
7714
7715         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
7716         * modules/lib-ignore: New file.
7717         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
7718         chdir-safer.m4, lchmod.m4.
7719         * modules/openat: Add mkdirat.c, openat-priv.h.
7720
7721 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7722
7723         Sync from coreutils.
7724         * m4/lib-ignore.m4: New file.
7725         * m4/lchmod.m4: New file.
7726
7727 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7728
7729         Sync from coreutils.
7730         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
7731         for write access: POSIX says that must fail.
7732         * lib/fts.c (diropen): Likewise.
7733         * lib/save-cwd.c (save_cwd): Likewise.
7734         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
7735         well, for minor improvements on hosts that lack O_DIRECTORY.
7736         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
7737         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
7738         Fall back on chown if open failed with EACCES.
7739
7740         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
7741         Report an error at compile-time if only a 1-second nominal clock
7742         resolution is found.
7743
7744         * lib/lchmod.h: New file.
7745         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
7746         (make_dir_parents): Use lchown rather than chown, and
7747         lchmod rather than chmod.
7748
7749         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
7750         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
7751         "proc" reported by n0dalus.
7752
7753         * lib/mountlist.c: Include <limits.h>.
7754         (dev_from_mount_options)
7755         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
7756         New function.  It no longer assumes "dev=" has the System V meaning
7757         on Linux (since it doesn't).  It also parses "dev=" more carefully.
7758         (read_file_system_list)
7759         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
7760         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
7761         dev= in that case.
7762
7763         * lib/posixtm.h (PDS_PRE_2000): New macro.
7764         * lib/posixtm.c (year): Arg is now syntax_bits rather than
7765         allow_century.  All usages changed.  Reject dates outside the range
7766         1969-1999 if PDS_PRE_2000 is used.
7767
7768 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7769
7770         Sync from coreutils.
7771         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
7772         (Time of day items): Mention the possibility of leap seconds.
7773         Problem reported by Dr. David Alan Gilbert.
7774
7775 2006-01-09  Jim Meyering  <jim@meyering.net>
7776
7777         Sync from coreutils.
7778
7779         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
7780
7781         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
7782
7783         * lib/modechange.c (mode_compile): Reject an invalid mode string
7784         that starts with an octal digit.  From Andreas Gruenbacher.
7785
7786         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
7787         and dup to open_safer and dup_safer, respectively.
7788         (openat_permissive): Fix typo in comment.
7789
7790         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
7791         "gettext.h"; either no longer needed or are guaranteed by openat.h.
7792         (_): Remove; no longer needed.
7793         (openat): Renamed from rpl_openat; no need for rpl_openat
7794         since openat.h renames openat for us.
7795         Replace most of the body with a call to openat_permissive,
7796         to avoid duplicate code.
7797         Port to (probably hypothetical) environments were mode_t is
7798         wider than int.
7799         (openat_permissive): Require mode arg, so that we can check
7800         types better.  Put it just after flags.  Change cwd failure
7801         indicator from pointer-to-bool to pointer-to-errno-value.
7802         All callers changed.
7803         Invoke openat_save_fail and/or openat_restore_fail if
7804         cwd_errno is null, so that openat can call us.
7805         (openat_permissive, fdopendir, fstatat, unlinkat):
7806         Simplify errno handling to avoid some duplicate code,
7807         as it's OK to set errno on success.
7808         * lib/openat.h: Revamp code so that function macros depend on
7809         __OPENAT_PREFIX only, not also on AT_FDCWD.
7810         (openat_ro): Remove.  Caller changed to use openat_permissive.
7811         (openat_permissive): Now a macro, if not a function.
7812         (openat_restore_fail, openat_save_fail): Now always functions,
7813         since mkdirat needs them even if __OPENAT_PREFIX is defined.
7814
7815         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
7816         and openat.c.
7817         * lib/mkdirat.c: Include openat-priv.h.
7818         Remove definitions of macros defined therein.
7819         * lib/openat.c: Likewise.
7820
7821         * lib/mkdirat.c (mkdirat): New file and function.
7822         * lib/openat.h (mkdirat): Declare.
7823
7824         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
7825
7826         * lib/openat.h (openat_permissive): Declare.
7827         (openat_ro): Define.
7828
7829         * lib/openat.c (EXPECTED_ERRNO): New macro.
7830         (openat_permissive): New function -- used in remove.c rewrite.
7831         (all functions): Set errno just before returning, only if there
7832         was an actual failure.
7833         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
7834
7835         Emulate openat-family functions using Linux's procfs, if possible.
7836         Idea and some code based on Ulrich Drepper's glibc changes.
7837
7838         * lib/openat.c: (BUILD_PROC_NAME): New macro.
7839         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
7840         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
7841         before falling back on save_cwd and restore_cwd.
7842         (fdopendir, fstatat, unlinkat): Likewise.
7843
7844         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
7845         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
7846
7847         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
7848         as second argument to va_arg.  Otherwise, some versions of gcc
7849         warn that `if this code is reached, the program will abort'.
7850
7851 2006-01-09  Jim Meyering  <jim@meyering.net>
7852
7853         Sync from coreutils.
7854         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
7855         Require openat-priv.h.
7856
7857 2006-01-09  Bruno Haible  <bruno@clisp.org>
7858
7859         * modules/strnlen (Include): Use strnlen.h.
7860
7861 2006-01-09  Bruno Haible  <bruno@clisp.org>
7862
7863         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
7864
7865 2006-01-09  Bruno Haible  <bruno@clisp.org>
7866
7867         * lib/sysexit_.h (EX_OK): New macro.
7868         Suggested by Martin Lambers <marlam@marlam.de>.
7869
7870 2006-01-09  Bruno Haible  <bruno@clisp.org>
7871
7872         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
7873         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
7874
7875 2006-01-09  Bruno Haible  <bruno@clisp.org>
7876
7877         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
7878         numbers.
7879
7880 2006-01-09  Bruno Haible  <bruno@clisp.org>
7881
7882         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
7883         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
7884         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
7885         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
7886
7887 2006-01-09  Bruno Haible  <bruno@clisp.org>
7888
7889         * build-aux/javacomp.sh.in: New file, moved from lib/.
7890         * modules/javacomp-script (Files): Update.
7891         (configure.ac): Add AC_CONFIG_FILES invocation.
7892         (EXTRA_DIST): Remove variable.
7893
7894         * build-aux/javaexec.sh.in: New file, moved from lib/.
7895         * modules/javaexec (Files): Update.
7896         (configure.ac): Add AC_CONFIG_FILES invocation.
7897         (EXTRA_DIST): Remove javaexec.sh.in.
7898
7899         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
7900         * modules/csharpcomp-script (Files): Update.
7901         (configure.ac): Add AC_CONFIG_FILES invocation.
7902         (EXTRA_DIST): Remove variable.
7903
7904         * build-aux/csharpexec.sh.in: New file, moved from lib/.
7905         * modules/csharpexec (Files): Update.
7906         (configure.ac): Add AC_CONFIG_FILES invocation.
7907         (EXTRA_DIST): Remove csharpexec.sh.in.
7908
7909 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7910
7911         Sync from coreutils.
7912
7913         Add POSIX ACL support
7914         * lib/acl.h (copy_acl, set_acl): Add declarations.
7915         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
7916         systems other than Linux.
7917         (chmod_or_fchmod): New function: use fchmod when possible,
7918         and chmod otherwise.
7919         (file_has_acl): Add a POSIX ACL implementation, with a
7920         Linux-specific subcase.
7921         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
7922         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
7923         acls are unsupported.
7924         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
7925         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
7926         are unsupported.
7927
7928 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7929
7930         Sync from coreutils.
7931         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
7932
7933 2006-01-07  Bruno Haible  <bruno@clisp.org>
7934
7935         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
7936         gl_EARLY.
7937
7938 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7939
7940         * lib/strftime.c (tzname): Don't declare if it is already #defined.
7941         Problem reported for Mingw by Mark Junker.
7942
7943 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7944
7945         * README: Gnulib normally doesn't generate a tarball.
7946
7947 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
7948
7949         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
7950         long int, not int, for nanosecond counts, so that people who are
7951         used to POSIX struct timespec won't be surprised.  Reported by Jim
7952         Meyering.
7953
7954 2005-12-28  Bruno Haible  <bruno@clisp.org>
7955
7956         * build-aux/config.rpath: Update from GNU gettext.
7957
7958 2005-12-16  Jim Meyering  <jim@meyering.net>
7959
7960         * modules/fprintftime: New module.
7961         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
7962
7963 2005-12-16  Jim Meyering  <jim@meyering.net>
7964
7965         * m4/fprintftime.m4: New file.
7966
7967 2005-12-16  Jim Meyering  <jim@meyering.net>
7968
7969         * lib/fprintftime.c, lib/fprintftime.h: New files.
7970
7971 2005-12-15  Simon Josefsson  <jas@extundo.com>
7972
7973         * modules/socklen (configure.ac): Fix M4 macro name, to align with
7974         new m4/socklen.m4.
7975
7976 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7977
7978         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
7979         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
7980
7981 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7982
7983         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
7984         * lib/argp-help.c (fill_in_uparams): Check if the constructed
7985         struct uparams is valid. Fall back to the default values if it is
7986         not.
7987
7988 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7989
7990         * modules/argp (Files): Add argp-pin.c
7991         (Depends-on): dirname
7992         (lib_SOURCES): Add argp-pin.c
7993
7994 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7995
7996         * m4/argp.m4:  Check if program_invocation_name and
7997         program_invocation_short_name are declared and define appropriate
7998         macros if they are not.
7999
8000 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8001
8002         * lib/argp-help.c (__argp_base_name): New function
8003         (__argp_short_program_name): Rewrite using __argp_base_name
8004         * lib/argp-namefrob.h: Define program_invocation_name and
8005         program_invocation_short_name if requested
8006         (__argp_base_name): Add prototype
8007         * lib/argp-parse.c (argp_def): Use gettext wrappers
8008         (argp_default_parser): Use __argp_base_name
8009         * lib/argp-pin.c: New file. Defines program_invocation_name and
8010         program_invocation_short_name on systems that lack them.
8011
8012 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8013
8014         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
8015         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8016         porting problem reported by Georg Schwarz in
8017         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8018
8019 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8020
8021         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
8022         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8023         porting problem reported by Georg Schwarz in
8024         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8025
8026 2005-12-05  Bruno Haible  <bruno@clisp.org>
8027
8028         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
8029         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
8030         Reported by Mark Junker <mjscod@gmx.de>.
8031
8032 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
8033
8034         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
8035         Use implementation from Albert Chin, with some
8036         comments/corrections by Stepan Kasal and myself.
8037
8038 2005-12-02  Bruno Haible  <bruno@clisp.org>
8039
8040         * gnulib-tool (func_import): Accept GPLed build tool modules when
8041         --lgpl is given.
8042         * modules/csharpcomp-script: New file.
8043         * modules/csharpcomp: Depend on it.
8044         * modules/javacomp-script: New file.
8045         * modules/javacomp: Depend on it.
8046         Suggested by Simon Josefsson.
8047
8048 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
8049
8050         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
8051         statement, to work around an HP-UX 10.20 compiler bug reported by
8052         Peter O'Gorman.
8053
8054 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8055
8056         * modules/savedir (Depends-on): Add openat.
8057
8058 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8059
8060         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
8061         (uintmax_t) [defined uintmax_t]: Do not declare.
8062         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
8063         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
8064         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
8065         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
8066         sake of portability to weird hosts that C allows (though we don't
8067         know of any practical examples).
8068
8069         * lib/savedir.h (fdsavedir): New decl.
8070         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
8071         contains most of the former guts of savedir.
8072         (savedir): Use savedirstream.
8073         Include "openat.h".
8074
8075 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
8076
8077         * modules/obstack (Files): Add m4/ulonglong.m4.
8078         Problem reported by Davide Angelocola.
8079
8080 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
8081
8082         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
8083         coreutils no longer futzes with rounding modes.
8084
8085 2005-11-14  Jim Meyering  <jim@meyering.net>
8086
8087         * lib/mkstemp-safer.c: Include <config.h>, required for possible
8088         replacement of mkstemp.
8089
8090 2005-11-10  Simon Josefsson  <jas@extundo.com>
8091
8092         * lib/readline.c: Remove EOL.
8093
8094 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8095
8096         * modules/gethrxtime (Depends-on): Add gettime.
8097
8098 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8099
8100         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
8101         or gettimeofday; no longer needed.
8102
8103 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8104
8105         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
8106         time business.
8107         (gethrxtime) [! (HAVE_NANOUPTIME
8108         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
8109         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
8110         our own approximation.
8111
8112 2005-11-08  Eric Blake  <ebb9@byu.net>
8113
8114         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
8115
8116 2005-11-08  Eric Blake  <ebb9@byu.net>
8117
8118         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
8119
8120 2005-11-04  Bruno Haible  <bruno@clisp.org>
8121
8122         * gnulib-tool: Implement --update mode.
8123
8124 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
8125
8126         Fix porting problem reported by Theodoros V. Kalamatianos.
8127         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
8128         Don't assume that futimes failing means we must fail.
8129
8130 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
8131
8132         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
8133         variables to suggest the intended function of the PATH_MAX check.
8134
8135 2005-10-30  Kean Johnston  <jkj@sco.com>
8136
8137         Trivial changes to support SCO systems.
8138         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
8139         as PATH_MAX.
8140         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
8141         where __ptr is null when no I/O is pending.
8142
8143 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
8144
8145         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
8146         leave errno alone.  Problem reported by Dmitry V. Levin.
8147
8148 2005-10-28  Simon Josefsson  <jas@extundo.com>
8149
8150         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
8151         Test more.
8152
8153         * tests/test-gc-md2.c, tests/test-md2.c: New files.
8154
8155         * modules/md2, modules/md2-tests: New files.
8156
8157 2005-10-28  Simon Josefsson  <jas@extundo.com>
8158
8159         * m4/inet_ntop.m4: More tests.
8160
8161         * m4/gc-md2.m4, md2.m4: New file.
8162
8163 2005-10-28  Simon Josefsson  <jas@extundo.com>
8164
8165         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
8166         "restrict" keywords, as per POSIX.  Protect the function
8167         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
8168         Don't use K&R prototypes.  Check the sprintf return values.
8169         Re-define EAFNOSUPPORT if not present.  Indent.
8170
8171         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
8172         suggested by Bruno Haible <bruno@clisp.org>.
8173
8174         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
8175
8176         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
8177
8178         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
8179         libgcrypt).
8180
8181         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
8182
8183         * lib/md2.h, lib/md2.c: New files.
8184
8185 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
8186
8187         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
8188         errno alone.  Problem reported by Frederic Jolliton.
8189
8190 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
8191
8192         * modules/verify (License): Change from GPL to LGPL.  This is a
8193         tiny module and there are apparently near-equivalents that are
8194         under the BSD license.
8195
8196 2005-10-24  Simon Josefsson  <jas@extundo.com>
8197
8198         * modules/sha1: Relicense to LGPL.
8199
8200 2005-10-24  Simon Josefsson  <jas@extundo.com>
8201
8202         * lib/md4.h: Shrink buffer size, now that we changed the type.
8203
8204 2005-10-23  Simon Josefsson  <jas@extundo.com>
8205
8206         * gnulib-tool (func_import): Fix --tests-base.
8207
8208 2005-10-22  Simon Josefsson  <jas@extundo.com>
8209
8210         * modules/arcfour (Depends-on): Need stdint.
8211
8212 2005-10-22  Simon Josefsson  <jas@extundo.com>
8213
8214         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
8215         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
8216
8217 2005-10-22  Simon Josefsson  <jas@extundo.com>
8218
8219         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
8220         suggested by Bruno Haible <bruno@clisp.org>.
8221
8222 2005-10-22  Simon Josefsson  <jas@extundo.com>
8223
8224         * lib/crc.h: Include stddef.h, for size_t.
8225
8226 2005-10-22  Simon Josefsson  <jas@extundo.com>
8227
8228         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
8229         arcfour_context struct (simplify test vector testing in GNU
8230         Shishi).
8231
8232 2005-10-21  Simon Josefsson  <jas@extundo.com>
8233
8234         * modules/des, modules/des-tests: New files.
8235
8236         * modules/gc-des, modules/gc-des-tests: New files.
8237
8238         * tests/test-des.c, tests/test-gc-des.c: New file.
8239
8240 2005-10-21  Simon Josefsson  <jas@extundo.com>
8241
8242         * modules/arctwo, modules/arctwo-tests: New files.
8243
8244         * tests/test-arctwo.c: New file.
8245
8246         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
8247
8248         * tests/test-gc-arctwo.c: New file.
8249
8250 2005-10-21  Simon Josefsson  <jas@extundo.com>
8251
8252         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
8253         Bruno Haible <bruno@clisp.org>.
8254
8255         * m4/gc-des.m4: New file.
8256
8257 2005-10-21  Simon Josefsson  <jas@extundo.com>
8258
8259         * m4/arctwo.m4: New file.
8260
8261         * m4/gc-arctwo.m4: New file.
8262
8263 2005-10-21  Simon Josefsson  <jas@extundo.com>
8264
8265         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
8266         block.
8267
8268 2005-10-21  Simon Josefsson  <jas@extundo.com>
8269
8270         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
8271         <bruno@clisp.org>.
8272
8273         * lib/hmac-sha1.c (hmac_sha1): Likewise.
8274
8275         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
8276         Bruno Haible <bruno@clisp.org>.
8277
8278         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
8279         <bruno@clisp.org>.
8280
8281 2005-10-21  Simon Josefsson  <jas@extundo.com>
8282
8283         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
8284
8285 2005-10-21  Simon Josefsson  <jas@extundo.com>
8286
8287         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
8288
8289 2005-10-21  Simon Josefsson  <jas@extundo.com>
8290
8291         * lib/des.h, lib/des.c: New files.
8292
8293         * lib/gc-gnulib.c: Support DES.c
8294
8295 2005-10-21  Simon Josefsson  <jas@extundo.com>
8296
8297         * lib/arctwo.h, lib/arctwo.c: New files.
8298
8299         * lib/gc-gnulib.c: Support ARCTWO.
8300
8301 2005-10-21  Simon Josefsson  <jas@extundo.com>
8302
8303         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
8304         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8305
8306 2005-10-21  Simon Josefsson  <jas@extundo.com>
8307
8308         * gnulib-tool (func_import, func_create_testdir): Define automake
8309         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
8310         Makefile.am snippet),
8311         suggested by Bruno Haible <bruno@clisp.org>.
8312
8313         * modules/gc (Makefile.am): Use it.
8314
8315 2005-10-21  Bruno Haible  <bruno@clisp.org>
8316
8317         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
8318         patch.
8319
8320 2005-10-19  Simon Josefsson  <jas@extundo.com>
8321
8322         * tests/test-gc-rijndael.c: New file.
8323
8324         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
8325
8326 2005-10-19  Simon Josefsson  <jas@extundo.com>
8327
8328         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
8329         interface too.
8330
8331 2005-10-19  Simon Josefsson  <jas@extundo.com>
8332
8333         * tests/test-gc-arcfour.c: New file.
8334
8335         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
8336
8337 2005-10-19  Simon Josefsson  <jas@extundo.com>
8338
8339         * modules/gc-md4, modules/gc-md4-tests: New file.
8340
8341         * tests/test-gc-md4.c: New file.
8342
8343 2005-10-19  Simon Josefsson  <jas@extundo.com>
8344
8345         * m4/gc-md4.m4: New file.
8346
8347 2005-10-19  Simon Josefsson  <jas@extundo.com>
8348
8349         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
8350         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
8351         <kasal@ucw.cz>.
8352
8353 2005-10-19  Simon Josefsson  <jas@extundo.com>
8354
8355         * m4/gc-arcfour.m4: New file.
8356
8357         * m4/gc-rijndael.m4: New file.
8358
8359 2005-10-19  Simon Josefsson  <jas@extundo.com>
8360
8361         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
8362
8363 2005-10-19  Simon Josefsson  <jas@extundo.com>
8364
8365         * lib/gc-gnulib.c: Support ARCFOUR.
8366
8367 2005-10-19  Simon Josefsson  <jas@extundo.com>
8368
8369         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
8370         support.
8371
8372         * lib/gc.h: Add ECB enum type.
8373
8374         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
8375
8376 2005-10-18  Simon Josefsson  <jas@extundo.com>
8377
8378         * tests/test-md5.c: New file.
8379
8380         * modules/md5-tests: New file.
8381
8382 2005-10-18  Simon Josefsson  <jas@extundo.com>
8383
8384         * tests/test-md4.c: New file.
8385
8386         * modules/md4, modules/md4-tests: New files.
8387
8388 2005-10-18  Simon Josefsson  <jas@extundo.com>
8389
8390         * m4/md4.m4: New file.
8391
8392 2005-10-18  Simon Josefsson  <jas@extundo.com>
8393
8394         * lib/md4.h, lib/md4.c: New files, based on md5.?.
8395
8396 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
8397
8398         * gnulib-tool (func_create_testdir): Omit the second check whether
8399         BUILT_SOURCES in nonempty.
8400
8401 2005-10-17  Simon Josefsson  <jas@extundo.com>
8402
8403         * tests/test-rijndael.c: New file.
8404
8405 2005-10-17  Simon Josefsson  <jas@extundo.com>
8406
8407         * modules/sha1: Depend on stdint instead of md5.
8408
8409         * modules/md5: Depend on stdint, remove uint32_t.
8410
8411 2005-10-17  Simon Josefsson  <jas@extundo.com>
8412
8413         * modules/gc-sha1-tests: New file.
8414
8415         * tests/test-gc-sha1.c: New file.
8416
8417 2005-10-17  Simon Josefsson  <jas@extundo.com>
8418
8419         * m4/md5.m4: Remove call to uint32_t.m4.
8420
8421 2005-10-17  Simon Josefsson  <jas@extundo.com>
8422
8423         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
8424
8425         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
8426         md5.h.
8427
8428         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
8429
8430         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
8431
8432 2005-10-17  Simon Josefsson  <jas@extundo.com>
8433
8434         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
8435
8436 2005-10-17  Simon Josefsson  <jas@extundo.com>
8437
8438         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
8439
8440 2005-10-17  Simon Josefsson  <jas@extundo.com>
8441
8442         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
8443
8444         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
8445
8446 2005-10-17  Bruno Haible  <bruno@clisp.org>
8447
8448         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
8449         that it can also be used in a test.
8450
8451 2005-10-16  Bruno Haible  <bruno@clisp.org>
8452
8453         * gnulib-tool (func_emit_tests_Makefile_am): Also define
8454         TESTS_ENVIRONMENT, so that individual tests can augment it.
8455
8456         * gnulib-tool (func_create_testdir): Use an intermediate target for
8457         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
8458         macros, like $(ALLOCA_H), which cannot be passed through the command
8459         line.
8460
8461 2005-10-15  Simon Josefsson  <jas@extundo.com>
8462
8463         * modules/rijndael-tests: New file.
8464
8465         * modules/rijndael: New file.
8466
8467 2005-10-15  Simon Josefsson  <jas@extundo.com>
8468
8469         * m4/rijndael.m4: New file.
8470
8471 2005-10-15  Simon Josefsson  <jas@extundo.com>
8472
8473         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
8474
8475         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
8476
8477 2005-10-14  Simon Josefsson  <jas@extundo.com>
8478
8479         * tests/test-arcfour.c: New file.
8480
8481         * modules/arcfour, modules/arcfour-tests: New files.
8482
8483 2005-10-14  Simon Josefsson  <jas@extundo.com>
8484
8485         * m4/arcfour.m4: New file.
8486
8487 2005-10-14  Simon Josefsson  <jas@extundo.com>
8488
8489         * lib/arcfour.h, lib/arcfour.c: New files.
8490
8491 2005-10-14  Roland McGrath  <roland@redhat.com>
8492
8493         Import from libc.  [BZ #1331]
8494         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
8495         macro argument.
8496         Reported by Matej Vela <vela@debian.org>.
8497
8498 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
8499
8500         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
8501         include <wchar.h>; no longer needed.
8502
8503 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
8504
8505         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
8506
8507 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
8508         and  Ulrich Drepper  <drepper@redhat.com>
8509
8510         Import from libc.
8511         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
8512         instead of inline stream orientation test and two separate
8513         function calls.  Pay no attention to USE_IN_LIBIO.
8514
8515 2005-10-13  Simon Josefsson  <jas@extundo.com>
8516
8517         * modules/gc-hmac-md5-tests: New file.
8518
8519         * tests/test-gc-hmac-sha1.c: New file.
8520
8521         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
8522
8523         * modules/gc-hmac-md5-tests: New file.
8524
8525         * tests/test-gc-md5.c: New file.
8526
8527         * modules/gc-md5-tests: New file.
8528
8529 2005-10-13  Simon Josefsson  <jas@extundo.com>
8530
8531         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
8532         Move memory allocation outside of loop.
8533
8534 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
8535
8536         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
8537         intermediate directory is in a read-only file system.  Problem
8538         reported by Eric Blake.
8539
8540 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
8541
8542         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
8543
8544 2005-10-12  Simon Josefsson  <jas@extundo.com>
8545
8546         * tests/test-hmac-sha1.c: New file.
8547
8548         * modules/hmac-sha1-tests: New file.
8549
8550         * modules/hmac-sha1: New file.
8551
8552 2005-10-12  Simon Josefsson  <jas@extundo.com>
8553
8554         * modules/gc-sha1: New file.
8555
8556 2005-10-12  Simon Josefsson  <jas@extundo.com>
8557
8558         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
8559
8560         * tests/test-gc-pbkdf2-sha1.c: New file.
8561
8562 2005-10-12  Simon Josefsson  <jas@extundo.com>
8563
8564         * modules/gc-md5, modules/gc-hmac-md5: New files.
8565
8566         * modules/gc (Files): Remove md5, memxor and hmac files.
8567
8568 2005-10-12  Simon Josefsson  <jas@extundo.com>
8569
8570         * m4/gc-pbkdf2-sha1.m4: New file.
8571
8572         * m4/gc-hmac-sha1.m4: New file.
8573
8574         * m4/gc-sha1: New file.
8575
8576         * m4/hmac-sha1.m4: New file.
8577
8578 2005-10-12  Simon Josefsson  <jas@extundo.com>
8579
8580         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
8581
8582         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
8583
8584 2005-10-12  Simon Josefsson  <jas@extundo.com>
8585
8586         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
8587         suggested by Bruno Haible <bruno@clisp.org>.
8588
8589 2005-10-12  Simon Josefsson  <jas@extundo.com>
8590
8591         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
8592
8593 2005-10-12  Simon Josefsson  <jas@extundo.com>
8594
8595         * lib/gc-pbkdf2-sha1.c: New file.
8596
8597         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
8598
8599 2005-10-12  Simon Josefsson  <jas@extundo.com>
8600
8601         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
8602
8603         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
8604
8605 2005-10-12  Simon Josefsson  <jas@extundo.com>
8606
8607         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
8608         GC_USE_HMAC_MD5, respectively.
8609
8610         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
8611         (gc_md5): Fix typo.
8612
8613         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
8614
8615         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
8616
8617         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
8618
8619 2005-10-12  Bruno Haible  <bruno@clisp.org>
8620
8621         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
8622         Reported by Stepan Kasal <kasal@ucw.cz>.
8623
8624 2005-10-11  Simon Josefsson  <jas@extundo.com>
8625
8626         * tests/test-crc.c: New file.
8627
8628         * modules/crc, modules/crc-tests: New files.
8629
8630 2005-10-11  Simon Josefsson  <jas@extundo.com>
8631
8632         * m4/crc.m4: New file.
8633
8634 2005-10-11  Simon Josefsson  <jas@extundo.com>
8635
8636         * lib/gc.h: Add gc_hash and gc_hash_buffer.
8637
8638         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
8639
8640         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
8641
8642 2005-10-11  Simon Josefsson  <jas@extundo.com>
8643
8644         * lib/crc.h, lib/crc.c: New files.
8645
8646         * lib/gc.h (gc_hash_buffer): Add doc.
8647
8648 2005-10-11  Bruno Haible  <bruno@clisp.org>
8649
8650         * modules/c-strcasestr: New file.
8651         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
8652
8653 2005-10-11  Bruno Haible  <bruno@clisp.org>
8654
8655         * modules/c-strcase: New file.
8656         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
8657
8658 2005-10-11  Bruno Haible  <bruno@clisp.org>
8659
8660         * lib/strcasecmp.c: Include limits.h.
8661         (strcasecmp): Avoid integer overflow on exotic platforms.
8662         * lib/strncasecmp.c: Include limits.h.
8663         (strncasecmp): Avoid integer overflow on exotic platforms.
8664         Reported by Paul Eggert.
8665
8666 2005-10-11  Bruno Haible  <bruno@clisp.org>
8667
8668         * lib/c-strcasestr.h: New file, from GNU gettext.
8669         * lib/c-strcasestr.c: New file, from GNU gettext.
8670
8671 2005-10-11  Bruno Haible  <bruno@clisp.org>
8672
8673         * lib/c-strcase.h: New file, from GNU gettext.
8674         * lib/c-strcasecmp.c: New file, from GNU gettext.
8675         * lib/c-strncasecmp.c: New file, from GNU gettext.
8676
8677 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
8678
8679         * modules/mempcpy (License): GPL -> LGPL.
8680         * modules/strchrnul (License): Likewise.
8681         * modules/sysexits (License): Likewise.
8682
8683 2005-10-08  Simon Josefsson  <jas@extundo.com>
8684
8685         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
8686
8687 2005-10-07  Simon Josefsson  <jas@extundo.com>
8688
8689         * m4/memxor.m4: Remove gl_C_RESTRICT call.
8690
8691 2005-10-06  Simon Josefsson  <jas@extundo.com>
8692
8693         * tests/test-hmac-md5.c: New file.
8694
8695         * modules/hmac-md5-tests: New file.
8696
8697         * modules/hmac-md5: New file.
8698
8699 2005-10-06  Simon Josefsson  <jas@extundo.com>
8700
8701         * m4/hmac-md5.m4: New file.
8702
8703         * m4/memxor.m4: Require gl_C_RESTRICT.
8704
8705 2005-10-06  Simon Josefsson  <jas@extundo.com>
8706
8707         * lib/memxor.c (memxor): Avoid casts and warnings.
8708
8709 2005-10-06  Simon Josefsson  <jas@extundo.com>
8710
8711         * lib/hmac-md5.c: New file.
8712
8713         * lib/hmac.h: New file.
8714
8715 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
8716
8717         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
8718         promotes to int, not unsigned int, to catch the AIX 5.3
8719         compiler bug.
8720
8721 2005-10-05  Simon Josefsson  <jas@extundo.com>
8722
8723         * modules/memxor: New file.
8724
8725         * modules/iconv (Files): Move config.rpath to havelib, it is used
8726         there.
8727
8728         * modules/havelib (Files): Add config.rpath.
8729
8730 2005-10-05  Simon Josefsson  <jas@extundo.com>
8731
8732         * m4/memxor.m4: New file.
8733
8734 2005-10-05  Simon Josefsson  <jas@extundo.com>
8735
8736         * lib/memxor.c (memxor): Fix compiler error.
8737
8738         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
8739         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
8740
8741         * lib/memxor.h, lib/memxor.c: New files.
8742
8743         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
8744         we assume all systems have it, suggested by Jim Meyering
8745         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
8746         any systems lack sys/socket.h; mingw32 is known to lack it, but we
8747         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
8748         same reasons.
8749
8750 2005-10-05  Simon Josefsson  <jas@extundo.com>
8751
8752         * config/srclist.txt: Add glibc bug 1423 for md5.h.
8753
8754 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
8755
8756         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
8757         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
8758         needed, since the source code now assumes these .h files.
8759
8760 2005-10-05  Derek Price  <derek@ximbiot.com>
8761
8762         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
8763
8764 2005-10-05  Bruno Haible  <bruno@clisp.org>
8765
8766         * modules/stdint (License): Change to LGPL.
8767
8768 2005-10-04  Simon Josefsson  <jas@extundo.com>
8769
8770         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
8771         D. Baushke" <mdb@gnu.org>.
8772
8773 2005-10-04  Bruno Haible  <bruno@clisp.org>
8774
8775         * lib/verify.h (verify_true): Provide alternative definition for C++.
8776
8777 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
8778
8779         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
8780         (SSIZE_MAX): New macro, if not already defined.
8781         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
8782         than 2 GiB.
8783
8784 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8785
8786         Sync from coreutils.
8787         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
8788         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
8789         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
8790         ULLONG_MAX doesn't work with 2.7.2.1.
8791
8792 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8793
8794         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
8795         From Ben Pfaff.
8796
8797         * modules/exclude (Depends-on): Depend on verify.
8798         * modules/strtoimax (Depends-on): Likewise.
8799         * modules/utimecmp (Depends-on): Likewise.
8800
8801 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8802
8803         * lib/exclude.c: Include verify.h.
8804         (verify): Remove.  All callers changed to use verify.h's version.
8805         * lib/strtoimax.c: Likewise.
8806         * lib/utimecmp.c: Likewis.e
8807
8808         Sync from coreutils.
8809         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
8810         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
8811         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
8812         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
8813         bother returning ENOSYS if settimeofday or stime fails; just let
8814         them return whatever errno they want to return.
8815         * lib/utimens.c: Include unistd.h, for dup2.
8816         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
8817         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
8818
8819 2005-10-02  Jim Meyering  <jim@meyering.net>
8820
8821         Sync from coreutils.
8822         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
8823         from glibc-2.2.5 that fails for read-only files.
8824
8825 2005-10-02  Jim Meyering  <jim@meyering.net>
8826
8827         Sync from coreutils.
8828         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
8829         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
8830         `#if HAVE_CONFIG_H'.
8831         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
8832         Remove AT_FDCWD test.
8833         Do not consume the fd unless successful.
8834         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
8835         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
8836         block, so that we don't even try to compile it if settimeofday is
8837         available.  This works around a compilation failure on OSF1 V5.1,
8838         due to stime requiring a `long int*' while tv_sec is `int'.
8839
8840 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
8841
8842         Sync from coreutils.
8843         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
8844         against `yes', rather than just testing for nonempty.
8845
8846 2005-10-01  Simon Josefsson  <jas@extundo.com>
8847
8848         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
8849         and Darwin.
8850
8851         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
8852         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
8853         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
8854         freeaddrinfo and gai_strerror are declared by the POSIX headers.
8855         Check if struct addrinfo is declared.
8856
8857 2005-10-01  Simon Josefsson  <jas@extundo.com>
8858
8859         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
8860         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
8861         AI_* and EAI_* definitions.  Protect function declarations.
8862
8863 2005-10-01  Jim Meyering  <jim@meyering.net>
8864
8865         Sync from coreutils.
8866
8867         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
8868         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
8869         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
8870         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8871         in the inet and nsl libraries.  Required on Solaris 5.7.
8872
8873 2005-10-01  Jim Meyering  <jim@meyering.net>
8874
8875         Sync from coreutils.
8876         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8877         in the inet and nsl libraries.  Required on Solaris 5.7.
8878
8879 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
8880
8881         * lib/getdelim.c (getdelim): Remove unused variables.
8882
8883 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
8884
8885         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
8886         so that the code works even with ancient cpp.  Portability problem
8887         with GCC 2.7.2.1 reported by Thomas M.Ott.
8888
8889 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
8890
8891         * modules/regex (Depends-on): Add strcase.
8892
8893         * modules/gethostname (Licence): Change from GPL to LGPL, since
8894         gethostname.c is a trivial implementation of a standard library
8895         function.
8896         * modules/poll (License): Change from GPL to LGPL, since it's
8897         derived from LGPL code.
8898
8899 2005-09-27  Jim Meyering  <jim@meyering.net>
8900
8901         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
8902         HAVE_CONFIG_H.
8903
8904         * lib/intprops.h (signed_type_or_expr__): Define.
8905         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
8906         for unsigned types.
8907
8908 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
8909
8910         * lib/verify.h (verify_expr): Remove, replacing with:
8911         (verify_true): New macro that returns true instead of void.
8912         (verify_type__): Remove.
8913         (verify): Use verify_true rather than verify_type__.
8914
8915 2005-09-26  Bruno Haible  <bruno@clisp.org>
8916
8917         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
8918         is necessary.
8919         (lib_SOURCES): Remove mbchar.c.
8920         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
8921         (Files): Add m4/mbrtowc.m4.
8922         * modules/mbiter: Likewise.
8923         * modules/mbuiter: Likewise.
8924
8925 2005-09-26  Bruno Haible  <bruno@clisp.org>
8926
8927         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
8928         compile mbchar.c if they are not both present.
8929         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
8930         * m4/mbiter.m4 (gl_MBITER): Likewise.
8931         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
8932         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
8933         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
8934
8935 2005-09-25  Jim Meyering  <jim@meyering.net>
8936
8937         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
8938         also uses socklen_t.
8939
8940 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
8941
8942         * lib/utimens.c (ENOSYS): Define if not already defined.
8943         (futimens): Support having a null PATH if the file descriptor
8944         is nonnegative.
8945
8946         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
8947         Remove.
8948         (__attribute): Define to empty unless GCC 3.1 or later.
8949         This works around a core dump on OpenBSD 3.4, which has GCC
8950         2.95.3, which dumps core when given __attribute__(()).  It also
8951         simplifies other tests, since we really don't want to bother with
8952         worrying about which ancient version of GCC supported what.
8953         Original problem reported by Yoann Vandoorselaere, with part of
8954         the fix suggested by Derek Price.
8955
8956 2005-09-24  Jim Meyering  <jim@meyering.net>
8957
8958         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
8959         so we can once again use a positive bitfield width of 1 -- now we
8960         don't have to explain why we were using a bitfield width of 2.
8961
8962 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8963
8964         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
8965         and similarly for the other external symbols.  Problem reported
8966         by James Gallager.
8967
8968         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
8969         bug reported by Jim Meyering.
8970
8971         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
8972         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
8973         not needed, since socklen is a prerequisite module.
8974
8975 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8976
8977         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
8978         Problem reported by Eric Blake.
8979         (getaddrinfo): Initialize se so that it's not garbage.
8980         Redo internal storage allocation so that it doesn't make unportable
8981         assumptions about alignment.
8982         Fix a memory leak.
8983
8984         * lib/utimens.c (futimens): Use futimesat if available.
8985         Prefer it to futimes since it doesn't have the futimes bug.
8986
8987         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
8988         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
8989         Instead, declare a function that returns a pointer to an array,
8990         and use verify_type__ to declare the size of the array.
8991         Problem and germ of a solution reported by Bruno Haible.
8992         (verify_type__): Use 2, not 1, for bitfield size, to avoid
8993         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
8994
8995 2005-09-23  Jim Meyering  <jim@meyering.net>
8996
8997         Sync from coreutils.
8998         Correct build failure (socklen_t not defined) on at least
8999         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
9000         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
9001
9002 2005-09-23  Jim Meyering  <jim@meyering.net>
9003
9004         * modules/getaddrinfo (Depends-on): Add socklen.
9005
9006 2005-09-23  Bruno Haible  <bruno@clisp.org>
9007
9008         * tests/test-verify.c: New file.
9009
9010 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9011
9012         Sync from coreutils.
9013
9014         * modules/argmatch (Depends-on): Add verify.
9015         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
9016         unistd-safer.
9017         * modules/save-cwd (Depends-on): Likewise.
9018
9019         * modules/openat (Files): Add lib/openat-die.c.
9020         (Depends-on): Remove error, exitfail.
9021         Add dirname.
9022
9023         * modules/verify: New file.
9024         * MODULES.html.sh (Diagnostics <assert.h>): New section,
9025         with "verify" module.
9026
9027 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9028
9029         Sync from coreutils.
9030
9031         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
9032         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
9033         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
9034         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
9035         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
9036         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
9037         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
9038         Don't bother checking for string.h, stdlib.h, unistd.h.
9039         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
9040         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
9041         module's job.
9042         * m4/jm-macros.m4 (gl_MACROS): Likewise.
9043         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
9044
9045         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
9046         (gl_GETDATE): Use it.
9047
9048         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
9049
9050 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9051
9052         Sync from coreutils.
9053
9054         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
9055         stat-time.h.
9056         * lib/argmatch.h: Include verify.h
9057         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
9058         (ARGMATCH_ASSERT): Remove; unused.
9059         * lib/canonicalize.c: Assume STDC_HEADERS.
9060         * lib/exclude.c: Include "strcase.h".
9061         * lib/regex_internal.h [!defined _LIBC]: Likewise.
9062         * lib/getusershell.c: Include stdio--.h rather than stdio.h
9063         and stdio-safer.h.
9064         (getusershell): Call fopen, not fopen_safer.
9065         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
9066         Do not include unistd-safer.h.
9067         (save_cwd): Don't call fd_safer; no longer needed
9068         now that we include fcntl--.h.
9069
9070         * lib/getdate.y (relative_time): New type.
9071         (RELATIVE_TIME_0): New constant.
9072         (parser_control): Use relative_time instead of doing it ourselves.
9073         (%union): Add new relative_time rel member.
9074         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
9075         Now typeless.
9076         (relunit, relunit_snumber): Now of type rel.
9077         (zone, rel, relunit, get_date): Adjust to above changes.
9078
9079         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
9080         Do not include unistd-safer.h.
9081         (getloadavg): Don't call fd_safer; no longer needed
9082         now that we include fcntl--.h.
9083
9084         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
9085         (make_dir_parents): Treat ENOSYS like EEXIST.
9086
9087         Improve quality of diagnostics on restore_cwd failure.
9088         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
9089         (make_dir_parents): Last arg is now int * (for errno), not bool *.
9090         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
9091         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
9092         each time through the loop.  Do not diagnose restore_cwd failure;
9093         that is the caller's job (and perhaps the caller does not care).
9094
9095         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
9096         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
9097         If the file already exists but is not a directory, don't bother
9098         to try to make its parents.
9099         Close potential file descriptor leak if we can't chdir("/") (!).
9100         Don't always return true if chdir($PWD) fails; return true only
9101         if the requested action was done successfully (except for the
9102         chdir($PWD)).
9103         Don't log final directory unless we actually made it.
9104         Refactor to avoid duplicate code to fix up permissions.
9105         Don't attempt to fix up parent permissions if chdir($PWD) fails.
9106
9107         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
9108         to make it a bit faster and (I hope) clearer.
9109         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
9110         Fix bug in formats like %2N.
9111
9112         * lib/verify.h: New file.
9113
9114 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9115
9116         Sync from coreutils.
9117         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
9118
9119 2005-09-22  Jim Meyering  <jim@meyering.net>
9120
9121         Sync from coreutils.
9122
9123         * m4/lstat.m4 (gl_FUNC_LSTAT):
9124         Use AC_LIBSOURCES to require lstat.c and lstat.h.
9125         Remove obsolete comment.
9126         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
9127         * m4/xstrtod.m4: Likewise.
9128
9129         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
9130
9131 2005-09-22  Jim Meyering  <jim@meyering.net>
9132
9133         Sync from coreutils.
9134
9135         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
9136
9137         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
9138         the .tm_year member, since otherwise gcc-4.0 would now warn about
9139         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
9140
9141         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
9142         order to avoid an unsuppressible warning from gcc on 64-bit systems.
9143
9144         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
9145         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
9146         when run in a time zone for which daylight savings time is in effect
9147         for the starting date.
9148
9149         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
9150         stop us from restricting permissions of just-created absolute-named
9151         directories.
9152         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
9153         to restore initial working directory.
9154         * lib/mkdir-p.c (make_dir_parents): New parameter:
9155         different_working_dir, to tell caller if/when we change the working
9156         directory and are unable to return to the initial one.
9157         * lib/mkdir-p.h (make_dir_parents): Update prototype.
9158         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
9159         `return false'.  This fixes a bug introduced on 2004-07-30.
9160
9161         * lib/openat.c (fdopendir): Be sure to close the supplied
9162         file descriptor before returning.  This makes our replacement
9163         implementation a little closer to Solaris's, where fdopendir
9164         ties the file descriptor to the returned DIR* pointer.
9165         * lib/openat.c (unlinkat): New function.
9166         * lib/openat.h (unlinkat): Add prototype.
9167         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
9168         (openat_restore_fail): Rename from openat_restore_die.
9169         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
9170
9171         Provide an alternative to exiting immediately upon save_cwd or
9172         restore_cwd failure.  Now, an application can arrange e.g.,
9173         to perform a longjump in that case.
9174         * lib/openat.c: Include dirname.h.
9175         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
9176         (rpl_openat, fdopendir, fstatat): Call openat_save_die
9177         and openat_restore_die rather than calling error directly.
9178         Don't include "error.h" or "exitfail.h"; they're no longer needed.
9179
9180         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
9181         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
9182         define.
9183
9184         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
9185         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
9186                             int utc, int nanoseconds);
9187         Background:
9188         date should not have to allocate a megabyte of virtual memory to
9189         handle a format argument like +%1048575T.  When implemented with
9190         strftime, it must allocate such a buffer, use strftime to fill it
9191         in, print it, then free it.
9192         With fprintftime, it simply prints everything and exits.
9193         With no need for memory allocation, that's one fewer way to fail.
9194         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
9195         optional field width, not before, so we accept %9:z, not %:9z.
9196         (my_strftime): Be sure to use L_('x') for literals.
9197
9198         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
9199         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
9200         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
9201         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
9202         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
9203         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
9204         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
9205         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
9206         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
9207         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
9208         * lib/xgethostname.c, lib/xreadlink.c:
9209         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
9210
9211         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
9212         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
9213         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
9214         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
9215         and don't include <sys/file.h>).
9216
9217 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
9218
9219         Sync from coreutils.
9220
9221         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
9222         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
9223         [!LDAV_DONE]: Avoid unused variable warning.
9224
9225 2005-09-21  Bruno Haible  <bruno@clisp.org>
9226
9227         * lib/unicodeio.h (unicode_to_mb): New declaration.
9228
9229 2005-09-20  Derek Price  <derek@ximbiot.com>
9230
9231         * lib/getaddrinfo.c: Don't include <netdb.h> included from
9232         getaddrinfo.h.
9233
9234 2005-09-20  Bruno Haible  <bruno@clisp.org>
9235
9236         * gnulib-tool: Remove trailing slashes from the values specified for
9237         --source-base, --m4-base, --tests-base, --aux-dir.
9238         Suggested by Simon Josefsson <jas@extundo.com>.
9239
9240 2005-09-20  Bruno Haible  <bruno@clisp.org>
9241
9242         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
9243         func_modules_to_filelist, func_import, func_create_testdir): Make all
9244         sorting results locale-independent, so that gnulib-cache.m4 doesn't
9245         change when gnulib-tool is invoked in a different locale.
9246
9247 2005-09-19  Simon Josefsson  <jas@extundo.com>
9248
9249         * m4/socklen.m4: Fix typo.
9250
9251 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9252
9253         Use a consistent style for including <config.h>.
9254         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
9255         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
9256         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
9257         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
9258         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
9259         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
9260         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
9261         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
9262         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
9263         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
9264         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
9265         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
9266         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
9267         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
9268         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
9269         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
9270         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
9271         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
9272         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
9273         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
9274         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
9275         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
9276         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
9277         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
9278         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
9279         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
9280         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
9281         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
9282         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
9283         lib/xstrtoumax.c, lib/yesno.c:
9284         Standardize inclusion of config.h.
9285         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
9286         lib/inttostr.h:  Removed inclusion of config.h from header files.
9287         * lib/inttostr.c:  Adjusted in-tree users.
9288         * lib/timespec.h: Remove superfluous warning to include config.h.
9289         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
9290         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
9291         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
9292         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
9293         config.h with HAVE_CONFIG_H.
9294
9295 2005-09-19  Jim Meyering  <jim@meyering.net>
9296
9297         * modules/pathmax (License): Change to LGPL.
9298
9299 2005-09-19  Derek Price  <derek@ximbiot.com>
9300
9301         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
9302
9303 2005-09-19  Bruno Haible  <bruno@clisp.org>
9304
9305         * gnulib-tool (import): Provide default for --tests-base.
9306
9307 2005-09-19  Bruno Haible  <bruno@clisp.org>
9308
9309         * doc/quote.texi: New file, extracted from gnulib.texi.
9310         * doc/ctime.texi: New file, extracted from gnulib.texi.
9311         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
9312         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
9313         * doc/gnulib.texi: Include them.
9314
9315 2005-09-18  Bruno Haible  <bruno@clisp.org>
9316
9317         Portability fix.
9318         * gnulib-tool (func_readlink): New function.
9319         (func_ln_if_changed): Use it.
9320
9321 2005-09-18  Bruno Haible  <bruno@clisp.org>
9322
9323         * gnulib-tool: Support --with-tests also with --import.
9324         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
9325         (func_import): Use variables $testsbase and $inctests. Emit a
9326         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
9327         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
9328         SUBDIRS += $testsdir.
9329         (func_create_testdir): Update.
9330
9331 2005-09-18  Bruno Haible  <bruno@clisp.org>
9332
9333         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
9334         instead of $dry_run.
9335         (func_cp_if_changed, func_mv_if_changed): Remove functions.
9336         (func_ln_if_changed): Don't handle dry-run here.
9337         (func_import): In dry-run mode, detect more precisely which actions
9338         would be performed, and don't use "...ing" verbs.
9339
9340 2005-09-18  Bruno Haible  <bruno@clisp.org>
9341
9342         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
9343         (func_import): Use join on two temporary files instead of three nested
9344         loops, in order to determine which files are new or old.
9345
9346 2005-09-18  Bruno Haible  <bruno@clisp.org>
9347
9348         * gnulib-tool (func_import): Comment out code that spits out the
9349         new files with --dry-run.
9350
9351 2005-09-18  Bruno Haible  <bruno@clisp.org>
9352
9353         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
9354
9355 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9356
9357         * lib/stat-time.h: New file.
9358         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
9359         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
9360         in a different way.
9361         (timespec_cmp): New function.
9362         * lib/utimecmp.c: Include stat-time.h.
9363         (SYSCALL_RESOLUTION): Depend on whether various struct stat
9364         members exist, not on the obsolescent ST_MTIM_NSEC.
9365         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
9366
9367 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9368
9369         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
9370
9371 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9372
9373         * MODULES.html.sh (File system functions): Add stat-time.
9374         * modules/stat-time: New file.
9375         * modules/timespec (Files): Remove m4/st_mtim.m4; this
9376         is now done in a different way, by the stat-time module.
9377         * modules/utimecmp (Depends-on): Add stat-time.
9378
9379 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
9380
9381         * m4/st_mtim.m4: Remove.  Superseded by...
9382         * m4/stat-time.m4: New file.
9383         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
9384         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
9385
9386 2005-09-15  Derek Price  <derek@ximbiot.com>
9387
9388         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
9389
9390 2005-09-15  Derek Price  <derek@ximbiot.com>
9391
9392         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
9393         * lib/regex_internal.c: Ditto, using this...
9394         (__GNUC_PREREQ): ...new macro.
9395         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
9396         using...
9397         (__GNUC_PREREQ): ...this new macro.
9398
9399         * lib/strstr.h: Include string.h. Define strstr as a macro here.
9400
9401 2005-09-15  Derek Price  <derek@ximbiot.com>
9402             Paul Eggert  <eggert@cs.ucla.edu>
9403
9404         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
9405         changes, consolidating in...
9406         * lib/regex_internal.h: ...this file.
9407
9408 2005-09-13  Jim Meyering  <jim@meyering.net>
9409
9410         * lib/canon-host.c: Filter through gnu indent and reword comments
9411         slightly.
9412         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
9413
9414 2005-09-13  Derek Price  <derek@ximbiot.com>
9415
9416         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
9417         failure.
9418         Reported by Jim Meyering  <jim@meyering.net>.
9419
9420 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9421
9422         * lib/base64.c: Typo.
9423         (base64_encode): Put b64str in initialized data section.
9424
9425 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
9426
9427         Merge glibc and coreutils changes into gnulib, plus a few
9428         extra fixes.
9429         * lib/md5.c: Use #error rather than a string.
9430         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
9431         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
9432         (__attribute__): Define to empty for non recent-GCC.
9433         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
9434         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
9435         Renamed from their non-__ counterparts, with new macros replacing
9436         them if not _LIBC.  Add __THROW attribute.
9437         (rol): Remove.
9438         (struct md5_ctx): Align buffer if using GCC.
9439         * lib/sha1.h (struct sha1_ctx): Likewise.
9440         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
9441         The old name was backwards.
9442         (NOTSWAP): Remove; not used.
9443         (rol): New macro, moved here from md5.h.
9444         (sha1_process_block): Remove a FIXME that doesn't make sense.
9445
9446 2005-09-12  Derek Price  <derek@ximbiot.com>
9447
9448         Return usable errors from canon-host.
9449         * lib/canon-host.h: New file.
9450         * lib/canon-host.c (canon_host): Wrap...
9451         (canon_host_r): ...this new function, which now relies exclusively on
9452         getaddrinfo.
9453         (ch_strerror): New function.
9454         (last_cherror): New global.
9455         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
9456         interface.
9457         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
9458         void *.
9459         (freeaddrinfo): Free ai->ai_canonname when set.
9460
9461 2005-09-12  Derek Price  <derek@ximbiot.com>
9462
9463         Make canon-host require getaddrinfo.
9464         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
9465         AC_LIBSOURCE canon-host.h.  Call...
9466         (gl_PREREQ_CANON_HOST): ...this new function, which requires
9467         gl_GETADDRINFO.
9468         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
9469
9470 2005-09-12  Derek Price  <derek@ximbiot.com>
9471
9472         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
9473         LGPL.
9474         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
9475
9476 2005-09-12  Derek Price  <derek@ximbiot.com>
9477
9478         * lib/gai_strerror.c: Include config.h when available.  Include
9479         getaddrinfo.h before other headers to test interface.
9480         Reported by Larry Jones <lawrence.jones@ugs.com>.
9481
9482 2005-09-12  Derek Price  <derek@ximbiot.com>
9483             Paul Eggert  <eggert@cs.ucla.edu>
9484
9485         * modules/glob (Files): Add glob-libc.h.
9486
9487 2005-09-12  Derek Price  <derek@ximbiot.com>
9488             Paul Eggert  <eggert@cs.ucla.edu>
9489
9490         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
9491         glob_.h, glob-libc.h.
9492         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
9493
9494 2005-09-12  Derek Price  <derek@ximbiot.com>
9495             Paul Eggert  <eggert@cs.ucla.edu>
9496
9497         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
9498         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
9499         protecting things that should be done only in gnulib contexts.
9500         * lib/glob_.h: New file, containing only the glob things needed for
9501         gnulib.
9502         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
9503         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
9504         (glob, globfree, glob_pattern_p): Now defined simply in terms of
9505         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
9506         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
9507         and to respect the namespace rules better.
9508
9509 2005-09-08  Simon Josefsson  <jas@extundo.com>
9510
9511         * modules/socklen: New file.
9512
9513 2005-09-08  Simon Josefsson  <jas@extundo.com>
9514
9515         * m4/socklen.m4: New file.
9516
9517 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9518
9519         * modules/utimens (Files): Add m4/utimbuf.m4, since
9520         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
9521         Reported by Sergey Poznyakoff.
9522
9523 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9524
9525         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
9526         definitions, since that's the preferred style in glibc.
9527         Fix a minor spacing issue, and update copyright notice to match
9528         glibc's.
9529
9530 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9531
9532         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
9533
9534 2005-09-06  Simon Josefsson  <jas@extundo.com>
9535
9536         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
9537         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
9538
9539 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9540
9541         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
9542         warning.
9543
9544 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9545
9546         * config/srclist.txt: Add glibc bug 1302.
9547
9548 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
9549
9550         Change bitset word type from unsigned int to unsigned long int,
9551         as this has better performance on typical 64-bit hosts.
9552         Port bitset code to hosts with unusual word sizes.
9553         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
9554         (build_collating_symbol):
9555         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
9556         argument is a bitset.  This is merely a style issue, but it makes
9557         it clearer that an entire array is expected.
9558         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
9559         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
9560         Port to the case where bitset_word is not the same as unsigned int.
9561         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
9562         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
9563         Likewise.
9564         * lib/regexec.c (check_dst_limits_calc_pos_1,
9565         check_subexp_matching_top):
9566         (build_trtable, group_nodes_into_DFAstates):
9567         Likewise.
9568         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
9569         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
9570         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
9571         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
9572         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
9573         * lib/regcomp.c (optimize_subexps, lower_subexp):
9574         Work even if bitset_word has holes in its bitwise representation.
9575         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
9576         * lib/regexec.c (check_dst_limits_calc_pos_1,
9577         check_subexp_matching_top):
9578         Likewise.
9579         * lib/regex_internal.c (re_string_reconstruct):
9580         Don't assume UCHAR_MAX == 255.
9581         * lib/regex_internal.h (bitset_set_all): Likewise.
9582         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
9583         All uses changed.
9584         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
9585         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
9586         All uses changed.
9587         (BITSET_WORD_MAX): New macro.
9588         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
9589         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
9590         (bitset_empty, bitset_copy):
9591         Prefer sizeof (bitset) to multiplying it out ourselves.
9592         (bitset_not_merge): Remove; unused.
9593         (bitset_contain): Return bool, not unsigned int with one bit on.
9594         All callers changed.
9595         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
9596         alignment than re_node_set; do this by defining a new internal
9597         type struct dests_alloc and using it to allocate memory.
9598
9599 2005-09-05  Bruno Haible  <bruno@clisp.org>
9600
9601         * gnulib-tool (func_import): Fix comparison in handling of symbolic
9602         links.
9603
9604 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
9605
9606         * modules/size_max (Makefile.am): Add size_max.h
9607
9608 2005-09-04  Derek Price  <derek@ximbiot.com>
9609
9610         * gnulib-tool (func_import): Fix reversed $symbolic logic.
9611
9612 2005-09-03  Simon Josefsson  <jas@extundo.com>
9613
9614         * gnulib-tool: Fix typo.
9615
9616 2005-09-03  Simon Josefsson  <jas@extundo.com>
9617
9618         * config/srclist.txt: Add glibc bug 1293.
9619
9620 2005-09-03  Derek Price  <derek@ximbiot.com>
9621
9622         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
9623         From Larry Jones <lawrence.jones@ugs.com>.
9624
9625 2005-09-02  Simon Josefsson  <jas@extundo.com>
9626
9627         * modules/socklen: New file.
9628
9629 2005-09-02  Simon Josefsson  <jas@extundo.com>
9630
9631         * modules/havelib: New module.
9632
9633         * modules/gettext, modules/iconv, modules/lock, modules/readline:
9634         Use havelib.
9635
9636 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
9637
9638         Check for arithmetic overflow when calculating sizes, to prevent
9639         some buffer-overflow issues.  These patches are conservative, in the
9640         sense that when I couldn't determine whether an overflow was possible,
9641         I inserted a run-time check.
9642         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
9643         macros.
9644         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
9645         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
9646         (re_xnrealloc, re_x2nrealloc): New inline functions.
9647         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
9648         parse_bracket_exp):
9649         (build_equiv_class, build_charclass): Check for arithmetic overflow
9650         in size expression calculations.
9651         * lib/regex_internal.c (re_string_realloc_buffers):
9652         (build_wcs_upper_buffer, re_node_set_add_intersect):
9653         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
9654         (re_dfa_add_node, register_state): Likewise.
9655         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
9656         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
9657         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
9658         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
9659
9660 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
9661
9662         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
9663         m4/ulonglong.m4.  Problem reported by Martin Lambers.
9664
9665 2005-09-02  Bruno Haible  <bruno@clisp.org>
9666
9667         Support for lib vs. lib64 distinction on biarch platforms.
9668         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
9669         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
9670         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
9671
9672 2005-09-02  Bruno Haible  <bruno@clisp.org>
9673
9674         * gnulib-tool (import): In the other first-use case, provide defaults
9675         as well.
9676
9677 2005-09-02  Bruno Haible  <bruno@clisp.org>
9678
9679         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
9680         patches not yet found in the latest gettext release.
9681
9682 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9683
9684         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
9685         to avoid a collision with bits/local_lim.h in glibc.
9686         All uses changed.  Problem reported by Dmitry V. Levin in
9687         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
9688
9689         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
9690         bugs in int versus size_t comparisons.
9691         (re_string_context_at): Fix bug where the code assumed that
9692         Idx is signed.
9693
9694         Use bool where appropriate.
9695         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
9696         All callers changed.
9697         (calc_eclosure_iter): Likewise, for ROOT arg.
9698         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
9699         (build_charclass_op): Likewise, for NON_MATCH arg.
9700         * lib/regex_internal.c (re_string_allocate, re_string_construct):
9701         (re_string_construct_common): Likewise, for ICASE arg.
9702         * lib/regexec.c (re_search_2_stub, re_search_stub):
9703         Likewise, for RET_LEN arg.
9704         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
9705         (set_regs): Likewise, for FL_BACKTRACK arg.
9706         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
9707         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
9708         (calc_eclosure_iter, parse_bracket_exp):
9709         Use bool for internal variables that are booleans.
9710         * lib/regexec.c (re_search_internal, check_matching,
9711         proceed_next_node):
9712         (set_regs, build_sifted_states, sift_states_bkref):
9713         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
9714         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
9715         (find_collation_sequence_value):
9716         Likewise.
9717         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
9718         (re_node_set_compare):
9719         Return bool, not int. All callers changed.
9720         * lib/regexec.c (check_halt_node_context, check_dst_limits):
9721         (build_trtable, check_node_accept): Likewise.
9722         * lib/regex_internal.h: Include stdbool.h.
9723
9724         Fix bugs uncovered when converting to bool.
9725         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
9726         failure instead of charging ahead blindly.
9727         * lib/regex_internal.c (register_state): Likewise.
9728         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
9729         for freeing internal storage.
9730         (group_nodes_into_DFA_states): Use unsigned int, not int, for
9731         bitset pieces used as boolean, to avoid undefined behavior
9732         on hosts that do int overflow checking.
9733
9734 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9735
9736         * config/srclist.txt: Add glibc bugs 1285-1287.
9737
9738 2005-09-01  Jim Meyering  <jim@meyering.net>
9739
9740         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
9741         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
9742         Require gl_STAT_MACROS, too.
9743
9744 2005-09-01  Bruno Haible  <bruno@clisp.org>
9745
9746         * gnulib-tool (import): In the first-use case, provide defaults.
9747
9748 2005-09-01  Bruno Haible  <bruno@clisp.org>
9749
9750         * gnulib-tool (func_import): Remove the .tmp files.
9751
9752 2005-09-01  Bruno Haible  <bruno@clisp.org>
9753
9754         * gnulib-tool (func_import): Fix handling of symbolic links.
9755
9756 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9757
9758         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
9759         old glibc regex code mishandles strings longer than 2**31 bytes.
9760         This patch fixes this when the regex code is used in gnulib
9761         (i.e., outside glibc).
9762
9763         This patch should not affect the use of the regex code inside
9764         glibc.  No doubt this problem also needs to be handled for glibc
9765         as well, but the result will be an incompatible change to the
9766         glibc ABI, and the old ABI will have to be supported too.  That
9767         can be the the subject for another patch.
9768
9769         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
9770         governing whether the rest of this patch is active.  By default,
9771         the macro is disabled and the patch has no effect.
9772         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
9773         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
9774         (struct re_pattern_buffer, re_search, re_search_2, re_match):
9775         (re_match_2, re_set_registers): Use the new types.
9776         * lib/regex_internal.h (Idx, re_hashval_t): New types.
9777         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
9778         New macros.
9779         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
9780         (re_string_context_at, bin_tree_t, re_dfastate_t):
9781         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
9782         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
9783         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
9784         (re_string_char_size_at, re_string_wchar_at):
9785         (re_string_elem_size_at):
9786         Use the new types and macros to port to 64-bit hosts.
9787         Use unsigned types for internal values, so that the code
9788         mostly works even for arrays larger than SSIZE_MAX.
9789         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
9790         (search_duplicated_node, calc_eclosure_iter, fetch_number):
9791         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
9792         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
9793         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
9794         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
9795         (calc_inveclosure, parse_dup_op, build_range_exp):
9796         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
9797         (fetch_number, create_token_tree, mark_opt_subexp):
9798         Likewise.
9799         * lib/regex_internal.c (re_string_construct_common,
9800         create_ci_newstate):
9801         (create_cd_newstate, re_string_allocate, re_string_construct):
9802         (re_string_realloc_buffers, build_wcs_upper_buffer):
9803         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
9804         (re_string_reconstruct, re_string_peek_byte_case):
9805         (re_string_fetch_byte_case, re_string_context_at):
9806         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
9807         (re_node_set_init_copy, re_node_set_add_intersect):
9808         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
9809         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
9810         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
9811         (re_acquire_state, re_acquire_state_context, register_state):
9812         Likewise.
9813         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
9814         search_cur_bkref_entry):
9815         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
9816         (re_search_internal, re_search_2_stub, re_search_stub)
9817         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
9818         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
9819         (update_cur_sifted_state, check_dst_limits):
9820         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
9821         (check_subexp_limits, sift_states_bkref, merge_state_array):
9822         (check_subexp_matching_top, get_subexp, get_subexp_sub):
9823         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
9824         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
9825         (expand_bkref_cache, check_node_accept_bytes):
9826         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
9827         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
9828         (acquire_init_state_context, check_halt_node_context):
9829         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
9830         (sift_states_backward, clean_state_log_if_needed):
9831         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
9832         (find_recover_state, transit_state_sb, transit_state_mb):
9833         (transit_state_bkref, build_trtable, match_ctx_clean):
9834         Likewise.
9835         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
9836         to work around an assumption that REG_MISSING is negative.
9837
9838         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
9839         (seek_collating_symbol_entry) [defined _LIBC]:
9840         (lookup_collation_sequence_value) [defined _LIBC]:
9841         (build_range_exp, build_collating_symbol) [defined _LIBC]:
9842         Use prototypes rather than old-style function definitions.
9843         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
9844         (transit_state_sb) [0]:
9845         (find_collation_sequence_value) [defined _LIBC]: Likewise.
9846
9847         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
9848         rm_eo.
9849
9850         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
9851         (optimize_subexps, lower_subexp):
9852         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
9853         since the signed shift might overflow.  Use 1u<<31 instead.
9854         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
9855         Likewise.
9856         * lib/regexec.c (check_dst_limits_calc_pos_1,
9857         check_subexp_matching_top): Likewise.
9858
9859         * lib/regcomp.c (optimize_subexps, lower_subexp):
9860         Use CHAR_BIT rather than 8, for clarity.
9861         * lib/regexec.c (check_dst_limits_calc_pos_1):
9862         (check_subexp_matching_top): Likewise.
9863         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
9864         have to worry about portability issues when shifting it left.
9865         Remove no-longer-needed test for table_size > 0.
9866         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
9867         in a word, as the resulting behavior is undefined.
9868         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
9869         in one case, a <= should have been an <, and in another case the
9870         whole test was missing.
9871         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
9872         the standard name CHAR_BIT.
9873         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
9874         this is not true on one's complement and signed-magnitude hosts.
9875
9876         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
9877         next_last_offset.
9878         (struct re_dfa_t): Remove unused member states_alloc.
9879         * lib/regcomp.c (init_dfa): Don't initialize unused members.
9880
9881 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9882
9883         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
9884         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
9885         and large-file glibc and in 32-bit large-file Solaris.
9886
9887 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9888
9889         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
9890         lengths fit in regoff_t; this isn't true if regoff_t is the same
9891         width as size_t.
9892         * lib/regex.c (re_search_internal): 5th arg is LAST_START
9893         (= START + RANGE) instead of RANGE.  This avoids overflow
9894         problems when regoff_t is the same width as size_t.
9895         All callers changed.
9896         (re_search_2_stub): Check for overflow when adding the
9897         sizes of the two strings.
9898         (re_search_stub): Check for overflow when adding START
9899         to RANGE; if it occurs, substitute the extreme value.
9900
9901 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9902
9903         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
9904
9905 2005-08-31  Jim Meyering  <jim@meyering.net>
9906
9907         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
9908         a pointer-to-const.
9909         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
9910         (register_state): Likewise.
9911         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
9912         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
9913         (group_nodes_into_DFAstates): Likewise.
9914
9915 2005-08-31  Jim Meyering  <jim@meyering.net>
9916
9917         * check-module: Add a FIXME comment.
9918
9919 2005-08-31  Eric Blake  <ebb9@byu.net>
9920
9921         * modules/unistd-safer (Files): Add unistd--.h.
9922         * modules/stdio-safer (Files): Add stdio--.h.
9923
9924 2005-08-31  Derek Price  <derek@ximbiot.com>
9925
9926         * lib/getdelim.c (getdelim): Return EOF on EOF.
9927         Reported by Larry Jones <lawrence.jones@ugs.com>.
9928
9929 2005-08-31  Bruno Haible  <bruno@clisp.org>
9930
9931         Avoid unnecessary diffs in the generated lib/Makefile.am.
9932         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
9933         the generated files.
9934         (func_import): Don't set cmd.
9935
9936 2005-08-31  Bruno Haible  <bruno@clisp.org>
9937
9938         * lib/strstr.c: Include <stddef.h>, for NULL.
9939         * lib/strcasestr.c: Likewise.
9940         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
9941
9942 2005-08-31  Bruno Haible  <bruno@clisp.org>
9943
9944         * gnulib-tool: New option --macro-prefix.
9945         (func_import): Use macro_prefix.
9946         (import): Handle option --macro-prefix.
9947
9948 2005-08-31  Bruno Haible  <bruno@clisp.org>
9949
9950         * gnulib-tool (import): Rename most ac_* variables to cached_*.
9951         Also use new variables cached_lgpl, cached_libtool.
9952
9953 2005-08-31  Bruno Haible  <bruno@clisp.org>
9954
9955         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
9956         always instantiating them.
9957
9958 2005-08-31  Bruno Haible  <bruno@clisp.org>
9959
9960         * gnulib-tool (func_import): Read the previous cached settings
9961         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
9962         earlier added by gnulib but are now dropped. Warn when a gnulib file
9963         overwrites a non-gnulib file.
9964
9965 2005-08-31  Bruno Haible  <bruno@clisp.org>
9966
9967         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
9968         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
9969         projects that don't keep autogenerated files in CVS. Put into
9970         actioncmd only the specified modules, not the transitive closure.
9971
9972 2005-08-31  Bruno Haible  <bruno@clisp.org>
9973
9974         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
9975         Create directories that shall be filled.
9976         (import): Don't look for gl_* macros in configure.ac. Recurse across
9977         all directories containing a gnulib-cache.m4 files, if meaningful.
9978
9979 2005-08-31  Bruno Haible  <bruno@clisp.org>
9980
9981         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
9982         (import): Set seen_libtool when we see gl_LIBTOOL.
9983
9984 2005-08-31  Bruno Haible  <bruno@clisp.org>
9985
9986         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
9987         declaration macro definitions from generated gnulib.m4.
9988
9989 2005-08-30  "Oskar Liljeblad"  <oskar@osk.mine.nu>
9990
9991         * lib/iconvme.h: Add prototype for iconv_alloc.
9992
9993 2005-08-29  Simon Josefsson  <jas@extundo.com>
9994
9995         * lib/iconvme.c: Fix errno.
9996
9997 2005-08-29  Bruno Haible  <bruno@clisp.org>
9998
9999         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
10000         that it works when the directory contains spaces.
10001
10002 2005-08-29  Bruno Haible  <bruno@clisp.org>
10003
10004         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
10005
10006 2005-08-29  Bruno Haible  <bruno@clisp.org>
10007
10008         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
10009         Emit more advice.
10010
10011 2005-08-29  Bruno Haible  <bruno@clisp.org>
10012         and Stepan Kasal  <kasal@ucw.cz>
10013
10014         * check-module: If more parameters are given, check each of them
10015         separately; add more exceptions, as noted by Jim Meyering.
10016         (check_module): New procedure.
10017         (%exempt_header): Now contains all exceptions.
10018
10019 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
10020
10021         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
10022
10023 2005-08-29  "Oskar Liljeblad"  <oskar@osk.mine.nu>
10024
10025         * lib/iconvme.c: Split iconv_string into iconv_alloc.
10026
10027 2005-08-28  Bruno Haible  <bruno@clisp.org>
10028
10029         * m4/gnulib-tool.m4: New file.
10030
10031 2005-08-27  Jim Meyering  <jim@meyering.net>
10032
10033         * modules/unistd-safer (Files): Add pipe-safer.c.
10034         * modules/fcntl-safer (Files): Add creat-safer.c.
10035
10036 2005-08-27  Jim Meyering  <jim@meyering.net>
10037
10038         * m4/stdlib-safer.m4: New file.  From coreutils.
10039         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
10040         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
10041         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
10042         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
10043         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
10044
10045 2005-08-27  Jim Meyering  <jim@meyering.net>
10046
10047         * lib/fopen-safer.c: Merge minor changes from coreutils.
10048         * lib/dup-safer.c: Likewise.
10049         * lib/fd-safer.c: Likewise.
10050
10051         Merge from coreutils.
10052         * lib/stdio--.h: New file.
10053         * lib/stdlib--.h: New file.
10054         * lib/mkstemp-safer.c: New file.
10055
10056         GNU tar needs these.
10057         * lib/pipe-safer.c: New file.
10058         * lib/creat-safer.c: New file.
10059         * lib/fcntl--.h (creat): Define to creat_safer.
10060         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
10061         * lib/unistd--.h (pipe): Define to pipe_safer.
10062         * lib/unistd-safer.h: Declare pipe_safer.
10063
10064 2005-08-26  Simon Josefsson  <jas@extundo.com>
10065
10066         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
10067         Haible <bruno@clisp.org>.
10068
10069 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
10070
10071         * lib/regex_internal.h: Remove all references to
10072         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
10073         or better.
10074         (bitset_not, bitset_merge, bitset_not_merge):
10075         (bitset_mask, re_string_allocate, re_string_construct):
10076         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
10077         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
10078         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
10079         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
10080         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10081         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10082         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
10083         (re_acquire_state_context):
10084         Remove unnecessary forward decls.
10085         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
10086         Put __attribute at function definition,
10087         now that the function decl has been removed.
10088         * lib/regex_internal.c (re_string_peek_byte_case):
10089         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
10090         Likewise.
10091
10092 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
10093
10094         * m4/regex.m4: Add AC_PREREQ(2.50).
10095         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
10096
10097 2005-08-25  Simon Josefsson  <jas@extundo.com>
10098
10099         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
10100         __fsetlocking.
10101
10102 2005-08-25  Simon Josefsson  <jas@extundo.com>
10103
10104         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
10105         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
10106         GLIBC specific code.
10107
10108 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10109
10110         Make regex safe for g++.  This fixes one real bug (an "err"
10111         that should have been "*err").  g++ problem reported by
10112         Sam Steingold.
10113         * lib/regex_internal.h (re_calloc): New macro, consistent with
10114         re_malloc etc.  All callers of calloc changed to use re_calloc.
10115         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
10116         not int.  All callers changed.
10117         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
10118         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
10119         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
10120         (find_recover_state): Change "err" to "*err"; this fixes what
10121         appears to be a real bug.
10122         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
10123         versus int.
10124
10125 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10126
10127         * modules/regex (Depends-on): Add malloc, since the code
10128         assumes that !malloc(0) means failure.
10129
10130 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10131
10132         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
10133
10134         alloca modernization/simplification for regex.
10135         * lib/regex.c: Remove portability cruft for alloca.  This no longer
10136         needs to be at the start of the file, and can be moved into
10137         regex_internal.h and simplified.
10138         * lib/regex_internal.h: Include <alloca.h>.
10139         (__libc_use_alloca) [!defined _LIBC]: New macro.
10140         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
10141         now works outside glibc.
10142
10143 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10144
10145         * config/srclist.txt: Add glibc bugs 1241, 1245.
10146
10147 2005-08-25  Jim Meyering  <jim@meyering.net>
10148
10149         * lib/open-safer.c: Include <config.h>.
10150         Otherwise, we'd lose LARGEFILE support in any file using
10151         e.g. "fcntl--.h"
10152
10153 2005-08-25  Bruno Haible  <bruno@clisp.org>
10154
10155         * m4/minmax.m4: Require autoconf 2.52.
10156         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
10157         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
10158         alternatives of translit over the alphabet.
10159         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
10160
10161 2005-08-24  Simon Josefsson  <jas@extundo.com>
10162
10163         * tests/test-getpass.c: New file.
10164
10165 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10166
10167         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
10168         for GNU regex features.
10169
10170 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10171
10172         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
10173         * lib/regex.h (regerror): Likewise.
10174
10175         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
10176         requires this.  (The code never needed it.)
10177
10178         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
10179         All uses of recently-renamed identifiers changed to use the new,
10180         POSIX-compliant names.  The code will build and run just fine
10181         without these changes, but it's better to eat our own dog food
10182         and use the standard-conforming names.
10183
10184         * lib/regex.h: Fix a multitude of POSIX name space violations.
10185         These changes have an effect only for programs that define
10186         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
10187         do not change anything for programs compiled in the normal way.
10188         Also, there is no effect on the ABI.
10189
10190         (_REGEX_SOURCE): New macro.
10191         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
10192         defined and _GNU_SOURCE is not; this fixes a name space violation.
10193
10194         Rename the following macros to obey POSIX requirements.
10195         The old names are still visible as macros if _REGEX_SOURCE is defined.
10196         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
10197         RE_BACKSLASH_ESCAPE_IN_LISTS.
10198         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
10199         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
10200         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
10201         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
10202         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
10203         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
10204         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
10205         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
10206         (REG_INTERVALS): renamed from RE_INTERVALS.
10207         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
10208         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
10209         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
10210         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
10211         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
10212         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
10213         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
10214         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
10215         RE_UNMATCHED_RIGHT_PAREN_ORD.
10216         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
10217         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
10218         (REG_DEBUG): renamed from RE_DEBUG.
10219         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
10220         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
10221         unusual, since we can't clash with the POSIX REG_ICASE.
10222         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
10223         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
10224         (REG_NO_SUB): renamed from RE_NO_SUB.
10225         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
10226         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
10227         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
10228         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
10229         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
10230         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
10231         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
10232         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
10233         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
10234         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
10235         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
10236         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
10237         RE_SYNTAX_POSIX_MINIMAL_BASIC.
10238         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
10239         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
10240         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
10241         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
10242         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
10243         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
10244         (REG_FIXED): Renamed from REGS_FIXED.
10245         (REG_NREGS): Renamed from RE_NREGS.
10246
10247         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
10248         of other REG_* macros, since POSIX says the user is allowed to
10249         #undef these macros selectively.
10250
10251         (reg_errcode_t): Update comment stating what other tables need
10252         to be consistent.
10253
10254         Rename the following enum values to obey POSIX requirements.
10255         The old names are still visible as macros.
10256         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
10257         is not defined, since GNU is supposed to be a superset of POSIX as
10258         much as possible, and since we want reg_errcode_t to be a signed
10259         type for implementation consistency.
10260         (_REG_NOERROR): Renamed from REG_NOERROR.
10261         (_REG_NOMATCH): Renamed from REG_NOMATCH.
10262         (_REG_BADPAT): Renamed from REG_BADPAT.
10263         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
10264         (_REG_ECTYPE): Renamed from REG_ECTYPE.
10265         (_REG_EESCAPE): Renamed from REG_EESCAPE.
10266         (_REG_ESUBREG): Renamed from REG_ESUBREG.
10267         (_REG_EBRACK): Renamed from REG_EBRACK.
10268         (_REG_EPAREN): Renamed from REG_EPAREN.
10269         (_REG_EBRACE): Renamed from REG_EBRACE.
10270         (_REG_BADBR): Renamed from REG_BADBR.
10271         (_REG_ERANGE): Renamed from REG_ERANGE.
10272         (_REG_ESPACE): Renamed from REG_ESPACE.
10273         (_REG_BADRPT): Renamed from REG_BADRPT.
10274         (_REG_EEND): Renamed from REG_EEND.
10275         (_REG_ESIZE): Renamed from REG_ESIZE.
10276         (_REG_ERPAREN): Renamed from REG_ERPAREN.
10277         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
10278         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
10279         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
10280         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
10281
10282         (_REG_RE_NAME, _REG_RM_NAME): New macros.
10283         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
10284         changed.  But support the old name if the new one is not defined
10285         and if _REGEX_SOURCE.
10286
10287         Change the following member names in struct re_pattern_buffer.
10288         The old names are still supported if !_REGEX_SOURCE.
10289         The new names are always supported, regardless of _REGEX_SOURCE.
10290         (re_buffer): Renamed from buffer.
10291         (re_allocated): Renamed from allocated.
10292         (re_used): Renamed from used.
10293         (re_syntax): Renamed from syntax.
10294         (re_fastmap): Renamed from fastmap.
10295         (re_translate): Renamed from translate.
10296         (re_can_be_null): Renamed from can_be_null.
10297         (re_regs_allocated): Renamed from regs_allocated.
10298         (re_fastmap_accurate): Renamed from fastmap_accurate.
10299         (re_no_sub): Renamed from no_sub.
10300         (re_not_bol): Renamed from not_bol.
10301         (re_not_eol): Renamed from not_eol.
10302         (re_newline_anchor): Renamed from newline_anchor.
10303
10304         Change the following member names in struct re_registers.
10305         The old names are still supported if !_REGEX_SOURCE.
10306         The new names are always supported, regardless of _REGEX_SOURCE.
10307         (rm_num_regs): Renamed from num_regs.
10308         (rm_start): Renamed from start.
10309         (rm_end): Renamed from end.
10310
10311         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
10312         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
10313         Prepend __ to parameter names.
10314
10315         Undo yesterday's changes.
10316
10317 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10318
10319         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
10320         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
10321         lib/regex.c.
10322
10323 2005-08-24  Jim Meyering  <jim@meyering.net>
10324
10325         Sync from coreutils.
10326         * m4/fcntl-safer.m4: New file.
10327
10328         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
10329         and object files for this module.
10330
10331 2005-08-24  Jim Meyering  <jim@meyering.net>
10332
10333         Sync from coreutils.
10334         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
10335
10336 2005-08-24  Jim Meyering  <jim@meyering.net>
10337
10338         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
10339         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
10340
10341 2005-08-24  Jim Meyering  <jim@meyering.net>
10342
10343         * modules/fcntl-safer: New module.
10344         * modules/fts (Depends-on): Add fcntl-safer.
10345         * MODULES.html.sh (File descriptor based Input/Output):
10346         Add fcntl-safer.
10347
10348 2005-08-24  Bruno Haible  <bruno@clisp.org>
10349
10350         Support for unit test modules.
10351         * modules/README: Mention tests modules.
10352         * modules/TEMPLATE-TESTS: New file.
10353         * gnulib-tool: New options --extract-tests-module, --with-tests and
10354         --tests-base (unused for the moment).
10355         (testsbase, inctests): New variables.
10356         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
10357         (func_verify_module): Exclude TEMPLATE-TESTS.
10358         (func_verify_nontests_module, func_verify_tests_module): New functions.
10359         (func_get_dependencies): Add implicit dependency for tests modules.
10360         (func_get_tests_module): New function.
10361         (func_modules_transitive_closure): When --with-tests was specified,
10362         include the unit tests as well, unless explicitly avoided.
10363         (func_emit_lib_Makefile_am): Ignore the tests modules here.
10364         (func_emit_tests_Makefile_am): New function.
10365         (func_create_testdir): When --with-tests was specified, emit a
10366         tests/ directory.
10367         * MODULES.html.sh (Future developments): Update.
10368
10369 2005-08-24  Bruno Haible  <bruno@clisp.org>
10370
10371         * modules/tls-tests: New file.
10372         * tests/test-tls.c: New file, from GNU gettext.
10373
10374 2005-08-24  Bruno Haible  <bruno@clisp.org>
10375
10376         * modules/lock-tests: New file.
10377         * tests/test-lock.c: New file, from GNU gettext.
10378
10379 2005-08-24  Bruno Haible  <bruno@clisp.org>
10380
10381         * lib/lock.h: Add multiple inclusion guard.
10382         * lib/tls.h: Add multiple inclusion guard.
10383
10384 2005-08-24  Bruno Haible  <bruno@clisp.org>
10385
10386         * gnulib-tool: Add support for the --aux-dir option to
10387         --create-testdir, --create-megatestdir, --test, --megatest.
10388         (func_create_testdir, func_create_megatestdir): Optionally emit a
10389         AC_CONFIG_AUX_DIR directive.
10390         (create-testdir, create-megatestdir, test, megatest): Provide a
10391         default value for $auxdir.
10392
10393 2005-08-24  Bruno Haible  <bruno@clisp.org>
10394
10395         * gnulib-tool (import): Use compound statement instead of subshell
10396         where possible.
10397
10398 2005-08-24  Bruno Haible  <bruno@clisp.org>
10399
10400         * gnulib-tool (import): Change --aux-dir default to "build-aux".
10401
10402 2005-08-24  Bruno Haible  <bruno@clisp.org>
10403
10404         * gnulib-tool (func_version): Update.
10405
10406 2005-08-24  Bruno Haible  <bruno@clisp.org>
10407
10408         * gnulib-tool (func_import, func_create_testdir,
10409         func_create_megatestdir): Quote all autoconf macro arguments.
10410
10411 2005-08-24  Bruno Haible  <bruno@clisp.org>
10412
10413         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
10414         option --force, because --force causes the aclocal.m4 of each
10415         subdirectory to be newer than the corresponding config.h.in.
10416
10417 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10418
10419         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
10420         All contents moved to gl_REGEX.
10421         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
10422         assume that it does.
10423
10424 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10425
10426         * lib/regex.h (REG_NOSYS)
10427         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
10428         Define, since POSIX requires it as of 2001.
10429         (_REG_ENOSYS)
10430         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
10431         New private symbol, used to keep the enum signed in all cases.
10432         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
10433         Youngman in
10434         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
10435
10436         * lib/regex_internal.c (re_string_skip_chars, register_state):
10437         (calc_state_hash):
10438         Remove forward decls; no longer needed now that we use prototypes.
10439         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
10440         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
10441         (clean_state_log_if_needed): Likewise.
10442
10443 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10444
10445         * config/srclist.txt: Add glibc bugs 1231-1233.
10446
10447 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10448
10449         Fix problems reported by Sam Steingold in
10450         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
10451         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
10452         assumed that reg_errcode_t is a signed type, which is not
10453         necessarily true if _XOPEN_SOURCE is not defined.
10454         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
10455         since some compilers warn about it otherwise.
10456
10457 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10458
10459         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
10460         (init_word_char, create_initial_state, duplicate_node_closure):
10461         (fetch_token, peek_token_bracket, build_range_exp):
10462         (build_collating_symbol): Remove forward decls; no longer needed
10463         now that we use prototypes.
10464
10465         * lib/regcomp.c:
10466         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
10467         (re_compile_fastmap_iter, regcomp, regerror, regfree):
10468         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
10469         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
10470         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
10471         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
10472         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
10473         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
10474         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
10475         (build_range_exp, build_collating_symbol, parse_bracket_exp):
10476         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
10477         (build_charclass, build_charclass_op, fetch_number, create_tree):
10478         (create_token_tree, mark_opt_subexp, duplicate_tree):
10479         Use prototypes rather than old-style definitions.
10480
10481         * lib/regex_internal.c:
10482         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
10483         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
10484         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
10485         (re_string_reconstruct, re_string_peek_byte_case):
10486         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
10487         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
10488         (re_node_set_init_copy, re_node_set_add_intersect):
10489         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10490         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10491         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
10492         (re_acquire_state, re_acquire_state_context, register_state):
10493         (create_ci_newstate, create_cd_newstate, free_state):
10494         Likewise.
10495         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
10496         re_search_2):
10497         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
10498         (re_search_internal, prune_impossible_nodes):
10499         (acquire_init_state_context, check_matching, static):
10500         (check_halt_node_context, check_halt_state_context, proceed_next_node):
10501         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
10502         (update_regs, sift_states_backward, build_sifted_states):
10503         (clean_state_log_if_needed, merge_state_array):
10504         (update_cur_sifted_state, add_epsilon_src_nodes):
10505         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
10506         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
10507         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
10508         (find_recover_state, check_subexp_matching_top, transit_state_mb):
10509         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
10510         (check_arrival, check_arrival_add_next_nodes):
10511         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
10512         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
10513         (check_node_accept_bytes, check_node_accept, extend_buffers):
10514         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
10515         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
10516         (sift_ctx_init):
10517         Likewise.
10518
10519         * lib/regex_internal.h:
10520         (re_string_allocate, re_string_construct, re_string_reconstruct):
10521         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
10522         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
10523         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
10524         (re_string_context_at, re_string_peek_byte_case):
10525         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
10526         is defined, since we now use prototypes always.
10527
10528         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
10529         C89 or better.  All uses removed.
10530
10531 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10532
10533         * config/srclist.txt: Add glibc bugs 1220-1227.
10534
10535 2005-08-20  Jim Meyering  <jim@meyering.net>
10536
10537         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
10538         of unused local, dfa.
10539
10540 2005-08-20  Bruno Haible  <bruno@clisp.org>
10541
10542         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
10543
10544 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10545
10546         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
10547         (re_node_set_insert_last, re_dfa_add_node):
10548         Rename local variables to avoid GCC shadowing warnings.
10549
10550 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10551
10552         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
10553         [defined lint]: Suppress bogus uninitialized-variable warnings.
10554
10555         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
10556         and let the caller return REG_ESPACE if out of space.  This
10557         removes an uninitialied-variable warning with GCC 4.0.1, and also
10558         avoids taking the address of a local variable.  All callers
10559         changed.
10560
10561 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10562
10563         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
10564         $LIBCSRC/posix/regexec.c.
10565         Add glibc bug 1217 for regcomp.c.
10566
10567 2005-08-19  Jim Meyering  <jim@meyering.net>
10568
10569         * lib/regexec.c (proceed_next_node): Redo local variables to
10570         avoid GCC shadowing warnings.
10571
10572 2005-08-18  Bruno Haible  <bruno@clisp.org>
10573
10574         * lib/strstr.c (strstr): Fix return value in multibyte case.
10575         * lib/strcasestr.c (strcasestr): Likewise.
10576
10577 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
10578
10579         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
10580
10581 2005-08-17  Jim Meyering  <jim@meyering.net>
10582
10583         Make the %s format (seconds since the epoch) work for a negative
10584         number and when used with a zero-padded field width, e.g. %015s.
10585
10586         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
10587         label so that it precedes the code to set `digits'.  Otherwise,
10588         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
10589         print `00-22'.  Now, it prints `-0022', as it should.
10590
10591 2005-08-17  Bruno Haible  <bruno@clisp.org>
10592
10593         * modules/strstr (Files): Add m4/mbrtowc.m4.
10594         (Depends-on): Add mbuiter.
10595
10596 2005-08-17  Bruno Haible  <bruno@clisp.org>
10597
10598         * modules/strcasestr: New file.
10599         * MODULES.html.sh (String handling, based on ANSI C 89): Add
10600         strcasestr.
10601
10602 2005-08-17  Bruno Haible  <bruno@clisp.org>
10603
10604         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
10605
10606 2005-08-17  Bruno Haible  <bruno@clisp.org>
10607
10608         * modules/mbuiter: New file.
10609         * MODULES.html.sh (Extended multibyte and wide character utilities):
10610         Add mbuiter.
10611
10612 2005-08-17  Bruno Haible  <bruno@clisp.org>
10613
10614         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
10615         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
10616
10617 2005-08-17  Bruno Haible  <bruno@clisp.org>
10618
10619         * m4/strcasestr.m4: New file.
10620
10621 2005-08-17  Bruno Haible  <bruno@clisp.org>
10622
10623         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
10624         * lib/strstr.c: Completely rewritten, with multibyte locale support.
10625
10626 2005-08-17  Bruno Haible  <bruno@clisp.org>
10627
10628         * lib/strcasestr.h: New file.
10629         * lib/strcasestr.c: New file.
10630
10631 2005-08-17  Bruno Haible  <bruno@clisp.org>
10632
10633         * lib/strcasecmp.c: Use mbuiter.h.
10634
10635 2005-08-17  Bruno Haible  <bruno@clisp.org>
10636
10637         * lib/mbuiter.h: New file.
10638
10639 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
10640
10641         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
10642         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
10643         and gl_GETOPT are both invoked via different paths (as happens
10644         with GNU tar CVS because it uses both argp and getopt), the former
10645         wins.
10646
10647 2005-08-16  Bruno Haible  <bruno@clisp.org>
10648
10649         * modules/tls: New file.
10650         * MODULES.html.sh (Multithreading): Add tls.
10651
10652 2005-08-16  Bruno Haible  <bruno@clisp.org>
10653
10654         * modules/strnlen1: New file.
10655         * MODULES.html.sh (String handling): Add strnlen1.
10656
10657 2005-08-16  Bruno Haible  <bruno@clisp.org>
10658
10659         * modules/strcase (Files): Add m4/mbrtowc.m4.
10660         (Depends-on): Add strnlen1, mbchar.
10661
10662 2005-08-16  Bruno Haible  <bruno@clisp.org>
10663
10664         * modules/mbiter: New file.
10665         * MODULES.html.sh (Extended multibyte and wide character utilities):
10666         Add mbiter.
10667
10668 2005-08-16  Bruno Haible  <bruno@clisp.org>
10669
10670         * modules/mbfile: New file.
10671         * MODULES.html.sh (Extended multibyte and wide character utilities):
10672         Add mbfile.
10673
10674 2005-08-16  Bruno Haible  <bruno@clisp.org>
10675
10676         * modules/mbchar: New file.
10677         * MODULES.html.sh (Extended multibyte and wide character utilities):
10678         New section.
10679
10680 2005-08-16  Bruno Haible  <bruno@clisp.org>
10681
10682         * m4/tls.m4: New file, from GNU gettext.
10683
10684 2005-08-16  Bruno Haible  <bruno@clisp.org>
10685
10686         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
10687         always.
10688         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
10689
10690 2005-08-16  Bruno Haible  <bruno@clisp.org>
10691
10692         * m4/mbiter.m4: New file.
10693
10694 2005-08-16  Bruno Haible  <bruno@clisp.org>
10695
10696         * m4/mbfile.m4: New file.
10697
10698 2005-08-16  Bruno Haible  <bruno@clisp.org>
10699
10700         * m4/mbchar.m4: New file.
10701
10702 2005-08-16  Bruno Haible  <bruno@clisp.org>
10703
10704         * lib/tls.h: New file, from GNU gettext.
10705         * lib/tls.c: New file, from GNU gettext.
10706
10707 2005-08-16  Bruno Haible  <bruno@clisp.org>
10708
10709         * lib/strnlen1.h: New file.
10710         * lib/strnlen1.c: New file.
10711
10712 2005-08-16  Bruno Haible  <bruno@clisp.org>
10713
10714         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
10715         (mbi_init): Update.
10716         (mbi_avail, mbi_advance): Let the iteration end before the terminating
10717         NUL byte, not after it.
10718
10719 2005-08-16  Bruno Haible  <bruno@clisp.org>
10720
10721         * lib/strcase.h (strcasecmp): Add note in comments.
10722         * lib/strncasecmp.c: Use code from strcasecmp.c.
10723         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
10724         (strcasecmp): Work correctly in multibyte locales.
10725
10726 2005-08-16  Bruno Haible  <bruno@clisp.org>
10727
10728         * lib/mbiter.h: New file.
10729
10730 2005-08-16  Bruno Haible  <bruno@clisp.org>
10731
10732         * lib/mbfile.h: New file.
10733
10734 2005-08-16  Bruno Haible  <bruno@clisp.org>
10735
10736         * lib/mbchar.h: New file.
10737         * lib/mbchar.c: New file.
10738
10739 2005-08-16  Bruno Haible  <bruno@clisp.org>
10740
10741         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
10742         the valid ones. Makes the comparison operations transitive:
10743         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
10744         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
10745
10746 2005-08-15  Simon Josefsson  <jas@extundo.com>
10747
10748         * modules/ssize_t (License): Change to 'unlimited'.
10749
10750         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
10751
10752 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10753
10754         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
10755         Add comments for each pending glibc patch.
10756
10757 2005-08-15  Bruno Haible  <bruno@clisp.org>
10758
10759         * lib/regex.h (__restrict_arr): Don't define to __restrict if
10760         __cplusplus is defined.
10761
10762 2005-08-14  Jim Meyering  <jim@meyering.net>
10763
10764         Sync from coreutils.
10765
10766         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
10767         Use the hash-table-based cycle-detection code not just when
10768         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
10769         Reported by James Youngman in
10770         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
10771         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
10772         FTS_TIGHT_CYCLE_CHECK.
10773         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
10774         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
10775         once again.
10776         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
10777         * lib/fts.c (fd_safer): Remove decl.
10778         Include fcntl--.h rather than unistd-safer.h
10779         (fts_safe_changedir): Don't call fd_safer; no longer needed
10780         now that we include fcntl--.h.
10781
10782 2005-08-12  Simon Josefsson  <jas@extundo.com>
10783
10784         * modules/getndelim2: Use ssize_t module.
10785         * modules/getnline: Likewise.
10786         * modules/safe-read: Likewise.
10787         * modules/xreadlink: Likewise.
10788
10789         * modules/ssize_t: New file.
10790
10791 2005-08-12  Simon Josefsson  <jas@extundo.com>
10792
10793         * m4/readline.m4: Look for termcap, curses or ncurses if required.
10794
10795 2005-08-12  Simon Josefsson  <jas@extundo.com>
10796
10797         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10798         ssize_t.
10799
10800 2005-08-12  Simon Josefsson  <jas@extundo.com>
10801
10802         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
10803         readline, getdelim and check_version.
10804         (Support for systems lacking ISO C 99: Sizes of integer types):
10805         Add size_max.
10806
10807 2005-08-12  Bruno Haible  <bruno@clisp.org>
10808
10809         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
10810
10811 2005-08-11  Simon Josefsson  <jas@extundo.com>
10812
10813         * modules/readline: New file.
10814
10815         * modules/strnlen (Files): Add strnlen.h.
10816
10817 2005-08-11  Simon Josefsson  <jas@extundo.com>
10818
10819         * m4/readline.m4: New file.
10820
10821 2005-08-11  Simon Josefsson  <jas@extundo.com>
10822
10823         * lib/readline.h, readline.c: New file.
10824
10825 2005-08-11  Simon Josefsson  <jas@extundo.com>
10826
10827         * doc/gnulib.texi (Initial import, Finishing touches): Mention
10828         gl_AVOID.
10829
10830 2005-08-11  Bruno Haible  <bruno@clisp.org>
10831
10832         * lib/strnlen.h (strnlen): Change parameter name to match comment.
10833
10834 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
10835
10836         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
10837
10838 2005-08-10  Simon Josefsson  <jas@extundo.com>
10839
10840         * tests/test-iconvme.c: New file.
10841
10842 2005-08-10  Simon Josefsson  <jas@extundo.com>
10843
10844         * m4/strnlen.m4: New file.
10845
10846         * m4/strndup.m4: Don't check for strnlen declaration, done in
10847         strnlen.m4.
10848
10849 2005-08-10  Simon Josefsson  <jas@extundo.com>
10850
10851         * lib/strndup.c: Use strnlen.h.
10852
10853         * lib/strnlen.h: New file.
10854
10855 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10856
10857         * README: Typos.
10858
10859 2005-08-02  Simon Josefsson  <jas@extundo.com>
10860
10861         * modules/readline: New file.
10862
10863 2005-08-02  Simon Josefsson  <jas@extundo.com>
10864
10865         * modules/getdelim: New file.
10866
10867         * modules/getline: Rewrite, don't use getndelim2.
10868
10869 2005-08-02  Simon Josefsson  <jas@extundo.com>
10870
10871         * m4/getline.m4: Separate out getdelim stuff into separate module.
10872
10873         * m4/getdelim.m4: New file.
10874
10875 2005-08-02  Simon Josefsson  <jas@extundo.com>
10876
10877         * lib/getline.h, getline.c: Rewrite.
10878
10879         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
10880
10881 2005-07-31  Bruno Haible  <bruno@clisp.org>
10882
10883         * lib/lock.h (gl_lock_initializer): New macro.
10884         (gl_lock_define_initialized): Use it.
10885         (gl_rwlock_initializer): New macro.
10886         (gl_rwlock_define_initialized): Use it.
10887         (gl_recursive_lock_initializer): New macro.
10888         (gl_recursive_lock_define_initialized): Use it.
10889
10890 2005-07-30  Karl Berry  <karl@gnu.org>
10891
10892         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
10893         Report from Ben Pfaff, regarding getopt.
10894
10895 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
10896
10897         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
10898         normal way.
10899         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
10900         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
10901         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
10902         (gl_GETOPT): Use the new macros.  Most of the implementation
10903         is moved to the new macros.  This is for programs like Emacs
10904         that don't want all the functionality of gl_GETOPT.
10905
10906 2005-07-26  Bruno Haible  <bruno@clisp.org>
10907
10908         * m4/lock.m4: Update from GNU gettext.
10909
10910 2005-07-26  Bruno Haible  <bruno@clisp.org>
10911
10912         * lib/lock.h: Update from GNU gettext.
10913         * lib/lock.c: Update from GNU gettext.
10914
10915 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
10916
10917         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
10918         obsolescent AC_TRY_RUN.  Include the default includes files, for
10919         'exit'.
10920
10921 2005-07-24  Bruno Haible  <bruno@clisp.org>
10922
10923         * modules/visibility: New file.
10924         * MODULES.html.sh (Misc): Add visibility.
10925
10926 2005-07-24  Bruno Haible  <bruno@clisp.org>
10927
10928         * m4/visibility.m4: New file.
10929
10930 2005-07-24  Bruno Haible  <bruno@clisp.org>
10931
10932         * doc/visibility.texi: New file.
10933
10934 2005-07-22  Bruno Haible  <bruno@clisp.org>
10935
10936         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
10937         $(ALLOCA_H), redundant through BUILT_SOURCES.
10938         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
10939         redundant through BUILT_SOURCES.
10940         * modules/byteswap (Makefile.am): Remove explicit dependency on
10941         $(BYTESWAP_H), redundant through BUILT_SOURCES.
10942         * modules/fnmatch (Makefile.am): Remove explicit dependency on
10943         $(FNMATCH_H), redundant through BUILT_SOURCES.
10944         * modules/getopt (Makefile.am): Remove explicit dependency on
10945         $(GETOPT_H), redundant through BUILT_SOURCES.
10946         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
10947         redundant through BUILT_SOURCES.
10948         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
10949         redundant through BUILT_SOURCES.
10950         * modules/stdbool (Makefile.am): Remove explicit dependency on
10951         $(STDBOOL_H), redundant through BUILT_SOURCES.
10952         * modules/stdint (Makefile.am): Remove explicit dependency on
10953         $(STDINT_H), redundant through BUILT_SOURCES.
10954         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
10955         Remove explicit dependency on $(SYSEXITS_H).
10956         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
10957
10958 2005-07-18  Simon Josefsson  <jas@extundo.com>
10959
10960         * lib/check-version.c (check_version): Accept identical versions too.
10961
10962 2005-07-18  Bruno Haible  <bruno@clisp.org>
10963
10964         * modules/lock: New file.
10965         * MODULES.html.sh (Multithreading): New section.
10966
10967 2005-07-18  Bruno Haible  <bruno@clisp.org>
10968
10969         * m4/lock.m4: New file, from GNU gettext.
10970
10971 2005-07-18  Bruno Haible  <bruno@clisp.org>
10972
10973         * lib/lock.h: New file, from GNU gettext.
10974         * lib/lock.c: New file, from GNU gettext.
10975
10976 2005-07-18  Bruno Haible  <bruno@clisp.org>
10977
10978         * lib/lock.h (gl_once_t): New type.
10979         (gl_once_define, gl_once): New macros.
10980         * lib/lock.c (fresh_once): New variable.
10981         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
10982         functions.
10983
10984 2005-07-16  Simon Josefsson  <jas@extundo.com>
10985
10986         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
10987         workaround, suggested by Bruno.
10988
10989 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
10990
10991         * modules/xalloc (Depends-on): Add xalloc-die.
10992         * modules/xvasprintf (Depends-on): Add xalloc-die.
10993
10994 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
10995
10996         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
10997         with a minor change.
10998
10999 2005-07-15  Bruno Haible  <bruno@clisp.org>
11000
11001         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
11002         When using lib/poll.c, define poll as rpl_poll.
11003
11004 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
11005
11006         * modules/argp (Depends-on): Remove unlocked-io.
11007
11008 2005-07-14  Derek Price  <derek@ximbiot.com>
11009
11010         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
11011         for glob symlink bug.
11012
11013 2005-07-14  Bruno Haible  <bruno@clisp.org>
11014
11015         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
11016         Instead, test for *_unlocked function declarations directly.
11017
11018 2005-07-11  Simon Josefsson  <jas@extundo.com>
11019
11020         * modules/size_max: New file.
11021
11022         * modules/xsize: Depend on size_max module for size_max.m4.
11023
11024 2005-07-11  Simon Josefsson  <jas@extundo.com>
11025
11026         * lib/size_max.h: New file.
11027
11028 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
11029
11030         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
11031         copyright symbol and the year.
11032         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
11033         (version_etc_va): Use parameterized copyright notice.
11034         Reword to conform to the current GNU coding standards.
11035
11036 2005-07-11  Karl Berry  <karl@gnu.org>
11037
11038         * doc/gnulib.texi (Quoting): new node.
11039         (Initial import): more info, from Patrice.
11040
11041 2005-07-11  Bruno Haible  <bruno@clisp.org>
11042
11043         * gnulib-tool (func_usage): Document option --avoid.
11044         (Command line options): Handle --avoid.
11045         (func_acceptable): New function.
11046         (func_modules_transitive_closure): Use it.
11047
11048 2005-07-11  Bruno Haible  <bruno@clisp.org>
11049
11050         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
11051         Reported by Jim Meyering.
11052
11053 2005-07-10  Bruno Haible  <bruno@clisp.org>
11054
11055         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
11056         Needed when size_t is smaller than 'unsigned int'.
11057         Reported by Paul Eggert.
11058
11059 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11060
11061         * modules/argp (Depends-on): Add unlocked-io
11062
11063 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11064
11065         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
11066         block of defines.
11067
11068 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
11069
11070         * config/srclist.txt: Comment out regcomp.c, since we have a porting
11071         fix now.
11072
11073 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
11074         and Paul Eggert  <eggert@cs.ucla.edu>
11075
11076         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
11077         in wint_t, not wchar_t.  Remove now-unnecessary cast.
11078
11079 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11080
11081         * modules/regex (Files): Add lib/regex_internal.c,
11082         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
11083         (Depends-on): Add extensions.
11084         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
11085
11086 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11087
11088         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
11089         pathconf.
11090         * m4/same.m4 (gl_SAME): Likewise.
11091         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
11092
11093         * m4/regex.m4: Adjust to new libc regex implementation.
11094         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
11095         all the .c and .h parts of (the new) regex.
11096         Quote the m4 stuff better.
11097         Check for RE_ICASE bug of old gnulib.
11098         Check for REG_STARTEND of recent libc.
11099         Rename local variables from jm_* to gl_*.
11100         Quote operand of "test -f".
11101         Say "recent enough" version of libc, not "version 2".
11102         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
11103         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
11104         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
11105         Remove check for btowc, isascii.
11106         Require AM_LANGINFO_CODESET.
11107
11108 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11109
11110         * lib/regex.c, regex.h: Sync from libc.
11111         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
11112         * lib/regexec.c:
11113         New files, synced from libc, except that regex_internal.h
11114         currently has a small porting fix.
11115
11116 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11117
11118         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
11119         regex_internal.c, regexec.c.
11120         Add regex_internal.h too, but as a comment, since the libc version
11121         is currently broken in gnulib mode.
11122
11123 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
11124
11125         Support programs like Emacs that use gnulib but not gettext.
11126         * MODULES.html.sh (Internationalization functions): Add gettext-h.
11127         * modules/gettext-h: New file.
11128         * modules/gettext (Files): Remove lib/gettext.h.
11129         (Depends-on): Add gettext-h.
11130         (Makefile.am): Remove lib_SOURCES.
11131         * modules/argmatch, modules/c-stack, modules/closeout:
11132         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
11133         * modules/execute, modules/file-type, modules/getaddrinfo:
11134         * modules/getopt, modules/human, modules/javacomp:
11135         * modules/javaexec, modules/mkdir-p, modules/obstack:
11136         * modules/openat, modules/pagealign_alloc, modules/pipe:
11137         * modules/quotearg, modules/regex, modules/rpmatch:
11138         * modules/unicodeio, modules/userspec, modules/version-etc:
11139         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
11140         * modules/xsetenv:
11141         Depend on gettext-h, not gettext.
11142
11143 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
11144
11145         * gnulib-tool (func_import): Add support for 'public domain' license.
11146         * modules/alloca, modules/atexit, modules/memmove:
11147         Now public domain, not GPL.
11148         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
11149         * modules/realloc, modules/strerror, modules/strtod:
11150         Now LGPL, not GPL.
11151
11152 2005-07-05  Bruno Haible  <bruno@clisp.org>
11153
11154         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
11155         autoconf CVS. Needed for mingw.
11156
11157 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11158
11159         Remove the dependency of the strftime module on the tzset module.
11160         * modules/strftime (Depends-on): Remove dependency on tzset.
11161
11162 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11163
11164         Remove the dependency of the strftime module on the tzset module.
11165         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
11166         gl_FUNC_TZSET_CLOBBER.
11167
11168 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11169
11170         Remove the dependency of the strftime module on the tzset module.
11171         * lib/strftime.c (my_strftime)
11172         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
11173         Copy the input structure, to work around some of the bug with
11174         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
11175         Solaris releases, you should also use the tzset module, but we won't
11176         require it as a dependency any more since we don't want LGPLed code
11177         to depend on GPLed code.
11178
11179 2005-07-02  Jim Meyering  <jim@meyering.net>
11180
11181         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
11182         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
11183         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
11184         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
11185
11186 2005-07-02  Jim Meyering  <jim@meyering.net>
11187
11188         * lib/backupfile.c (backup_args): Change a `0' to NULL.
11189
11190 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11191
11192         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
11193         declares only 'struct timespec;' (!).
11194
11195 2005-07-01  Jim Meyering  <jim@meyering.net>
11196
11197         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
11198         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
11199         * lib/save-cwd.c, tempname.c:
11200         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11201         and don't include <sys/file.h>).
11202
11203 2005-06-29  Jim Meyering  <jim@meyering.net>
11204
11205         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
11206         type name.  Use the variable name instead.
11207         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
11208         Likewise.
11209
11210 2005-06-28  Simon Josefsson  <jas@extundo.com>
11211
11212         * modules/check-version (Files): Add check-version.m4.
11213
11214 2005-06-28  Simon Josefsson  <jas@extundo.com>
11215
11216         * m4/check-version.m4: New file, suggested by Jim Meyering
11217         <jim@meyering.net>.
11218
11219 2005-06-28  Simon Josefsson  <jas@extundo.com>
11220
11221         * lib/check-version.h, lib/check-version.c: New files.
11222
11223 2005-06-28  Simon Josefsson  <jas@extundo.com>
11224
11225         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
11226         collision with global variable.  Better indentation.  Don't
11227         increment buffer pointer beyond buffer end.  Based on comments
11228         from Paul Eggert <eggert@cs.ucla.edu>.
11229
11230         * lib/base64.h: Indent.
11231
11232 2005-06-28  Simon Josefsson  <jas@extundo.com>
11233
11234         * doc/gnulib.texi (Library version handling): New section.
11235
11236 2005-06-28  Jim Meyering  <jim@meyering.net>
11237
11238         * check-module (find_included_lib_files): Hard-code another
11239         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
11240         but modules/fts-lgpl (correctly) does not list those files.
11241
11242         * modules/canonicalize (Files): Add lib/pathmax.h.
11243
11244 2005-06-25  Simon Josefsson  <jas@extundo.com>
11245
11246         * modules/check-version: New file.
11247
11248 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
11249
11250         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
11251         initializer of struct addrinfo, as an indication that we don't
11252         care how many members the structure has.
11253
11254 2005-06-24  Derek Price  <derek@ximbiot.com>
11255         and Bruno Haible  <bruno@clisp.org>
11256
11257         Remove stat module & update lstat.
11258         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
11259         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
11260         * m4/stat.m4: Remove this file.
11261
11262 2005-06-24  Derek Price  <derek@ximbiot.com>
11263         and Bruno Haible  <bruno@clisp.org>
11264
11265         Remove stat module & update lstat.
11266         * lib/stat.c: Remove this file...
11267         (slash_aware_lstat): ...moving this content and its support...
11268         * lib/lstat.c (rpl_lstat): ...into here.
11269         * lib/lstat.h: New file.
11270
11271 2005-06-24  Derek Price  <derek@ximbiot.com>
11272         and Bruno Haible  <bruno@clisp.org>
11273
11274         Remove stat module & update lstat.
11275         * config/srclist.txt (libc sources): Remove stat.
11276
11277 2005-06-24  Derek Price  <derek@ximbiot.com>
11278         and Bruno Haible  <bruno@clisp.org>
11279
11280         Remove stat module & update lstat.
11281         * MODULES.html.sh (stat): Remove.
11282         * MODULES.html: Regenerated.
11283         * modules/lstat (Description): Correct function name.
11284         (Files): Add "lstat.h".
11285         (Depends-on): Remove stat, add xalloc, stat-macros.
11286         * modules/stat: Remove this file.
11287         (Include): Add "lstat.h", remove <sys/stat.h>.
11288
11289 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
11290
11291         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
11292         (ranged_convert): Don't save conversion in a temporary struct.
11293         This causes a warning with GCC 4.0.0, and anyway in the typical
11294         case it's not worth the extra 100 bytes or so of code.
11295         (ranged_convert, __mktime_internal): When calling a function via a
11296         pointer P, use P () rather than (*P) (), as we now assume C89 or
11297         better.
11298
11299 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
11300
11301         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
11302         "who -r" failed to give output.  Problem reported by Tim Waugh.
11303
11304         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
11305         (xcalloc): Use it to avoid needless tests.
11306         Problem reported by Jim Meyering.
11307
11308 2005-06-20  Derek Price  <derek@ximbiot.com>
11309
11310         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
11311         unnecessary for Autoconfs > 2.59c.
11312
11313 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11314
11315         * lib/argp.h (__option_is_short): Check upper limit of
11316         __key. Isprint() requires its argument to have the value
11317         of an unsigned char or EOF.
11318
11319 2005-06-16  Jim Meyering  <jim@meyering.net>
11320
11321         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
11322         when either N or S is zero.
11323
11324 2005-06-16  Derek Price  <derek@ximbiot.com>
11325
11326         * m4/bison.m4: Declare YACC & YFLAGS precious.
11327
11328 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
11329
11330         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
11331         multibyte string or pattern, fall back on unibyte matching.
11332         Problem reported by James Youngman.
11333
11334 2005-06-08  Bruno Haible  <bruno@clisp.org>
11335
11336         * modules/csharpcomp: New file.
11337         * MODULES.html.sh (C#): Add csharpcomp.
11338
11339 2005-06-08  Bruno Haible  <bruno@clisp.org>
11340
11341         * m4/csharpcomp.m4: New file, from GNU gettext.
11342
11343 2005-06-08  Bruno Haible  <bruno@clisp.org>
11344
11345         * lib/csharpcomp.h: New file, from GNU gettext.
11346         * lib/csharpcomp.c: New file, from GNU gettext.
11347         * lib/csharpcomp.sh.in: New file, from GNU gettext.
11348
11349 2005-06-08  Bruno Haible  <bruno@clisp.org>
11350
11351         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
11352         warning on mingw.
11353
11354 2005-06-07  Derek Price  <derek@ximbiot.com>
11355
11356         Sync from CVS.
11357         * lib/glob_.h: Indent nested #ifdef.
11358
11359 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11360
11361         Sync from coreutils.
11362         Use "file name" when talking about file names, instead of "filename"
11363         or "path", as per the GNU coding standards.
11364         * lib/mkdir-p.c: Renamed from makepath.c.
11365         (make_dir_parents): Renamed from make_path.  All callers changed.
11366         * lib/mkdir-p.h: Likewise.  All includers changed.
11367         * lib/filenamecat.c: Renamed from path-concat.c.
11368         (file_name_concat): Renamed from path_concat.  All callers changed.
11369         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
11370         * lib/filenamecat.h: Likewise.  All includers changed.
11371         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
11372         in comments or local variable names.
11373         * lib/basename.c: Likewise.
11374         * lib/canonicalize.c, canonicalize.h: Likewise.
11375         * lib/dirname.c, dirname.h: Likewise.
11376         * lib/euidaccess.c: Likewise.
11377         * lib/exclude.c: Likewise
11378         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
11379         * lib/fsusage.c, fsuage.h: Likewise.
11380         * lib/fts.c, fts_.h: Likewise.
11381         * lib/getcwd.c: Likewise.
11382         * lib/getloadavg.c: Likewise.
11383         * lib/mkstemp.c: Likewise.
11384         * lib/mountlist.c, mountlist.h: Likewise.
11385         * lib/openat.c, openat.h: Likewise.
11386         * lib/readlink-stub.c: Likewise.
11387         * lib/readutmp.c, readutmp.h: Likewise.
11388         * lib/rename.c: Likewise.
11389         * lib/rmdir.c: Likewise.
11390         * lib/same.c: Likewise.
11391         * lib/savedir.c: Likewise.
11392         * lib/stripslash.c: Likewise.
11393         * lib/tempname.c: Likewise.
11394         * lib/xreadlink.c: Likewise.
11395         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
11396         All uses changed.
11397         * lib/exclude.h: Likewise.
11398
11399         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
11400         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11401         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
11402         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11403         * lib/pathmax.h: Include <limits.h> unconditionally, since other
11404         files have been getting away with it for years (MORE/BSD 4.3
11405         is extinct now).
11406         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
11407         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11408
11409         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
11410         Define to 256, not 255, as per modern POSIX.
11411
11412 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11413
11414         Sync from coreutils.
11415         Use "file name" when talking about file names, instead of "filename"
11416         or "path", as per the GNU coding standards.
11417         * MODULES.html.sh: mkdir-p renamed from makepath.
11418         filenamecat renamed from path-concat.
11419         * modules/filenamecat: Renamed from modules/path-concat.
11420         (Files): filenamecat.h and filenamecat.c renamed from
11421         path-concat.h and path-concat.c.
11422         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
11423         (Include): filenamecat.h, not path-concat.h.
11424         * modules/mkdir-p: Renamed from modules/makepath.
11425         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
11426         makepath.c.
11427         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
11428         (Include): mkdir-p.h, not makepath.h.
11429
11430 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11431
11432         Sync from coreutils.
11433         * m4/mkdir-p.m4: Renamed from makepath.m4.
11434         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
11435         Rename files from makepath.c to mkdir-p.c, and from
11436         makepath.h to mkdir-p.h.
11437         * m4/filenamecat.m4: Renamed from path-concat.m4.
11438         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
11439         Rename files from path-concat.c to filenamecat.c,
11440         and from path-concat.h to filenamecat.h.
11441         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
11442         "file name" in local variables or comments.
11443         * m4/rename.m4: Likewise.
11444
11445 2005-06-01  Bruno Haible  <bruno@clisp.org>
11446
11447         * modules/csharpexec: New file.
11448         * MODULES.html.sh (C#): New section.
11449
11450 2005-06-01  Bruno Haible  <bruno@clisp.org>
11451
11452         * m4/csharp.m4: New file, from GNU gettext.
11453         * m4/csharpexec.m4: New file, from GNU gettext.
11454
11455 2005-06-01  Bruno Haible  <bruno@clisp.org>
11456
11457         * lib/csharpexec.h: New file, from GNU gettext.
11458         * lib/csharpexec.c: New file, from GNU gettext.
11459         * lib/csharpexec.sh.in: New file, from GNU gettext.
11460
11461 2005-05-31  Derek Price  <derek@ximbiot.com>
11462             Paul Eggert  <eggert@cs.ucla.edu>
11463
11464         Sync from cvs.
11465         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
11466
11467 2005-05-31  Derek Price  <derek@ximbiot.com>
11468             Paul Eggert  <eggert@cs.ucla.edu>
11469
11470         Sync from cvs.
11471         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
11472
11473 2005-05-29  Derek Price  <derek@ximbiot.com>
11474
11475         * config/srclist.txt (glob_.h, glob.c): Add these files.
11476
11477 2005-05-29  Derek Price  <derek@ximbiot.com>
11478
11479         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
11480         * modules/glob: New file.
11481         * modules/getlogin_r: Add link to POSIX spec in description.
11482
11483 2005-05-29  Derek Price  <derek@ximbiot.com>
11484             Paul Eggert  <eggert@cs.ucla.edu>
11485
11486         * m4/glob.m4: New file.
11487
11488 2005-05-29  Derek Price  <derek@ximbiot.com>
11489             Paul Eggert  <eggert@cs.ucla.edu>
11490
11491         * lib/glob_.h, lib/glob.c: New files.
11492
11493 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11494
11495         * modules/fts (Files): Remove m4/inttypes-pri.m4.
11496         * modules/fts-lgpl (Depends-on): Remove gettext.
11497
11498 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11499
11500         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
11501         and don't require gt_INTTYPES_PRI.
11502
11503 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11504
11505         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
11506
11507         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
11508         the configuration hassle isn't worth it.
11509         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
11510         (LONGEST_MODIFIER, PRIuMAX): Remove.
11511
11512 2005-05-27  Bruno Haible  <bruno@clisp.org>
11513
11514         * lib/getlogin_r.h: Remove second include of <stddef.h>.
11515
11516 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
11517
11518         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
11519         _POSIX_PTHREAD_SEMANTICS for Solaris.
11520
11521 2005-05-25  Derek Price  <derek@ximbiot.com>
11522
11523         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
11524
11525 2005-05-25  Derek Price  <derek@ximbiot.com>
11526             Paul Eggert  <eggert@cs.ucla.edu>
11527
11528         * modules/getlogin_r, m4/getlogin_r.m4: New files.
11529         * lib/getlogin_r.c, getlogin_r.h: New files.
11530
11531 2005-05-25  Bruno Haible  <bruno@clisp.org>
11532             Derek Price  <derek@ximbiot.com>
11533
11534         * lib/getlogin_r.h: Simplify API documentation.
11535
11536 2005-05-23  Derek Price  <derek@ximbiot.com>
11537
11538         * modules/minmax (Files): Add m4/minmax.m4.
11539         (configure.ac): Add gl_MINMAX.
11540
11541 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
11542
11543         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
11544         so that unistd-safer.h (GPL'ed code) need not be included.
11545
11546 2005-05-22  Bruno Haible  <bruno@clisp.org>
11547
11548         * m4/minmax.m4: New file.
11549         Based on a patch by Derek Price <derek@ximbiot.com>.
11550
11551 2005-05-22  Bruno Haible  <bruno@clisp.org>
11552
11553         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
11554         (INT64_MIN): Fix definition.
11555         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
11556
11557         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
11558         NEED_SIGNED_INT_TYPES.
11559
11560         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
11561         HAVE_SYSTEM_INTTYPES.
11562
11563 2005-05-22  Bruno Haible  <bruno@clisp.org>
11564
11565         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
11566         Also include <sys/param.h> if it defines MIN, MAX.
11567         Based on a patch by Derek Price <derek@ximbiot.com>.
11568
11569 2005-05-21  Jim Meyering  <jim@meyering.net>
11570
11571         * modules/fts (Files): Add m4/inttypes-pri.m4.
11572         (Depends-on): Add lstat and remove gettext.  Alphabetize.
11573
11574 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11575
11576         New fts module.
11577         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
11578         (setup_dir, free_dir): New functions.
11579         (enter_dir, leave_dir): Define trivial
11580         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
11581         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
11582         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
11583         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
11584         Move to fts-cycle.c.
11585         (fts_open): Use setup_dir.
11586         (fts_close): Use free_dir.
11587         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
11588         This adds a label and some gotos, but the alternatives were messier.
11589         Check for memory allocation failure when entering a dir.
11590         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
11591         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
11592         (FTS): New member fts_cycle, that is a union that contains the
11593         old active_dir_ht and cycle_state.  All uses changed to mention
11594         fts_cycle.ht and fts_cycle.state.
11595         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
11596         fts.c, with the following changes:
11597         (setup_dir, free_dir): New functions.
11598         (enter_dir): Now returns bool.  Return true if successful, false
11599         if memory exhausted.  All callers changed.
11600         Do not bother partly cleaning up on
11601         memory allocation failure; that is free_dir's job.
11602         However, free ad if hash_insert fails, to avoid memory leak.
11603         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
11604         fts->fts_options to see which union member to use.
11605
11606 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11607
11608         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
11609         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
11610
11611 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11612
11613         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
11614
11615 2005-05-20  Jim Meyering  <jim@meyering.net>
11616
11617         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
11618         Now a macro, to pacify GCC.
11619
11620 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
11621
11622         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
11623         of -1.
11624
11625 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
11626
11627         * lib/chown.c (rpl_chown): Return -1 on failure.
11628
11629 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
11630
11631         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
11632         Don't check for stddef.h.
11633         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
11634         don't use its results.
11635         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
11636         since we include them unconditionally.  Don't require
11637         AM_STDBOOL_H, since stdbool is a prerequisite.
11638         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
11639         since we assume C89 or better.
11640         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
11641         as we don't use their results.
11642         Don't check for fchdir, memmove, memset, strrchr, as we use
11643         them unconditionally.
11644         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
11645         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
11646
11647 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
11648
11649         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
11650         Include <stddef.h> unconditionally, since we assume C89 now.
11651         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
11652         * lib/fts.c: Include fts_.h first, to check interface.
11653         Do not include intprops.h; no longer needed.
11654         Include cycle-check.h and hash.h, since fts_.h no longer does.
11655         Remove unnecessary casts of closedir to void.
11656         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
11657         decide whether to decrement nlinks.
11658         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
11659         (FTS): Use struct hash_table * instead of Hash_table, so that
11660         we no longer need to include hash.h here.
11661
11662 2005-05-18  Jim Meyering  <jim@meyering.net>
11663
11664         * modules/dirfd (License): Change to LGPL.  Most of the code
11665         is already in the public domain.
11666
11667 2005-05-18  Jim Meyering  <jim@meyering.net>
11668
11669         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
11670         Reported by Yoann Vandoorselaere.
11671
11672 2005-05-17  Jim Meyering  <jim@meyering.net>
11673
11674         * m4/fts.m4: New file, from coreutils.
11675
11676 2005-05-17  Jim Meyering  <jim@meyering.net>
11677
11678         * lib/fts.c, lib/fts_.h: New files, from coreutils.
11679
11680 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11681
11682         Sync from coreutils.
11683         * m4/unlinkdir.m4: New file.
11684
11685 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11686
11687         Sync from coreutils.
11688         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
11689         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
11690         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
11691         White space changes only.
11692         * lib/makepath.c (make_path): Port to hosts where leading "//" is
11693         special.
11694         * lib/yesno.c: Include getline.h, not ctype.h.
11695         (yesno): Don't remove leading white space; POSIX doesn't allow it.
11696         Use getline to remove arbitrary restriction on response length.
11697
11698 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11699
11700         * config/srclist-update: Spell out "Street" in FSF postal
11701         mail address; this is the style the FSF seems to prefer.
11702
11703         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
11704         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
11705         this updates FSF postal mail address.
11706
11707         Sync from coreutils.
11708         * modules/unlinkdir: New file.
11709         * modules/yesno (Depends-on): Add getline.
11710         * MODULES.html.sh (File system functions): Add unlinkdir.
11711
11712 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
11713
11714         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
11715         lib/strsep.h:
11716         Change the initial comment to refer to GPL, not LGPL.
11717         gnulib-tool will change it to LGPL as needed.
11718
11719         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
11720         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
11721         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
11722         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
11723         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
11724         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
11725         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
11726         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
11727         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
11728         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
11729         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
11730         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
11731         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
11732         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
11733         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
11734         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
11735         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
11736         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
11737         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
11738         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
11739         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
11740         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
11741         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
11742         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
11743         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
11744         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
11745         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
11746         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
11747         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
11748         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
11749         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
11750         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
11751         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
11752         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
11753         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
11754         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
11755         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
11756         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
11757         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
11758         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
11759         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
11760         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
11761         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
11762         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
11763         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
11764         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
11765         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
11766         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
11767         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
11768         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
11769         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
11770         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
11771         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
11772         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
11773         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
11774         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
11775         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
11776         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
11777         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
11778         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
11779         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
11780         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
11781         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
11782         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
11783         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
11784         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
11785         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
11786         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
11787         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
11788         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
11789         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
11790         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
11791         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
11792         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
11793         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
11794         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
11795         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
11796         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
11797         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
11798         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
11799         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
11800         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
11801         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
11802         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
11803         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
11804         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
11805         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
11806         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
11807         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
11808         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
11809         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
11810         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
11811         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
11812         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
11813         lib/yesno.c, lib/yesno.h:
11814         Update FSF postal mail address.
11815
11816 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
11817
11818         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
11819         tests/test-memmem.c, tests/test-stpncpy.c:
11820         Update FSF postal mail address.
11821
11822 2005-05-13  Bruno Haible  <bruno@clisp.org>
11823
11824         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
11825         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
11826         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
11827         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
11828         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
11829         Add support for 64-bit integers in the MSVC compiler.
11830
11831 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11832
11833         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
11834
11835 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
11836
11837         * gnulib-tool (func_import): Sort and uniquify recommended includes.
11838
11839 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
11840
11841         * doc/getdate.texi (General date syntax): Don't say that date
11842         date --iso-8601=ns generates acceptable dates; it doesn't yet.
11843         Problem reported by Nic Ferrier.
11844
11845 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11846
11847         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
11848         specified in ai_socktype. Fix invalid ai_protocol
11849         check. ai_protocol is usually set to 0 or depending on
11850         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
11851         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
11852         ai_socktype / ai_protocol in the returned addrinfo structure.
11853
11854 2005-05-10  Simon Josefsson  <jas@extundo.com>
11855
11856         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
11857         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11858
11859 2005-05-10  Karl Berry  <karl@gnu.org>
11860
11861         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
11862         (from http://www.gnu.org/licenses).
11863         * doc/COPYING.LIB: also rename to COPYING.LESSER.
11864         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
11865         fdl.texi suffices.
11866
11867 2005-05-10  Karl Berry  <karl@gnu.org>
11868
11869         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
11870         (COPYING.DOC): remove.
11871
11872         * config/srclist-update: new FSF address.
11873
11874 2005-05-10  Derek Price  <derek@ximbiot.com>
11875
11876         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
11877         possible.
11878
11879 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11880             Bruno Haible  <bruno@clisp.org>
11881
11882         * modules/inet_ntop: New file.
11883         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11884         inet_ntop.
11885
11886 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11887             Bruno Haible  <bruno@clisp.org>
11888
11889         * m4/inet_ntop.m4: New file.
11890
11891 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11892             Bruno Haible  <bruno@clisp.org>
11893
11894         * lib/inet_ntop.h: New file.
11895         * lib/inet_ntop.c: New file, from glibc with modifications.
11896
11897 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
11898
11899         * modules/time_r (License): Change to LGPL.
11900         * modules/extensions (License): Change to LGPL.  Actually,
11901         the license is more permissive than that, but currently gnulib-tool
11902         doesn't know how to handle more-permissive licenses.
11903
11904         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
11905         Problem reported by Dave Love.
11906
11907 2005-05-08  Jim Meyering  <jim@meyering.net>
11908
11909         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
11910         blank.
11911
11912 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
11913
11914         * modules/argmatch (Depends-on): Add stdbool.
11915         * modules/backupfile (Depends-on): Likewise.
11916         * modules/chdir-long (Depends-on): Likewise.
11917         * modules/closeout (Depends-on): Likewise.
11918         * modules/cycle-check (Depends-on): Likewise.
11919         * modules/dirname (Depends-on): Likewise.
11920         * modules/fnmatch (Depends-on): Likewise.
11921         * modules/fsusage (Depends-on): Likewise.
11922         * modules/fwriteerror (Depends-on): Likewise.
11923         * modules/getcwd (Depends-on): Likewise.
11924         * modules/getloadavg (Depends-on): Likewise.
11925         * modules/hard-locale (Depends-on): Likewise.
11926         * modules/makepath (Depends-on): Likewise.
11927         * modules/mountlist (Depends-on): Likewise.
11928         * modules/nanosleep (Depends-on): Likewise.
11929         * modules/posixtm (Depends-on): Likewise.
11930         * modules/quotearg (Depends-on): Likewise.
11931         * modules/readtokens (Depends-on): Likewise.
11932         * modules/readtokens0 (Depends-on): Likewise.
11933         * modules/readutmp (Depends-on): Likewise.
11934         * modules/save-cwd (Depends-on): Likewise.
11935         * modules/strftime (Depends-on): Likewise.
11936         * modules/userspec (Depends-on): Likewise.
11937         * modules/utimecmp (Depends-on): Likewise.
11938         * modules/xgetcwd (Depends-on): Likewise.
11939         * modules/xnanosleep (Depends-on): Likewise.
11940         * modules/xstrtod (Depends-on): Likewise.
11941         * modules/yesno (Depends-on): Likewise.
11942
11943 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
11944
11945         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
11946         needless checks.
11947
11948 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11949
11950         Merge from coreutils.  Among other things,
11951         add bulletproofing for cases where stdin, stdout, or stderr are closed.
11952         * lib/fd-safer.c: New file.
11953         * lib/fcntl-safer.h, open-safer.c: Remove.
11954         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
11955         * lib/dup-safer.c: Include unistd-safer.h first.
11956         Don't include errno.h.
11957         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
11958         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
11959         * lib/file-type.c: Rely on file-type.h change.
11960         * lib/getloadavg.c: Include unistd-safer.h.
11961         (getloadavg): Use safer open.
11962         * lib/getusershell.c: Include "stdio-safer.h".
11963         (getusershell): Use safer fopen.
11964         * lib/long-options.c (long_options): Use NULL rather than 0.
11965         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
11966         'free'.
11967         * lib/modechange.c: Likewise.
11968         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
11969         (MODE_DONE): New constant.
11970         (struct mode_change): Remove 'next' member.
11971         (make_node_op_equals): New function; like the old one of the
11972         same name, except it allocates an array.
11973         (mode_compile, mode_create_from_ref): Use it.
11974         (mode_compile): Allocate result as an array, not a linked list.
11975         Parse octal string ourself, so that we catch mistakes like "+0".
11976         (mode_adjust): Arg is an array, not a linked list.
11977         * lib/modechange.c: Include stat-macros.h, xalloc.h.
11978         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
11979         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
11980         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
11981         Remove.  This is now stat-macros.h's job.
11982         (talloc): Remove.  All callers replaced by xalloc, so that
11983         our invokers don't have to worry about reporting memory failures.
11984         (make_node_op_equals): Remove.
11985         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
11986         New constants.
11987         (struct mode_change): Moved here from modechange.h.
11988         (mode_append_entry): Remove.
11989         (mode_compile): Remove MASKED_OPS arg, since it encouraged
11990         apps to have incorrect behavior.  Use simpler algorithm for head
11991         and tail.  Don't futz with umask; that's now the job of mode_adjust.
11992         Detect more invalid usages rather than having somewhat-random behavior.
11993         Don't insert an "a=" action, as that leads to incorrect behavior.
11994         (mode_compile, mode_create_from_ref): Return NULL on error instead
11995         of an enum, since now there's only one way to have an error.  All
11996         callers changed.
11997         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
11998         at the correct time.  Simplify calculation of "+u" and its ilk.
11999         Don't mishandle "+X".
12000         (mode_free): Remove "register" and localize decls.
12001         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12002         (struct mode_change): Move to modechange.c; callers don't
12003         need to see this stuff.
12004         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
12005         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
12006         (mode_change, mode_adjust): Reflect the new signatures noted above.
12007         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
12008         that might redefine system include files.
12009         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
12010         (my_usleep): Use NULL rather than (void *) 0.
12011         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
12012         Use siginterrupt to specify that system calls should be interrupted.
12013         (rpl_nanosleep): Move initialization of suspended closer to call of
12014         my_usleep.
12015         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
12016         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
12017         (desirable_utmp_entry): New function.
12018         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
12019         using x2nrealloc, to simplify logic.
12020         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
12021         size calculation.  Do not assume utmp file is a regular file.
12022         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
12023         (READ_UTMP_CHECK_PIDS): New constant.
12024         * lib/save-cwd.c: Include unistd-safer.h.
12025         (save_cwd): Use fd_safer.
12026         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
12027         [!_LIBC] Include "stat-macros.h" instead.
12028         * lib/unistd-safer.h (fd_safer): New decl.
12029
12030 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12031
12032         * modules/getloadavg (Depends-on): Add unistd-safer.
12033         * modules/getusershell (Depends-on): Add stdio-safer.
12034         * modules/lstat (Depends-on): Remove xalloc.
12035         * modules/mkstemp (Depends-on): Add stat-macros.
12036         * modules/modechange (Depends-on): Remove xstrtol.
12037         Add stat-macros, xalloc.
12038         * modules/save-cwd (Depends-on): Add unistd-safer.
12039         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
12040         * modules/unistd-safer (Files): Add lib/fd-safer.c
12041         (Makefile.am): Remove lib_SOURCES.
12042
12043         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
12044         Remove fcntl-safer; unistd-safer supersedes it.
12045
12046 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12047
12048         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
12049         AC_HEADER_STAT.
12050         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
12051         (gl_PREREQ_CHOWN): Remove.
12052         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
12053         it.  Don't require AC_HEADER_STAT.
12054         (gl_PREREQ_LSTAT): Remove.
12055         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
12056         Don't require AC_HEADER_STAT.
12057         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
12058         (gl_PREREQ_RMDIR): Remove.
12059         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
12060         mention stat-macros.h or AC_HEADER_STAT, since we'll make
12061         the stat-macros module a prerequisite.
12062         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
12063         * m4/filemode.m4 (gl_FILEMODE): Likewise.
12064         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
12065         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
12066         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
12067         variable names.
12068         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
12069         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
12070         variable prefixes.
12071         * m4/fcntl-safer.m4: Remove.
12072         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
12073         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
12074         Invoke gl_PREREQ_FD_SAFER.
12075         (gl_PREREQ_FD_SAFER): New macro.
12076         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
12077         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
12078         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
12079         Remove duplicate call to AC_LIBOBJ(readutmp).
12080         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
12081
12082         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
12083         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
12084
12085 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12086
12087         * MODULES.html.sh (Misc): Add byteswap.
12088
12089 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12090
12091         * modules/getcwd (Depends-on): Add extensions.
12092         * modules/openat (Depends-on): Likewise.
12093
12094 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12095
12096         * modules/byteswap: New file.
12097
12098 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12099
12100         * m4/byteswap.m4: New file.
12101
12102 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12103
12104         * lib/byteswap_.h: New file.
12105
12106 2005-04-25  Karl Berry  <karl@gnu.org>
12107
12108         * m4/gettext.m4: Update from GNU gettext 0.14.4.
12109
12110 2005-04-25  Albert Chin  <china@thewrittenword.com>
12111
12112         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
12113         Toolkit C bug.
12114
12115 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
12116
12117         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
12118         (func_ln_if_changed) Remove forcibly for no error message
12119         in case file does not exist.
12120
12121 2005-04-19  Simon Josefsson  <jas@extundo.com>
12122
12123         * gnulib-tool (Options): Make --symlink mean --symbolic.
12124
12125 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
12126
12127         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
12128
12129 2005-04-16  Simon Josefsson  <jas@extundo.com>
12130
12131         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
12132
12133 2005-04-15  Simon Josefsson  <jas@extundo.com>
12134
12135         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
12136
12137 2005-04-15  Simon Josefsson  <jas@extundo.com>
12138
12139         * gnulib-tool: Rename --symlink to --symbolic.
12140
12141 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
12142
12143         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
12144         symbolic links to files instead of copying/moving.  Add --aux-dir,
12145         specifying directory relative --dir where auxiliary build tools
12146         are placed.
12147
12148 2005-04-14  Bruno Haible  <bruno@clisp.org>
12149
12150         * modules/allocsa (License): Change to LGPL.
12151         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
12152
12153 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
12154
12155         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
12156         that "UTC +1 second" continues to work.  Problem reported
12157         by Dmitry V. Levin.
12158         (relunit_snumber): New rule.
12159         (relunit): Use it.
12160
12161 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
12162
12163         * lib/getdate.y (universal_time_zone_table): New constant.
12164         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
12165         universal_time_zone_table.
12166         (lookup_zone): Prefer universal_time_zone_table to
12167         local_time_zone_table, so that "GMT" time stamps are allowed in
12168         London during the summer.  Problem reported by Ian Abbott.
12169
12170 2005-04-12  Jim Meyering  <jim@meyering.net>
12171
12172         * lib/human.c (humblock): Set *options even when returning due to
12173         xstrtoumax conversion failure.  Thanks to a used-uninitialized
12174         warning from gcc-4.
12175
12176 2005-04-09  Jim Meyering  <jim@meyering.net>
12177
12178         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
12179         -Wuninitialized: initialize tm0.tm_year.
12180
12181 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
12182
12183         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
12184         count, since there's no maximum.  All uses changed.
12185         Add member dsts_seen.
12186         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
12187         not being INT_MAX.
12188         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
12189         Use pc_rels_seen to decide whther a date is absolute.
12190
12191         * lib/getdate.y (number): Don't overwrite year.
12192         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
12193         check.
12194
12195 2005-04-02  Simon Josefsson  <jas@extundo.com>
12196
12197         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
12198         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
12199
12200 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
12201
12202         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
12203         where no absolute path name can be longer than PATH_MAX.
12204
12205 2005-03-27  Jim Meyering  <jim@meyering.net>
12206
12207         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
12208
12209 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
12210
12211         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
12212         "one's complement" -> "ones' complement" in comment, as per Knuth.
12213         "value of type" -> "type or expression" in comment.
12214         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
12215
12216 2005-03-26  Jim Meyering  <jim@meyering.net>
12217
12218         Comment nits.
12219         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
12220         Correct typos: s/or/of/.
12221
12222 2005-03-26  Jim Meyering  <jim@meyering.net>
12223
12224         * modules/check-include-files: Move to ../ and rename to...
12225         * check-module: ...this.
12226
12227 2005-03-25  Jim Meyering  <jim@meyering.net>
12228
12229         * modules/xvasprintf (Files): Add xalloc.h.
12230
12231 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
12232
12233         * modules/gettext (Files): config/config.rpath ->
12234         build-aux/config.rpath
12235         * modules/iconv (Files): Likewise.
12236         Problem reported by Oskar Liljeblad.
12237
12238 2005-03-23  Jim Meyering  <jim@meyering.net>
12239
12240         * modules/check-include-files: New script to check for
12241         missing dependencies, multiple includes, etc.
12242
12243         * modules/c-strtold (Depends-on): Add xalloc.
12244         * modules/c-strtod (Depends-on): Add xalloc.
12245         * modules/hash (Depends-on): Add xalloc.
12246         (Files): Remove lib/xalloc.h.
12247
12248         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
12249         * modules/userspec (Files): Add lib/inttostr.h.
12250
12251 2005-03-23  Jim Meyering  <jim@meyering.net>
12252
12253         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
12254
12255 2005-03-22  Jim Meyering  <jim@meyering.net>
12256
12257         * modules/stat-macros: New module.
12258         * modules/canonicalize, modules/euidaccess, modules/file-type,
12259         * modules/filemode, modules/lchown, modules/makepath,
12260         * modules/rmdir, modules/stat: Depend on new stat-macros module
12261         rather than listing lib/stat-macros.h manually.
12262         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
12263
12264 2005-03-22  Jim Meyering  <jim@meyering.net>
12265
12266         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
12267
12268 2005-03-22  Bruno Haible  <bruno@clisp.org>
12269
12270         * config/srclist.txt: Replace target directory 'config' with
12271         'build-aux'.
12272         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
12273         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
12274         ../build-aux/.
12275
12276 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
12277
12278         * modules/chdir-long (Depends-on): Add mempcpy.
12279
12280         * modules/acl, modules/backupfile, modules/c-strtod,
12281         modules/c-strtold, modules/canon-host, modules/canonicalize,
12282         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
12283         modules/exclude, modules/exitfail, modules/file-type,
12284         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
12285         modules/getdate, modules/getline, modules/getpagesize,
12286         modules/getpass, modules/getugroups, modules/group-member,
12287         modules/hard-locale, modules/hash, modules/human, modules/idcache,
12288         modules/inttostr, modules/long-options, modules/makepath,
12289         modules/md5, modules/memcasecmp, modules/memcoll,
12290         modules/modechange, modules/mountlist, modules/path-concat,
12291         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
12292         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
12293         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
12294         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
12295         modules/strftime, modules/strndup, modules/strverscmp,
12296         modules/timespec, modules/unlocked-io, modules/userspec,
12297         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
12298         modules/yesno:
12299         Remove lib_SOURCES line from Makefile.am section, as this is now
12300         done automatically by the corresponding Autoconf macro.
12301
12302 2005-03-21  Jim Meyering  <jim@meyering.net>
12303
12304         Changes imported from coreutils.
12305
12306         * lib/cycle-check.c: Don't include xalloc.h.
12307
12308         * lib/path-concat.c: Don't include assert.h.
12309         (path_concat): Remove assertion that would have triggered
12310         for ABASE starting with more than one slash.
12311         Reported by Andreas Schwab.
12312
12313         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
12314         properly when ABASE is an absolute file name.
12315         Correct the description of this function.
12316         Include <assert.h>.
12317         Add an assertion and a test driver.
12318         This fixes a bug introduced on 2004-07-02.
12319         Andreas Schwab reported the resulting failure of cp --parents:
12320         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
12321
12322 2005-03-21  Jim Meyering  <jim@meyering.net>
12323
12324         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
12325         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
12326
12327 2005-03-21  Jim Meyering  <jim@meyering.net>
12328         and  Paul Eggert  <eggert@cs.ucla.edu>
12329
12330         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
12331         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
12332         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
12333         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
12334         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
12335         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
12336         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
12337         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
12338         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
12339         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
12340         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
12341         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
12342         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
12343         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
12344         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
12345         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
12346         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
12347         for these modules.
12348
12349 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
12350
12351         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
12352         (which shouldn't happen), generate nothing instead of returning 0
12353         immediately, so that nstrftime (NULL, ...) doesn't return 0.
12354
12355 2005-03-16  Bruno Haible  <bruno@clisp.org>
12356
12357         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
12358         HAVE_LONGLONG_64BIT.
12359
12360 2005-03-16  Bruno Haible  <bruno@clisp.org>
12361
12362         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
12363         HAVE_LONGLONG_64BIT.
12364
12365 2005-03-16  Bruno Haible  <bruno@clisp.org>
12366
12367         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
12368         HAVE_LONGLONG_64BIT.
12369
12370 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
12371
12372         * lib/strftime.c (my_strftime): Prepend space to format so that we can
12373         reliably distinguish strftime failure from empty output on POSIX
12374         hosts.
12375
12376 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
12377
12378         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
12379         (iconv_string): Don't guess a size-zero buffer, as that might cause
12380         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
12381         result would be 'too large', where 'too large' is (heuristically)
12382         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
12383         overflow concerns.  This will prevent some unwanted malloc failures
12384         when the inputs are very large.
12385
12386 2005-03-15  Karl Berry  <karl@gnu.org>
12387
12388         * config/srclist.txt (config.rpath): from gettext.
12389         * config/config.rpath: update.
12390
12391 2005-03-15  Bruno Haible  <bruno@clisp.org>
12392
12393         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
12394         to 'negate'.
12395
12396         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
12397         variable.
12398
12399         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
12400         results.
12401
12402 2005-03-14  Simon Josefsson  <jas@extundo.com>
12403
12404         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
12405         <fx@gnu.org>.
12406
12407 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
12408
12409         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
12410         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
12411         intprops.h.
12412         * lib/strtol.c: Likewise.
12413
12414 2005-03-14  Jim Meyering  <jim@meyering.net>
12415
12416         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
12417         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
12418         to be nonzero so that we (and caller) can detect the difference
12419         between a valid zero-length expansion and an error return, even
12420         when the underlying strftime fails before writing anything into
12421         that location.
12422
12423 2005-03-14  Bruno Haible  <bruno@clisp.org>
12424
12425         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
12426         Update from GNU gettext 0.14.3.
12427
12428 2005-03-10  Jim Meyering  <jim@meyering.net>
12429
12430         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
12431
12432 2005-03-10  Jim Meyering  <jim@meyering.net>
12433
12434         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
12435         so that this module works on systems without fchdir.
12436
12437 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
12438
12439         Factor int-properties macros into a single file, except for
12440         glibc-related files.
12441         * lib/intprops.h: New file.
12442         * lib/getloadavg.c: Include it instead of limits.h.
12443         (INT_STRLEN_BOUND): Remove.
12444         * lib/human.c: Include intprops.h.
12445         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
12446         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
12447         302/1000.
12448         * lib/inttostr.h: Include intprops.h instead of limits.h.
12449         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
12450         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
12451         for consistency with intprops.h.
12452         (time_t_is_integer, twos_complement_arithmetic): Use them.
12453         * lib/sig2str.h: Include <signal.h>, intprops.h.
12454         (INT_STRLEN_BOUND): Remove.
12455         * lib/strftime.c (TYPE_SIGNED): Remove.
12456         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
12457         * lib/strtol.c: Adjust comments to match intprops.h.
12458         * lib/userspec.c: Include intprops.h.
12459         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
12460         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
12461         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
12462         instead of rolling our own expressions.
12463         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
12464
12465         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
12466         instead of int.
12467         (my_strftime): Do not mishandle years close to INT_MAX, by doing
12468         the right thing even if adding 1900 would overflow.  Similarly
12469         for tm_mon + 1 and tm_yday + 1.
12470         Make %Y always equivalent to %C%y, and similarly for %G and %g.
12471         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
12472         (DO_SIGNED_NUMBER): New macro.
12473         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
12474
12475 2005-03-07  Bruno Haible  <bruno@clisp.org>
12476
12477         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
12478
12479 2005-03-07  Bruno Haible  <bruno@clisp.org>
12480
12481         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
12482
12483 2005-03-04  Derek R. Price  <derek@ximbiot.com>
12484
12485         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
12486         (func_import): Only replace files via --import when they have actually
12487         changed.
12488
12489 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12490
12491         * m4/mmap-anon.m4: New file.
12492         * m4/pagealign_alloc.m4: New file.
12493
12494 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12495             Bruno Haible  <bruno@clisp.org>
12496
12497         * modules/pagealign_alloc: New file.
12498         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
12499
12500 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12501             Bruno Haible  <bruno@clisp.org>
12502
12503         * lib/pagealign_alloc.h: New file.
12504         * lib/pagealign_alloc.c: New file.
12505
12506 2005-03-03  Bruno Haible  <bruno@clisp.org>
12507
12508         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
12509         Use an all-permissive copyright notice, recommended by RMS.
12510
12511 2005-03-02  Bruno Haible  <bruno@clisp.org>
12512
12513         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
12514         of AIX, the replacement has to be done only after <string.h> is
12515         included, therefore not in config.h. stpncpy.h does the replacement,
12516         and stpncpy.c uses it.
12517
12518 2005-03-02  Bruno Haible  <bruno@clisp.org>
12519
12520         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
12521         stpncpy.c uses it.
12522
12523 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12524
12525         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
12526         The workaround isn't strictly needed for POSIX conformance, and
12527         it's too much of a pain to configure and maintain.  We'll ask
12528         people to fix their kernels instead.
12529         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
12530         (NANOSLEEP_BUG_WORKAROUND): Remove.
12531         (xnanosleep): Remove the workaround.
12532
12533 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12534
12535         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
12536         Reported by Derek Price.
12537         (Include): Add "timespec.h".
12538
12539         * modules/xnanosleep (Depends-on): Remove gethrxtime.
12540
12541 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12542
12543         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
12544         to detect nanosleep bug.
12545
12546 2005-03-01  Bruno Haible  <bruno@clisp.org>
12547
12548         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
12549
12550 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
12551
12552         * modules/gethrxtime: New file.
12553         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
12554         (Depends-on): Add gethrxtime.
12555         (configure.ac): Add gl_XNANOSLEEP.
12556         (Makefile.am): Remove lib_SOURCES line.
12557
12558 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
12559
12560         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
12561         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
12562
12563 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
12564
12565         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
12566         * lib/timespec.h (gettime): Return void, since it always
12567         succeeds now.  All uses changed.
12568         * lib/gettime.c (gettime) Likewise.
12569         [HAVE_NANOTIME]: Prefer nanotime.
12570         Assume gettimeofday succeeds, as POSIX requires.
12571         Assime time () succeeds, since other code already does.
12572         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
12573         (timespec_subtract): Remove.
12574         (NANOSLEEP_BUG_WORKAROUND): New constant.
12575         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
12576         things considerably.  Use it only on GNU/Linux hosts, since the
12577         workaround shouldn't be needed elsewhere.
12578
12579 2005-02-24  Bruno Haible  <bruno@clisp.org>
12580
12581         * modules/gettext (Files): Add m4/glibc2.m4.
12582
12583 2005-02-24  Bruno Haible  <bruno@clisp.org>
12584
12585         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
12586         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
12587         * m4/progtest.m4:
12588         Update from GNU gettext 0.14.2.
12589         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
12590
12591 2005-02-24  Bruno Haible  <bruno@clisp.org>
12592
12593         * lib/localcharset.c: Update from GNU gettext 0.14.2.
12594         * lib/config.charset: Update from GNU gettext 0.14.2.
12595
12596 2005-02-24  Bruno Haible  <bruno@clisp.org>
12597
12598         * lib/gettext.h: Update from GNU gettext 0.14.2.
12599
12600 2005-02-23  Simon Josefsson  <jas@extundo.com>
12601
12602         * m4/iconvme.m4: New file.
12603
12604 2005-02-23  Jim Meyering  <jim@meyering.net>
12605
12606         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
12607         change.
12608         Thanks to Bruno Haible for catching it.
12609
12610 2005-02-22  Simon Josefsson  <jas@extundo.com>
12611
12612         * modules/iconvme: New file.
12613
12614         * MODULES.html.sh: Add iconvme.
12615
12616 2005-02-22  Simon Josefsson  <jas@extundo.com>
12617
12618         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
12619
12620 2005-02-22  Simon Josefsson  <jas@extundo.com>
12621
12622         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
12623
12624 2005-02-22  Jim Meyering  <jim@meyering.net>
12625
12626         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
12627         s/ifndef/ifdef/.
12628
12629 2005-02-20  Neil Conway  <neilc@samurai.com>
12630
12631         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
12632         returned by OSX/Darwin if the specified buffer is not large
12633         enough for the hostname.
12634
12635 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12636
12637         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
12638         pass it to _help, otherwise the latter coredumps trying to
12639         dereference state.root_argp.
12640
12641 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12642
12643         * modules/chdir-long (Depends-on): Add memrchr.
12644         * modules/memrchr (Files): Add lib/memrchr.h.
12645         (Include): "memrchr.h".
12646
12647 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12648
12649         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
12650
12651 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12652
12653         * lib/memrchr.h: New file.
12654         * lib/chdir-long.c: Include it.
12655         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
12656         Don't bother including stddef.h.
12657
12658 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
12659
12660         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
12661         inclusion.
12662         Include <sys/types.h>, for dev_t.
12663         (ME_DUMMY, ME_REMOTE): Move from here....
12664         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
12665         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
12666         Dmitry V. Levin.
12667         Include mountlist.h first, to test the interface.
12668
12669 2005-01-29  Bruno Haible  <bruno@clisp.org>
12670
12671         * lib/progname.c (program_name): Initialize.
12672         Needed when linking statically on MacOS X.
12673
12674 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
12675
12676         Sync from coreutils.
12677         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
12678         (Depends-on): Add c-strtod.
12679         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
12680
12681 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
12682
12683         Sync from coreutils.
12684         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
12685
12686         Remove files that are specific to coreutils.
12687         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
12688
12689 2005-01-28  Bruno Haible  <bruno@clisp.org>
12690
12691         * modules/javacomp: New file.
12692         * MODULES.html.sh (Java): Add javacomp.
12693
12694 2005-01-28  Bruno Haible  <bruno@clisp.org>
12695
12696         * m4/javacomp.m4: New file, from GNU gettext.
12697
12698 2005-01-28  Bruno Haible  <bruno@clisp.org>
12699
12700         * lib/javacomp.sh.in: New file, from GNU gettext.
12701         * lib/javacomp.h: New file, from GNU gettext.
12702         * lib/javacomp.c: New file, from GNU gettext.
12703
12704 2005-01-26  Simon Josefsson  <jas@extundo.com>
12705
12706         * lib/gai_strerror.c: Use GPL in header.
12707
12708 2005-01-26  Bruno Haible  <bruno@clisp.org>
12709
12710         * modules/javaexec: New file.
12711         * MODULES.html.sh (Java): Add javaexec.
12712
12713 2005-01-26  Bruno Haible  <bruno@clisp.org>
12714
12715         * m4/javaexec.m4: New file, from GNU gettext.
12716
12717 2005-01-26  Bruno Haible  <bruno@clisp.org>
12718
12719         * lib/javaexec.sh.in: New file, from GNU gettext.
12720         * lib/javaexec.h: New file, from GNU gettext.
12721         * lib/javaexec.c: New file, from GNU gettext.
12722
12723 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12724
12725         * modules/lchown (Depends-on): Remove lchown.h
12726
12727 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12728
12729         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
12730         must be defined if the header file was not found, in order
12731         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
12732
12733 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12734
12735         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
12736         initializers for struct pentry_state.
12737         (__argp_error): Check return value of __asprintf
12738         (__argp_failure): Translate error message
12739
12740         * lib/argp-parse.c: Removed braces around the expansion of N_()
12741
12742 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12743
12744         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
12745         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
12746         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
12747         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
12748         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
12749         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
12750         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
12751         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
12752         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
12753         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
12754         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
12755         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
12756         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
12757         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
12758         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
12759         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
12760         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
12761         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
12762         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
12763         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
12764         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
12765         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
12766         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
12767         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
12768         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
12769         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
12770         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
12771         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
12772         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
12773         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
12774         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
12775         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
12776         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
12777         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
12778         xstrtol.m4, xstrtoumax.m4, yesno.m4:
12779         Use an all-permissive copyright notice, recommended by RMS.
12780
12781 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
12782
12783         * modules/chdir-long (Depends-on): Remove mempcpy.
12784
12785 2005-01-21  Jim Meyering  <jim@meyering.net>
12786
12787         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
12788         same value as for Solaris 9.
12789
12790         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
12791         component length.  This included changing the parameter to be
12792         of type `char *' rather than `char const *'.
12793         * lib/chdir-long.h (chdir_long): Update prototype.
12794
12795         * lib/openat.c (fdopendir, fstatat): New functions.
12796         * lib/openat.h: Include headers required for use of DIR and struct
12797         stat.
12798         [AT_SYMLINK_NOFOLLOW]: Define.
12799         (fdopendir, fstatat): Add prototypes.
12800
12801 2005-01-21  Bruno Haible  <bruno@clisp.org>
12802
12803         * modules/classpath: New file.
12804         * MODULES.html.sh (Java): Add classpath.
12805
12806 2005-01-21  Bruno Haible  <bruno@clisp.org>
12807
12808         * lib/classpath.h: New file, from GNU gettext.
12809         * lib/classpath.c: New file, from GNU gettext.
12810
12811 2005-01-20  Simon Josefsson  <jas@extundo.com>
12812
12813         * modules/version-etc-fsf: New file.
12814
12815 2005-01-20  Simon Josefsson  <jas@extundo.com>
12816
12817         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
12818         * lib/version-etc.c: Remove version_etc_copyright.
12819         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
12820         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
12821
12822 2005-01-20  Simon Josefsson  <jas@extundo.com>
12823
12824         * lib/base64.h (isbase64): Add.
12825
12826         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
12827         using a unsigned prototype, don't inline.
12828         (base64_decode): Use it.
12829
12830 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12831
12832         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
12833         it.
12834
12835 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12836
12837         * lib/save-cwd.c (save_cwd): Remove code to support the case
12838         where fchdir is missing or flaky.
12839
12840 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12841
12842         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
12843
12844 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
12845
12846         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
12847         AC_LIBSOURCES now does this.
12848         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
12849         with new ullong_max module.
12850
12851 2005-01-19  Bruno Haible  <bruno@clisp.org>
12852
12853         * modules/sh-quote: New file.
12854         * MODULES.html.sh (Executing programs): Add sh-quote.
12855
12856 2005-01-19  Bruno Haible  <bruno@clisp.org>
12857
12858         * lib/sh-quote.h: New file, from GNU gettext.
12859         * lib/sh-quote.c: New file, from GNU gettext.
12860
12861 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12862
12863         Merge from coreutils.
12864         * m4/ullong_max.m4: New file.
12865         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
12866         (gl_MACROS): Assume localeconv exists.
12867
12868 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12869
12870         Merge changes from coreutils, as described below in several
12871         changelogs dated today.
12872
12873         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
12874         (O_DIRECTORY): Remove; not needed here, since "." must be
12875         a directory.  All uses removed.
12876         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
12877         universal on Suns, and we also need to test for IRIX.
12878         Revamp code to use 'if' rather than '#if'.
12879         Avoid unnecessary comparison of cwd->desc to 0.
12880
12881         * lib/utimens.c (futimens): Robustify the previous patch, by checking
12882         for known valid error numbers rather than observed invalid ones.
12883
12884 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12885
12886         * modules/ullong_max: New file.
12887
12888         * modules/chdir-long, modules/openat: New files.
12889         * modules/save-cwd (Depends-on): Depend on chdir-long.
12890         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
12891
12892 2005-01-18  Jim Meyering  <jim@meyering.net>
12893
12894         Merge from coreutils.
12895         * m4/chdir-long.m4, m4/openat.m4: New files.
12896         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
12897         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
12898         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
12899         is sane and DOES follow symlinks.  Besides, testing 20 different
12900         systems found no broken chown implementations.
12901         Prompted by a change in rsync's copy of this macro.
12902         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
12903
12904         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
12905
12906         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
12907         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
12908         NULL-means-set-to-current-time semantics.
12909         Remove temporary file immediately, rather than waiting
12910         for configure's at-exit trap code to do it.
12911
12912 2005-01-18  Jim Meyering  <jim@meyering.net>
12913
12914         * lib/version-etc.c (version_etc_copyright): Update copyright date.
12915
12916         * lib/utimens.c (futimens): Account for the fact that futimes
12917         can also fail with errno == ENOSYS or errno == ENOENT.
12918         Patch from Dmitry V. Levin.
12919
12920         Change the name of the robust chdir function from chdir to chdir_long.
12921         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
12922         (restore_cwd): Use chdir_long, not chdir.
12923         * lib/chdir-long.c: Renamed from chdir.c.
12924         * lib/chdir-long.h: Renamed from chdir.h.
12925         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
12926         Hurd.
12927
12928 2005-01-18  Bruno Haible  <bruno@clisp.org>
12929
12930         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
12931         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
12932         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
12933         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
12934         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
12935         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
12936         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
12937         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
12938         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
12939         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
12940         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
12941         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
12942         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
12943         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
12944         Use an all-permissive copyright notice, recommended by RMS.
12945
12946 2005-01-18  Bob Proulx  <bob@proulx.com>
12947
12948         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
12949         simplify offsetof() macro construct to avoid compile failure with
12950         native HP-UX 11.0 ANSI C compiler.
12951
12952 2005-01-17  Bruno Haible  <bruno@clisp.org>
12953
12954         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
12955         redundant because stpncpy.m4 takes care of it.
12956
12957 2005-01-17  Bruno Haible  <bruno@clisp.org>
12958
12959         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
12960
12961 2005-01-17  Bruno Haible  <bruno@clisp.org>
12962
12963         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
12964         used.
12965
12966 2005-01-17  Bruno Haible  <bruno@clisp.org>
12967
12968         * lib/fwriteerror.h (fwriteerror): Change specification to include
12969         fclose.
12970         * lib/fwriteerror.c: Include <stdbool.h>.
12971         (fwriteerror): At the end, close the file stream. Record whether
12972         stdout was already closed.
12973
12974 2005-01-17  Bruno Haible  <bruno@clisp.org>
12975
12976         * lib/execute.c (environ): Declare if needed.
12977         * lib/pipe.c (environ): Likewise.
12978         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
12979
12980 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12981
12982         * modules/argp: Depend on vsnprintf
12983
12984 2005-01-10  Jim Meyering  <jim@meyering.net>
12985
12986         * modules/closeout (Depends-on): Add atexit.
12987
12988 2005-01-06  Bruno Haible  <bruno@clisp.org>
12989
12990         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
12991
12992 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
12993
12994         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
12995         definitions to be after all include files, to avoid collisions.
12996         Problem reported by Bob Proulx.
12997
12998 2005-01-04  Jim Meyering  <jim@meyering.net>
12999
13000         Changes imported from coreutils.
13001         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
13002         as the mkstemp template, use a temporary directory and an
13003         8.3-friendly template to avoid trouble on systems like DJGPP.
13004         Reported by Juan M. Guerrero via Stepan Kasal.
13005         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
13006         close. Remove the temporary directory right away, rather than waiting
13007         for configure's at-exit trap code to do it.
13008         Suggestion from Stepan Kasal.
13009
13010 2005-01-01  Simon Josefsson  <jas@extundo.com>
13011
13012         * gnulib-tool: Print #include directives when --import'ing.
13013
13014 2004-12-28  Simon Josefsson  <jas@extundo.com>
13015
13016         * tests/test-base64.c: Include required header files.  Remove
13017         unused variables.
13018
13019 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13020
13021         * modules/error (Depends-on): Remove gettext.
13022
13023 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13024
13025         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
13026         not needed.  This removes a dependency on the gettext module.
13027         [defined _LIBC]: Do not include <libintl.h>; not needed.
13028
13029 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13030
13031         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
13032         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
13033
13034 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13035
13036         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
13037         HAVE_DECL_STRTOLD.
13038
13039 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13040
13041         * modules/getdate (Depends-on): Remove alloca-opt.
13042
13043 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13044
13045         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
13046
13047 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13048
13049         * lib/argp-parse.c: Include <stddef.h>.
13050         (alignof, alignto): New macros.
13051         (parser_init): Don't assume that void * is aligned sufficiently
13052         for struct option.
13053
13054         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
13055         need to extend the stack.
13056         (YYINITDEPTH): New macro, so that the initial stack isn't overly
13057         large.
13058
13059 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13060
13061         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
13062
13063 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
13064
13065         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
13066         (2004-10-24) change.  Apparently this was a false alarm.
13067
13068         * modules/getdate: Depend on alloca-opt, not alloca.
13069
13070 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
13071
13072         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
13073         Remove now-obsolete comment about AIX.
13074         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
13075         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
13076         (YYMAXDEPTH): New macro.
13077
13078 2004-12-18  Simon Josefsson  <jas@extundo.com>
13079
13080         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
13081
13082 2004-12-18  Bruno Haible  <bruno@clisp.org>
13083
13084         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
13085
13086 2004-12-18  Bruno Haible  <bruno@clisp.org>
13087
13088         * lib/fatal-signal.c (fatal_signals): Make non-const.
13089         (init_fatal_signals): New function.
13090         (uninstall_handlers, install_handlers): Ignore signals that were set to
13091         SIG_IGN.
13092         (at_fatal_signal): Call init_fatal_signals.
13093         (init_fatal_signal_set): Likewise. Ignore signals that were set to
13094         SIG_IGN.
13095         Reported by Paul Eggert.
13096
13097 2004-12-18  Bruno Haible  <bruno@clisp.org>
13098
13099         * doc/alloca.texi: New file.
13100         * doc/alloca-opt.texi: New file.
13101
13102 2004-12-17  Jim Meyering  <jim@meyering.net>
13103
13104         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
13105         Otherwise, install-sh could exit with improper exit status when
13106         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
13107
13108 2004-12-16  Simon Josefsson  <jas@extundo.com>
13109
13110         * tests/test-base64.c: Add license.
13111
13112 2004-12-15  Stepan Kasal  <address@hidden>
13113
13114         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
13115
13116 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
13117
13118         * modules/getcwd (Files): Add m4/d-ino.m4.
13119         Suggested by Mark D. Baushke.
13120
13121 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
13122
13123         * lib/getdate.y (textint): New member "negative".
13124         (time_zone_hhmm): New function.
13125         Expect 14 shift-reduce conflicts, not 13.
13126         (o_colon_minutes): New rule.
13127         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
13128         (yylex): Set the "negative" member of signed numbers.
13129
13130 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
13131
13132         * doc/getdate.texi (Time of day items, Time zone items):
13133         Describe new formats +00:00, UTC+00:00.
13134
13135 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13136
13137         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
13138         spurious "-l"s.  Problem reported by Stepan Kasal.
13139
13140 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
13141
13142         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
13143         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
13144
13145 2004-12-04  Simon Josefsson  <jas@extundo.com>
13146
13147         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
13148         Vandoorselaere <yoann@prelude-ids.org>.
13149
13150 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13151
13152         Changes imported from coreutils.
13153         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
13154         exist.
13155         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
13156
13157 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13158
13159         Changes imported from coreutils.
13160         * lib/hard-locale.c: Assume <locale.h> exists.
13161         Include "strdup.h".
13162         (GLIBC_VERSION): New macro.
13163         (hard_locale): Assume setlocale exists.
13164         Rewrite to avoid #ifdef.
13165         Use strdup rather than malloc + strcpy.
13166         * lib/human.c: Assume <locale.h> exists.
13167         (human_readable): Assume localeconv exists.
13168
13169 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13170
13171         * modules/hard-locale (Depends-on): Add strdup.
13172
13173 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
13174
13175         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
13176         convert T2, not T.  (Imported from libc.)
13177
13178 2004-11-30  Simon Josefsson  <jas@extundo.com>
13179
13180         * modules/restrict (License): Change to LGPL.
13181
13182 2004-11-30  Simon Josefsson  <jas@extundo.com>
13183
13184         * m4/restrict.m4: Add copyright and copying conditions.
13185
13186 2004-11-30  Simon Josefsson  <jas@extundo.com>
13187
13188         * m4/base64.m4: New file.
13189
13190 2004-11-30  Simon Josefsson  <jas@extundo.com>
13191
13192         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
13193         base64.
13194
13195         * tests/test-base64.c: New file.
13196
13197         * modules/base64: New file.
13198
13199 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
13200
13201         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
13202         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
13203
13204         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
13205
13206 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
13207
13208         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
13209         (__getcwd.c): Don't restore errno; glibc doesn't.
13210         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
13211         first, falling back to our code only if its results look suspicious.
13212         Ensure that the resulting buffer is only as large as necessary.
13213
13214         * lib/readutmp.c: Include readutmp.h first.
13215         Include <errno.h>, since readutmp.h no longer does that.
13216         * lib/readutmp.h: Don't include <errno.h>,
13217         <sys/param.h>, <time.h>; not needed to establish interface.
13218         (errno): Remove decl.
13219         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
13220         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
13221         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
13222
13223 2004-11-28  Simon Josefsson  <jas@extundo.com>
13224
13225         * lib/base64.h, base64.c: New file.
13226
13227 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
13228
13229         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
13230
13231 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
13232
13233         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
13234         (Depends-on): Remove pathmax, same.  Add mempcpy.
13235         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
13236         (Makefile.am): Append getcwd.h to lib_SOURCES.
13237         (Include): Add getcwd.h.
13238         (Maintainer): Change from Jim Meyering to "all, glibc",
13239         since getdate now uses intended-for-glibc code.
13240         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
13241         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
13242
13243 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13244
13245         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
13246         HP's ANSI C compiler.
13247         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
13248         Declaring int functions causes warnings on some modern systems and
13249         shouldn't be needed to compile on ancient ones.
13250         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
13251         defined.
13252
13253         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
13254         with the following changes.
13255         (__set_errno): Parenthesize properly.
13256         Include <stdbool.h>.
13257         (MIN, MAX, MATCHING_INO): New macros.
13258         (__getcwd): Define with prototype, not K&R form.
13259         Use heuristics to allocate default buffer on stack if possible.
13260         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
13261         behavior, and to avoid the PATH_MAX limit when computing
13262         ../../../../...
13263         Use MATCHING_INO to compare inode number to file.
13264         Check for arithmetic overflow in size calculations.
13265         Fix bug in reallocation of dot array that caused getcwd to fail
13266         on directories nested deeper than 75.
13267         Be more careful about saving errno on error.
13268         Do not use realloc; use only free+malloc, as this is a bit
13269         more flexible and avoids a needless copy operation.
13270         Do not inspect st_dev and st_ino for symbolic links; POSIX
13271         doesn't specify the latter.
13272         Check for closedir errors.
13273         Avoid needless casts.
13274         Use "#ifdef weak_alias" around weak_alias, to be like other
13275         glibc code.
13276         The following changes to getcwd.c have effect only when used in
13277         gnulib; they have no effect inside glibc proper.
13278         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
13279         as alloca isn't used.
13280         (alloca, __alloca): Likewise.
13281         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
13282         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
13283         unconditionally, as gnulib assumes C89 or better.
13284         Do not include <sys/param.h>.
13285         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
13286         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
13287         better.
13288         (NULL) [!defined NULL]: Remove; we assume C89 or better.
13289         Include <dirent.h> in a way that is compatible with modern Autoconf.
13290         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
13291         New macros, if not already defined.
13292         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
13293         Use "_LIBC", not "defined _LIBC", for consistency.
13294         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
13295         a mempcpy module.
13296         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
13297         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
13298         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
13299         credit only to Jim Meyering and adjust the copyright dates.
13300         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
13301         <stdlib.h>, <unistd.h>, "pathmax.h".
13302         Instead, include "xgetcwd.h" (first) and "getcwd.h".
13303         (INITIAL_BUFFER_SIZE): Remove.
13304         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
13305
13306 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13307
13308         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
13309         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
13310         Use the _ONCE methods, for efficiency.
13311         Check for fcntl.h.  In test program, include <errno.h>
13312         and <fcntl.h> if available.  Remove old K&R cruft from
13313         test program.  Check for common errors in GNU/Linux,
13314         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
13315         don't do AC_LIBOBJ, as that's getcwd.m4's job.
13316         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
13317         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
13318         name accordingly.
13319         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
13320         accommodate new getcwd.c.
13321         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
13322         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
13323         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
13324         that's all we need now.
13325
13326 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13327
13328         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
13329         argp-parse.c depends on getopt internals, that means we should
13330         always use our getopt, to be on the safe side.
13331         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
13332         order not to spoil the result of an eventual previous invocation
13333         of gl_GETOPT_SUBSTITUTE.
13334
13335 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13336
13337         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
13338         redefinition warnings. To avoid them, include the defines
13339         in `#if !defined __need_getopt ... #endif'. The only place
13340         where __getopt_argv_const is used is in definitions
13341         of getopt_long and getopt_long_only below, which are as well
13342         protected by `#ifndef __need_getopt'.
13343         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
13344         __need_getopt after including <stdio.h> and <unistd.h> These
13345         headers might have defined it.
13346
13347 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
13348
13349         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
13350
13351 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
13352
13353         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
13354         (futimens): New function, which uses futimes if available.
13355         (futimens, utimens): Support timespec==NULL, with same semantics
13356         as utime and utimens.
13357         * lib/utimens.h (futimens): New decl.
13358
13359 2004-11-23  Jim Meyering  <jim@meyering.net>
13360
13361         * lib/getopt_.h: Remove trailing blanks.
13362
13363 2004-11-23  Jim Meyering  <jim@meyering.net>
13364
13365         * lib/__fpending.c: Add comment.
13366
13367 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
13368
13369         * modules/canonicalize (Depends-on): Add xreadlink.
13370         Problem reported by James Youngman.
13371
13372 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
13373
13374         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
13375         New macros.
13376         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
13377         optopt): Use them instead of invoking ## directly; otherwise, the
13378         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
13379
13380 2004-11-19  Bruno Haible  <bruno@clisp.org>
13381
13382         * lib/strtok_r.c: Move comments from here...
13383         * lib/strtok_r.h: ... to here.
13384
13385 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
13386
13387         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
13388         implementations that mishandle size_t overflow.
13389
13390 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
13391
13392         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
13393         might fail.  Problem reported by Yoann Vandoorselaere.
13394         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
13395         implementations that mishandle size_t overflow.
13396
13397 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13398
13399         * modules/canon-host (Depends-on): Add strdup.
13400
13401 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13402
13403         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
13404
13405 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13406
13407         * lib/canon-host.c: Include "strdup.h".
13408         (canon_host): Use getaddrinfo if available, so that IPv6 works.
13409         Use strdup instead of malloc/strcpy to duplicate strings.
13410
13411         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
13412         (human_space_before_unit): New constant.
13413         * lib/human.c (human_readable): Support it.
13414
13415         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
13416         (xgetcwd): Set errno correctly when failing.
13417         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
13418         the failure is actually due to a PATH_MAX problem.
13419
13420         Further getopt changes to make it more likely that glibc will
13421         buy the changes back.
13422         * lib/getopt.c (POSIXLY_CORRECT): New constant.
13423         (getopt): Use it, so to preserve glibc semantic
13424         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
13425         when compiling for libc.
13426         * lib/getopt_.h (__getopt_argv_const): Bring it back.
13427         (getopt_long, getopt_long_only): Use it.
13428
13429         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
13430         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
13431         (getopt): Argv is now char * const *, as per standard.
13432         (_getopt_internal_r, _getopt_internal): Argv is now char **,
13433         not char *__getopt_argv_const *.
13434         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
13435         _getopt_long_only_r): Likewise.
13436         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
13437         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
13438         _getopt_long_r, _getopt_long_only_r): Likewise.
13439         * lib/getopt_.h (__getopt_argv_const): Remove.
13440         (getopt): Argv is now char * const *, as per standard.
13441
13442         * lib/getdate.y (tORDINAL): New token.
13443         (day, relunit): Allow it for relative times.
13444         (relative_time_table): Use tORDINAL for ordinals.
13445
13446 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13447
13448         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
13449         Document that "second" isn't allowed as an ordinal number.
13450
13451 2004-11-16  Jim Meyering  <jim@meyering.net>
13452
13453         * modules/closeout (Depends-on): Add fpending.
13454
13455 2004-11-15  Jim Meyering  <jim@meyering.net>
13456
13457         * lib/closeout.c: Include "__fpending.h" once again.
13458         Include <stdbool.h>.
13459         (close_stdout): Don't fail just because stdout was closed initially,
13460         since some programs don't write to stdout in the normal course of
13461         operation (other than --version and --help), and we don't want this
13462         function to make e.g. `touch file >&-' fail.
13463         But do fail if it was closed and someone has tried to write to it.
13464         E.g., `printf foo >&-' must fail.
13465
13466 2004-11-13  Jim Meyering  <jim@meyering.net>
13467
13468         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
13469
13470 2004-11-12  Simon Josefsson  <jas@extundo.com>
13471
13472         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
13473         small doc fix is still pending.
13474
13475 2004-11-11  Simon Josefsson  <jas@extundo.com>
13476
13477         * modules/strtok_r: New file.
13478
13479         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13480         strtok_r.
13481
13482 2004-11-11  Simon Josefsson  <jas@extundo.com>
13483
13484         * m4/strtok_r.m4: New file.
13485
13486         * m4/getopt.m4: Replace opterr.
13487
13488 2004-11-11  Simon Josefsson  <jas@extundo.com>
13489
13490         * lib/strtok_r.h, strtok_r.c: New file.
13491
13492 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
13493
13494         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
13495         of replacing opterr, getopt, etc.  This should handle the
13496         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
13497
13498 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
13499
13500         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
13501         we can stop lying to compilers about the constness of argv when we
13502         are compiled outside glibc.
13503         (getopt, getopt_long, getopt_long_only): Use it.
13504         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
13505         _getopt_internal, getopt): Likewise.
13506         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
13507         _getopt_long_only_r): Likewise.
13508         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
13509         _getopt_long_r, _getopt_long_only_r): Likewise.
13510
13511         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
13512         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
13513         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
13514         the other external symbols.
13515         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
13516         declaration, since the above renaming now works around collisions.
13517
13518 2004-11-11  Jim Meyering  <jim@meyering.net>
13519
13520         * lib/linebreak.c: Remove trailing blanks.
13521         * lib/alloca_.h: Likewise.
13522         * lib/acosl.c: Likewise.
13523         * lib/euidaccess.c: Likewise.
13524         * lib/allocsa.h: Likewise.
13525
13526 2004-11-10  Simon Josefsson  <jas@extundo.com>
13527
13528         * m4/getaddrinfo.m4: New file.
13529
13530 2004-11-10  Simon Josefsson  <jas@extundo.com>
13531
13532         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
13533
13534 2004-11-10  Simon Josefsson  <jas@extundo.com>
13535
13536         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13537         getaddrinfo.
13538
13539         * modules/getaddrinfo: New file.
13540
13541 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13542
13543         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
13544
13545 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13546
13547         * lib/mktime.c (SHR): New macro, which is a portable
13548         substitute for >> that should work even on Crays.
13549         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
13550         Problem reported by Mark D. Baushke in
13551         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
13552         * lib/getdate.y (SHR): Likewise.
13553         (tm_diff): Use it.
13554         * lib/strftime.c (SHR): Likewise.
13555         (tm_diff): Use it.
13556         * lib/quotearg.c (struct quoting_options): Use unsigned int for
13557         quote_these_too, so that right shifts are well defined.  All uses
13558         changed.
13559
13560 2004-11-10  Jim Meyering  <jim@meyering.net>
13561
13562         Ensure that no close failure goes unreported.
13563         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
13564         return early when it seems there's nothing to flush.
13565         Don't include __fpending.h.
13566
13567 2004-11-10  Jim Meyering  <jim@meyering.net>
13568
13569         * modules/closeout (Depends-on): Remove fpending.
13570
13571 2004-11-10  Jim Meyering  <jim@meyering.net>
13572
13573         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
13574
13575 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
13576
13577         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
13578         gl_FUNC_STRFTIME.
13579         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
13580         and AC_REQUIRE when possible, to avoid duplicate checks.
13581         Check for <wchar.h>.
13582
13583 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
13584
13585         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
13586
13587 2004-11-09  Bruno Haible  <bruno@clisp.org>
13588
13589         * m4/sockpfaf.m4: New file.
13590
13591 2004-11-05  Bruno Haible  <bruno@clisp.org>
13592
13593         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
13594         Reported by Mark D. Baushke <mdb@cvshome.org>.
13595
13596 2004-11-04  Bruno Haible  <bruno@clisp.org>
13597
13598         2004-09-11  Bruno Haible  <bruno@clisp.org>
13599                 * allocsa.valgrind: New file.
13600         2004-02-06  Bruno Haible  <bruno@clisp.org>
13601                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
13602                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
13603                 Reported by Christopher Seip <chris.seip@hp.com>.
13604
13605 2004-11-04  Bruno Haible  <bruno@clisp.org>
13606
13607         * modules/allocsa (Files): Add lib/allocsa.valgrind.
13608         (Makefile.am): Distribute it.
13609
13610 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
13611
13612         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
13613         with errno == ERANGE if the buffer is too small.
13614         Problem reported by Mark D. Baushke.
13615
13616 2004-11-03  Albert Chin  <china@thewrittenword.com>
13617             Paul Eggert  <eggert@cs.ucla.edu>
13618
13619         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
13620         equivalent, substitute $ac_type for equivalent type rather than
13621         blindly using uint32_t *always* which won't work if uint32_t is not
13622         available.  Define _UINT32_T to work around typedef of uint32_t if
13623         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
13624         2.5.1.
13625
13626 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13627
13628         * m4/jm-macros.m4: Sync from coreutils.
13629         (gl_MACROS): Check for mbrlen, for pathchk.
13630         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
13631
13632 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13633
13634         * lib/xreadlink.c (MAXSIZE): New macro.
13635         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
13636         size does not exceed MAXSIZE.  Avoid cast.
13637         As suggested by Mark D. Baushke in
13638         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
13639         if readlink fails with buffer size just under MAXSIZE, try again
13640         with MAXSIZE.
13641
13642 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13643
13644         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
13645
13646 2004-11-02  Derek R. Price  <derek@ximbiot.com>
13647         and  Paul Eggert  <eggert@cs.ucla.edu>
13648
13649         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
13650         (get_date): Overparenthesize to avoid GCC warning.
13651
13652 2004-11-02  Bruno Haible  <bruno@clisp.org>
13653
13654         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
13655         returns void.
13656
13657 2004-11-02  Bruno Haible  <bruno@clisp.org>
13658
13659         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
13660         function returns void.
13661
13662 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
13663
13664         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
13665         fflush_unlocked, flockfile, funlockfile, funlockfile,
13666         fputs_unlocked, putc_unlocked.
13667
13668 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
13669
13670         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
13671         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
13672         already declared.
13673
13674 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13675
13676         * modules/getdate (Files): Add doc/getdate.texi.
13677         (Depends-on): Add setenv, xalloc.
13678
13679 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13680
13681         * lib/getdate.y: Add support for TZ="foo" within a date string.
13682         Fix some bugs near time_t boundaries.  Reject dates with
13683         out-of-range components, e.g., "Sept 31".
13684         Include <stdlib.h>, "setenv.h", "xalloc.h".
13685         (ISDIGIT_LOCALE): Remove; unused.
13686         Note that the TZ and time functions used here are not reentrant.
13687         (mktime_ok, get_tz): New functions.
13688         (TZBUFSIZE): New constant.
13689         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
13690         This requires that we sometimes generate our own TZ="XXX..." setting.
13691
13692 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13693
13694         * doc/getdate.texi: New file, from coreutils with modifications for
13695         the new TZ parsing.
13696
13697 2004-10-27  Derek R. Price  <derek@ximbiot.com>
13698
13699         * lib/mktime.c (not_equal_tm): Remove redundant check.
13700
13701 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
13702
13703         * modules/regex (lib_SOURCES): Add regex.c.
13704         Reported by James Youngman in
13705         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
13706
13707 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
13708
13709         * lib/getdate.y: Use Bison 1.875 features, and some minor
13710         code cleanups.  This change does not affect semantics.
13711         Don't include <stdlib.h>; no longer needed.
13712         Don't include unlocked-io.h; only the "#if TEST" code uses
13713         stdio, and performance isn't crucial there.
13714         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
13715         Bison 1.875 features as described below.
13716         All uses of "PC." replaced by "pc->".
13717         (YYSTYPE): Add a forward declaration.
13718         (yylex, yyerror): Use full prototypes in forward decls.
13719         Use "%pure-parser" rather than obsolescent "%pure_parser".
13720         Use %parse-param and %lex-param instead of obsolescent
13721         YYPARSE_PARAM and YYLEX_PARAM.
13722         (meridian_table, month_and_day_table, time_units_table,
13723         relative_time_table, time_zone_table, military_table,
13724         lookup_zone, lookup_word, get_date):
13725         Use NULL instead of 0 where appropriate.
13726         (to_hour): Avoid abort (), to avoid a dependency on
13727         stdlib.h.
13728         (yyerror, yylex): Now accepts parser_control * arg.
13729         (main) [TEST]: Use '\0' rather than 0 for char.
13730
13731 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
13732
13733         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
13734
13735 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
13736
13737         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
13738         It's now the caller's responsibility to handle the case where
13739         !HAVE_GETPAGESIZE && !defined getpagesize.
13740
13741         * lib/mktime.c (leapyear): Arg is long int, not int.
13742
13743 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
13744
13745         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
13746
13747 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
13748
13749         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
13750         missing.  Problem reported by James Youngman.
13751
13752 2004-10-16  Simon Josefsson  <jas@extundo.com>
13753
13754         * gnulib-tool: Fix comments.  Fix parse problem.
13755         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
13756
13757 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
13758
13759         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
13760         implementation of getopt_long.  Problem reported by Alexander Taler in:
13761         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
13762
13763 2004-10-15  Bruno Haible  <bruno@clisp.org>
13764
13765         * gnulib-tool: Untabify. Initialize supplied_libname.
13766         (func_usage): More homogenous output.
13767         (func_modules_transitive_closure, func_modules_to_filelist,
13768         func_emit_lib_Makefile_am): New functions.
13769         (func_import): New function, extracted from big case statement. Use
13770         func_get_license, func_modules_transitive_closure,
13771         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
13772         opt_lgpl. Don't use test -a, as it's not portable.
13773         (func_create_testdir): Use func_modules_transitive_closure,
13774         func_modules_to_filelist, func_emit_lib_Makefile_am.
13775
13776 2004-10-15  Bruno Haible  <bruno@clisp.org>
13777
13778         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
13779
13780 2004-10-15  Bruno Haible  <bruno@clisp.org>
13781
13782         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
13783         the portions belonging to each module.
13784         Suggested by Derek Robert Price <derek@ximbiot.com>.
13785
13786 2004-10-12  Simon Josefsson  <jas@extundo.com>
13787
13788         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
13789         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
13790         to real functions.
13791
13792 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13793
13794         * modules/vsnprintf: New file.
13795
13796 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13797
13798         * m4/vsnprintf.m4: New file.
13799
13800 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13801
13802         * lib/vsnprintf.h: New file.
13803         * lib/vsnprintf.c: New file.
13804
13805 2004-10-11  Bruno Haible  <bruno@clisp.org>
13806
13807         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
13808         vsnprintf.
13809
13810 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
13811
13812         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
13813
13814 2004-10-07  Bruno Haible  <bruno@clisp.org>
13815
13816         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
13817         fits into the provided buffer.
13818
13819 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
13820
13821         * lib/diacrit.c, diacrit.h: Add GPL notice.
13822
13823         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
13824         notice.
13825         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
13826         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
13827         This avoids a potential constant-folding bug.
13828
13829 2004-10-05  Bruno Haible  <bruno@clisp.org>
13830
13831         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
13832         for the declaration of strsep.
13833
13834 2004-10-05  Bruno Haible  <bruno@clisp.org>
13835
13836         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
13837
13838 2004-10-04  Simon Josefsson  <jas@extundo.com>
13839
13840         * modules/memmem: New file.
13841         * tests/test-memmem.c: New file.
13842         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
13843
13844 2004-10-04  Simon Josefsson  <jas@extundo.com>
13845
13846         * m4/memmem.m4: New file.
13847
13848 2004-10-04  Simon Josefsson  <jas@extundo.com>
13849
13850         * lib/memmem.h: New file.
13851         * lib/memmem.c: New file, taken from glibc.
13852
13853 2004-10-04  Simon Josefsson  <jas@extundo.com>
13854
13855         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
13856         '#ifdef USE_UNLOCKED_IO'.
13857
13858 2004-10-04  Simon Josefsson  <jas@extundo.com>
13859
13860         * config/srclist.txt: Add memmem from glibc.
13861
13862 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13863
13864         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
13865
13866         * modules/argmatch, modules/argp, modules/closeout, modules/error,
13867         modules/exclude, modules/getdate, modules/getline,
13868         modules/getndelim2, modules/getpass, modules/getpass-gnu,
13869         modules/getusershell, modules/linebuffer, modules/md5,
13870         modules/mountlist, modules/posixtm, modules/readtokens,
13871         modules/readutmp, modules/regex, modules/sha1,
13872         modules/version-etc, modules/yesno:
13873         Remove dependency on unlocked-io.
13874
13875 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13876
13877         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
13878
13879         * m4/unlocked-io.m4: Add copyright notice.
13880         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
13881
13882 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13883
13884         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
13885         * lib/xmalloc.c (xmemdup): Likewise.
13886         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
13887         XFREE): Remove these long-obsolescent macros.
13888         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
13889         * lib/xstrdup.c: Remove.
13890
13891         * lib/regex.c (re_comp): Cast gettext return value to char *,
13892         Problem reported by Martin Neitzel via Mark D. Baushke.
13893
13894 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13895
13896         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
13897         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
13898         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
13899         regex.c, sha1.c, version-etc.c, yesno.c:
13900         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
13901         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
13902         the includer's responsibility.
13903
13904         Sync from coreutils.
13905
13906         * lib/modechange.c (mode_compile): Don't decrement a pointer that
13907         points to the start of a string, as the C Standard says the
13908         resulting behavior is undefined.
13909
13910         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
13911         simple -> simple_backups, numbered_existing ->
13912         numbered_existing_backups, numbered -> numbered_backups
13913         to avoid shadowing problems.  All uses changed.
13914         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
13915         * lib/backupfile.c (check_extension, numbered_backup):
13916         Rename locals to avoid shadowing 'basename'.
13917         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
13918         once.
13919
13920         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
13921         * lib/.cvsignore: Add getopt.h.
13922
13923 2004-10-04  Bruno Haible  <bruno@clisp.org>
13924
13925         * modules/README: New file.
13926         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
13927         not a module.
13928
13929 2004-10-02  Jim Meyering  <jim@meyering.net>
13930
13931         * lib/dirfd.h, getpagesize.h: Add copyright notice.
13932
13933 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13934
13935         * modules/strsep: New file.
13936
13937 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13938
13939         * m4/strsep.m4: New file.
13940
13941 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13942
13943         * lib/strsep.h: New file.
13944         * lib/strsep.c: New file.
13945
13946 2004-10-01  Simon Josefsson  <jas@extundo.com>
13947
13948         * lib/snprintf.c (snprintf): Handle size==0.
13949
13950 2004-10-01  Simon Josefsson  <jas@extundo.com>
13951             Bruno Haible  <bruno@clisp.org>
13952
13953         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
13954         (snprintf): Declare 'args'.
13955
13956 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
13957
13958         * lib/snprintf.c: Remove comments as to why each header is needed.
13959
13960 2004-10-01  Bruno Haible  <bruno@clisp.org>
13961
13962         * MODULES.html.sh: Add strsep.
13963
13964 2004-09-30  Simon Josefsson  <jas@extundo.com>
13965
13966         * modules/snprintf: New file.
13967
13968 2004-09-30  Simon Josefsson  <jas@extundo.com>
13969
13970         * m4/snprintf.m4: New file.
13971
13972 2004-09-30  Simon Josefsson  <jas@extundo.com>
13973
13974         * lib/snprintf.h, lib/snprintf.c: New files.
13975
13976 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13977
13978         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
13979         (hol_entry_help): Never translate an empty string.
13980         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
13981         * lib/argp.h (OPTION_NO_TRANS): New option.
13982
13983 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13984
13985         * modules/argp (Maintainer): Replace Simon Josefsson
13986         by Sergey Poznyakoff.
13987
13988 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13989
13990         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
13991         changes merged back into glibc.
13992
13993 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13994
13995         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
13996
13997 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
13998
13999         * lib/xvasprintf.c: Include xalloc.h.
14000         (xvasprintf): Use xalloc_die, not xmalloc_die.
14001
14002 2004-09-29  Bruno Haible  <bruno@clisp.org>
14003
14004         * modules/alloca-opt: New file, derived from modules/alloca.
14005         * modules/allocsa: Depend on alloca-opt instead of alloca.
14006         * modules/setenv: Likewise.
14007         * modules/vasnprintf: Likewise.
14008         * MODULES.html.sh: Add alloca-opt.
14009
14010 2004-09-28  Simon Josefsson  <jas@extundo.com>
14011
14012         * gnulib-tool: New parameter --lgpl, to asseert that modules are
14013         LGPL, and to replace license template from GPL to LGPL.
14014
14015 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14016
14017         * modules/dummy: Change license to LGPL.
14018
14019 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14020
14021         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
14022
14023 2004-09-24  Simon Josefsson  <jas@extundo.com>
14024
14025         * modules/minmax (License): Change from GPL to LGPL.
14026
14027 2004-09-23  Simon Josefsson  <jas@extundo.com>
14028
14029         * gnulib-tool (--import): Typo.
14030
14031 2004-09-23  Simon Josefsson  <jas@extundo.com>
14032
14033         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
14034
14035 2004-09-22  Bruno Haible  <bruno@clisp.org>
14036
14037         * modules/*: Add 'License' field.
14038         * gnulib-tool: Accept --extract-license option.
14039         (func_get_license): New function.
14040
14041 2004-09-21  Bruno Haible  <bruno@clisp.org>
14042
14043         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
14044         Reported by Simon Josefsson.
14045
14046 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14047
14048         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
14049         gl_AC_TYPE_LONG_LONG.
14050
14051 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14052
14053         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
14054
14055 2004-09-18  Simon Josefsson  <jas@extundo.com>
14056         and  Paul Eggert  <eggert@cs.ucla.edu>
14057
14058         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
14059         calls with autoreconf.  Define GL_LIB.
14060
14061 2004-09-14  Karl Berry  <karl@gnu.org>
14062
14063         * config/srclist.txt: unsync setenv.c, sigh.
14064
14065 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
14066
14067         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
14068         Problem reported by Bruno Haible in:
14069         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
14070
14071 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
14072
14073         * config/srclist.txt: Comment out argp-pvh.c.
14074
14075 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
14076
14077         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
14078         in case some system header has #define'd it.  Problem reported by
14079         Soeren D. Schulze in
14080         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
14081
14082 2004-09-09  Karl Berry  <karl@gnu.org>
14083
14084         * regex.[ch]: delete from the root.  These were supposed to be
14085                 synced with emacs cvs, but this has not happened for about
14086                 a year, and anyway nothing else uses emacs regex.[ch].
14087                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
14088                 lib/regex[.ch] is untouched.
14089
14090 2004-09-09  Bruno Haible  <bruno@clisp.org>
14091
14092         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
14093
14094 2004-09-09  Bruno Haible  <bruno@clisp.org>
14095
14096         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
14097         modifications.
14098         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
14099
14100 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
14101
14102         * modules/xvasprintf: New file.
14103         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
14104
14105 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
14106
14107         * lib/xvasprintf.h: New file.
14108         * lib/xvasprintf.c: New file.
14109         * lib/xasprintf.c: New file.
14110
14111 2004-09-08  Bruno Haible  <bruno@clisp.org>
14112
14113         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
14114
14115 2004-09-08  Bruno Haible  <bruno@clisp.org>
14116
14117         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
14118         length is > INT_MAX.
14119         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
14120         more.
14121
14122 2004-09-08  Bruno Haible  <bruno@clisp.org>
14123
14124         * lib/stdint_.h: New file, taken from GNU clisp.
14125
14126 2004-09-08  Bruno Haible  <bruno@clisp.org>
14127             Oskar Liljeblad  <oskar@osk.mine.nu>
14128
14129         * modules/stdint: New file.
14130         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
14131
14132 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14133
14134         Import from coreutils.
14135         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
14136         strings on unbounded length.  alloca's performance benefits aren't
14137         that important here.
14138         (V_STRDUP): Remove.
14139         (parse_with_separator): New function, with most of the internals
14140         of the old parse_user_spec.  Allow user to omit both user and group,
14141         for compatibility with FreeBSD.
14142         Clone only the user name, not the entire spec.
14143         Do not set *uid, *gid unless entirely successful.
14144         Avoid memory leak in some failing cases.
14145         Fix regression for USER.GROUP reported by Dmitry V. Levin in
14146         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
14147         (parse_user_spec): Rewrite to use parse_with_separator.
14148
14149 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14150
14151         * modules/userspec: Don't depend on alloca.
14152
14153 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14154
14155         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
14156
14157 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
14158
14159         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
14160         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
14161         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
14162
14163 2004-08-16  Simon Josefsson  <jas@extundo.com>
14164
14165         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
14166         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
14167         Add --dry-run for --import.
14168         Let user provided command line parameters override configure.ac
14169         settings.
14170
14171 2004-08-12  Simon Josefsson  <jas@extundo.com>
14172
14173         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
14174         as discussed with Paul Eggert in threads rooted at
14175         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
14176         and
14177         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
14178         Before, the test was empty, and relied on ELIDE_CODE in source
14179         code.)
14180         (gl_PREREQ_GETOPT): New macro.
14181         (gl_GETOPT): Use them.
14182
14183 2004-08-12  Simon Josefsson  <jas@extundo.com>
14184
14185         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
14186         * lib/getopt_.h: Renamed from getopt.h.
14187
14188 2004-08-12  Simon Josefsson  <jas@extundo.com>
14189
14190         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
14191         Change default library name from libfoo to libgnu.
14192         Now, if you have a configure.ac that says:
14193                 gl_SOURCE_BASE(gl)
14194                 gl_M4_BASE(gl/m4)
14195                 gl_MODULES(error getopt etcetera)
14196                 gl_INIT
14197         you can import all you need by running:
14198                 ../gnulib/gnulib-tool --import
14199
14200         * modules/getopt (Files): Rename getopt.h to getopt_.h.
14201         (Makefile.am): Rewrite, use logic from argz.
14202         (Include): Use <getopt.h> instead of "getopt.h".
14203
14204 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14205
14206         * modules/argp (Files): Add m4/unlocked-io.m4.
14207         (Depends-on): Add extensions.
14208
14209 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14210
14211         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
14212         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
14213         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
14214         Check for program_invocation_name, program_invocation_short_name,
14215         flockfile, funlockfile, features.h, _getopt_long_only_r.
14216
14217 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14218
14219         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
14220         its complicated substitute.
14221         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
14222         and program_invocation_name.
14223         (__argp_basename) [!_LIBC]: Remove; the only use was
14224         replaced by its body.
14225         (__argp_short_program_name): Change condition from
14226         !defined __argp_short_program_name to
14227         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
14228         to match argp-namefrob.h.
14229         (__argp_failure): Don't assume strerror_r returns char *.
14230         * lib/argp-parse.c (N_): Define unconditionally.
14231         (argp_default_options): Fill out initializers with 0 to avoid
14232         gcc warnings.
14233
14234 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14235
14236         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
14237         getopt1.c.
14238
14239 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14240
14241         Merge from coreutils.
14242
14243         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
14244
14245         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
14246         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
14247
14248 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14249
14250         Merge from coreutils.
14251
14252         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
14253         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
14254         for Reliant Unix 5.43.
14255
14256         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
14257         (union fooround): Use uintmax_t, not long int.
14258         The rest is a merge from libc:
14259         [defined _LIBC]: Include <shlib-compat.h>.
14260         (_obstack) [defined _LIBC]: Remove after 2.3.4.
14261
14262         * lib/settime.c (settime): Recode to avoid warning with
14263         Sun Forte C 6U2.
14264
14265         * lib/strverscmp.c: Convert to UTF-8.
14266
14267 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14268
14269         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
14270         m4/uintmax_t.m4.
14271
14272 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14273
14274         * modules/xalloc-die: New file.
14275         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
14276
14277         * modules/md5 (Files): Add m4/uint32_t.m4.
14278         * modules/sha1: Renamed from modules/sha.
14279         (Files):
14280         Rename lib/sha.h to lib/sha1.h.
14281         Rename lib/sha.c to lib/sha1.c.
14282         Rename m4/sha.m4 to m4/sha1.m4.
14283         (lib_SOURCES): Likewise.
14284         (configure.ac): Rename gl_SHA to gl_SHA1.
14285         (Include): sha.h -> sha1.h.
14286
14287 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14288
14289         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
14290         * m4/sha1.m4: Renamed from sha.m4.
14291         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
14292
14293 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14294
14295         * lib/obstack.h (obstack_empty_p):
14296         Don't assume that chunk->contents is suitably aligned.
14297         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
14298         Likewise. Problem reported by Benno in
14299         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
14300
14301         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
14302         readable.  This could be improved further but it'd take some work.
14303
14304 2004-08-08  Simon Josefsson  <jas@extundo.com>
14305
14306         * modules/xgethostname (Depends-on): Remove exit and error (not
14307         used).
14308
14309         * modules/getpass-gnu: Add getpass.h.
14310         (Depends-on): Add stdbool.
14311         * modules/getpass: Add getpass.h.
14312
14313 2004-08-08  Simon Josefsson  <jas@extundo.com>
14314
14315         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
14316         Check getpass declaration.
14317
14318 2004-08-08  Simon Josefsson  <jas@extundo.com>
14319
14320         * lib/xgethostname.c: Don't include error.h (not used).
14321
14322         * lib/getpass.h: Add.
14323         * lib/getpass.c: Include getpass.h first.
14324
14325 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
14326
14327         * lib/xalloc-die.c: New file.
14328         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
14329         All uses removed.
14330         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
14331         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
14332         xalloc-die.c.
14333         (_, N_, xalloc_die): Move to xalloc-die.c.
14334         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
14335         so that we needn't mess with xalloc_msg_memory_exhausted.
14336
14337         * lib/sha1.h: Renamed from sha.h.
14338         (SHA1_H): Renamed from _SHA_H.
14339         (sha1_ctx): Renamed from sha_ctx.
14340         (sha1_init_ctx): Renamed from sha_init_ctx.
14341         (sha1_process_block): Renamed from sha_process_block.
14342         (sha1_process_bytes): Renamed from sha_process_bytes.
14343         (sha1_finish_ctx): Renamed from sha_finish_ctx.
14344         (sha1_read_ctx): Renamed from sha_read_ctx.
14345         (sha1_stream): Renamed from sha_stream.
14346         (sha1_buffer): Renamed from sha_buffer.
14347         * lib/sha1.c: Likewise; renamed from sha.c.
14348         Do not include <sys/types.h>.
14349         Include <stddef.h> rather than <stdlib.h>.
14350
14351 2004-08-08  Bruno Haible  <bruno@clisp.org>
14352
14353         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
14354         FILESYSTEM_PREFIX_LEN.
14355         * lib/progreloc.c: Likewise.
14356         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
14357
14358 2004-08-06  Simon Josefsson  <jas@extundo.com>
14359
14360         * modules/progname (Depends-on): Don't depend on stdbool.
14361
14362 2004-08-06  Simon Josefsson  <jas@extundo.com>
14363
14364         * modules/getsubopt: New file.
14365         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14366         getsubopt.
14367
14368 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14369
14370         More merge from coreutils.
14371
14372         * m4/utimens.m4, m4/utimecmp.m4: New files.
14373         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
14374         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
14375         prereq.m4, sha.m4: Import changes from coreutils.
14376
14377 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14378
14379         More merge from coreutils.
14380         * modules/raise, modules/readtokens0, modules/utimens:
14381         * modules/utimecmp, module/xnanosleep: New files.
14382         * modules/strftime: Add lib/strftime.h.
14383         Change include from <time.h> to "strftime.h".
14384         * modules/yesno: Add lib/yesno.h.
14385         * modules/backupfile: Remove lib/addext.c.
14386         * modules/euidaccess: Add stat-macros.h.
14387         * modules/canonicalize, modules/euidaccess,
14388         modules/filemode, modules/lchown, modules/makepath,
14389         modules/rmdir, modules/stat: Likewise.
14390
14391 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14392
14393         Merge from tar.
14394         * lib/argp-help.c (make_hol, hol_append): Don't assume that
14395         SIZE_MAX is a valid preprocessor constant.
14396         (__argp_basename): Change from "#ifndef _LIBC"
14397         to "#ifndef __argp_short_program_name", so that
14398         we don't compile these functions for tar.
14399
14400         More merges from coreutils.
14401         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
14402         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
14403         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
14404         * lib/addext.c: Remove; no longer needed.
14405         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
14406         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
14407         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
14408         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
14409         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
14410         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
14411         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
14412         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
14413         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
14414         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14415         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
14416         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
14417         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
14418         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
14419         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
14420         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
14421         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
14422         Import changes from coreutils.
14423
14424 2004-08-05  Simon Josefsson  <jas@extundo.com>
14425
14426         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
14427
14428 2004-08-05  Simon Josefsson  <jas@extundo.com>
14429
14430         * m4/getsubopt.m4: New file.
14431
14432 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14433
14434         Merge from coreutils.
14435
14436         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
14437         * m4/getcwd-path-max.m4: New files.
14438
14439         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
14440         FILESYSTEM_PREFIX_LEN ->
14441         FILE_SYSTEM_PREFIX_LEN.
14442         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
14443         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
14444         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
14445         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
14446
14447         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
14448         prerequisite modules now handle the DOS stuff.
14449         Don't check for unistd.h.
14450
14451 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14452
14453         Merge from coreutils.
14454
14455         * lib/.gdb-history: Remove; this doesn't belong here.
14456
14457         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
14458         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
14459         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
14460         * lib/getcwd.c: New files.
14461
14462         * lib/dirname.h: Include <stdbool.h>.
14463         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
14464         for consistency with POSIX terminology.  All uses changed.
14465         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
14466         (strip_trailing_slashes): Use bool for booleans.
14467         * lib/stripslash.c (strip_trailing_slashes): Likewise.
14468
14469         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
14470         sometimes returns a positive errno value even when it succeeds.
14471         (print_errno_message) [!LIBC]: Fall back on strerror if
14472         __strerror_r fails.
14473
14474         * lib/path-concat.c (mempcpy): Don't define if a system header defines
14475         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
14476         (longest_relative_suffix): New function.
14477         (path_concat): Use it.  Assume first argument is not NULL.
14478         Port to DOS.  Omit redundant separators.
14479         Report an error instead of returning NULL.
14480         Use mempcpy instead of memcpy.
14481         (xpath_concat): Remove: not declared or used.
14482
14483         * lib/same.h: Include <stdbool.h>
14484         (same_name): Return bool, not int.
14485         * lib/same.c (same_name): Likewise.
14486         (errno): Don't declare; we assume C89 or better now.
14487
14488         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
14489         if not already defined.
14490
14491         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
14492         * lib/dup-safer.c (errno): Likewise.
14493
14494 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14495
14496         Merge from coreutils.
14497         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
14498         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
14499         * modules/path-concat: Don't depend on strdup.
14500
14501 2004-08-03  Simon Josefsson  <jas@extundo.com>
14502
14503         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
14504         * lib/progname.h: Don't include stdbool.h.
14505
14506 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14507
14508         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
14509         * MODULES.html.sh (func_all_modules): Remove fatal.
14510
14511 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14512
14513         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
14514
14515 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14516
14517         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
14518         working.
14519
14520 2004-08-02  Simon Josefsson  <jas@extundo.com>
14521
14522         * lib/getsubopt.h: New file, with comments from Bruno Haible.
14523         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
14524         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
14525
14526 2004-08-01  Simon Josefsson  <jas@extundo.com>
14527
14528         * lib/xgetdomainname.c: Include stdlib.h, for free().
14529
14530 2004-07-19  Bruno Haible  <bruno@clisp.org>
14531
14532         * MODULES.html.sh (func_all_modules): Add dummy.
14533
14534 2004-07-16  Simon Josefsson  <jas@extundo.com>
14535
14536         * modules/dummy: New file.
14537
14538 2004-07-16  Simon Josefsson  <jas@extundo.com>
14539
14540         * lib/dummy.c: New file.
14541
14542 2004-07-16  Bruno Haible  <bruno@clisp.org>
14543
14544         * lib/backupfile.h: Add extern "C" for C++.
14545         * lib/closeout.h: Likewise.
14546         * lib/copy-file.h: Likewise.
14547         * lib/findprog.h: Likewise.
14548         * lib/full-write.h: Likewise.
14549         * lib/pathname.h: Likewise.
14550         * lib/progname.h: Likewise.
14551         * lib/stpcpy.h: Likewise.
14552         * lib/stpncpy.h: Likewise.
14553         * lib/strcase.h: Likewise.
14554         * lib/strstr.h: Likewise.
14555         * lib/xalloc.h: Likewise.
14556
14557         * lib/mbswidth.h: Add extern "C" for C++.
14558         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
14559
14560 2004-07-13  Robert Millan  <robertmh@gnu.org>
14561
14562         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
14563
14564 2004-07-09  Simon Josefsson  <jas@extundo.com>
14565
14566         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
14567         failed without this.)
14568
14569 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14570
14571         * modules/chown (Files): Add lib/fchown-stub.c, since
14572         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
14573
14574 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14575
14576         * lib/fchown-stub.c: New file.
14577
14578 2004-06-24  Jim Meyering  <jim@meyering.net>
14579
14580         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
14581
14582 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14583
14584         * modules/argz: Omit "#include".
14585
14586         * MODULES.html.sh (func_all_modules): Add calloc, to match
14587         2004-06-01 addition of calloc module.
14588
14589 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14590
14591         * m4/argz.m4: New file, which is autoupdated from libtool.
14592
14593 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14594
14595         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
14596         libtool.
14597
14598 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14599
14600         * config/srclist-update: Don't insist on "USA." before the
14601         close-comment, as libtool omits the period and puts the */ on a
14602         separate line.
14603         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
14604         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
14605
14606 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
14607
14608         * modules/argz: New file.
14609         * MODULES.html.sh (func_all_modules): Add argz.
14610
14611 2004-06-12  Jim Meyering  <jim@meyering.net>
14612         and  Paul Eggert  <eggert@cs.ucla.edu>
14613
14614         * modules/hash (Files): Add lib/xalloc.h.
14615         * modules/pipe (Depends-on): Add wait-process.
14616         * modules/stat (Depends-on): Add xalloc.
14617         * modules/userspec (Files): Add lib/userspec.h.
14618         * modules/xstrto
14619
14620         Upgrade from gettext-0.13.
14621         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
14622         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
14623         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
14624
14625 2004-06-10  Jim Meyering  <jim@meyering.net>
14626
14627         * lib/calloc.c: New file.
14628
14629 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
14630
14631         * lib/getdate.y (yylex): Allow space between sign and number.
14632         Problem reported by Dan Jacobson.
14633
14634 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
14635
14636         Merge from coreutils CVS.
14637
14638         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
14639         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
14640         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
14641         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
14642         xstrtol.m4: Fix copyright date and/or serial number.
14643
14644         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
14645         See if we need an fchown replacement.
14646         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
14647         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
14648         and use the replacement function if we detect either defect.
14649
14650         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
14651         gl_UTIMECMP.
14652
14653 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
14654         and  Jim Meyering  <jim@meyering.net>
14655
14656         Merge from coreutils CVS.
14657
14658         * lib/stat-macros.h: New file, with contents from file-type.h
14659         and coreutils' system.h.
14660         * lib/file-type.c: Include "stat-macros.h".
14661         * lib/file-type.h (file_type): Move all macro definitions to new file,
14662         stat-macros.h.
14663
14664         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
14665         Wrap old code with this conditional.
14666         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
14667         function that does not dereference symlinks.
14668         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
14669
14670         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
14671         dependency problems.
14672         (xreadlink): Accept new arg SIZE, for efficiency.
14673         All decls and uses changed.
14674         * lib/xreadlink.h: Include <stddef.h>, for size_t.
14675
14676         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
14677         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
14678
14679         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
14680         sysexits.h.
14681
14682 2004-06-01  Jim Meyering  <jim@meyering.net>
14683
14684         * m4/calloc.m4: New file.
14685
14686 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
14687
14688         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
14689         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
14690         Also, fix a typo in a diagnostic.
14691
14692 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
14693
14694         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
14695         or AC_FUNC_REALLOC.
14696
14697 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
14698
14699         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
14700         macros to be defined.
14701         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
14702         the allocator returns NULL because the requested size is zero.
14703
14704 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14705
14706         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
14707         var.  Add comment explaining why libc still defines it.  This
14708         merges the following patch from glibc:
14709         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
14710
14711 2004-05-20  Andreas Schwab  <schwab@suse.de>
14712
14713         * m4/free.m4: Replace free if it not known to work, not the other
14714         way round.
14715
14716 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14717
14718         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
14719         present in glibc since revision 1.1 of this file.
14720         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
14721         obstack_alignment_mask, obstack_alloc, obstack_base,
14722         obstack_blank, obstack_blank_fast, obstack_chunk_size,
14723         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
14724         obstack_grow0, obstack_init, obstack_int_grow,
14725         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
14726         obstack_next_free, obstack_object_size, obstack_ptr_grow,
14727         obstack_ptr_grow_fast, obstack_room): Remove declarations of
14728         nonexistent functions.
14729
14730 2004-05-18  Karl Berry  <karl@gnu.org>
14731
14732         * config/srclist.txt: break link for vasnprintf.c.
14733
14734 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
14735
14736         Port obstack to the AS/400, where pointers are 16 bytes wide and
14737         you cannot cast an integer to a valid pointer.  This patch is
14738         currently waiting to be integrated into glibc; see
14739         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
14740
14741         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
14742         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
14743         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
14744         (struct obstack): temp member is now a union of a pointer and
14745         an integer, instead of an integer.  All integer uses changed.
14746         This does not affect the physical layout of struct obstack,
14747         except on hosts (like the AS/400) where the size or alignment of
14748         void * is greater than that of ptrdiff_t.
14749         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
14750         __STDC__)]: Store temporary in pointer member of union, not
14751         integer member.
14752         * lib/obstack.c: Include <stddef.h>, for offsetof.
14753         (struct fooalign): Remove; it doesn't need a name.
14754         (union fooround): Change double to long double, and add void *.
14755         (DEFAULT_ALIGNMENT): Use offsetof to compute.
14756         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
14757         not a macro.  Hence the values are always int; so remove all
14758         casts-to-int in uses.
14759
14760 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
14761
14762         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
14763         we can get this patch merged into glibc.
14764
14765 2004-05-17  Derek R. Price  <derek@ximbiot.com>
14766             Paul Eggert  <eggert@cs.ucla.edu>
14767
14768         * m4/argp: Depend on alloca.
14769
14770 2004-05-17  Derek R. Price  <derek@ximbiot.com>
14771             Paul Eggert  <eggert@cs.ucla.edu>
14772
14773         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
14774         freecoding.
14775
14776 2004-05-17  Bruno Haible  <bruno@clisp.org>
14777
14778         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
14779         precision that consists of a '.' followed by an empty digit string.
14780         Patch by Tor Lillqvist <tml@iki.fi>.
14781
14782 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
14783
14784         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
14785         for backward compatibility with older code.  We need our own
14786         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
14787         it under some other name, and our alloca.h will define it.
14788
14789 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
14790             Derek Price  <derek@ximbiot.com>
14791
14792         * lib/alloca.c: Include <alloca.h>, to get our interface.
14793         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
14794         include <alloca.h> first.  Use C89 prototype for alloca; this
14795         requires including <stddef.h> for size_t.  Use extern "C" if C++.
14796         Use #elif for simplicity, since we can assume C89 now.
14797         Don't try to source the system alloca.h since it will not be found
14798         and to prevent recursively including its replacement.
14799         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
14800         * lib/regex.c: Likewise.
14801
14802 2004-05-16  Derek Price  <derek@ximbiot.com>
14803             Paul Eggert  <eggert@cs.ucla.edu>
14804
14805         getline cleanup.  This changes the getndelim2 API: both order of
14806         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
14807         no delimiter).
14808
14809         * lib/getline.c: Don't include stddef.h or stdio.h, since our
14810         interface does that.
14811         (getline): Always use getdelim, so that we don't have two
14812         copies of this code.
14813         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
14814         if available.
14815         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
14816         (GETNDELIM2_MAXIMUM): New macro.
14817         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
14818         instead of the old practice of delim2==0.  All callers changed.
14819         Return -1 on overflow, instead of returning junk.
14820         Do not set *linesize unless allocation succeeds.
14821         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
14822         that we include sys/types.h.
14823         * lib/getnline.h: Likewise.
14824         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
14825         (getndelim2): Reorder arguments.
14826         * lib/getnline.c (getnline, getndelim):
14827         Don't discard the NMAX argument.
14828         (getnline): Invoke getndelim, to avoid code duplication.
14829         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
14830         of (size_t) -1 by callers of the getnline family.
14831
14832 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14833
14834         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
14835         Check for gettimeofday.
14836         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
14837         Check for settimeofday, stime.
14838
14839 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14840
14841         * lib/nanosleep.c (suspended): Change its type from int to
14842         sig_atomic_t volatile.
14843         (first_call): Make it private to rpl_nanosleep, and have it
14844         be zero initially as that's a bit faster.
14845         (my_usleep): Round up fractional times instead of truncating them,
14846         as this is the usual meaning for 'sleep'.
14847
14848         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
14849         doesn't work.
14850         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
14851         (ENOSYS): Define if not defined.
14852         (settime): Fall back on stime if it exists and settimeofday fails.
14853         But don't bother with fallbacks if a method fails with errno == EPERM.
14854
14855 2004-05-11  Jim Meyering  <jim@meyering.net>
14856
14857         Prior to this change, the save_cwd caller required read access to the
14858         current directory on most systems (ones with the fchdir function).
14859
14860         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
14861         fails, try write-only, and finally, resort to using xgetcwd.
14862
14863 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14864
14865         * lib/obstack.c, obstack.h: Import changes from libc.
14866
14867 2004-04-28  Bruno Haible  <bruno@clisp.org>
14868
14869         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
14870         also implicitly appends .exe to executables.
14871         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
14872         accepts Windows pathnames.
14873         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14874         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14875         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14876         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14877         Reported by Derek Robert Price <derek@ximbiot.com>.
14878
14879 2004-04-21  Karl Berry  <karl@gnu.org>
14880
14881         * config/srclist.txt (localcharset.c): break sync.
14882
14883 2004-04-20  Paul Eggert  <eggert@twinsun.com>
14884
14885         * m4/host-os.m4: Add a copyright notice.
14886
14887 2004-04-20  Jim Meyering  <jim@meyering.net>
14888
14889         Change UTILS_ to gl_ in AC_DEFINE'd names.
14890         Change utils_- and jm_-prefixed variables, too.
14891         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
14892         UTILS_FUNC_MKDIR_TRAILING_SLASH.
14893         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
14894
14895         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
14896         Don't emit trailing blanks.
14897         Also rename jm_-prefixed variables to have gl_ prefix.
14898
14899         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
14900         Also rename jm_-prefixed variables to have gl_ prefix.
14901
14902         * m4/jm-macros.m4: Reflect the renamings.
14903         * m4/prereq.m4: Likewise.
14904
14905 2004-04-20  Jim Meyering  <jim@meyering.net>
14906
14907         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
14908         memory.
14909
14910 2004-04-20  Jim Meyering  <jim@meyering.net>
14911             Bruno Haible  <bruno@clisp.org>
14912
14913         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
14914         memory when realloc fails.
14915
14916 2004-04-19  Jim Meyering  <jim@meyering.net>
14917
14918         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
14919         now that readutmp.c may call `free (0)'.
14920
14921 2004-04-19  Bruno Haible  <bruno@clisp.org>
14922
14923         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
14924         * m4/inttypes_h.m4: Likewise.
14925         * m4/stdint_h.m4: Likewise.
14926         * m4/intmax_t.m4: Likewise.
14927         * m4/uintmax_t.m4: Likewise.
14928
14929 2004-04-18  Jim Meyering  <jim@meyering.net>
14930
14931         * m4/prereq.m4: Don't forbid jm_ prefix.
14932
14933         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
14934         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
14935         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
14936         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
14937         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
14938         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
14939         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
14940         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
14941         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
14942         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
14943         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
14944         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
14945         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
14946         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
14947         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
14948         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
14949         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
14950         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
14951         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
14952
14953 2004-04-18  Jim Meyering  <jim@meyering.net>
14954
14955         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
14956         failure, don't leak memory and do call END_UTMP_ENT.
14957
14958 2004-04-16  Jim Meyering  <jim@meyering.net>
14959
14960         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
14961         coreutils' stat program.
14962         (gl_PREREQ): Don't require jm_PREREQ_STAT.
14963
14964 2004-04-11  Paul Eggert  <eggert@twinsun.com>
14965
14966         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
14967         C89.
14968         (CHAR_BIT): Remove, since we assume C89.
14969         Include <stdint.h> if available, as per current Autoconf CVS advice.
14970
14971 2004-03-31  Jim Meyering  <jim@meyering.net>
14972
14973         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
14974         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
14975         * m4/xalloc.m4: Likewise.
14976
14977 2004-03-30  Paul Eggert  <eggert@twinsun.com>
14978
14979         Merge from coreutils.
14980
14981         * m4/inttostr.m4: New file.
14982         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
14983         Require AM_STDBOOL_H and gl_TIMESPEC instead.
14984         Require gl_CLOCK_TIME.
14985         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
14986
14987 2004-03-30  Paul Eggert  <eggert@twinsun.com>
14988
14989         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
14990         not bool, to be more consistent with Unix conventions.
14991         Suggested by Bruno Haible.
14992
14993         Merge from coreutils.
14994
14995         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
14996         * lib/umaxtostr.c: New files.
14997
14998         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
14999         the usual <time.h> dance.
15000         (get_date): Change signature to support fractional time stamps.
15001         All callers changed.
15002         * lib/getdate.y: Include "getdate.h" first, as we can now
15003         assume C89 and don't need to worry about 'const'.
15004         Similarly, include "unlocked-io.h" near start, not in middle.
15005         Include <limits.h>.
15006         (textint.value): Use long int rather than int.
15007         (textint.digits): Use size_t rather than int.
15008         (BILLION, LOG10_BILLION): New constants.
15009         (parser_control): New member rel_ns.  Members day_ordinal,
15010         time_zone, month, day, hour, minutes, rel_year, rel_month,
15011         rel_day, rel_hour, rel_minutes, rel_seconds
15012         are now long int, not int.  Member seconds is now struct timespec,
15013         not int.  New member timespec_seen.  Members dates_seen, days_seen,
15014         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
15015         not int.
15016         (%union.intval): Now long int, not int.
15017         New member timespec.
15018         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
15019         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
15020         (spec): Now is a timespec or an item list.
15021         (timespec, items): New nonterminals.
15022         (time, rel, relunit, number, get_date):
15023         Add support for fractional seconds.
15024         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
15025         (gmtime, localtime, mktime): Remove decls; not needed with C89.
15026         (to_hour): First arg is now long int, not int.
15027         (to_year): Returns long int, not int.
15028         Don't treat year -70 like 70.
15029         (tm_diff): Returns long int, not int.
15030         (lookup_word): Use bool instead of int when appropriate.
15031         (yylex): Use size_t for count, not int.
15032         Detect overflow when parsing large integer constants.
15033         Add support for fractions.
15034         (get_date): Make pointers 'const' if possible.
15035         Use more-portable code to detect integer overflow.
15036         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
15037         Don't use ctime; it's not reliable if the year has >4 digits.
15038
15039         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
15040         This is for compatibility with BSD.
15041
15042         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
15043         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
15044         From coreutils' system.h.
15045
15046         * lib/userspec.c: Don't include "posixver.h".
15047         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
15048         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
15049         compatible extension.  Simplify code by removing a boolean int
15050         that was always nonzero if a string was nonnull.
15051
15052 2004-03-30  Jim Meyering  <jim@meyering.net>
15053
15054         Merge from coreutils.
15055
15056         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
15057         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
15058         on some systems one must include <grp.h> before it.
15059         Reported by Christian Krackowizer.
15060
15061 2004-03-30  Jim Meyering  <jim@meyering.net>
15062
15063         Merge from coreutils.
15064
15065         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
15066
15067         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
15068         an empty input stream.
15069
15070         * lib/readtokens.c: Include <stdbool.h>.
15071         (readtoken): Use `size_t' rather than int/long.
15072         All callers adjusted.
15073         Use `bool' rather than `int' where appropriate.
15074         Use memset rather than an explicit loop.
15075         Use x2nrealloc rather than xrealloc.
15076         Allow the use of `\0' as a delimiter.
15077         (readtokens): Likewise.
15078         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
15079
15080 2004-03-30  Jim Meyering  <jim@meyering.net>
15081
15082         * m4/realloc.m4: Remove file, since now it does no more than
15083         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
15084         the `configure.ac' section of module/realloc.
15085         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
15086
15087 2004-03-30  Bruno Haible  <bruno@clisp.org>
15088
15089         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
15090         nonnull.
15091
15092 2004-03-29  Paul Eggert  <eggert@twinsun.com>
15093
15094         Merge changes to getloadavg.c from coreutils and Emacs.
15095
15096         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
15097         Define to an expression, not to the empty string.
15098         Include cloexec.h and xalloc.h.
15099         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
15100         Use set_cloexec_flag rather than rolling our own.
15101         * lib/cloexec.c, lib/cloexec.h: New files.
15102
15103 2004-03-29  Paul Eggert  <eggert@twinsun.com>
15104
15105         * m4/cloexec.m4: New file.
15106
15107 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15108
15109         * lib/getopt.h: Sync with libc CVS.
15110
15111 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15112             Bruno Haible  <bruno@clisp.org>
15113
15114         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
15115         mbswidth.
15116
15117 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15118             Bruno Haible  <bruno@clisp.org>
15119
15120         * lib/mbswidth.h: Include <wchar.h> only if
15121         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
15122         <wchar.h>.
15123         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
15124
15125 2004-03-09  Paul Eggert  <eggert@twinsun.com>
15126
15127         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
15128         Sync with libc CVS.
15129         * lib/getopt_int.h: New file, also synced from libc.
15130
15131 2004-03-09  Paul Eggert  <eggert@twinsun.com>
15132
15133         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
15134         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
15135         Bring back getopt.c, getopt.h, getopt1.c.
15136
15137 2004-03-07  Paul Eggert  <eggert@twinsun.com>
15138
15139         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
15140         All uses changed.  Check for sa_sigaction member; this fixes
15141         a bug first reported by Jason Andrade in
15142         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
15143
15144 2004-03-07  Paul Eggert  <eggert@twinsun.com>
15145
15146         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
15147         '#if' expressions.  Unlike the code it replaces, it does not
15148         depend on (defined _SC_PAGESIZE).  However, it does depend on
15149         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
15150         first reported by Jason Andrade in
15151         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
15152
15153 2004-02-25  Simon Josefsson  <jas@extundo.com>
15154
15155         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
15156
15157 2004-02-25  Simon Josefsson  <jas@extundo.com>
15158
15159         * lib/strdup.h: New file.
15160         * lib/strdup.c: Include it.
15161         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
15162         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
15163
15164 2004-02-23  Karl Berry  <karl@gnu.org>
15165
15166         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
15167         (from fencepost.gnu.org:/gd/gnuorg).
15168
15169 2004-02-23  Karl Berry  <karl@gnu.org>
15170
15171         * config/srclistvars.sh (GNUORG) [karl]: redefine.
15172         * config/srclist.txt: add maintain/standards documents.
15173
15174 2004-02-18  Bruno Haible  <bruno@clisp.org>
15175
15176         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
15177         Reported by Derek Robert Price <derek@ximbiot.com>.
15178
15179 2004-02-16  Karl Berry  <karl@gnu.org>
15180
15181         * config/mkinstalldirs, install-sh: update from automake.
15182
15183 2004-02-06  Karl Berry  <karl@gnu.org>
15184
15185         * m4/po.m4: update from gettext 0.14.1.
15186
15187 2004-02-06  Karl Berry  <karl@gnu.org>
15188
15189         * lib/config.charset: update from gettext 0.14.1.
15190
15191 2004-02-05  Paul Eggert  <eggert@twinsun.com>
15192
15193         Add comments and code, prompted by suggestions from Bruno Haible
15194         for sh-quote.
15195         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
15196         describing the enum quoting_style values.
15197         * lib/quotearg.c (quotearg_alloc): New function.
15198         (quotearg_buffer_restyled): Treat lone { and } as special.
15199         Treat = as special.  Work around bug with older shells
15200         that "see" a '\' that is really the 2nd byte of a multibyte char.
15201         Quote empty string with shell_quoting_style.
15202
15203 2004-02-03  Bruno Haible  <bruno@clisp.org>
15204
15205         * m4/pipe.m4: New file, from GNU gettext.
15206
15207 2004-02-03  Bruno Haible  <bruno@clisp.org>
15208
15209         * lib/pipe.h: New file, from GNU gettext.
15210         * lib/pipe.c: New file, from GNU gettext.
15211
15212 2004-01-27  Bruno Haible  <bruno@clisp.org>
15213
15214         * m4/execute.m4: New file, from GNU gettext.
15215
15216 2004-01-27  Bruno Haible  <bruno@clisp.org>
15217
15218         * lib/execute.h: New file, from GNU gettext.
15219         * lib/execute.c: New file, from GNU gettext.
15220         * lib/w32spawn.h: New file, from GNU gettext.
15221
15222 2004-01-24  Paul Eggert  <eggert@twinsun.com>
15223
15224         Merge from diffutils.
15225
15226         * lib/file-type.c (file_type): Add typed memory objects.
15227         * lib/file-type.h (S_TYPEISTMO): New macro.
15228
15229         * lib/c-stack.h (c_stack_action): Remove argv argument.
15230         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
15231         (die): Don't calculate message unless segv_action returns.
15232         (get_stack_location, min_address_from_argv, max_address_from_argv,
15233         volatile stack_base, volatile_stack_size): Remove.
15234         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
15235         that every segmentation violation is a stack overflow.  (Ouch!)
15236         See Debian bug 136249 (still outstanding) for more info about why
15237         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
15238
15239 2004-01-24  Paul Eggert  <eggert@twinsun.com>
15240
15241         Exit-status fix from coreutils.
15242
15243         Use exit_failure consistently in place of EXIT_FAILURE,
15244         so that program exit statuses are consistent on failure.
15245
15246         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
15247         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
15248         * lib/argmatch.h: Comment fix to match the above.
15249         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
15250         Now a macro referring to exit_failure, instead of a separate
15251         variable.  Include "exitfail.h" to get it.
15252         * lib/xstrtol.h: Include "exitfail.h".
15253         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
15254
15255         * lib/long-options.c (parse_long_options): Use prototype
15256         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
15257         for clarity.
15258
15259 2004-01-21  Jim Meyering  <jim@meyering.net>
15260
15261         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
15262         so as not to conflict with a different-sized __mktime_internal
15263         function in GNU libc.
15264         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
15265         Problem building statically-linked `ls' reported by Michael Brunnbauer.
15266
15267 2004-01-20  Karl Berry  <karl@gnu.org>
15268
15269         * config/config.guess: update from config.
15270
15271         * config/srclistvars.sh: GNUWWWLICENSES for karl.
15272
15273 2004-01-20  Bruno Haible  <bruno@clisp.org>
15274
15275         Safer stack allocation.
15276         * lib/setenv.c: Include allocsa.h.
15277         (alloca): Remove fallback definition.
15278         (freea): Remove macro.
15279         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
15280         instead of freea.
15281
15282 2004-01-20  Bruno Haible  <bruno@clisp.org>
15283
15284         * m4/eealloc.m4: New file, from GNU gettext.
15285
15286 2004-01-20  Bruno Haible  <bruno@clisp.org>
15287
15288         * m4/allocsa.m4: New file, from GNU gettext.
15289
15290 2004-01-20  Bruno Haible  <bruno@clisp.org>
15291
15292         * lib/xallocsa.h: New file, from GNU gettext.
15293         * lib/xallocsa.c: New file, from GNU gettext.
15294
15295 2004-01-20  Bruno Haible  <bruno@clisp.org>
15296
15297         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
15298
15299 2004-01-20  Bruno Haible  <bruno@clisp.org>
15300
15301         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
15302         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
15303         specially.
15304
15305 2004-01-20  Bruno Haible  <bruno@clisp.org>
15306
15307         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
15308         patch.
15309
15310 2004-01-20  Bruno Haible  <bruno@clisp.org>
15311
15312         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
15313
15314 2004-01-20  Bruno Haible  <bruno@clisp.org>
15315
15316         * lib/eealloc.h: New file.
15317
15318 2004-01-20  Bruno Haible  <bruno@clisp.org>
15319
15320         * lib/binary-io.h: Avoid warnings on Cygwin.
15321
15322 2004-01-20  Bruno Haible  <bruno@clisp.org>
15323
15324         * lib/allocsa.h: New file, from GNU gettext.
15325         * lib/allocsa.c: New file, from GNU gettext.
15326
15327 2004-01-18  Karl Berry  <karl@gnu.org>
15328
15329         * doc/gpl.texi, doc/lgpl.texi: new files.
15330
15331 2004-01-18  Karl Berry  <karl@gnu.org>
15332
15333         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
15334         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
15335
15336 2004-01-15  Paul Eggert  <eggert@twinsun.com>
15337
15338         Merge from coreutils.
15339
15340         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
15341         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
15342         (gl_DEFAULT_POSIX2_VERSION): Move
15343         the documentation from 'configure' into 'config.hin',
15344         so that 'configure --help' isn't burdened by it and
15345         we don't have to worry about its formatting there.
15346         Reword the documentation so that it's more succinct
15347         and can be run together into a single paragraph.
15348         * m4/same.m4 (gl_SAME): Check for pathconf.
15349
15350 2004-01-15  Paul Eggert  <eggert@twinsun.com>
15351
15352         Merge from coreutils.
15353
15354         * lib/posixver.c: Include posixver.h.
15355
15356         * lib/same.c: Include <stdbool.h>, <limits.h>.
15357         (_POSIX_NAME_MAX): Define if not defined.
15358         (MIN): New macro.
15359         (same_name): If file names are silently truncated, report
15360         that the file names are the same if they are the same after
15361         the silent truncation.
15362
15363         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
15364         conversion function.
15365         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
15366         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
15367         longer needed.
15368
15369 2004-01-15  Jim Meyering  <jim@meyering.net>
15370
15371         Merge from coreutils.
15372
15373         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
15374         if no library is required.
15375         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
15376         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
15377         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
15378         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
15379         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
15380         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
15381         value, $ac_cv_search_crypt, if it's "none required".
15382         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
15383         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
15384         not gl_FUNC_GETLOADAVG.
15385         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
15386         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
15387
15388 2004-01-15  Jim Meyering  <jim@meyering.net>
15389
15390         Merge from coreutils.
15391
15392         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
15393         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
15394         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
15395
15396         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
15397         optional configure-time default.
15398
15399         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15400
15401         * lib/xreadlink.c (xreadlink): Correct outdated comment.
15402
15403 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
15404
15405         Merge from coreutils.
15406
15407         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
15408         value, $ac_cv_search_nanosleep, if it's "none required".
15409
15410 2004-01-14  Paul Eggert  <eggert@twinsun.com>
15411
15412         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
15413         with like-named macro in fnmatch.c.
15414         (EXT): Use an internal constant instead.
15415
15416         Merge fnmatch patches from glibc.
15417         * lib/fnmatch.c (mbsinit): Remove define.
15418         Add libc_hidden_ver (__fnmatch, fnmatch).
15419         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
15420         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
15421
15422 2004-01-14  Karl Berry  <karl@gnu.org>
15423
15424         * config/install-sh: update from automake.
15425
15426 2004-01-13  Karl Berry  <karl@gnu.org>
15427
15428         * config/install-sh: update from automake.
15429
15430 2004-01-09  Karl Berry  <karl@gnu.org>
15431
15432         * config/install-sh: update from automake.
15433
15434 2004-01-05  Karl Berry  <karl@gnu.org>
15435
15436         * config/config.{sub,guess}: update from config.
15437
15438 2003-12-31  Karl Berry  <karl@gnu.org>
15439
15440         * config/depcomp: update from automake.
15441
15442 2003-12-14  Karl Berry  <karl@gnu.org>
15443
15444         * lib/config.charset: update from gettext-runtime.
15445
15446 2003-12-03  Paul Eggert  <eggert@twinsun.com>
15447
15448         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
15449         Bug reported by Alfred M. Szmidt.
15450
15451 2003-12-03  Bruno Haible  <bruno@clisp.org>
15452
15453         * m4/gettext.m4: Upgrade from gettext-0.13.
15454         * m4/po.m4: Upgrade from gettext-0.13.
15455         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
15456         * m4/intmax.m4: New file, from gettext-0.13.
15457         * m4/printf-posix.m4: New file, from gettext-0.13.
15458
15459 2003-11-29  Karl Berry  <karl@gnu.org>
15460
15461         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
15462
15463 2003-11-25  Paul Eggert  <eggert@twinsun.com>
15464             Bruno Haible  <bruno@clisp.org>
15465
15466         * lib/printf-parse.h: Don't include sys/types.h.
15467         (ARG_NONE): New macro.
15468         (char_directive): Change type of *arg_index fields to size_t.
15469         * lib/printf-parse.c: Don't include sys/types.h.
15470         (SSIZE_MAX): Remove macro.
15471         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
15472         Remove unnecessary overflow check.
15473         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
15474         fields.
15475
15476 2003-11-25  Bruno Haible  <bruno@clisp.org>
15477
15478         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
15479
15480 2003-11-25  Bruno Haible  <bruno@clisp.org>
15481
15482         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
15483         gt_TYPE_SSIZE_T.
15484
15485 2003-11-24  Paul Eggert  <eggert@twinsun.com>
15486
15487         * modules/alloca: Remove dependency on xalloc.
15488
15489 2003-11-24  Paul Eggert  <eggert@twinsun.com>
15490
15491         * lib/alloca.c: Remove dependency on xalloc module.
15492         (xalloc_die): Remove.
15493         (memory_full) [!defined emacs]: New macro.
15494         [!defined emacs]: Don't include xalloc.h.
15495         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
15496         address arithmetic overflows.  Change datatypes a bit to avoid
15497         unnecessary casts.
15498
15499 2003-11-22  Jim Meyering  <jim@meyering.net>
15500
15501         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
15502         s/size/size_t/.
15503
15504 2003-11-21  Karl Berry  <karl@gnu.org>
15505
15506         * config/config.{sub,guess}: update from config.
15507
15508 2003-11-18  Karl Berry  <karl@gnu.org>
15509
15510         * config/config.{sub,guess}: update from config.
15511
15512         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
15513
15514 2003-11-17  Paul Eggert  <eggert@twinsun.com>
15515
15516         * README: Mention that S+T cannot overflow if S is the size of
15517         an existing object and T is sufficiently small.
15518
15519 2003-11-17  Jim Meyering  <jim@meyering.net>
15520
15521         On systems without utime and without a utimes function capable of
15522         dealing with a NULL struct utimbuf* argument, this utime replacement
15523         could -- in unusual circumstances -- leak a file descriptor.
15524         * lib/utime.c: Include <unistd.h> and <errno.h>.
15525         (utime_null): Be sure to close `fd' and to preserve errno.
15526         Reported by Geoff Collyer via Arnold Robbins.
15527
15528 2003-11-17  Bruno Haible  <bruno@clisp.org>
15529
15530         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
15531         (Depends-on): Add xsize.
15532
15533 2003-11-17  Bruno Haible  <bruno@clisp.org>
15534
15535         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
15536
15537 2003-11-17  Bruno Haible  <bruno@clisp.org>
15538
15539         * lib/vasnprintf.c (alloca): Remove fallback definition.
15540         (freea): Remove definition.
15541         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
15542         Reported by Paul Eggert.
15543
15544 2003-11-16  Paul Eggert  <eggert@twinsun.com>
15545             Bruno Haible  <bruno@clisp.org>
15546
15547         Protect against address arithmetic overflow.
15548         * lib/printf-args.h: Include stddef.h.
15549         (arguments): Change type of field 'count' to size_t.
15550         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
15551         'unsigned int' where appropriate.
15552         * lib/printf-parse.h: Include sys/types.h.
15553         (char_directive): Change type of *arg_index fields to ssize_t.
15554         (char_directives): Change type of fields 'count', max_*_length to
15555         size_t.
15556         * lib/printf-parse.c: Include sys/types.h and xsize.h.
15557         (SSIZE_MAX): Define fallback value.
15558         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
15559         instead of 'int' where appropriate. Check a_allocated, d_allocated
15560         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
15561         * lib/vasnprintf.c: Include xsize.h.
15562         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
15563         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
15564         overflow. Avoid wraparound when converting a width or precision from
15565         decimal to binary.
15566
15567 2003-11-16  Bruno Haible  <bruno@clisp.org>
15568
15569         Update from GNU gettext.
15570         * lib/printf-parse.c: Generalize to it can be compiled for wide
15571         strings.
15572         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
15573         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
15574         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
15575         SNPRINTF): New macros.
15576         Don't include <alloca.h> if the file is used inside libintl.
15577         (local_wcslen): New function, for Solaris 2.5.1.
15578         (VASNPRINTF): Use it instead of wcslen.
15579
15580 2003-11-16  Bruno Haible  <bruno@clisp.org>
15581
15582         * lib/xsize.h (xmax): New function.
15583         (xsum, xsum3, xsum4): Declare as "pure" functions.
15584
15585 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15586
15587         * modules/xalloc (Files): Undo latest change, since xalloc.h
15588         no longer needs SIZE_MAX or PTRDIFF_MAX.
15589
15590 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15591
15592         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
15593         gl_PTRDIFF_MAX.
15594
15595 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15596
15597         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
15598         "return", to pacify some unknown compiler.  Problem reported
15599         by Joerg Schilling.
15600
15601 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15602
15603         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
15604         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
15605         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
15606         heuristic is just as accurate as far as we know, and it removes a
15607         dependency on size_max.m4 and ptrdiff_max.m4.
15608
15609 2003-11-11  Bruno Haible  <bruno@clisp.org>
15610
15611         * modules/xsize (Files): Add m4/size_max.m4.
15612         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
15613
15614 2003-11-11  Bruno Haible  <bruno@clisp.org>
15615
15616         * m4/size_max.m4: New file.
15617         * m4/ptrdiff_max.m4: New file.
15618         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
15619         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
15620         (gl_XALLOC): Invoke it.
15621
15622 2003-11-11  Bruno Haible  <bruno@clisp.org>
15623
15624         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
15625         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
15626         defined.
15627
15628 2003-11-10  Paul Eggert  <eggert@twinsun.com>
15629
15630         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
15631         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
15632         rejected some allocations of exactly SIZE_MAX - 2 bytes.
15633         From Bruno Haible.
15634         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
15635         not (size_t) -1, since it's defined here.
15636
15637 2003-11-09  Karl Berry  <karl@gnu.org>
15638
15639         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
15640
15641 2003-11-06  Paul Eggert  <eggert@twinsun.com>
15642
15643         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
15644         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
15645         Reject sizes of exactly SIZE_MAX bytes.
15646         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
15647         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
15648
15649 2003-11-05  Bruno Haible  <bruno@clisp.org>
15650
15651         * lib/xsize.h: Include limits.h, to avoid a possible collision with
15652         SIZE_MAX defined in <limits.h> on Solaris.
15653
15654 2003-11-04  Jim Meyering  <jim@meyering.net>
15655
15656         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
15657         variable names, rather than @VAR@.
15658         * modules/poll: Likewise.
15659
15660 2003-11-04  Bruno Haible  <bruno@clisp.org>
15661
15662         * modules/xsize: New file.
15663         * modules/linebreak: Depend on xsize.
15664         * MODULES.html.sh (func_all_modules): Add xsize.
15665
15666 2003-11-04  Bruno Haible  <bruno@clisp.org>
15667
15668         * m4/xsize.m4: New file.
15669
15670 2003-11-04  Bruno Haible  <bruno@clisp.org>
15671
15672         * lib/xsize.h: New file.
15673         * lib/linebreak.c: Include xsize.h.
15674         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
15675         argument for overflow.
15676         Suggested by Paul Eggert.
15677
15678 2003-11-03  Karl Berry  <karl@gnu.org>
15679
15680         * config/config.{guess,sub}: update from config.
15681
15682 2003-11-03  Jim Meyering  <jim@meyering.net>
15683
15684         * modules/userspec (lib_SOURCES): Add userspec.h.
15685         (Include): Add "userspec.h".
15686         Improve description.
15687
15688 2003-11-03  Jim Meyering  <jim@meyering.net>
15689
15690         * lib/userspec.c: Include "userspec.h".
15691         * lib/userspec.h: New file.
15692
15693 2003-11-03  Bruno Haible  <bruno@clisp.org>
15694
15695         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
15696
15697 2003-11-03  Bruno Haible  <bruno@clisp.org>
15698
15699         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
15700         available, to avoid (extremely rare) race condition.
15701         Suggested by Paul Eggert.
15702
15703 2003-11-02  Karl Berry  <karl@gnu.org>
15704
15705         * config/srclist.txt (vasprintf.c): sync broken, sigh.
15706
15707 2003-10-31  Paul Eggert  <eggert@twinsun.com>
15708
15709         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
15710         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
15711         (read_filesystem_list): Set and use me_type_malloced.
15712         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
15713         whatever the type happens to be), for brevity and consistency.
15714         Check for size calculation overflow on Alphas running OSF/1.
15715
15716 2003-10-31  Jim Meyering  <jim@meyering.net>
15717
15718         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
15719
15720         * lib/linebuffer.c: Include <string.h> for declaration of memset.
15721
15722 2003-10-30  Paul Eggert  <eggert@twinsun.com>
15723             Bruno Haible  <bruno@clisp.org>
15724
15725         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
15726         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
15727
15728 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15729
15730         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
15731         netbsd*-gnu*.  Suggested by Robert Millan.
15732
15733 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15734
15735         * modules/group-member: Depend on stdbool.
15736
15737 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15738
15739         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
15740
15741 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15742
15743         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
15744         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
15745         after the 'gnu' in these cases.  This fixes some bugs in the
15746         previous change, and is based on suggestions by Robert Millan.
15747
15748 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15749
15750         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
15751         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
15752         no longer needed.
15753         * lib/quotearg.c (quotearg_n_options): Use it.
15754         * lib/group-member.c: Include <stdbool.h>.
15755         (free_group_info): Arg is now const *; don't free arg.
15756         (get_group_info): Now returns bool and accepts struct group_info *,
15757         rather than returning a malloc'ed struct group_info *.
15758         All uses changed.  Check for overflow in internal size calculation.
15759
15760         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
15761         rather than xmalloc/xrealloc.
15762         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
15763         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
15764         conformance bug: the old code used a pointer after freeing the
15765         storage that it addressed.
15766         * lib/hash.c (hash_initialize): Simplify the code by using
15767         xalloc_oversized rather than doing it by hand.
15768         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
15769         the buffer preserved.  Use free and xmalloc instead.
15770         * lib/quotearg.c (quotearg_n_options): Likewise.
15771         Use a simpler test for size overflow.  Don't use xalloc_oversized
15772         because unsigned int might be wider than size_t (!); this suggests
15773         that we should switch from unsigned int to size_t for slot numbers.
15774
15775 2003-10-28  Paul Eggert  <eggert@twinsun.com>
15776
15777         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
15778         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
15779         NetBSD kernels.  Requested by Richard Stallman.
15780
15781 2003-10-27  Paul Eggert  <eggert@twinsun.com>
15782
15783         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
15784         to allocate the returned structure.  Do not allocate a subarray,
15785         as x2nrealloc will do that.
15786         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
15787         instead of xnrealloc.
15788         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
15789
15790 2003-10-27  Bruno Haible  <bruno@clisp.org>
15791
15792         * lib/stdbool_.h: Better support for BeOS.
15793
15794 2003-10-26  Paul Eggert  <eggert@twinsun.com>
15795
15796         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
15797         now uses inline.
15798
15799 2003-10-26  Paul Eggert  <eggert@twinsun.com>
15800
15801         * lib/xalloc.h (xalloc_oversized): New static inline function, for
15802         callers that want to do their own size-overflow checking.  Include
15803         <stdbool.h>, since xalloc_oversized returns bool.
15804         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
15805         to use xalloc_oversized.
15806
15807         Add two functions x2realloc, x2nrealloc, for programs that grow
15808         arrays dynamically by doubling their sizes.
15809         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
15810         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
15811         New functions.
15812
15813         Port to C99 semantics for 'inline' of external functions.
15814         Bug reported by Bruno Haible.
15815         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
15816         with the old contents of xnmalloc.
15817         (xnmalloc, xmalloc): Use it.
15818         (xnrealloc_inline): New static inline function,
15819         with the old contents of xnrealloc.
15820         (xnrealloc, xrealloc): Use it.
15821
15822         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
15823         that.
15824
15825 2003-10-26  Karl Berry  <karl@gnu.org>
15826
15827         * config/srclist.txt (COPYING.DOC): no longer available from
15828         /gd/gnuorg; don't know where the ultimate source is.
15829
15830 2003-10-25  Paul Eggert  <eggert@twinsun.com>
15831
15832         Fix several address-calculation bugs in the hash modules,
15833         plus some minor code cleanup.
15834
15835         * lib/hash.h: Include <stdbool.h>, for bool.
15836         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
15837         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
15838         hash_get_n_entries, hash_get_max_bucket_length,
15839         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
15840         hash_rehash): Use size_t rather than unsigned.
15841         * lib/hash.c (struct hash_table, hash_get_n_buckets,
15842         hash_get_n_buckets_used, hash_get_n_entries,
15843         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
15844         hash_get_entries, hash_do_for_each, hash_string, is_prime,
15845         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
15846         Likewise.
15847         (SIZE_MAX): Define if not defined.
15848         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
15849         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
15850         hash_print):
15851         Use const * when possible.
15852         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
15853         (check_tuning): Fix bug: if tuning parameters were very close to
15854         0 or 1, rounding errors could have caused subscript violations.
15855         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
15856         (hash_initialize): Add 'fail:' label
15857         to free table and return NULL, and use it to simplify code.
15858         Use calloc rather than clearing the storage ourself.
15859         (hash_initialize, hash_rehash): Check for arithmetic overflow in
15860         buffer size calculations.
15861         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
15862         Include <stddef.h>, for size_t.
15863         * lib/hash-pjw.c (hash_pjw): Likewise.
15864         Switch to method described by Bruno Haible.
15865         Include <limits.h>, for CHAR_BIT.
15866         (SIZE_BITS): New macro.
15867
15868 2003-10-23  Paul Eggert  <eggert@twinsun.com>
15869
15870         * m4/getline.m4 (AM_FUNC_GETLINE):
15871         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
15872         hosts.  Problem reported by Derek Robert Price in
15873         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
15874         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
15875         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
15876
15877 2003-10-21  Paul Eggert  <eggert@twinsun.com>
15878
15879         * lib/getndelim2.c (getndelim2): When size calculation overflows,
15880         ceiling the allocation at NMAX bytes rather than silently
15881         discarding input bytes before NMAX is reached.  This makes
15882         a difference only if NMAX exceeds SIZE_MAX / 2.
15883
15884         * lib/obstack.c: Merge from glibc.
15885         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
15886         Add libc_hidden_def (_obstack_newchunk).
15887         (_obstack_free) [! defined _LIBC]: Remove.
15888         [defined _LIBC]: Make a strong alias from obstack_free, rather than
15889         a clone of the function body.
15890         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
15891         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
15892
15893         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
15894         glibc.
15895         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
15896         arg to memcpy.
15897
15898         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
15899         (obstack_ptr_grow_fast, obstack_int_grow_fast):
15900         Don't use lvalue casts, as GCC plans to remove support for them
15901         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
15902         was also present in the non-GCC version, indicating that this
15903         code had always been buggy and had never been widely used.
15904         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
15905         Use the fast variant of each macro, rather than copying the
15906         definiens of the fast variant; that way, we'll be more likely to
15907         catch future bugs in the fast variants.
15908
15909 2003-10-20  Bruno Haible  <bruno@clisp.org>
15910
15911         * modules/wait-process: New file.
15912         * MODULES.html.sh (func_all_modules): Add wait-process.
15913
15914 2003-10-20  Bruno Haible  <bruno@clisp.org>
15915
15916         * m4/wait-process.m4: New file.
15917
15918 2003-10-20  Bruno Haible  <bruno@clisp.org>
15919
15920         * lib/wait-process.h: New file, from GNU gettext.
15921         * lib/wait-process.c: New file, from GNU gettext.
15922
15923 2003-10-19  Jim Meyering  <jim@meyering.net>
15924
15925         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
15926         HPUX 10.20.
15927
15928 2003-10-18  Karl Berry  <karl@gnu.org>
15929
15930         * config/config.guess: update from config.
15931
15932 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15933
15934         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
15935         (getgroups): First arg is int, not size_t.
15936         Don't let 'free' mangle errno.
15937
15938 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15939
15940         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
15941
15942 2003-10-16  Karl Berry  <karl@gnu.org>
15943
15944         * config/config.{guess,sub}: update from config.
15945
15946 2003-10-16  Jim Meyering  <jim@meyering.net>
15947
15948         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
15949         memcpy.
15950
15951 2003-10-15  Paul Eggert  <eggert@twinsun.com>
15952
15953         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
15954         (SIZE_MAX): Remove.
15955         (new_exclude, add_exclude_file): Initial size no longer needs to
15956         be a power of 2.
15957         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
15958         our own address arithmetic overflow checking.
15959
15960         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
15961         (fnmatch): Do not alloca more than 2000 wide characters;
15962         instead, use malloc for large buffers.
15963         Check for address arithmetic overflow, and return -1
15964         with errno set to ENOMEM in that case.
15965         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
15966         (NEW_PATTERN): Do not alloca more than 8000 bytes;
15967         instead, return -1.  Check for address arithmetic overflow.
15968
15969 2003-10-14  Paul Eggert  <eggert@twinsun.com>
15970
15971         Handle invalid suffixes and overflow independently, so that
15972         callers can treat them independently as needed.  Fix some bugs in
15973         suffix handling, e.g., "100k@" was not diagnosed as an invalid
15974         suffix for a human-readable blocksize.  The major caller-visible
15975         change is the addition of a new
15976         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
15977         that both overflow and suffix chars were found.
15978
15979         * lib/human.c (humblock): Don't check separately for invalid suffix
15980         char; that is xstrtoumax's job (now that its bug is fixed).
15981         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
15982         INTMAX_MAX]: New macros.
15983         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
15984         TYPE_MAXIMUM): New macros.
15985         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
15986         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
15987         if overflow occurs, as it's what __strtol does and it's more useful
15988         in practice.
15989         (__xstrtol): If __strtol reports some error other than ERANGE,
15990         reflect it to the caller as LONGINT_INVALID.  If it reports
15991         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
15992         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
15993         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
15994         value.
15995         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
15996         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
15997         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
15998         [defined UINTMAX_MAX]: New macros.
15999
16000 2003-10-14  Bruno Haible  <bruno@clisp.org>
16001
16002         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
16003
16004 2003-10-14  Bruno Haible  <bruno@clisp.org>
16005
16006         * m4/sig_atomic_t: New file, from GNU gettext.
16007         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
16008
16009 2003-10-14  Bruno Haible  <bruno@clisp.org>
16010
16011         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
16012         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
16013         Also use volatile where needed.
16014
16015 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16016
16017         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
16018         Change maintainer from Bruno Haible to 'all'.
16019
16020 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16021
16022         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
16023
16024 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16025
16026         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
16027         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
16028         and define in terms of the other primitives.
16029         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
16030         (SIZE_MAX): Define if not already defined.
16031         (array_size_overflow): New function.
16032         (xalloc_die): Abort instead of exiting if 'error' returns.
16033         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
16034         (xmalloc, xrealloc): Use them.
16035         (xcalloc): Check for address arithmetic overflow.
16036         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
16037         a bit faster than strcpy.
16038
16039 2003-10-10  Simon Josefsson  <jas@extundo.com>
16040
16041         * modules/argp (Depends-on): Add restrict and strcase.
16042
16043 2003-10-10  Simon Josefsson  <jas@extundo.com>
16044
16045         * m4/argp.m4: Add AC_C_INLINE.
16046
16047 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16048
16049         Merge getpass from libc, plus a few fixes.
16050
16051         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
16052         Include <stdbool.h>.
16053         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
16054         __fsetlocking to empty.
16055         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
16056         do include <bits/libc-lock.h>.
16057         Do not include <fcntl.h>; not needed.
16058         [_LIBC]: Include <wchar.h>.
16059         (NOTCANCEL_MODE): New macro.
16060         (flockfile, funlockfile) [_LIBC]: New macros.
16061         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
16062         [!_LIBC]: New macros.
16063         (call_fclose): New function.
16064         (getpass): Use it.  Save tty stream separately; this simplifies the
16065         code and makes it more reliable if stdin happens to equal stdout.
16066         Invoke __fsetlocking on tty.
16067         Handle thread cancellation if needed.
16068         Namespace cleanup (use __tcgetattr, __getline).
16069         Use bool for Booleans.
16070         [USE_IN_LIBIO]: Handle wide streams.
16071         [!_LIBC]: Unconditionally do the fseek, since we don't know what
16072         stream might go where.
16073
16074         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
16075         doesn't have to include <stdio.h> before us.
16076         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
16077         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
16078         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
16079         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
16080         if not declared, so that we can use getpass.c code from libc without
16081         rewriting it.
16082         (flockfile, ftrylockfile, funlockfile): New macros.
16083
16084 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16085
16086         * modules/getpass: Depend on stdbool.
16087
16088 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16089
16090         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
16091
16092 2003-10-07  Karl Berry  <karl@gnu.org>
16093
16094         * config/config.{guess,sub}: update from config.
16095
16096 2003-10-06  Jim Meyering  <jim@meyering.net>
16097             Bruno Haible  <bruno@clisp.org>
16098
16099         This lets translators provide better translations for the
16100         "Written by ..." part of --version output.
16101         * lib/version-etc.h: Include stdarg.h.
16102         (version_etc_copyright): Declare as readonly.
16103         (version_etc): Make this function variadic with a NULL-terminated list
16104         of author name strings.
16105         (version_etc_va): New declaration.
16106         * lib/version-etc.c: Include stdarg.h, stdlib.h.
16107         (version_etc_copyright): Declare as readonly.
16108         (version_etc_va): New function. Provide a different translatable string
16109         for each possible number of authors < 10. Abbreviate when there are 10
16110         authors or more.
16111         (version_etc): Make this function variadic. Call version_etc_va.
16112         Suggestion from Gary V. Vaughan.
16113
16114         * lib/long-options.h (parse_long_options): Change prototype: the
16115         authors string is moved to the end and becomes variadic.
16116         * lib/long-options.c: Include stdarg.h.
16117         (parse_long_options): Make this function variadic, too.
16118         Call version_etc_va, not version_etc.
16119
16120 2003-10-06  Bruno Haible  <bruno@clisp.org>
16121
16122         * modules/version-etc-2: Remove file.
16123         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
16124
16125 2003-10-06  Bruno Haible  <bruno@clisp.org>
16126
16127         * modules/fatal-signal: New file.
16128         * MODULES.html.sh (func_all_modules): Add fatal-signal.
16129
16130 2003-10-06  Bruno Haible  <bruno@clisp.org>
16131
16132         * m4/fatal-signal.m4: New file.
16133         * m4/signalblocking.m4: New file, from GNU gettext.
16134
16135 2003-10-06  Bruno Haible  <bruno@clisp.org>
16136
16137         * lib/version-etc-2.h: Remove file.
16138         * lib/version-etc-2.c: Remove file.
16139
16140 2003-10-06  Bruno Haible  <bruno@clisp.org>
16141
16142         * lib/fatal-signal.h: New file, from GNU gettext.
16143         * lib/fatal-signal.c: New file, from GNU gettext.
16144
16145 2003-10-05  Paul Eggert  <eggert@twinsun.com>
16146
16147         * README: Rework advice for preventing empty .o files.
16148         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
16149         not <sys/types.h>.
16150
16151 2003-10-04  Karl Berry  <karl@gnu.org>
16152
16153         * lib/argp*: update from libc.
16154
16155 2003-10-04  Karl Berry  <karl@gnu.org>
16156
16157         * config/config.{guess,sub}: update from config.
16158
16159 2003-10-02  Bruno Haible  <bruno@clisp.org>
16160
16161         * modules/lchown (Include): Add lchown.h.
16162         * modules/time_r (Include): Use "..." syntax.
16163         * modules/xgetdomainname (Include): Add xgetdomainname.h.
16164
16165 2003-10-01  Simon Josefsson  <jas@extundo.com>
16166
16167         * MODULES.html.sh (func_all_modules): Move gethostname from section
16168         'based on' to section 'lacking' POSIX:2001.
16169
16170 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
16171
16172         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
16173         to output mode on the same stream.
16174
16175 2003-09-29  Paul Eggert  <eggert@twinsun.com>
16176
16177         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
16178         Fix arg typo in previous patch.
16179
16180 2003-09-28  Jim Meyering  <jim@meyering.net>
16181
16182         * lib/error.c: Correct cpp indentation.
16183
16184 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16185
16186         * modules/free: New file.
16187
16188 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16189
16190         * m4/free.m4: New file.
16191
16192 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16193
16194         * lib/minmax.h (MIN, MAX)
16195         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
16196         Omit the special code that used __typeof__, since we worry that
16197         it could be more trouble than it's worth.  See:
16198         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
16199         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
16200
16201         * lib/free.c: New file.
16202
16203 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
16204
16205         Trivial fixes to Makefile.am parts of module listings.
16206         * modules/strstr: Append strstr.h to lib_SOURCES.
16207         * modules/strcase: Likewise, for strcase.h.
16208
16209 2003-09-27  Karl Berry  <karl@gnu.org>
16210
16211         * config/mkinstalldirs: update from automake.
16212
16213 2003-09-26  Paul Eggert  <eggert@twinsun.com>
16214
16215         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
16216         (error_tail): Do not loop, reallocating temporary buffer, since
16217         the output cannot contain more wide characters than the input
16218         contains bytes, the size must be big enough already.  This avoids
16219         one potential size overflow calculation.  Check for size overflow
16220         when calculating temporary buffer size.  Free temporary buffer
16221         when done, if it was allocated with malloc; this plugs a memory
16222         leak.  Remove casts from void * to pointers, that are no longer
16223         needed now that we're assuming C89 or better.
16224
16225         Merge error changes from glibc.
16226
16227         * lib/error.c, error.h: Update copyright notice header to match glibc.
16228         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
16229         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
16230         Disable cancellation while printing error.
16231         * lib/error.h: Prepend __ to parameter names.
16232
16233 2003-09-26  Jim Meyering  <jim@meyering.net>
16234
16235         * lib/error.c (error_tail): Move some declarations
16236         into inner scope where the local variables are used.
16237
16238 2003-09-26  Bruno Haible  <bruno@clisp.org>
16239
16240         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
16241         stpncpy().
16242         Don't define stpncpy through config.h; it's now done through stpncpy.h.
16243
16244 2003-09-26  Bruno Haible  <bruno@clisp.org>
16245
16246         * lib/stpncpy.h (gnu_stpncpy): New declaration.
16247         (stpncpy): Define as alias for gnu_stpncpy.
16248         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
16249
16250 2003-09-25  Simon Josefsson  <jas@extundo.com>
16251
16252         * lib/xgetdomainname.h: New file.
16253         * lib/xgetdomainname.c: New file.
16254
16255 2003-09-25  Simon Josefsson  <jas@extundo.com>
16256             Bruno Haible  <bruno@clisp.org>
16257
16258         * modules/getdomainname: New file.
16259         * modules/xgetdomainname: New file.
16260         * MODULES.html.sh (func_all_modules): Add getdomainname,
16261         xgetdomainname.
16262
16263 2003-09-25  Simon Josefsson  <jas@extundo.com>
16264             Bruno Haible  <bruno@clisp.org>
16265
16266         * m4/getdomainname.m4: New file.
16267
16268 2003-09-25  Simon Josefsson  <jas@extundo.com>
16269             Bruno Haible  <bruno@clisp.org>
16270
16271         * lib/getdomainname.h: New file.
16272         * lib/getdomainname.c: New file.
16273
16274 2003-09-25  Karl Berry  <karl@gnu.org>
16275
16276         * lib/argp-fmtstream.c, argp-help.c: update from libc.
16277
16278 2003-09-25  Karl Berry  <karl@gnu.org>
16279
16280         * config/install-sh: update from automake.
16281
16282 2003-09-25  Bruno Haible  <bruno@clisp.org>
16283
16284         * modules/version-etc-2: New file, from modules/version-etc with
16285         modifications.
16286         * MODULES.html.sh (func_all_modules): Add version-etc-2.
16287
16288 2003-09-25  Bruno Haible  <bruno@clisp.org>
16289
16290         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
16291         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
16292
16293 2003-09-24  Simon Josefsson  <jas@extundo.com>
16294
16295         * modules/xgethostname: Add xgethostname.h.
16296
16297 2003-09-24  Paul Eggert  <eggert@twinsun.com>
16298
16299         * lib/linebuffer.c (freebuffer): Don't free the argument, just
16300         the buffer associated with the argument.  Bug reported by
16301         Simon Josefsson.
16302
16303 2003-09-24  Paul Eggert  <eggert@twinsun.com>
16304
16305         * README: Document assumptions that 'int' is at least 32 bits
16306         wide, that integer arithmetic is 2's complement without overflow,
16307         that there are no holes in integer values, that adding sizes of
16308         two nonoverlapping objects can't overflow, and that all-bits-zero
16309         yields scalar zero.  Fix spelling and capitalization typos.
16310
16311 2003-09-19  Karl Berry  <karl@gnu.org>
16312
16313         * lib/argp.h: update from libc.
16314
16315 2003-09-17  Paul Eggert  <eggert@twinsun.com>
16316
16317         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
16318         to avoid spurious warnings like "AC_RUN_IFELSE was called before
16319         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
16320
16321 2003-09-17  Paul Eggert  <eggert@twinsun.com>
16322
16323         * gnulib-tool: Use "test -h", not "test -L", for portability
16324         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
16325         (tags_regexp): Remove, since \| doesn't conform to POSIX.
16326         (sed_extract_prog): Issue s commands one-by-one, rather than
16327         using \| in one s command.
16328
16329 2003-09-16  Paul Eggert  <eggert@twinsun.com>
16330
16331         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
16332         input error, instead of returning NULL the next time we are called
16333         (and therefore losing track of errno).
16334
16335 2003-09-16  Bruno Haible  <bruno@clisp.org>
16336
16337         * gnulib-tool (func_create_testdir): Warn about duplicated
16338         dependencies.
16339
16340 2003-09-15  Paul Eggert  <eggert@twinsun.com>
16341
16342         * modules/argmatch, modules/fatal, modules/obstack,
16343         modules/xalloc, modules/xgethostname: Sort dependencies by
16344         importance, not alphabetically.
16345
16346 2003-09-15  Paul Eggert  <eggert@twinsun.com>
16347
16348         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
16349         fails, so that the caller gets the proper errno.
16350
16351         * lib/readutmp.c (read_utmp): Likewise.
16352         Check for fstat error.  Close stream and free storage
16353         when failing.
16354
16355 2003-09-14  Karl Berry  <karl@gnu.org>
16356
16357         * config/srclist.txt (strdup.c): disable for c89 changes.
16358
16359 2003-09-14  Jim Meyering  <jim@meyering.net>
16360
16361         * lib/getloadavg.c: Correct cpp indentation.
16362         * lib/strdup.c: Likewise.
16363         * lib/vasnprintf.c: Likewise.
16364
16365 2003-09-14  Bruno Haible  <bruno@clisp.org>
16366
16367         * modules/fwriteerror: New file.
16368         * MODULES.html.sh (func_all_modules): Add fwriteerror.
16369
16370 2003-09-14  Bruno Haible  <bruno@clisp.org>
16371
16372         * lib/fwriteerror.h: New file.
16373         * lib/fwriteerror.c: New file.
16374
16375 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16376
16377         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
16378         modules/xgethostname, modules/xalloc: Depend on exit.
16379
16380 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16381
16382         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
16383
16384         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
16385         and AC_MINIX, too, so that their extensions are available.
16386
16387         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
16388         This macro has been superseded by gl_BACKUPFILE.
16389
16390         More patches to assume C89 or better.
16391
16392         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
16393
16394         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
16395         unconditionally.
16396         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
16397         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
16398         Include <string.h>, <stdlib.h> unconditionally.
16399         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
16400         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
16401         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
16402         headers or for string.h.
16403         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
16404         or strtoul.
16405
16406         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
16407         headers.
16408         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
16409         * m4/userspec.m4 (gl_USERSPEC): Likewise.
16410         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
16411         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
16412         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
16413         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
16414         memcpy, memset.
16415         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
16416         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
16417         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
16418         strtol.
16419         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
16420         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
16421         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
16422         strtoul.
16423
16424 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16425
16426         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
16427         * lib/obstack.c [!defined _LIBC]: Likewise.
16428         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
16429         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
16430         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
16431
16432         More changes to assume C89 or better.
16433
16434         * lib/error.c (error_tail): Assume vprintf.
16435
16436         * lib/argmatch.c (getenv): Remove decl.
16437         * lib/progreloc.c (get_full_program_name): Define via prototype.
16438         * lib/setenv.c (clearenv): Likewise.
16439         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
16440         needed.
16441         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
16442         (malloc, memcpy): Remove decls.
16443         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
16444         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
16445         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
16446         (memcpy): Remove macro.
16447         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
16448         (__P): Remove.  All uses removed.
16449         (PTR): Remove.  All uses changed to void *.
16450         (CHAR_BIT, NULL): Remove.
16451         (spaces, zeros, memset_space, memset_zero)
16452         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
16453         Remove.
16454         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
16455         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
16456         Define with prototype.
16457         Remove now-unnecessary prototype decl.
16458         (extra_args_spec): Assume ANSI C.  All uses changed.
16459         (extra_args_spec_iso): Remove.
16460         (my_strftime, emacs_strftimeu): Define via prototype.
16461         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
16462         unconditionally.
16463         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
16464         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
16465         (strtoul, strtol): Remove decls.
16466         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
16467         LONG_MAX): Remove.
16468         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
16469         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
16470         (LOCALE_PARAM_PROTO): New macro.
16471         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
16472         (INTERNAL (strtol), strtol): Define with a prototype.
16473         (PARAMS): Remove.  All uses removed.
16474         * lib/tempname.c: Include <string.h> unconditionally.
16475         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
16476         * lib/xgethostname.c (main): Define with a prototype.
16477         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
16478         Include <stdlib.h> unconditionally.
16479         (calloc, malloc, realloc, free): Remove decls.
16480         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
16481         Include <stdlib.h> unconditionally.  Sort include file names.
16482         (strtod): Remove.
16483         (xstrtod): Define with a prototype.
16484         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
16485         (strtol, strtoul): Remove decls.
16486
16487 2003-09-11  Paul Eggert  <eggert@twinsun.com>
16488
16489         More patches to assume C89 or better.
16490         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
16491         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
16492         string.h, memchr, STDC_HEADERS.
16493
16494 2003-09-11  Paul Eggert  <eggert@twinsun.com>
16495
16496         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
16497         Include <stdlib.h>, <string.h> unconditionally.
16498         Remove now-unnecessary cast to char *.
16499         * lib/strnlen.c: Include <string.h> unconditionally.
16500         * lib/yesno.c (yesno): Define with a prototype.
16501
16502 2003-09-11  Bruno Haible  <bruno@clisp.org>
16503
16504         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
16505
16506 2003-09-10  Jim Meyering  <jim@meyering.net>
16507
16508         * lib/error.c: Correct indentation of cpp directives.
16509
16510 2003-09-10  Bruno Haible  <bruno@clisp.org>
16511
16512         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
16513         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
16514         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
16515         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
16516         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
16517         <stdlib.h> and <string.h> checks.
16518         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
16519         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
16520
16521 2003-09-10  Bruno Haible  <bruno@clisp.org>
16522
16523         * lib/strcspn.c: Include <string.h> unconditionally.
16524         * lib/strpbrk.c: Include <string.h> unconditionally.
16525         * lib/strstr.c: Include <string.h> unconditionally.
16526         * lib/unicodeio.c: Include <string.h> unconditionally.
16527         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
16528         * lib/unsetenv.c: Likewise.
16529         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
16530         * lib/yesno.c: Include <stdlib.h> unconditionally.
16531         (rpmatch): Add prototype.
16532
16533 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16534
16535         More patches to assume C89 or better.
16536         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
16537         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
16538         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
16539         or for string.h.
16540         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
16541         stdlib.h.
16542         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
16543         C headers.
16544         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
16545         string.h.
16546         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
16547         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
16548         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
16549         or for string.h.
16550         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
16551         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
16552         C headers.
16553         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
16554         memcpy.
16555         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
16556         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
16557         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
16558         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
16559         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
16560         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
16561         string.h, free.
16562         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
16563         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
16564         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
16565         C headers, or for string.h.
16566         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
16567         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
16568         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
16569         headers, memory.h, stdlib.h, string.h, strings.h.
16570         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
16571         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
16572         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
16573         strchr.
16574         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
16575         headers, memory.h, string.h.
16576         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
16577         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
16578         free.
16579         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
16580         headers.
16581         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
16582         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
16583         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
16584         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
16585         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
16586
16587 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16588
16589         More K&R removal.
16590
16591         * lib/acosl.c (main): Use a prototype.
16592         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
16593         tanl.c: Likewise.
16594
16595         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
16596
16597         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
16598         (getopt, etopt_long, getopt_long_only, _getopt_internal)
16599         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
16600         with a prototype.
16601         * lib/getopt.c (const): Remove macro.
16602         Include <string.h> unconditionally.
16603         (my_index): Remove; all uses changed to strchr.
16604         (strlen): Remove decl.
16605         (exchange): Remove forward decl; no longer needed.
16606         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
16607         Define with prototype.
16608         * lib/getopt1.c (const): Remove macro.
16609         (getopt_long, getopt_long_only, main): Define with prototype.
16610
16611         * lib/getugroups.c: Include <string.h> unconditionally.
16612
16613         * lib/getusershell.c: Include <stdlib.h> unconditionally.
16614         (getusershell, setusershell, endusershell, readname, main):
16615         Define with prototypes.
16616
16617         * lib/group-member.c: Include group-member.h first.
16618         Include <stdlib.h> unconditionally.
16619
16620         * lib/hard-locale.c: Include hard-locale.h first.
16621         Include <stdlib.h>, <string.h> unconditionally.
16622
16623         * lib/hash.c (free, malloc): Remove decls.
16624         Include <stdlib.h> unconditionally.
16625
16626         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
16627         (getenv): Do not declare.
16628
16629         * lib/idcache.c: Include <string.h> unconditionally.
16630
16631         * lib/long-options.c: Include long-options.h first, to test interface.
16632         Include <stdlib.h> unconditionally.
16633
16634         * lib/makepath.c: Include makepath.h first, to test interface.
16635         Include <stdlib.h> and <string.h> unconditionally.
16636
16637         * lib/linebuffer.c: Include <stdlib.h>.
16638         (free): Remove decl.
16639
16640         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
16641         stddef.h. rpl_malloc returns void *, not char *.
16642         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
16643         prototype.
16644
16645         * lib/md5.h: Include <limits.h> unconditionally.
16646         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
16647         (__P): Remove; all uses removed.
16648         * lib/md5.c: Include "md5.h" first.
16649         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
16650         md5_buffer, md5_process_bytes, md5_process_block):
16651         Define with prototypes.
16652         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
16653         * lib/sha.c: Include "sha.h" first.
16654         Include <stdlib.h>, <string.h> unconditionally.
16655
16656         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
16657         * lib/memcmp.c (__ptr_t): Likewise.
16658         * lib/memrchr.c (__ptr_t): Likewise.
16659         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
16660         Include <string.h> unconditionally.
16661         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
16662         * lib/memchr.c: Include <stdlib.h> unconditionally.
16663         * lib/memchr.c (LONG_MAX): Remove.
16664         * lib/memrchr.c (LONG_MAX): Likewise.
16665         * lib/memchr.c (__memchr): Define via a prototype.
16666         * lib/memrchr.c (__memrchr): Likewise.
16667         * lib/memcmp.c (__P): Remove, and remove all uses.
16668         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
16669         Remove forward decls; no longer needed.
16670         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
16671         Use types required by C89 in prototype.
16672
16673         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
16674         * lib/savedir.c: Likewise.
16675         * lib/mkdir.c (free): Remove decl.
16676         * lib/rmdir.c (rmdir): Define with a prototype.
16677         * lib/savedir.c: Include savedir.h first, to test interface.
16678
16679         * lib/mktime.c (STDC_HEADERS): Remove.
16680         Include <stdlib.h>, <string.h> unconditionally.
16681
16682         * lib/modechange.c: Include <stdlib.h> unconditionally.
16683         (malloc): Remove decl.
16684
16685         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
16686         (free): Remove decl.
16687
16688         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
16689         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
16690         (This type really should be intptr_t, but that's a C99ism.)
16691         (_obstack_memcpy): Remove: all uses changed to memcpy.
16692         Include <string.h> unconditionally.
16693         (struct obstack): Assume __STDC__ for types of members
16694         chunkfun, freefun, extra_arg.
16695         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
16696         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
16697         obstack_begin, obstack_specify_allocation,
16698         obstack_specify_allocation_with_arg, obstack_chunkfun,
16699         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
16700         Remove unprototyped decls and the macros that use them.
16701         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
16702         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
16703         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
16704         (defined __STDC__ && __STDC__)]:
16705         Remove nonprototyped code.
16706         Include <stdlib.h> unconditionally.
16707         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
16708         _obstack_allocated_p, _obstack_free, obstack_free,
16709         _obstack_memory_used, print_and_abort):
16710         Define using prototypes.
16711         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
16712         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
16713         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
16714         obstack_next_free, obstack_object_size, obstack_room) [0]:
16715         Remove unused, unprototyped code.
16716
16717         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
16718
16719         * lib/physmem.c (physmem_total, physmem_available, main): Define
16720         with prototypes.
16721
16722         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
16723         (main): Define with a prototype.
16724
16725         * lib/posixver.c (getenv): Remove decl.
16726
16727         * lib/putenv.c (malloc): Returns void *, not char *.
16728         Include <string.h> unconditionally.
16729         (strchr, memcpy, NULL): Do not define.
16730
16731         * lib/readtokens.c: Include readtokens.h first, to test interface.
16732         Include <stdlib.h>, <string.h> unconditionally.
16733         (init_tokenbuffer): Define with a prototype.
16734
16735         * lib/regex.c (PARAMS): Remove.  All uses removed.
16736         All uses of _RE_ARGS removed, too.
16737         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
16738         unconditionally.
16739         (bzero): Assume memset exists.
16740         (memcmp, memcpy, NULL): Remove.
16741         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
16742         char, or assignments to local vars of type signed char.
16743         (init_syntax_once, PREFIX(extract_number_and_incr),
16744         PREFIX(print_partial_compiled_pattern),
16745         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
16746         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
16747         PREFIX(regex_grow_registers), PREFIX(regex_compile),
16748         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
16749         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
16750         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
16751         wcs_compile_range, byte_compile_range, truncate_wchar,
16752         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
16753         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
16754         count_mbs_length, wcs_re_match_2_internal,
16755         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
16756         PREFIX(alt_match_null_string_p),
16757         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
16758         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
16759         regfree, PREFIX(extract_number)): Define with prototype.  Remove
16760         now-unnecessary declaration, if any.
16761         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
16762         regcomp, regexec):
16763         Remove now-unnecessary casts among pointer types.
16764         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
16765
16766         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
16767         (free): Remove decl.
16768
16769         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
16770
16771         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
16772         (free): Remove decl.
16773
16774         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
16775         * lib/xgetcwd.c: Likewise.
16776
16777         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
16778         (free): Remove decl.
16779
16780         * lib/strchrnul.c (strchrnul): Define with a prototype.
16781         Fix bug: c_in was not converted to char before searching.
16782
16783         The following changes are not K&R related:
16784
16785         * lib/group-member.h: Include <sys/types.h>, so that this file is
16786         self-contained.
16787         * lib/makepath.h: Likewise.
16788
16789         * lib/getusershell.c (readname, default_index, line_size, readname):
16790         Use size_t, not int, for sizes.
16791         (readname): If the size overflows, report an error instead of
16792         looping forever.
16793
16794 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16795
16796         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
16797         libc.
16798
16799 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16800
16801         * README: New section: portability guidelines.
16802
16803 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
16804
16805         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
16806         C89 spec.
16807
16808 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
16809
16810         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
16811
16812 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16813
16814         Assume C89 or better; remove K&R cruft.
16815         A few of these changes were first proposed by Derek Robert Price
16816         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
16817
16818         * lib/addext.c: Include <string.h> unconditionally.
16819         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
16820         Don't declare getenv or malloc.
16821
16822         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
16823         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
16824         (NULL): Remove.
16825         (find_stack_direction, alloca): Use prototypes.
16826
16827         * lib/atexit.c (atexit): Define using a prototype.
16828
16829         * lib/basename.c, dirname.c, stripslash.c:
16830         Include <string.h> unconditionally.
16831
16832         * lib/bcopy.c: Include <stddef.h>.
16833         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
16834
16835         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
16836
16837         * lib/error.h (error, error_at_line, error_print_progname)
16838         [! (defined (__STDC__) && __STDC__)]: Remove decls.
16839         * lib/error.c: Include error.h first, to check interface.
16840         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16841         (VA_START): Remove; all uses changeed to va_start.
16842         (exit, strerror): Remove decls.
16843         (error_print_progname): Prototype uncondionally.
16844         Don't include <errno.h>; no longer needed.
16845         (private_strerror): Remove.
16846         (error_tail): Always define.
16847         (error, error_at_line): Assume C89 or better; always use prototypes.
16848         * lib/fatal.c: Include "fatal.h" first, to test interface.
16849         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16850         (VA_START): Remove; all uses changed to va_start.
16851         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
16852         this case.
16853         (exit): Remove decl.
16854         (fatal): Prototype unconditionally.  Assume va_start works.
16855         Abort at end, to pacify gcc.
16856
16857         * lib/euidaccess.c (main): Define with a prototype.
16858
16859         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
16860
16861         * lib/exitfail.c: Include <stdlib.h> unconditionally.
16862
16863         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
16864         prototypes.
16865         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
16866         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
16867         (getenv): Remove decl.
16868         (fnmatch): Define using a prototype.
16869         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
16870         (FCT): Define using a prototype.
16871
16872         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
16873
16874         * lib/gethostname.c: Include <stddef.h>.
16875         (gethostname): Define with prototype.  Length is size_t, not int.
16876
16877 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16878
16879         Assume C89 or better; remove K&R cruft.
16880         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
16881         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
16882         string.h, getenv, malloc.
16883         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
16884         headers.
16885         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
16886         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
16887         do not check for strerror.
16888         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
16889         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
16890         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
16891         do not check for doprnt or vprintf.
16892         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
16893         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
16894
16895 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16896
16897         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
16898         getversion.c should have been removed then, but was accidentally
16899         preserved.
16900
16901         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
16902         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
16903
16904 2003-09-08  Karl Berry  <karl@gnu.org>
16905
16906         * config/config.sub, config.guess, srclistvars.sh: update from savannah
16907                 config, forget about prep.
16908
16909         * config/depcomp, missing: update from automake.
16910
16911 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16912
16913         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
16914         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16915
16916 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16917
16918         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
16919         copy_tm_result.  Bug reported by Simon Josefsson in
16920         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16921
16922 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16923
16924         * m4/time_r.m4: New file.
16925         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
16926         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
16927         is. Check for timegm declaration.
16928         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
16929         Do not check for gmtime_r.
16930         Replace mktime if __mktime_internal does not exist and if mktime
16931         hasn't been replaced already.
16932
16933 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16934
16935         * lib/time_r.c, lib/time_r.h: New files.
16936
16937         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
16938         __localtime_r.
16939         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
16940         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
16941
16942         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
16943         __gmtime_r.
16944         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
16945         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
16946         Include <time_r.h>.
16947
16948         * lib/timegm.c: Switch to glibc implementation, with the following
16949         changes:
16950         [defined HAVE_CONFIG_H]: Include <config.h>.
16951         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
16952         (__mktime_internal) [!defined _LIBC]: New decl.
16953         (__gmtime_r) [!defined _LIBC]: New macro and function.
16954         (timegm): Use a prototype, since gnulib assumes C89.
16955         Do not bother declaring tmp to be const, as it's not really usefu.
16956         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
16957         (timegm): Declare only if HAVE_DECL_TIMEGM.
16958
16959 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16960
16961         * MODULES.html.sh (func_all_modules): Add time_r.
16962         * modules/time_r: New file.
16963         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
16964         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
16965
16966 2003-09-03  Paul Eggert  <eggert@twinsun.com>
16967
16968         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
16969         Bug reported by Lute Kamstra in
16970         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
16971
16972         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
16973         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
16974         course with correspondingly smaller numbers for tomorrow and
16975         yesterday.  From Tadayoshi Funaba.  Originally installed into
16976         sh-utils on 1999-08-07, but the patch got lost (I guess during the
16977         coreutils merge?).
16978
16979 2003-08-31  Simon Josefsson  <jas@extundo.com>
16980
16981         * modules/timegm: New file.
16982         * MODULES.html.sh (func_all_modules): Add timegm.
16983
16984 2003-08-31  Simon Josefsson  <jas@extundo.com>
16985
16986         * m4/timegm.m4: New file.
16987
16988 2003-08-31  Simon Josefsson  <jas@extundo.com>
16989
16990         * lib/timegm.h: New file.
16991         * lib/timegm.c: New file.  Based on
16992         wget-1.8.2/src/http.c:mktime_from_utc.
16993
16994 2003-08-31  Karl Berry  <karl@gnu.org>
16995
16996         * lib/argp.h: update from libc.
16997
16998 2003-08-28  Bruno Haible  <bruno@clisp.org>
16999
17000         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
17001         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
17002         followed by '#define fnmatch fnmatch_posix' gives an error.
17003
17004 2003-08-28  Bruno Haible  <bruno@clisp.org>
17005
17006         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
17007         warning on QNX, which defines O_BINARY to 000000.
17008
17009 2003-08-27  Jim Meyering  <jim@meyering.net>
17010
17011         * m4/mkstemp.m4: Require that the system mkstemp be able to create
17012         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
17013         would fail after 32.  Reported by Danny Levinson.  Details here:
17014         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
17015
17016 2003-08-24  Bruno Haible  <bruno@clisp.org>
17017
17018         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
17019         MSVC7 <stdio.h> is included later.
17020
17021 2003-08-22  Simon Josefsson  <jas@extundo.com>
17022
17023         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
17024
17025 2003-08-20  Karl Berry  <karl@gnu.org>
17026
17027         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
17028
17029 2003-08-20  Bruno Haible  <bruno@clisp.org>
17030
17031         * modules/progname: New file.
17032         * MODULES.html.sh (func_all_modules): Add progname.
17033
17034 2003-08-20  Bruno Haible  <bruno@clisp.org>
17035
17036         * lib/progname.h: New file, from GNU gettext.
17037         * lib/progname.c: New file, from GNU gettext.
17038         * lib/progreloc.c: New file, from GNU gettext.
17039
17040 2003-08-19  Jim Meyering  <jim@meyering.net>
17041
17042         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
17043         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
17044
17045 2003-08-19  Bruno Haible  <bruno@clisp.org>
17046
17047         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
17048         more.
17049
17050 2003-08-19  Bruno Haible  <bruno@clisp.org>
17051
17052         * lib/xstrdup.c: Assume <string.h> exists.
17053
17054 2003-08-18  Paul Eggert  <eggert@twinsun.com>
17055
17056         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
17057         in makefile rules.
17058
17059 2003-08-18  Jim Meyering  <jim@meyering.net>
17060
17061         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
17062         * m4/lib-ld.m4: Likewise.
17063
17064 2003-08-18  Jim Meyering  <jim@meyering.net>
17065
17066         * lib/setenv.h: Indent nested cpp directive.
17067         * lib/vasnprintf.c: Remove trailing blanks.
17068
17069 2003-08-17  Simon Josefsson  <jas@extundo.com>
17070
17071         * modules/xstrndup: New file.
17072         * MODULES.html.sh (func_all_modules): Add xstrndup.
17073
17074 2003-08-17  Simon Josefsson  <jas@extundo.com>
17075
17076         * modules/argp: Fix autoconf macro name. Add more dependencies.
17077
17078 2003-08-17  Simon Josefsson  <jas@extundo.com>
17079
17080         * m4/xstrndup.m4: New file.
17081
17082 2003-08-17  Simon Josefsson  <jas@extundo.com>
17083
17084         * m4/argp.m4: New file.
17085
17086 2003-08-17  Simon Josefsson  <jas@extundo.com>
17087             Bruno Haible  <bruno@clisp.org>
17088
17089         * lib/xstrndup.h: New file.
17090         * lib/xstrndup.c: New file.
17091
17092 2003-08-17  Bruno Haible  <bruno@clisp.org>
17093
17094         * modules/strndup (Files, Include): Add lib/strndup.h.
17095
17096 2003-08-17  Bruno Haible  <bruno@clisp.org>
17097
17098         * modules/euidaccess (Files): Add lib/euidaccess.h.
17099
17100 2003-08-17  Bruno Haible  <bruno@clisp.org>
17101
17102         * lib/strndup.h: New file.
17103
17104 2003-08-17  Bruno Haible  <bruno@clisp.org>
17105
17106         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
17107         like AC_GNU_SOURCE.
17108         * modules/extensions (configure.ac): Comment out the invocation of
17109         gl_USE_SYSTEM_EXTENSIONS.
17110
17111 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17112
17113         Merges from coreutils, etc.
17114         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
17115         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
17116         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
17117         fixing a typo.
17118         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
17119         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
17120
17121 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17122
17123         Document merge from coreutils.
17124         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
17125         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
17126         * modules/utime: Add m4/utimes-null.m4.
17127
17128 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17129
17130         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
17131         space, undoing this 2003-08-12 change:
17132         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
17133
17134 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17135
17136         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
17137         strtoul.c from libc, undoing this 2003-08-12 change:
17138         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
17139
17140 2003-08-16  Jim Meyering  <jim@meyering.net>
17141
17142         Merges from coreutils.
17143         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
17144         prefix.  Adjust cache variables similarly.  Create 500 rather than
17145         just 300 files, to exercise bug on Darwin6.5, too.
17146         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
17147         $missing_dir.
17148         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
17149         AM_SYS_POSIX_TERMIOS.
17150         Reported by mkc@mathdogs.com.
17151         Also change use of $am_cv_sys_posix_termios
17152         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
17153         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
17154         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
17155         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
17156         in /proc/mounts until it finds one with matching device number.  This
17157         is unnecessary when the FILE argument *is* a mount point.  No stat call
17158         is necessary in that case.  So, disable the statvfs-testing code on
17159         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
17160         as RedHat bug# 84846.
17161         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
17162         to 1MB, so as not to render systems with no stack size limit (e.g.,
17163         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
17164         Include <unistd.h>.  On some systems,
17165         it is required for the definition of _SC_PAGESIZE.
17166
17167 2003-08-16  Jim Meyering  <jim@meyering.net>
17168
17169         Merge from coreutils.
17170         * lib/xstrtoimax.c: #else #if -> #elif.
17171         * lib/xstrtoumax.c: Likewise.
17172
17173 2003-08-16  Jim Meyering  <jim@meyering.net>
17174
17175         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
17176         * m4/utimes.m4: Removed.
17177         * m4/utimes-null.m4: Renamed from utimes.m4.
17178
17179         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
17180         to 1MB, so as not to render systems with no stack size limit (e.g.,
17181         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
17182         Include <unistd.h>.  On some systems,
17183         it is required for the definition of _SC_PAGESIZE.
17184
17185 2003-08-16  Jim Meyering  <jim@meyering.net>
17186         and Paul Eggert  <eggert@cs.ucla.edu>
17187
17188         Merges from coreutils, etc.
17189
17190         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
17191         using the latest version from cvs.  This avoids problems with #line
17192         directives using a vendor (Sun) compiler.
17193         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
17194         Don't set GETGROUPS_LIB here; now it's
17195         done via getgroups.m4's wrapper function.
17196         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
17197         rather than just in sh-util/configure.in, so that the
17198         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
17199         same.
17200         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
17201         AC_FUNC_GETLOADAVG where to find getloadavg.c.
17202         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
17203         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
17204         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
17205         Remove code that is now done by the newly-required macros.
17206         Append $(EXEEXT) to DF_PROG.
17207         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
17208         Do not invoke or require the following here,
17209         since prereq.m4 or some gnulib .m4 now does this for us:
17210         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
17211         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
17212         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
17213         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
17214         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
17215         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
17216         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
17217         AC_FUNC_OBSTACK.
17218         Do not replace the following functions, as this is now the job
17219         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
17220         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
17221         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
17222         atexit getpass, strdup, getpagesize.
17223         Replace 'raise'.
17224         Do not check for the following functions, as this is now the job
17225         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
17226         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
17227         setregid.
17228         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
17229         Check for sys/sysctl.h.
17230         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
17231         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
17232         of checking for ssize_t ourselves.
17233
17234         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
17235         Require every macro that gnulib/modules/* suggests for us.
17236         (jm_PREREQ_ADDEXT): New macro.
17237         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
17238         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
17239
17240         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
17241         (gl_PHYSMEM): Use it.
17242         Also check for `table' function.
17243         Check for new headers and functions.
17244         Add check for sys/sysmp.h.
17245         With suggestions from Kaveh Ghazi.
17246         Ignore headers that are present but cannot be compiled.  This
17247         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
17248         C 5.4.
17249
17250 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17251
17252         Document merge from coreutils.
17253         * modules/userspec: Depend on posixver.
17254         * modules/strftime: Depend on tzset.
17255
17256 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17257
17258         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
17259         rather than tab, after '#' in shell-script copyright notices.
17260         Suggested by Bruno Haible.
17261
17262 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17263
17264         * config/srclist-update: Use three spaces, rather than tab, after '#'
17265         in shell-script copyright notices.  Suggested by Bruno Haible.
17266         Remove unnecessary parenthesization in regular expression.
17267
17268 2003-08-15  Jim Meyering  <jim@meyering.net>
17269
17270         Merge from coreutils.
17271         * lib/xgethostname.c: Include <stdlib.h>.
17272         (xghostname): Don't exit for anything other than memory-related
17273         failure; just return NULL.
17274         * lib/userspec.c: Include "posixver.h".
17275         (parse_user_spec): Accept `.' as a separator only
17276         in pre-POSIX-200112 mode.
17277         * lib/strtoimax.c: Use #elif rather than #else #if.
17278         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
17279         Remove function, now that we can rely on a working tzset function.
17280         [!_LIBC]: Ensure that the required autoconf test has been run.
17281         [!defined _NL_CURRENT && HAVE_STRFTIME]:
17282         Use underlying_strftime for %r.
17283         * lib/sha.c: Merge in some clean-up and optimization changes from
17284         glibc.
17285         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
17286         Ensure that it is a multiple of 64.
17287         Rearrange loop exit tests so as to avoid performing an
17288         additional fread after encountering an error or EOF.
17289         * lib/realloc.c: Update copyright date.
17290
17291 2003-08-15  Jim Meyering  <jim@meyering.net>
17292         and Paul Eggert  <eggert@twinsun.com>
17293
17294         Merge from coreutils.
17295         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
17296         member but strut utmpx does not.  Needed for AIX 4.3.3.
17297         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
17298
17299 2003-08-15  Jim Meyering  <jim@meyering.net>
17300         and Paul Eggert  <eggert@cs.ucla.edu>
17301
17302         Merges from coreutils, etc.
17303         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
17304         Require gl_FUNC_TZSET_CLOBBER.
17305         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
17306         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
17307         members.
17308
17309 2003-08-14  Paul Eggert  <eggert@twinsun.com>
17310
17311         Help the merge from coreutils.
17312         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
17313         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
17314         * m4/tzset.m4: Use it too.
17315
17316 2003-08-14  Paul Eggert  <eggert@twinsun.com>
17317
17318         * modules/tzset: New file.
17319
17320 2003-08-14  Jim Meyering  <jim@meyering.net>
17321
17322         Merges from coreutils.
17323         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
17324         variable names, rather than @FNMATCH_H@.
17325         * modules/alloca: Likewise for $(ALLOCA_H).
17326
17327         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
17328         the three copies of the literal target, `fnmatch.h'.
17329         * modules/alloca (alloca.h): Likewise.
17330
17331 2003-08-14  Jim Meyering  <jim@meyering.net>
17332
17333         Merge from coreutils.
17334         * m4/tzset.m4: New file.
17335         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
17336         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
17337         otherwise, AIX 5.1 systems would end up using the latter.
17338         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
17339         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
17340         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
17341         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
17342
17343 2003-08-14  Jim Meyering  <jim@meyering.net>
17344
17345         Merge from coreutils.
17346         * lib/obstack.h: Whitespace changes.
17347         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
17348         and xcalloc return values.
17349         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
17350         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
17351         hang on OSF/1 5.1 for DIR on both local and remote file systems.
17352         Reported by (and fix confirmed by) Nelson H. F. Beebe.
17353         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
17354         error from mntctl.
17355         Use mntctl's return value to drive the entry-processing loop, since
17356         we can't rely on the value of the vmt_length member in the last
17357         entry.  On some systems doing so could result in exhausting
17358         virtual memory.  Based in part on a patch from Mike Jetzer.
17359
17360 2003-08-14  Jim Meyering  <jim@meyering.net>
17361         and Paul Eggert  <eggert@twinsun.com>
17362
17363         Merges from coreutils, plus other fixes.
17364         * lib/physmem.c: Merge in portability changes from gcc/libiberty
17365         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
17366         for credits and details.  Thanks to Kaveh Ghazi for helping
17367         to keep these files in sync.
17368         (ARRAY_SIZE): Define it.
17369         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
17370         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
17371         (memcasecmp): Don't assume size_t fits in unsigned int.
17372         Remove casts and duplicate code.
17373         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
17374         (memcpy): Remove definition.
17375         Merge in some clean-up and optimization changes from glibc.
17376         [BLOCKSIZE]: Move definition to top of file.
17377         Ensure that it is a multiple of 64.
17378         Rearrange loop exit tests so as to avoid performing an
17379         additional fread after encountering an error or EOF.
17380         * lib/md5.h (md5_uintptr): Define.
17381         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
17382         return to the initial working directory.  Preserve errno
17383         for caller.
17384         * lib/idcache.c: Include "xalloc.h".
17385         (xmalloc, xrealloc): Remove decls.
17386         (getuser): Remove casts no longer required in C89.
17387         * lib/human.c: Include stdio.h, for sprintf.
17388         * lib/group-member.c: Include "xalloc.h".
17389         (xmalloc, xrealloc): Remove decls.
17390         (get_group_info): Remove casts no longer required in C89.
17391         * lib/getusershell.c (readname): Remove casts no longer required in
17392         C89.
17393         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
17394         * lib/getline.c: Whitespace fix, from coreutils.
17395
17396 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17397
17398         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
17399         Check for isascii.
17400
17401         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
17402         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
17403         Undo previous (whitespace-only) change.
17404
17405 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17406
17407         * lib/exclude.c: Include <ctype.h>
17408         (IN_CTYPE_DOMAIN): New macro.
17409         (is_space): New fn.
17410         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
17411         and empty lines.
17412
17413         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
17414         Undo previous (whitespace-only) change.
17415
17416 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17417
17418         * config/srclist-update: Change update back to the old behavior,
17419         leaving whitespace alone.  Use one 'sed' command rather than a
17420         pipeline.
17421         (fixlicense): Now a variable, not a function.
17422         (remove_trailing_blanks): Remove.
17423         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
17424         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
17425         Undo previous (whitespace-only) change.
17426
17427 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17428
17429         Merge from coreutils.
17430         * modules/euidaccess: Add lib_SOURCES, include for new
17431         file euidaccess.h
17432
17433 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17434
17435         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
17436         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
17437         Normalize leading white space and remove trailing white space.
17438
17439         Merge from coreutils
17440         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
17441
17442         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
17443         0.12.1.  These files are now being upgraded automatically by
17444         ../config/srclist-update.
17445
17446 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17447
17448         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
17449         Normalize leading white space and remove trailing white space.
17450         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
17451         notice, as per ../config/srclist-update.
17452
17453         Merge from coreutils.
17454         * lib/euidaccess.h: New file.
17455         * lib/euidaccess.c: Include it.
17456         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
17457         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
17458         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
17459
17460 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17461
17462         * config/srclist-update: Add copyright notice.
17463         (remove_id_lines, remove_trailing_blanks): New constants.
17464         (fixfile): Use them to normalize spacing a bit in copied files.
17465         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
17466         Normalize leading white space and remove trailing white space.
17467
17468         * config/texinfo.tex: Sync with texinfo.
17469
17470         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
17471         strtoul.c from libc, to merge coreutils whitespace changes.
17472
17473         * config/srclist.txt: Get the following m4 files from gettext:
17474         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
17475         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
17476         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
17477         wint_t.m4.
17478
17479 2003-08-12  Karl Berry  <karl@gnu.org>
17480
17481         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
17482         been made.
17483
17484 2003-08-11  Paul Eggert  <eggert@twinsun.com>
17485
17486         * modules/gnu-source, m4/gnu-source.m4:
17487         Remove; we're assuming Autoconf 2.54 or later now.
17488         Suggested by Bruno Haible.
17489         * MODULES.html.sh (func_all_modules): Remove gnu-source.
17490
17491 2003-08-11  Bruno Haible  <bruno@clisp.org>
17492
17493         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
17494
17495 2003-08-11  Bruno Haible  <bruno@clisp.org>
17496
17497         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
17498         (vasnprintf): Use it instead of wcslen.
17499
17500 2003-08-11  Bruno Haible  <bruno@clisp.org>
17501
17502         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
17503         value to ensure that _Bool promotes to int. Use #define for _Bool when
17504         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
17505
17506 2003-08-10  Karl Berry  <karl@gnu.org>
17507
17508         * lib/regex.h: update from libc (whitespace fix).
17509
17510 2003-08-09  Paul Eggert  <eggert@twinsun.com>
17511
17512         Merge some files from coreutils.  These changes were
17513         originally made by Jim Meyering.
17514         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
17515         many older Unixes require this.
17516         * lib/alloca.c (alloca): Remove cast to argument of free;
17517         no longer needed in C89.
17518         * lib/alloca_.h, regex.h: Fix white space to match
17519         what GNU indent does.
17520
17521 2003-08-09  Paul Eggert  <eggert@twinsun.com>
17522
17523         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
17524         apparently Emacs's Unicode mode got confused before my 2003-08-05
17525         checkin.
17526
17527 2003-08-08  Paul Eggert  <eggert@twinsun.com>
17528
17529         * m4/extensions.m4: New file.
17530         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
17531         Require gl_USE_SYSTEM_EXTENSIONS.
17532         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
17533         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
17534
17535 2003-08-08  Paul Eggert  <eggert@twinsun.com>
17536
17537         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
17538         * modules/extensions, modules/gnu-source: New files.
17539         * modules/timespec, modules/unlocked-io: Depend on extensions.
17540
17541 2003-08-07  Paul Eggert  <eggert@twinsun.com>
17542
17543         * modules/restrict: New file.
17544         * MODULES.html.sh (func_all_modules): Add restrict.
17545         * modules/regex: Depend on restrict.
17546
17547 2003-08-07  Paul Eggert  <eggert@twinsun.com>
17548
17549         * m4/restrict.m4: New file.
17550         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
17551
17552 2003-08-07  Bruno Haible  <bruno@clisp.org>
17553
17554         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
17555         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
17556
17557 2003-08-07  Bruno Haible  <bruno@clisp.org>
17558
17559         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
17560         makes the module 'getndelim2' compatible with the module 'getline'.
17561
17562 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17563
17564         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
17565         byte with "\201" to avoid glitches when editing that source file
17566         with multi-gnome-terminal.
17567
17568 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17569
17570         * lib/bumpalloc.h: Remove.
17571
17572 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17573
17574         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
17575         * modules/bumpalloc: Remove.
17576
17577 2003-08-04  Paul Eggert  <eggert@twinsun.com>
17578
17579         * lib/getloadavg.c: Change copyright notice and spacing to conform to
17580         GNU coding style.
17581
17582         Merge from coreutils.
17583         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
17584         1. From glibc.
17585         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
17586         from Karl Berry, implemented by Jim Meyering.
17587         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
17588         from Dmitry V. Levin.
17589         Remove anachronistic cast of xrealloc.
17590         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
17591         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
17592         type. Otherwise, it wouldn't compile with at least /bin/cc on
17593         ymp-cray-unicos9.0.2.X.
17594         Combine two mostly-identical uses of alloca into one.
17595         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
17596
17597 2003-08-04  Dave Love  <d.love@dl.ac.uk>
17598
17599         [From Emacs.]
17600
17601         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
17602         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
17603         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
17604         obsolete NLIST_NAME_UNION.
17605         [__GNU__]: Undef BSD and FSCALE.
17606         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
17607
17608 2003-08-03  Paul Eggert  <eggert@twinsun.com>
17609
17610         * lib/stdbool_.h (_Bool): Make it signed char, instead of
17611         an enum type, so that it's guaranteed to promote to int.  See:
17612         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
17613
17614 2003-08-03  Karl Berry  <karl@gnu.org>
17615
17616         * config/depcomp: update from automake.
17617
17618 2003-07-31  Paul Eggert  <eggert@twinsun.com>
17619
17620         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
17621         (strerror): Don't assume that a printable int fits in 14 bytes.
17622
17623 2003-07-31  Bruno Haible  <bruno@clisp.org>
17624
17625         * modules/getpass-gnu: New file.
17626         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
17627
17628 2003-07-31  Bruno Haible  <bruno@clisp.org>
17629
17630         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
17631
17632 2003-07-24  Karl Berry  <karl@gnu.org>
17633
17634         * config/missing: update from automake.
17635
17636 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
17637             Bruno Haible  <bruno@clisp.org>
17638
17639         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
17640         * lib/getline.c (getline, getdelim): Likewise.
17641         Remove _GNU_SOURCE define; now it's defined in config.h through
17642         m4/getline.m4.
17643
17644 2003-07-23  Karl Berry  <karl@gnu.org>
17645
17646         * config/config.sub: update from prep.
17647
17648 2003-07-22  Paul Eggert  <eggert@twinsun.com>
17649
17650         * modules/xalloc (Depends-on): Add exitfail.
17651         * modules/xmemcoll: Likewise.
17652
17653 2003-07-22  Paul Eggert  <eggert@twinsun.com>
17654
17655         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
17656         over-parenthesization in macros.
17657
17658         Sync with coreutils.
17659
17660         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
17661         required by C99.
17662
17663         Use `exit_failure' for xalloc and xmemcoll instead of their own
17664         private exit-failure variables.
17665         * lib/xalloc.h (xalloc_exit_failure): Remove.
17666         * lib/xmalloc.c: Likewise.  Include exitfail.h.
17667         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
17668         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
17669         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
17670         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
17671
17672 2003-07-20  Jim Meyering  <jim@meyering.net>
17673
17674         * modules/closeout (Depends-on): Add exitfail.
17675         Suggestion from Bruno Haible.
17676
17677 2003-07-19  Karl Berry  <karl@gnu.org>
17678
17679         * config/config.sub: update from prep.
17680
17681 2003-07-18  Paul Eggert  <eggert@twinsun.com>
17682
17683         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
17684         Remove.
17685         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
17686         to test that it can stand by itself.  Include "exitfail.h".
17687         Clients should set exit_failure instead.
17688         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
17689
17690 2003-07-18  Bruno Haible  <bruno@clisp.org>
17691
17692         * modules/getndelim2: New file.
17693         * modules/getline: Share files with module getndelim2.
17694         * modules/getnline: Depend on getndelim2 instead of sharing files with
17695         it. Add getnline.c to lib_SOURCES.
17696         * MODULES.html.sh (func_all_modules): Add getndelim2.
17697
17698 2003-07-18  Bruno Haible  <bruno@clisp.org>
17699
17700         * m4/getndelim2.m4: New file.
17701         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
17702         invoke gl_PREREQ_GETNDELIM2.
17703         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
17704         gl_PREREQ_GETNDELIM2.
17705         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
17706         gl_GETNDELIM2.
17707
17708 2003-07-18  Bruno Haible  <bruno@clisp.org>
17709
17710         * lib/getndelim2.h: New file.
17711         * lib/getndelim2.c: Make into a module of its own. Include config.h,
17712         getndelim2.h.
17713         (getndelim2): Make non-static. Change return type to ssize_t.
17714         * lib/getline.h: Change argument names.
17715         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
17716         * lib/getnline.c: Include getndelim2.h.
17717
17718 2003-07-18  Andreas Schwab  <schwab@suse.de>
17719
17720         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
17721
17722 2003-07-17  Karl Berry  <karl@gnu.org>
17723
17724         * config/config.sub: update from prep.
17725
17726 2003-07-17  Bruno Haible  <bruno@clisp.org>
17727
17728         * modules/getnline: New file.
17729         * modules/getline: Add lib/getndelim2.c to source file list.
17730         * MODULES.html.sh (func_all_modules): Add getnline.
17731
17732 2003-07-17  Bruno Haible  <bruno@clisp.org>
17733
17734         * m4/getnline.m4: New file.
17735
17736 2003-07-17  Bruno Haible  <bruno@clisp.org>
17737
17738         * m4/Makefile.am.in: Remove file.
17739         * m4/Makefile.am: Remove file.
17740         * m4/Makefile.in: Remove file.
17741
17742 2003-07-17  Bruno Haible  <bruno@clisp.org>
17743
17744         * lib/getnline.h: New file.
17745         * lib/getnline.c: New file.
17746         * lib/getndelim2.c: New file, extracted from getline.c.
17747         (getndelim2): Renamed from getdelim2, with added nmax argument.
17748         * lib/getline.c: Include getndelim2.c.
17749         (getdelim2): Moved out to getndelim2.c.
17750         (getline, getdelim): Update.
17751
17752 2003-07-17  Bruno Haible  <bruno@clisp.org>
17753
17754         * lib/Makefile.am: Remove file.
17755         * lib/Makefile.in: Remove file.
17756
17757 2003-07-17  Bruno Haible  <bruno@clisp.org>
17758
17759         * configure.in: Remove file.
17760         * Makefile.in: Remove file.
17761
17762 2003-07-17  Bruno Haible  <bruno@clisp.org>
17763
17764         * MODULES.html.sh: Put the </BODY> right before </HTML>.
17765
17766 2003-07-16  Karl Berry  <karl@gnu.org>
17767
17768         * config/srclist-update: was running fixlicense twice, which caused
17769                 texinfo.tex to be nullified for some reason.  Simplify,
17770                 $gplsrc is no longer needed as far as I can see?
17771
17772 2003-07-16  Jim Meyering  <jim@meyering.net>
17773
17774         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
17775
17776 2003-07-15  Paul Eggert  <eggert@twinsun.com>
17777
17778         * config/srclist.txt: Get the following files from gettext-runtime/intl
17779         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
17780         ref-del.sin.  From Bruno Haible.
17781         * config/srclist-update (fixfile): Change grep pattern again, since the
17782         previous fix didn't work (there was another trailing $).  Use
17783         '[$]' to escape the $s.
17784
17785 2003-07-15  Karl Berry  <karl@gnu.org>
17786
17787         * lib/vasnprintf.c: update from gettext.
17788
17789 2003-07-15  Karl Berry  <karl@gnu.org>
17790
17791         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
17792         gets expanded when surrounded by '$'.
17793
17794 2003-07-15  Jim Meyering  <jim@meyering.net>
17795
17796         * modules/save-cwd: Don't depend on error.  From Derek Price.
17797
17798 2003-07-15  Jim Meyering  <jim@meyering.net>
17799
17800         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
17801
17802 2003-07-14  Simon Josefsson  <jas@extundo.com>
17803
17804         * modules/mempcpy: New file.
17805         * MODULES.html.sh (func_all_modules): Add mempcpy.
17806
17807 2003-07-14  Simon Josefsson  <jas@extundo.com>
17808
17809         * m4/mempcpy.m4: New file.
17810
17811 2003-07-14  Simon Josefsson  <jas@extundo.com>
17812
17813         * lib/mempcpy.h: New file.
17814         * lib/mempcpy.c: New file.
17815
17816 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17817
17818         * modules/getdate, modules/posixtm: Depend on mktime.
17819
17820 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17821
17822         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
17823         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
17824         unicodeio.c, unicodeio.h, unlocked-io.h:
17825         Switch from LGPL to GPL.
17826
17827 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17828
17829         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
17830         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
17831         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
17832         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
17833         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
17834         updated automatically by ../config/srclist-update.  This changes
17835         their license from LPGL to GPL.
17836
17837 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17838
17839         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
17840         assumed to refer to the root of the most recent stable gettext version.
17841         * config/srclistvars.sh: Add defaults for eggert.
17842         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
17843         Match "This program" as well as "The program".  This is needed
17844         for gettext.
17845
17846 2003-07-14  Jim Meyering  <jim@meyering.net>
17847
17848         Don't emit diagnostics.  Let callers do that.
17849         * lib/save-cwd.c: Don't include "error.h".
17850         (save_cwd): Don't call error.  Ensure that errno is valid
17851         when returning nonzero.
17852
17853         * lib/save-cwd.h (restore_cwd): Update prototype.
17854         * lib/save-cwd.c (restore_cwd): Remove two parameters.
17855         Simplify.  Don't call error upon failure.  Let callers do that.
17856         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
17857         when auditing is enabled.  But don't bother updating the #if.
17858
17859 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
17860
17861         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
17862         it breaks C++ compilation.
17863         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
17864
17865 2003-07-10  Simon Josefsson  <jas@extundo.com>
17866
17867         * modules/strchrnul (Makefile.am): Add strchrnul.h.
17868
17869 2003-07-10  Jim Meyering  <jim@meyering.net>
17870
17871         * m4/clock_time.m4: Remove trailing blank.
17872         * m4/intmax_t.m4: Likewise.
17873
17874 2003-07-10  Jim Meyering  <jim@meyering.net>
17875
17876         * lib/vasnprintf.c: Remove trailing blanks.
17877         Make cpp indentation consistent.
17878
17879 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17880
17881         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
17882         posixver.c, strftime.c, strnlen.c, strverscmp.c:
17883         Switch from LGPL to GPL.
17884
17885 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17886
17887         * config/srclist.txt: Sort sublists.  Add
17888         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
17889         that differ from gnulib for one reason or another; we'd like this list
17890         to be smaller but for now let's document what we have.
17891
17892 2003-07-08  Paul Eggert  <eggert@twinsun.com>
17893
17894         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
17895         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
17896         and sweeter "eval x=$x".
17897         * config/srclist.txt: Get lib/argp* from glibc.
17898
17899 2003-07-07  Paul Eggert  <eggert@twinsun.com>
17900
17901         * lib/mktime.c: Fix some boundary cases and remove need for floating
17902         point.
17903
17904         Issue a compile-time diagnostic if time_t is floating point, or if
17905         two's complement arithmetic is not in effect, or if arithmetic
17906         right shift does not propagate the sign.  These assumptions were
17907         all in the original code but they weren't checked.
17908
17909         (TIME_T_MIDPOINT, verify): New macros.
17910         (__isleap): Remove; it has integer overflow problems.
17911         (leapyear): New function, without those problems.
17912         (ydhms_tm_diff): Remove; splitting into two parts.
17913         (ydhms_diff): New function, containing the arithmetic part of
17914         the old ydhms_tm_diff function.  Issue a compile-time
17915         diagnostic if we are not using C99 integer division.
17916         Avoid casts when possible.
17917         (guess_time_tm): New function, containing the checking part of
17918         the old ydhms_tm_diff function.  Return the new value, rather than
17919         the difference between it and the old.  Accept a new argument T
17920         so that *T specifies the old value.  Check for overflow in the result.
17921
17922         (__mktime_internal): Use a time_t offset, not a long int offset.
17923         This undoes the 2003-06-04 change, which is no longer needed now
17924         that we have better overflow checking.
17925         (localtime_offset): Likewise.
17926
17927         (__mktime_internal): Avoid harmful overflow on hosts where time_t
17928         and long are 64-bit but int is only 32-bit.
17929         (ydhms_diff): Use long int to store year1 and yday1.
17930         Issue a compile-time diagnostic if long int is not wide enough.
17931
17932         (__mktime_internal): Use long int to store adjusted year and yday.
17933         Use plain C rather than preprocessor commands, if that doesn't
17934         affect efficiency.
17935         Check for overflow (and try to repair) after each probe
17936         rather than checking only at the very end.  This avoids some bugs
17937         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
17938         does not equal GMT offset at maximum time).
17939         Use integer to check for overflow rather than floating point; this
17940         is more portable to non-IEEE hosts, and is a tad faster.
17941         When we detect that we are oscillating between two values,
17942         don't check whether tm_isdst has the requested value, since
17943         we already know the answer.  When tm_isdst has the wrong value,
17944         use a different heuristic to find the right one, based on the
17945         extreme values actually observed in practice in tz2003a,
17946         rather than the (overly optimistic) "previous 3 calendar quarters".
17947
17948         (not_equal_tm, print_tm, check_result): Use "const T" rather than
17949         "T const" to accommodate glibc style.
17950         (check_result): Use less-confusing report format.  "long" -> "long int.
17951         (main): Likewise.
17952         Don't loop if the iteration overflows time_t.
17953         Allow a negative step in the iteration.
17954
17955 2003-07-06  Karl Berry  <karl@gnu.org>
17956
17957         * config/depcomp: update from automake.
17958         * config/config.sub: update from prep.
17959
17960 2003-07-03  Karl Berry  <karl@gnu.org>
17961
17962         * config/config.guess: update from prep.
17963
17964 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17965
17966         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
17967         xreadlink.c now includes it unconditionally.
17968
17969 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17970
17971         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
17972         having it depend on HAVE_SYS_TYPES_H.
17973
17974 2003-07-01  Bruno Haible  <bruno@clisp.org>
17975
17976         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
17977         <sys/types.h> should be sufficient.
17978         Reported by Paul Eggert.
17979
17980 2003-06-26  Karl Berry  <karl@gnu.org>
17981
17982         * config/depcomp: update from automake.
17983
17984 2003-06-26  Bruno Haible  <bruno@clisp.org>
17985
17986         * modules/human: Depend on module stdbool.
17987
17988 2003-06-25  Bruno Haible  <bruno@clisp.org>
17989
17990         * modules/readlink: New file.
17991         * modules/xreadlink: Depend on it.
17992         * MODULES.html.sh (func_all_modules): Add readlink.
17993
17994 2003-06-25  Bruno Haible  <bruno@clisp.org>
17995
17996         * m4/readlink.m4: New file.
17997
17998 2003-06-25  Bruno Haible  <bruno@clisp.org>
17999
18000         * lib/readlink.c: New file.
18001
18002 2003-06-22  Karl Berry  <karl@gnu.org>
18003
18004         * config/srclist.txt: update mkinstalldirs from automake.
18005         * config/mkinstalldirs: update.
18006
18007 2003-06-22  Bruno Haible  <bruno@clisp.org>
18008
18009         Portability to mingw32.
18010         * m4/ssize_t.m4: New file, from GNU gettext.
18011         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
18012         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
18013
18014 2003-06-22  Bruno Haible  <bruno@clisp.org>
18015
18016         * modules/safe-read: Add m4/ssize_t.m4.
18017         * modules/xreadlink: Add m4/ssize_t.m4.
18018
18019 2003-06-20  Bruno Haible  <bruno@clisp.org>
18020
18021         Assume C89, so PARAMS isn't needed.
18022         * lib/unicodeio.h (PARAMS): Remove.
18023         * lib/unicodeio.c: Don't use PARAMS.
18024
18025 2003-06-18  Karl Berry  <karl@gnu.org>
18026
18027         * config/config.{guess,sub}: update from prep.
18028
18029 2003-06-18  Jim Meyering  <jim@meyering.net>
18030
18031         Merge changes from coreutils.
18032         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
18033         Remove explicit declarations of xmalloc and realloc.
18034         Include xalloc.h.
18035         (read_utmp): Remove anachronistic cast of xmalloc.
18036
18037 2003-06-17  Paul Eggert  <eggert@twinsun.com>
18038
18039         Assume C89, so PARAMS isn't needed.
18040         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
18041         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
18042         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
18043         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
18044         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
18045         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
18046         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
18047         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
18048         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
18049         lib/xstrtod.h, lib/xstrtol.h: Likewise.
18050         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
18051         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
18052         no longer needed. Anyway, config.h should always be included before any
18053         other file.
18054
18055 2003-06-11  Simon Josefsson  <jas@extundo.com>
18056
18057         * modules/sysexits: New file.
18058         * MODULES.html.sh (func_all_modules): Add sysexits.
18059
18060 2003-06-11  Simon Josefsson  <jas@extundo.com>
18061
18062         * lib/sysexit_.h: New file.
18063
18064 2003-06-11  Derek Price  <derek@ximbiot.com>
18065
18066         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
18067         necessary.
18068
18069 2003-06-11  Bruno Haible  <bruno@clisp.org>
18070
18071         * m4/sysexits.m4: New file.
18072
18073 2003-06-10  Simon Josefsson  <jas@extundo.com>
18074
18075         * lib/argp.h: New file, from glibc.
18076         * lib/argp-ba.c: New file, from glibc.
18077         * lib/argp-eexst.c: New file, from glibc.
18078         * lib/argp-fmtstream.c: New file, from glibc.
18079         * lib/argp-fmtstream.h: New file, from glibc.
18080         * lib/argp-fs-xinl.c: New file, from glibc.
18081         * lib/argp-help.c: New file, from glibc.
18082         * lib/argp-namefrob.h: New file, from glibc.
18083         * lib/argp-parse.c: New file, from glibc.
18084         * lib/argp-pv.c: New file, from glibc.
18085         * lib/argp-pvh.c: New file, from glibc.
18086         * lib/argp-xinl.c: New file, from glibc.
18087
18088 2003-06-10  Simon Josefsson  <jas@extundo.com>
18089
18090         * modules/strchrnul: New file.
18091
18092 2003-06-10  Simon Josefsson  <jas@extundo.com>
18093
18094         * modules/argp: New file.
18095
18096 2003-06-10  Simon Josefsson  <jas@extundo.com>
18097
18098         * m4/strchrnul.m4: New file.
18099
18100 2003-06-10  Simon Josefsson  <jas@extundo.com>
18101
18102         * lib/strchrnul.h: New file.
18103         * lib/strchrnul.c: New file.
18104
18105 2003-06-10  Bruno Haible  <bruno@clisp.org>
18106
18107         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
18108
18109 2003-06-07  Karl Berry  <karl@gnu.org>
18110
18111         * config/config.{guess,sub}: update from prep.
18112
18113 2003-06-07  Jim Meyering  <jim@meyering.net>
18114
18115         * modules/strtod: Use $(...) notation, not @...@ for
18116         AC_REPLACE'd variables.
18117         * modules/localcharset: Likewise.
18118
18119 2003-06-07  Jim Meyering  <jim@meyering.net>
18120
18121         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
18122         in place of my name in the copyright comment.
18123         Remove definition and uses of __P.
18124
18125         From coreutils.
18126         * lib/stat.c: Don't declare xmalloc explicitly.
18127         Instead, include "xalloc.h".
18128         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
18129         xrealloc, and xcalloc return values.
18130         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
18131         Improve comment.
18132         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
18133
18134 2003-06-07  Bruno Haible  <bruno@clisp.org>
18135
18136         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
18137         avoid AC_CONFIG_LINKS.
18138         * modules/fnmatch (Makefile.am): Use explicit creation rule for
18139         fnmatch.h, to avoid AC_CONFIG_LINKS.
18140         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
18141
18142 2003-06-07  Bruno Haible  <bruno@clisp.org>
18143
18144         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
18145         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
18146         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
18147         directory.
18148         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
18149         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
18150         directory.
18151
18152 2003-06-06  Jim Meyering  <jim@meyering.net>
18153
18154         Merge from coreutils.
18155         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
18156         Consolidate declarations and initializations of *_base* locals.
18157
18158         Merge from coreutils.
18159         This avoids a core dump on systems without GNU putenv,
18160         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
18161         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
18162         (unsetenv): New static function, from GNU libc.
18163         (rpl_putenv): Use it.
18164
18165         * lib/modechange.c: Remove trailing blanks.
18166
18167         Merge from coreutils.
18168         * lib/fsusage.c: Remove declaration of statfs.
18169         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
18170
18171         * lib/posixtm.c: Include <stdbool.h> unconditionally.
18172
18173 2003-06-06  Jim Meyering  <jim@meyering.net>
18174
18175         * lib/stdbool_.h: Renamed from stdbool.h.in.
18176
18177 2003-06-06  Jim Meyering  <jim@meyering.net>
18178             Bruno Haible  <bruno@clisp.org>
18179
18180         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
18181         Adjust Makefile.am snippet not to redirect directly to target.
18182         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
18183
18184 2003-06-05  Paul Eggert  <eggert@twinsun.com>
18185
18186         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
18187         mismatch, look in future quarters as well as past.  This fixes a
18188         bug when processing fall-backwards gaps immediately after a long
18189         period of daylight-saving time.
18190
18191         * lib/mktime.c: Assume freestanding C89 or better.
18192         (HAVE_LIMITS_H): Remove.  Assume it's 1.
18193         (__P): Remove; not used.
18194         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
18195         (mktime, not_equal_tm, print_tm, check_result,
18196         main): Use prototypes.  Use const * where appropriate.
18197         (main): Fix typo in testing code that uncovered by above changes.
18198         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
18199
18200 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18201
18202         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
18203         locale.h, localeconv.  This merges changes from coreutils.
18204
18205         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
18206         It can be removed after the next Autoconf is released.
18207         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
18208         needed.
18209
18210 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18211
18212         * lib/mktime.c: Fix Debian bug 177940
18213         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
18214         (localtime_offset): Now long int, not time_t, because we want it
18215         to be guaranteed to be signed.  All uses changed.
18216         (__mktime_internal): If overflow would occur when adding offset,
18217         don't add it.
18218
18219         Merge 'human' changes from coreutils.  Rewrite to support
18220         locale-specific notations like thousands separators.
18221         * lib/human.c: Simplify authorship notice.
18222         Include human.h immediately after config.h.
18223         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
18224         <limits.h>: Do not include, since human.h does.
18225         (SIZE_MAX, UINTMAX_MAX): New macros.
18226         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
18227         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
18228         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
18229         (power_letter): Renamed from suffixes.
18230         (generate_suffix_backwards): Remove.
18231         (adjust_value): Now takes int style (because of human.h changes)
18232         and long double value (for greater precision on some platforms).
18233         (group_number): New function.
18234         (human_readable): Use it.  Use integer options, not enum.
18235         Put the options before the sizes in the arg list.
18236         Support all the new options.
18237         The old human_readable function has been removed;
18238         use inttostr.h instead.
18239         (human_readable, default_block_size, humblock):
18240         Use uintmax_t, not int, for block sizes.
18241         (human_readable_inexact, block_size_types): Remove.
18242         (block_size_opts): New constant.
18243         (human_options): Renamed from human_block_size, with new signature
18244         that allows block sizes up to UINTMAX_MAX.  All callers changed.
18245         * lib/human.h: Add copyright and authorship notice.
18246         Include <limits.h> and <stdbool.h> unconditionally.
18247         (PARAMS): Remove.  All uses removed.
18248         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
18249         (enum human_inexact_style): Remove tag; now a nameless enum.
18250         (human_floor, human_ceiling, human_round_to_even): Now have
18251         values 2, 0, 1 rather than -1, 1, 0.
18252         (human_group_digits, human_suppress_point_zero, human_autoscale,
18253         human_base_1024, human_SI, human_B): New constants.
18254         (human_readable_inexact, human_block_size): Remove.
18255         (human_readable): Size args are now uintmax_t, not int.
18256         (human_options): New decl.
18257
18258         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
18259         unnecessary now that we assume C89 or better.  This change
18260         imported from coreutils.
18261
18262         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
18263         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
18264         in the 2003-05-30 sync from glibc.
18265
18266         .h files should stand alone, but we shouldn't include <sys/types.h>
18267         if we can get away with just <stddef.h>.
18268
18269         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
18270         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
18271         rather than <sys/types.h>, as we merely need size_t.
18272         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
18273         to get size_t.
18274         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
18275         Include <stdio.h>, to get FILE.
18276         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
18277         memcasecmp.h has included <stddef.h> and all we need is size_t.
18278         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
18279         our interface, instead of including <sys/types.h>
18280
18281 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18282
18283         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
18284         now, as glibc mktime is buggy on non-glibc systems.
18285
18286 2003-06-03  Karl Berry  <karl@gnu.org>
18287
18288         * config/config.sub: update from prep.
18289
18290 2003-06-02  Paul Eggert  <eggert@twinsun.com>
18291
18292         [from coreutils]
18293         Fix some minor time-related bugs with POSIX time arguments.
18294         Some valid time stamps were being rejected (notably -1, and
18295         time stamps before 1900 on 64-bit hosts).  And some invalid
18296         time stamps were being accepted, e.g. September 31.
18297
18298         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
18299         that we can return (time_t) -1 successfully.
18300         * lib/posixtm.c: Likewise.
18301         [HAVE_STDBOOL_H]: Include <stdbool.h>.
18302         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
18303         (t): Remove static var.
18304         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
18305         of static var.  All uses changed.
18306         (year): Do not reject years before 1900; they can occur with
18307         64-bit time_t.
18308         (posix_time_parse): Do not check for out-of-range components;
18309         that is now the caller's responsibility, since our checks were
18310         only approximations.
18311         (posixtime): Use mktime to check for out-of-range components,
18312         since it knows them exactly.
18313         If mktime returns (time_t) -1, check whether an error actually occurred
18314         by invoking localtime on -1.
18315         (main) [TEST_POSIXTIME]: Check for input data errors, and report
18316         posixtime failures better.
18317         Improve the test data (in comments only).
18318
18319 2003-06-02  Karl Berry  <karl@gnu.org>
18320
18321         * config/mkinstalldirs (version): new variable.
18322         (--version): new option.
18323         (usage): improve message.
18324
18325 2003-05-30  Karl Berry  <karl@gnu.org>
18326
18327         * lib/mktime.c: update from libc.
18328
18329 2003-05-30  Bruno Haible  <bruno@clisp.org>
18330
18331         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
18332         * config/config.rpath: Upgrade to gettext-0.12.1.
18333
18334 2003-05-30  Bruno Haible  <bruno@clisp.org>
18335
18336         * m4/gettext.m4: Upgrade to gettext-0.12.1.
18337         * m4/nls.m4: New file, from gettext-0.12.1.
18338         * m4/po.m4: New file, from gettext-0.12.1.
18339         * m4/progtest.m4: Upgrade to gettext-0.12.1.
18340
18341 2003-05-30  Bruno Haible  <bruno@clisp.org>
18342
18343         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
18344         * lib/localcharset.h: Likewise.
18345         * lib/localcharset.c: Likewise.
18346
18347 2003-05-29  Karl Berry  <karl@gnu.org>
18348
18349         * config/config.rpath: update from gettext.
18350
18351 2003-05-28  Paul Eggert  <eggert@twinsun.com>
18352
18353         Assume the headers required for C89 freestanding compilers.
18354         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
18355         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
18356         * m4/human.m4 (gl_HUMAN): Likewise.
18357         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
18358         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
18359         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18360         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
18361         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18362         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
18363
18364 2003-05-28  Paul Eggert  <eggert@twinsun.com>
18365
18366         Assume the headers required for C89 freestanding compilers.
18367         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
18368         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
18369         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
18370         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
18371         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
18372         define, since <limits.h> is guaranteed to do that.
18373         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
18374         * lib/exclude.c: Include <stdbool.h> unconditionally.
18375         * lib/tempname.c: Include <stddef.h> unconditionally.
18376         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
18377         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
18378         <stddef.h> does that.
18379         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
18380         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
18381         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
18382         needed.
18383         * lib/xstrtol.c: Likewise.
18384         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
18385         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
18386
18387         * lib/addext.c (addext): Use assignment rather than cast, to avoid
18388         warnings on some platforms.
18389
18390         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
18391         arbitrarily.
18392
18393 2003-05-26  Jim Meyering  <jim@meyering.net>
18394
18395         Merge in a change from coreutils:
18396         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
18397         that is guaranteed to be `no'.  Use `no_such_member' to indicate
18398         that condition, rather than `-1' which is slightly misleading.
18399         Change the name of the cache variable to have the gl_ prefix.
18400         Prompted by a patch from Richard Dawe for DJGPP.
18401
18402 2003-05-24  Karl Berry  <karl@gnu.org>
18403
18404         * config/config.guess: update from prep.
18405
18406 2003-05-22  Karl Berry  <karl@gnu.org>
18407
18408         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
18409
18410 2003-05-20  Karl Berry  <karl@gnu.org>
18411
18412         * config/config.guess: update from prep.
18413
18414 2003-05-18  Karl Berry  <karl@gnu.org>
18415
18416         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
18417         might actually be set by the user.
18418
18419         * config/depcomp, install-sh, mdate-sh: update from automake.
18420
18421 2003-05-17  Bruno Haible  <bruno@clisp.org>
18422
18423         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
18424         invalid expansion for AC_EGREP_CPP.
18425         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
18426         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
18427         Suggested by Akim Demaille <akim@epita.fr> in
18428         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
18429
18430 2003-05-12  Jim Meyering  <jim@meyering.net>
18431
18432         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
18433         the space-padded-by-default conversion specifiers, %e, %k, %l.
18434
18435 2003-05-12  Bruno Haible  <bruno@clisp.org>
18436
18437         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
18438         the string is longer than 4 KB.
18439
18440 2003-05-11  Karl Berry  <karl@gnu.org>
18441
18442         * config/config.{guess,sub}: update from prep.
18443
18444 2003-05-09  Bruno Haible  <bruno@clisp.org>
18445
18446         * modules/error: Add m4/strerror_r.m4 to file list.
18447
18448 2003-05-03  Bruno Haible  <bruno@clisp.org>
18449
18450         Upgrade to Unicode-4.0.
18451         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
18452         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
18453         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
18454         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
18455         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
18456         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
18457         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
18458         Change width of U+E0100..U+E01EF from 1 to 0.
18459
18460 2003-04-25  Jim Meyering  <jim@meyering.net>
18461
18462         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
18463         of type size_t, not int.
18464
18465 2003-04-25  Bruno Haible  <bruno@clisp.org>
18466
18467         * lib/copy-file.c: Include <stddef.h>, for size_t.
18468
18469 2003-04-21  Paul Eggert  <eggert@twinsun.com>
18470
18471         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
18472         code which expansion is under static control.  Patch imported from
18473         Akim Demaille's patch to Bison; see
18474         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
18475
18476 2003-04-14  Bruno Haible  <bruno@clisp.org>
18477
18478         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
18479
18480 2003-04-11  Jim Meyering  <jim@meyering.net>
18481
18482         Merge changes from Coreutils.
18483
18484         2003-03-22  Jim Meyering  <jim@meyering.net>
18485
18486         * lib/strftime.c (widen): Cast alloca return value to proper type.
18487
18488         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
18489
18490         From GNU libc.
18491         * lib/strftime.c (my_strftime): Handle very large width
18492         specifications for numeric values correctly.  Improve checks for
18493         overflow.
18494
18495         2003-01-19  Jim Meyering  <jim@meyering.net>
18496
18497         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
18498         definitions.
18499         (nl_get_alt_digit) [! defined my_strftime]: Define.
18500         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
18501         _nl_get_alt_digit and _nl_get_walt_digit.
18502
18503         * lib/strftime.c (my_strftime): Merge in locale-related changes from
18504         libc. These changes have no effect outside of _LIBC.
18505
18506 2003-04-10  Bruno Haible  <bruno@clisp.org>
18507
18508         * modules/findprog: New file.
18509         * MODULES.html.sh (func_all_modules): Add it.
18510
18511 2003-04-10  Bruno Haible  <bruno@clisp.org>
18512
18513         * m4/findprog.m4: New file.
18514         * m4/eaccess.m4: New file.
18515
18516 2003-04-10  Bruno Haible  <bruno@clisp.org>
18517
18518         * lib/findprog.h: New file, from GNU gettext.
18519         * lib/findprog.c: New file, from GNU gettext.
18520
18521 2003-04-05  Jim Meyering  <jim@meyering.net>
18522
18523         Merge changes from Coreutils.
18524
18525         * lib/exclude.h (PARAMS): Remove definition and uses.
18526         * lib/exclude.c: Remove uses of `PARAMS'.
18527
18528         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
18529         Add test-cases for DOS filenames. Declare program_name.
18530         (main): Set up program_name.  Patch by Rich Dawe.
18531
18532         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18533         error from mntctl.
18534         Use mntctl's return value to drive the entry-processing loop, since
18535         we can't rely on the value of the vmt_length member in the last
18536         entry.  On some systems doing so could result in exhausting
18537         virtual memory.  Based in part on a patch from Mike Jetzer.
18538
18539 2003-04-04  Bruno Haible  <bruno@clisp.org>
18540
18541         * modules/linebreak: New file.
18542         * MODULES.html.sh (func_all_modules): Add it.
18543
18544 2003-04-04  Bruno Haible  <bruno@clisp.org>
18545
18546         * m4/linebreak.m4: New file.
18547
18548 2003-04-04  Bruno Haible  <bruno@clisp.org>
18549
18550         * lib/linebreak.h: New file, from GNU gettext.
18551         * lib/linebreak.c: New file, from GNU gettext with slight
18552         modifications.
18553         * lib/lbrkprop.h: New file, from GNU gettext.
18554
18555 2003-04-03  Bruno Haible  <bruno@clisp.org>
18556
18557         * modules/utf8-ucs4: New file.
18558         * modules/utf16-ucs4: New file.
18559         * modules/ucs4-utf8: New file.
18560         * modules/ucs4-utf16: New file.
18561         * MODULES.html.sh (func_all_modules): Add them.
18562
18563 2003-04-03  Bruno Haible  <bruno@clisp.org>
18564
18565         * m4/utf-ucs4.m4: New file.
18566         * m4/ucs4-utf.m4: New file.
18567
18568 2003-04-03  Bruno Haible  <bruno@clisp.org>
18569
18570         * lib/utf8-ucs4.h: New file, from GNU gettext.
18571         * lib/utf16-ucs4.h: New file, from GNU gettext.
18572         * lib/ucs4-utf8.h: New file, from GNU gettext.
18573         * lib/ucs4-utf16.h: New file, from GNU gettext.
18574
18575 2003-04-02  Bruno Haible  <bruno@clisp.org>
18576
18577         * modules/binary-io: New file.
18578         * MODULES.html.sh (func_all_modules): Add it.
18579
18580 2003-04-02  Bruno Haible  <bruno@clisp.org>
18581
18582         * lib/binary-io.h: New file, from GNU gettext.
18583
18584 2003-04-01  Bruno Haible  <bruno@clisp.org>
18585
18586         * modules/pathname: New file.
18587         * MODULES.html.sh (func_all_modules): Add it.
18588
18589 2003-04-01  Bruno Haible  <bruno@clisp.org>
18590
18591         * lib/pathname.h: New file, from GNU gettext.
18592         * lib/concatpath.c: New file, from GNU gettext.
18593
18594 2003-03-30  Bruno Haible  <bruno@clisp.org>
18595
18596         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
18597
18598 2003-03-30  Bruno Haible  <bruno@clisp.org>
18599
18600         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
18601         function chown() doesn't exist.
18602
18603 2003-03-28  Bruno Haible  <bruno@clisp.org>
18604
18605         * modules/copy-file: New file.
18606         * MODULES.html.sh (func_all_modules): Add it.
18607
18608 2003-03-28  Bruno Haible  <bruno@clisp.org>
18609
18610         * m4/copy-file.m4: New file.
18611
18612 2003-03-28  Bruno Haible  <bruno@clisp.org>
18613
18614         * lib/copy-file.h: New file, from GNU gettext.
18615         * lib/copy-file.c: New file, from GNU gettext.
18616
18617 2003-03-18  Jim Meyering  <jim@meyering.net>
18618
18619         * lib/quote.c (quote_n): Fix typo in comment.
18620
18621 2003-03-18  Bruno Haible  <bruno@clisp.org>
18622
18623         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
18624         checking.
18625         * m4/onceonly_2_57.m4: Likewise.
18626
18627 2003-03-17  Bruno Haible  <bruno@clisp.org>
18628
18629         * m4/onceonly.m4: Require autoconf 2.54 or newer.
18630         (m4_quote): Remove macro.
18631         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
18632
18633 2003-03-14  Jim Meyering  <jim@meyering.net>
18634
18635         Merge changes from Coreutils.
18636         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
18637         to be const, in order to avoid warnings.
18638         (obstack_room): Likewise.
18639         (obstack_empty_p): Likewise.
18640
18641 2003-03-14  Bruno Haible  <bruno@clisp.org>
18642
18643         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
18644         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
18645
18646 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18647
18648         Merge changes from Bison.
18649         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
18650         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
18651         when compiling Bison 1.875's `bitset bset = obstack_alloc
18652         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
18653         * lib/hash.c: Include <stdbool.h> unconditionally.
18654
18655 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18656
18657         * m4/onceonly.m4 (m4_quote): New macro.
18658         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
18659         Quote AC_FOREACH variable-expansions properly.
18660
18661 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18662
18663         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
18664
18665 2003-03-09  Paul Eggert  <eggert@twinsun.com>
18666
18667         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
18668         Reported by Bruce Becker; see:
18669         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
18670
18671 2003-03-03  Paul Eggert  <eggert@twinsun.com>
18672             Bruno Haible  <bruno@clisp.org>
18673
18674         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
18675         Reported by John Hughes, see
18676         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
18677
18678 2003-02-20  Bruno Haible  <bruno@clisp.org>
18679
18680         * MODULES.html.sh (func_all_modules): Add poll.
18681
18682 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18683
18684         * modules/poll: New file.
18685
18686 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18687
18688         * lib/poll_.h: New file.
18689         * lib/poll.c: New file.
18690
18691 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18692
18693         * m4/poll.m4: New file.
18694
18695 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18696
18697         * modules/mathl: New file.
18698
18699 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18700
18701         * lib/mathl.h: New file.
18702         * lib/acosl.c: New file.
18703         * lib/asinl.c: New file.
18704         * lib/atanl.c: New file.
18705         * lib/ceill.c: New file.
18706         * lib/cosl.c: New file.
18707         * lib/expl.c: New file.
18708         * lib/floorl.c: New file.
18709         * lib/frexpl.c: New file.
18710         * lib/ldexpl.c: New file.
18711         * lib/logl.c: New file.
18712         * lib/sincosl.c: New file.
18713         * lib/sinl.c: New file.
18714         * lib/sqrtl.c: New file.
18715         * lib/tanl.c: New file.
18716         * lib/trigl.c: New file.
18717         * lib/trigl.h: New file.
18718
18719 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18720
18721         * m4/mathl.m4: New file.
18722
18723 2003-02-18  Bruno Haible  <bruno@clisp.org>
18724
18725         * MODULES.html.sh (func_all_modules): Add mathl.
18726
18727 2003-02-17  Bruno Haible  <bruno@clisp.org>
18728
18729         * modules/mkdtemp: New module.
18730         * MODULES.html.sh (func_all_modules): Add it.
18731
18732 2003-02-17  Bruno Haible  <bruno@clisp.org>
18733
18734         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
18735
18736 2003-02-17  Bruno Haible  <bruno@clisp.org>
18737
18738         * lib/mkdtemp.h: New file, from GNU gettext.
18739         * lib/mkdtemp.c: New file, from GNU gettext.
18740
18741 2003-02-02  Jim Meyering  <jim@meyering.net>
18742
18743         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
18744         e.g. glibc-2.2.93.
18745
18746 2003-01-31  Bruno Haible  <bruno@clisp.org>
18747
18748         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
18749         'rpl_rename'.
18750         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
18751         'rpl_strnlen'.
18752         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
18753         'rpl_strtod'.
18754         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
18755         'rpl_utime'.
18756
18757 2003-01-31  Bruno Haible  <bruno@clisp.org>
18758
18759         * lib/rename.c: #undef rename before defining rpl_rename.
18760         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
18761
18762 2003-01-30  Bruno Haible  <bruno@clisp.org>
18763
18764         * modules/vasnprintf, modules/vasprintf: New modules.
18765         * MODULES.html.sh (func_all_modules): Add them.
18766
18767 2003-01-30  Bruno Haible  <bruno@clisp.org>
18768
18769         * m4/signed.m4: New file, from GNU gettext.
18770         * m4/longdouble.m4: New file, from GNU gettext.
18771         * m4/wchar_t.m4: New file, from GNU gettext.
18772         * m4/wint_t.m4: New file, from GNU gettext.
18773         * m4/vasnprintf.m4: New file.
18774         * m4/vasprintf.m4: New file.
18775
18776 2003-01-30  Bruno Haible  <bruno@clisp.org>
18777
18778         * lib/printf-args.h: New file, from GNU gettext.
18779         * lib/printf-args.c: New file, from GNU gettext.
18780         * lib/printf-parse.h: New file, from GNU gettext.
18781         * lib/printf-parse.c: New file, from GNU gettext.
18782         * lib/vasnprintf.h: New file, from GNU gettext.
18783         * lib/vasnprintf.c: New file, from GNU gettext.
18784         * lib/asnprintf.c: New file, from GNU gettext.
18785         * lib/vasprintf.h: New file, from GNU gettext with modifications.
18786         * lib/vasprintf.c: New file, from GNU gettext.
18787         * lib/asprintf.c: New file, from GNU gettext.
18788
18789 2003-01-29  Bruno Haible  <bruno@clisp.org>
18790
18791         * modules/stpncpy: New module.
18792         * MODULES.html.sh (func_all_modules): Add it.
18793
18794 2003-01-29  Bruno Haible  <bruno@clisp.org>
18795
18796         * m4/stpncpy.m4: New file.
18797
18798 2003-01-29  Bruno Haible  <bruno@clisp.org>
18799
18800         * lib/stpncpy.h: New file, from GNU gettext with modifications.
18801         * lib/stpncpy.c: New file, from GNU gettext with modifications.
18802
18803 2003-01-28  Bruno Haible  <bruno@clisp.org>
18804
18805         * modules/c-ctype: New module.
18806         * MODULES.html.sh (func_all_modules): Add it.
18807
18808 2003-01-28  Bruno Haible  <bruno@clisp.org>
18809
18810         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
18811         Paul Eggert.
18812         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
18813         Paul Eggert.
18814
18815 2003-01-27  Bruno Haible  <bruno@clisp.org>
18816
18817         * modules/xsetenv: New module.
18818         * MODULES.html.sh (func_all_modules): Add it.
18819
18820 2003-01-27  Bruno Haible  <bruno@clisp.org>
18821
18822         * lib/xsetenv.h: New file, from GNU gettext.
18823         * lib/xsetenv.c: New file, from GNU gettext.
18824
18825 2003-01-23  Jim Meyering  <jim@meyering.net>
18826
18827         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
18828         from working on systems without dirfd (at least Irix and OSF1/Tru64).
18829
18830 2003-01-23  Bruno Haible  <bruno@clisp.org>
18831
18832         * modules/minmax: New module.
18833         * MODULES.html.sh (func_all_modules): Add it.
18834
18835 2003-01-23  Bruno Haible  <bruno@clisp.org>
18836
18837         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
18838         Eggert.
18839
18840 2003-01-22  Bruno Haible  <bruno@clisp.org>
18841
18842         * modules/exit: New module.
18843         * MODULES.html.sh (func_all_modules): Add it.
18844
18845 2003-01-22  Bruno Haible  <bruno@clisp.org>
18846
18847         * lib/exit.h: New file, from GNU gettext.
18848
18849 2003-01-19  Bruno Haible  <bruno@clisp.org>
18850
18851         * gnulib-tool: Recognize option --extract-maintainer.
18852         (func_get_maintainer): New function.
18853         * modules/*: Add Maintainer entry.
18854
18855 2003-01-16  Jim Meyering  <jim@meyering.net>
18856
18857         * m4/regex.m4: The `regex' struct is both input and output.
18858         Initialize it before each use.  Patch by Tim Waugh.
18859
18860 2003-01-16  Bruno Haible  <bruno@clisp.org>
18861
18862         * MODULES.html.sh: Add a table of contents. Add the module name as
18863         leftmost column. Add hyperlinks.
18864
18865 2003-01-15  Bruno Haible  <bruno@clisp.org>
18866
18867         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
18868
18869 2003-01-15  Bruno Haible  <bruno@clisp.org>
18870
18871         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
18872         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
18873         suffix.
18874
18875 2003-01-15  Bruno Haible  <bruno@clisp.org>
18876
18877         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
18878
18879 2003-01-15  Bruno Haible  <bruno@clisp.org>
18880
18881         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
18882         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
18883
18884 2003-01-14  Jim Meyering  <jim@meyering.net>
18885
18886         * lib/same.c (same_name): Tweak a comment.
18887
18888 2003-01-14  Bruno Haible  <bruno@clisp.org>
18889
18890         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
18891         when a string comparison is sufficient.
18892
18893 2003-01-14  Bruno Haible  <bruno@clisp.org>
18894
18895         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
18896         'unsigned int'.
18897
18898 2003-01-14  Bruno Haible  <bruno@clisp.org>
18899
18900         * lib/hash-pjw.c: Add comment about low quality of this function.
18901
18902 2003-01-13  Bruno Haible  <bruno@clisp.org>
18903
18904         * modules/stpcpy: Distribute lib/stpcpy.h.
18905         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
18906
18907 2003-01-13  Bruno Haible  <bruno@clisp.org>
18908
18909         * modules/*: Add a description.
18910         * modules/strpbrk: Fix Makefile.am snippet.
18911         * modules/strtoimax: Fix dependencies.
18912         * modules/strtoumax: Likewise.
18913
18914 2003-01-13  Bruno Haible  <bruno@clisp.org>
18915
18916         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
18917         * modules/alloca (Makefile.am): All object files depend on alloca.h.
18918         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
18919
18920 2003-01-13  Bruno Haible  <bruno@clisp.org>
18921
18922         * gnulib-tool (func_create_testdir): Store config/* files in the main
18923         directory.
18924         * config.rpath: Move to ...
18925         * config/config.rpath: ... here.
18926         * modules/gettext: Contains config/config.rpath, not config.rpath.
18927         * modules/iconv: Likewise.
18928
18929 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18930
18931         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18932         to avoid collisions with libcurses and libreadline.
18933
18934         * m4/getstr.m4: Remove.
18935         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
18936
18937 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18938
18939         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18940         to avoid collisions with libcurses and libreadline.
18941
18942         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
18943         * lib/getstr.h, getstr.c: Remove.
18944         * lib/getline.c: Include "getline.h", to check interface.
18945         Move body of old getstr.c here: this defines MIN_CHUNK and
18946         declares getdelim2, which is renamed from getstr.
18947         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
18948
18949         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
18950         All uses changed.
18951         * lib/linebuffer.h: Likewise.
18952         (readline): Remove backward-compatibility macro.
18953
18954 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18955
18956         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18957         to avoid collisions with libcurses and libreadline.
18958         * getstr: Remove.
18959         * MODULES.html.sh: Remove getstr.
18960         * modules/getline: Depend on unlocked-io, not getstr.
18961
18962 2003-01-12  Jim Meyering  <jim@meyering.net>
18963
18964         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
18965
18966 2003-01-10  Bruno Haible  <bruno@clisp.org>
18967
18968         * modules/alloca: Change Makefile.am requirements. Simplify Include
18969         requirements. Add lib/alloca_.h to file list.
18970
18971 2003-01-10  Bruno Haible  <bruno@clisp.org>
18972
18973         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
18974
18975 2003-01-10  Bruno Haible  <bruno@clisp.org>
18976
18977         * lib/alloca_.h: New file.
18978         * lib/getdate.y: Unconditionally include alloca.h.
18979         * lib/makepath.c: Likewise.
18980         * lib/setenv.c: Likewise.
18981         * lib/userspec.c: Likewise.
18982
18983 2003-01-09  Karl Berry  <karl@gnu.org>
18984
18985         * MODULES.html.sh: include `dirname $0` in PATH, to find
18986         gnulib-tool.
18987
18988 2003-01-09  Bruno Haible  <bruno@clisp.org>
18989
18990         * modules/stdbool: Change configure.ac, Makefile.am requirements.
18991         Simplify Include requirements. Add lib/stdbool.h.in to file list.
18992
18993 2003-01-09  Bruno Haible  <bruno@clisp.org>
18994
18995         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
18996
18997 2003-01-09  Bruno Haible  <bruno@clisp.org>
18998
18999         * lib/stdbool.h.in: New file.
19000
19001 2003-01-09  Bruno Haible  <bruno@clisp.org>
19002
19003         * gnulib-tool (func_all_modules): Ignore files ending in ~.
19004         * MODULES.html.sh: Likewise.
19005
19006 2003-01-08  Jim Meyering  <jim@meyering.net>
19007
19008         * lib/full-write.c: Undefine and define-away `const' after inclusion
19009         of errno.h, not before.  Suggestion from Bruno Haible.
19010
19011 2003-01-08  Bruno Haible  <bruno@clisp.org>
19012
19013         * modules/full-read: Depend on full-write.
19014
19015 2003-01-08  Bruno Haible  <bruno@clisp.org>
19016
19017         * lib/safe-read.c: Include specification header first, to ensure its
19018         selfcontainedness.
19019         * lib/full-write.c: Likewise.
19020
19021 2003-01-07  Jim Meyering  <jim@meyering.net>
19022
19023         * lib/full-write.c: Rework so that it may serve to define full_read,
19024         too.
19025         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
19026
19027 2003-01-07  Bruno Haible  <bruno@clisp.org>
19028
19029         * lib/strtoimax.c: Include <stdint.h> as an alternative to
19030         <inttypes.h>.
19031         * lib/xstrtol.h: Likewise.
19032         * lib/xstrtoimax.c: Likewise.
19033         * lib/xstrtoumax.c: Likewise.
19034         * lib/human.h: Likewise.
19035
19036         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
19037         on systems that have <inttypes.h> but not <stdint.h>.
19038
19039 2003-01-07  Bruno Haible  <bruno@clisp.org>
19040
19041         * MODULES.html.sh: Add copyright notice.
19042         (missed_files): Omit CVS directory entries.
19043         (func_module): Make it work with sed-3.02.
19044         * MODULES.txt: Remove file.
19045
19046 2003-01-06  Jim Meyering  <jim@meyering.net>
19047
19048         * lib/version-etc.c: Update year in translatable copyright string.
19049
19050 2003-01-03  Karl Berry  <karl@gnu.org>
19051
19052         * config/config.{guess,sub}: update from prep.
19053
19054 2003-01-02  Karl Berry  <karl@gnu.org>
19055
19056         * doc/COPYING.DOC: belatedly updated to 1.2.
19057
19058 2003-01-01  Karl Berry  <karl@gnu.org>
19059
19060         * gnulib-tool (func_verify_module): report module name $module in
19061         error message, not $1.
19062         * gnulib-tool (create-testdir): don't complain if destdir couldn't
19063         be created, only if it doesn't exist.
19064         * gnulib-tool (last_checkin_date): don't expand the $Date here.
19065
19066 2002-12-31  Paul Eggert  <eggert@twinsun.com>
19067
19068         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
19069
19070 2002-12-31  Paul Eggert  <eggert@twinsun.com>
19071
19072         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
19073         memcmp if strcoll doesn't work.
19074
19075 2002-12-31  Bruno Haible  <bruno@clisp.org>
19076
19077         * lib/utime.c (utime_null): No need to call ftruncate if the file was
19078         nonempty.
19079
19080 2002-12-31  Bruno Haible  <bruno@clisp.org>
19081
19082         * lib/memcoll.c (STRCOLL): New macro.
19083         (memcoll): Use it.
19084
19085 2002-12-31  Bruno Haible  <bruno@clisp.org>
19086
19087         * lib/localcharset.h: New file.
19088         * lib/localcharset.c: Include it.
19089         * lib/unicodeio.c: Likewise.
19090
19091 2002-12-31  Bruno Haible  <bruno@clisp.org>
19092
19093         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
19094         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
19095
19096 2002-12-31  Bruno Haible  <bruno@clisp.org>
19097
19098         * lib/getline.h: Include <stddef.h>, for size_t.
19099
19100         * lib/unicodeio.h: Include <stddef.h>, for size_t.
19101         * lib/unicodeio.c: Don't include <stddef.h>.
19102
19103 2002-12-31  Bruno Haible  <bruno@clisp.org>
19104
19105         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
19106         HAVE_TM_ZONE.
19107
19108 2002-12-24  Karl Berry  <karl@gnu.org>
19109
19110         * config/config.guess: update from prep.
19111
19112 2002-12-24  Bruno Haible  <bruno@clisp.org>
19113
19114         General infrasructure.
19115         * m4/README: Rewritten.
19116         * m4/onceonly.m4: New file.
19117         * m4/onceonly_2_57.m4: New file.
19118
19119         Module atexit.
19120         * m4/atexit.m4: New file.
19121
19122         Module strtod.
19123         * m4/strtod.m4: New file.
19124
19125         Module strtol.
19126         * m4/strtol.m4: New file.
19127
19128         Module strtoul.
19129         * m4/strtoul.m4: New file.
19130
19131         Module memchr.
19132         * m4/memchr.m4: New file.
19133
19134         Module memcmp.
19135         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
19136         (jm_FUNC_MEMCMP): Invoke it.
19137
19138         Module memcpy.
19139         * m4/memcpy.m4: New file.
19140
19141         Module memmove.
19142         * m4/memmove.m4: New file.
19143
19144         Module memset.
19145         * m4/memset.m4: New file.
19146
19147         Module strcspn.
19148         * m4/strcspn.m4: New file.
19149
19150         Module strpbrk.
19151         * m4/strpbrk.m4: New file.
19152
19153         Module strstr.
19154         * m4/strstr.m4: New file.
19155
19156         Module strerror.
19157         * m4/strerror.m4: New file.
19158
19159         Module mktime.
19160         * m4/mktime.m4: Renamed from jm-mktime.m4.
19161         (gl_PREREQ_MKTIME): New macro.
19162         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
19163
19164         Module malloc.
19165         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
19166         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
19167         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
19168
19169         Module realloc.
19170         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
19171         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
19172         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
19173
19174         Module strftime.
19175         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
19176         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
19177         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
19178         gl_TM_GMTOFF.
19179         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
19180
19181         Module xalloc.
19182         * m4/xalloc.m4: New file.
19183
19184         Module alloca.
19185         * m4/alloca.m4: New file.
19186
19187         Module putenv.
19188         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
19189         (jm_FUNC_PUTENV): Invoke it.
19190
19191         Module setenv.
19192         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
19193         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
19194         when invoked twice.
19195         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
19196         gt_FUNC_SETENV.
19197
19198         Module memrchr.
19199         * m4/memrchr.m4: New file.
19200
19201         Module stpcpy.
19202         * m4/stpcpy.m4: New file.
19203
19204         Module strcase.
19205         * m4/strcase.m4: New file.
19206
19207         Module strdup.
19208         * m4/strdup.m4: New file.
19209
19210         Module strnlen.
19211         * m4/strnlen.m4: New file.
19212
19213         Module strndup.
19214         * m4/strndup.m4: New file.
19215
19216         Module xstrtod.
19217         * m4/xstrtod.m4: New file.
19218
19219         Module xstrtol.
19220         * m4/xstrtol.m4: New file.
19221
19222         Module getdate.
19223         * m4/getdate.m4: New file.
19224
19225         Module unlocked-io.
19226         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
19227         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
19228         * m4/jm-glibc-io.m4n: Remove file.
19229
19230         Module long-options.
19231         * m4/long-options.m4: New file.
19232
19233         Module md5.
19234         * m4/md5.m4: New file.
19235
19236         Module sha.
19237         * m4/sha.m4: New file.
19238
19239         Module getstr.
19240         * m4/getstr.m4: New file.
19241
19242         Module getline.
19243         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
19244         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
19245         <sys/types.h>, for size_t. Use the function name gnu_getline, not
19246         simply getline. Infoke gl_PREREQ_GETLINE.
19247
19248         Module obstack.
19249         * m4/obstack.m4: New file.
19250
19251         Module hash.
19252         * m4/hash.m4: New file.
19253
19254         Module readtokens.
19255         * m4/readtokens.m4: New file.
19256
19257         Module strverscmp.
19258         * m4/strverscmp.m4: New file.
19259
19260         Module stdbool.
19261         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
19262         OSF/1.
19263
19264         Module strtoll.
19265         * m4/strtoll.m4: New file.
19266
19267         Module strtoull.
19268         * m4/strtoull.m4: New file.
19269
19270         Module strtoimax.
19271         * m4/strtoimax.m4: New file.
19272
19273         Module strtoumax.
19274         * m4/strtoumax.m4: New file.
19275
19276         Module xstrtoimax.
19277         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
19278         jm_AC_PREREQ_XSTRTOIMAX.
19279         Moved the strtol prerequisites to strtol.m4.
19280         Moved the strtoll prerequisites to strtoll.m4.
19281         Moved the strtoimax prerequisites to strtoimax.m4.
19282
19283         Module xstrtoumax.
19284         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
19285         jm_AC_PREREQ_XSTRTOUMAX.
19286         Moved the strtoul prerequisites to strtoul.m4.
19287         Moved the strtoull prerequisites to strtoull.m4.
19288         Moved the strtoumax prerequisites to strtoumax.m4.
19289
19290         Module chown.
19291         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
19292         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
19293
19294         Module dup2.
19295         * m4/dup2.m4: New file.
19296
19297         Module ftruncate.
19298         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
19299         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
19300
19301         Module getgroups.
19302         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
19303         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
19304
19305         Module gettimeofday.
19306         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
19307         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
19308         gl_PREREQ_GETTIMEOFDAY.
19309
19310         Module mkdir.
19311         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
19312         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
19313
19314         Module mkstemp.
19315         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
19316         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
19317         jm_AC_TYPE_UINTMAX_T.
19318         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
19319
19320         Module stat.
19321         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
19322         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
19323
19324         Module lstat.
19325         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
19326         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
19327
19328         Module timespec.
19329         * m4/timespec.m4 (gl_TIMESPEC): New macro.
19330         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
19331         * m4/st_mtim.m4: Indentation.
19332
19333         Module nanosleep.
19334         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
19335         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
19336         gl_PREREQ_NANOSLEEP.
19337
19338         Module regex.
19339         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
19340         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
19341         (gl_REGEX): New macro.
19342
19343         Module rename.
19344         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
19345         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
19346
19347         Module rmdir.
19348         * m4/rmdir.m4: New file.
19349
19350         Module utime.
19351         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
19352         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
19353         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
19354
19355         Module dirname.
19356         * m4/dirname.m4: New file.
19357
19358         Module getopt.
19359         * m4/getopt.m4: New file.
19360
19361         Module unistd-safer.
19362         * m4/unistd-safer.m4: New file.
19363
19364         Module fnmatch.
19365         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
19366         declaration.
19367         (gl_PREREQ_FNMATCH_EXTRA): New macro.
19368         (gl_FUNC_FNMATCH_POSIX): New macro.
19369         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
19370         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
19371         simply fnmatch.
19372
19373         Module exclude.
19374         * m4/exclude.m4: New file.
19375
19376         Module human.
19377         * m4/human.m4: New file.
19378
19379         Module acl.
19380         * m4/acl.m4: Nop.
19381
19382         Module backupfile.
19383         * m4/backupfile.m4: New file.
19384         * m4/d-ino.m4: Indentation.
19385
19386         Module fsusage.
19387         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
19388         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
19389         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
19390
19391         Module dirfd.
19392         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
19393         requirements.
19394
19395         Module euidaccess.
19396         * m4/euidaccess.m4: New file.
19397
19398         Module file-type.
19399         * m4/file-type.m4: New file.
19400
19401         Module fileblocks.
19402         * m4/fileblocks.m4: New file.
19403
19404         Module filemode.
19405         * m4/filemode.m4: New file.
19406
19407         Module isdir.
19408         * m4/isdir.m4: New file.
19409
19410         Module lchown.
19411         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
19412         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
19413
19414         Module makepath.
19415         * m4/makepath.m4: New file.
19416
19417         Module modechange.
19418         * m4/modechange.m4: New file.
19419
19420         Module mountlist.
19421         * m4/mountlist.m4: New file.
19422         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
19423         Indentation.
19424
19425         Module path-concat.
19426         * m4/path-concat.m4: New file.
19427
19428         Module pathmax.
19429         * m4/pathmax.m4: New file.
19430
19431         Module same.
19432         * m4/same.m4: New file.
19433
19434         Module save-cwd.
19435         * m4/save-cwd.m4: New file.
19436
19437         Module savedir.
19438         * m4/savedir.m4: New file.
19439
19440         Module xgetcwd.
19441         * m4/xgetcwd.m4: New file.
19442         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
19443
19444         Module xreadlink.
19445         * m4/xreadlink.m4: New file.
19446
19447         Module safe-read.
19448         * m4/safe-read.m4: New file.
19449
19450         Module safe-write.
19451         * m4/safe-write.m4: New file.
19452
19453         Module closeout.
19454         * m4/closeout.m4: New file.
19455
19456         Module stdio-safer.
19457         * m4/stdio-safer.m4: New file.
19458
19459         Module getpass.
19460         * m4/getpass.m4: New file.
19461
19462         Module getugroups.
19463         * m4/getugroups.m4: New file.
19464
19465         Module group-member.
19466         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
19467         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
19468
19469         Module idcache.
19470         * m4/idcache.m4: New file.
19471
19472         Module userspec.
19473         * m4/userspec.m4: New file.
19474
19475         Module gettime.
19476         * m4/clock_time.m4: New file.
19477         * m4/gettime.m4: New file.
19478
19479         Module settime.
19480         * m4/settime.m4: New file.
19481
19482         Module posixtm.
19483         * m4/posixtm.m4: New file.
19484
19485         Module gethostname.
19486         * m4/gethostname.m4: New file.
19487
19488         Module canon-host.
19489         * m4/canon-host.m4: New file.
19490
19491         Module gettext.
19492         * m4/codeset.m4: New file, from gettext-0.11.5.
19493         * m4/gettext.m4: New file, from gettext-0.11.5.
19494         * m4/glibc21.m4: New file, from gettext-0.11.5.
19495         * m4/iconv.m4: New file, from gettext-0.11.5.
19496         * m4/intdiv0.m4: New file, from gettext-0.11.5.
19497         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
19498         * m4/inttypes.m4: New file, from gettext-0.11.5.
19499         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
19500         * m4/isc-posix.m4: New file, from gettext-0.11.5.
19501         * m4/lcmessage.m4: New file, from gettext-0.11.5.
19502         * m4/lib-ld.m4: New file, from gettext-0.11.5.
19503         * m4/lib-link.m4: New file, from gettext-0.11.5.
19504         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
19505         * m4/progtest.m4: New file, from gettext-0.11.5.
19506         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
19507         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
19508         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
19509
19510         Module localcharset.
19511         * m4/localcharset.m4: New file.
19512
19513         Module hard-locale.
19514         * m4/hard-locale.m4: New file.
19515
19516         Module mbswidth.
19517         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
19518         onceonly macros.
19519         * m4/mbrtowc.m4: Add comment.
19520
19521         Module memcasecmp.
19522         * m4/memcasecmp.m4: New file.
19523
19524         Module memcoll.
19525         * m4/memcoll.m4: New file.
19526
19527         Module unicodeio.
19528         * m4/unicodeio.m4: New file.
19529
19530         Module rpmatch.
19531         * m4/rpmatch.m4: New file.
19532
19533         Module yesno.
19534         * m4/yesno.m4: New file.
19535
19536         Module exitfail.
19537         * m4/exitfail.m4: New file.
19538
19539         Module c-stack.
19540         * m4/c-stack.m4 (gl_C_STACK): New macro.
19541         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
19542
19543         Module error.
19544         * m4/error.m4 (gl_ERROR): New macro.
19545         (jm_PREREQ_ERROR): Use onceonly macros.
19546
19547         Module fatal.
19548         * m4/fatal.m4: New file.
19549
19550         Module getloadavg.
19551         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
19552         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
19553
19554         Module getpagesize.
19555         * m4/getpagesize.m4: New file.
19556
19557         Module getusershell.
19558         * m4/getusershell.m4: New file.
19559
19560         Module physmem.
19561         * m4/physmem.m4: New file.
19562
19563         Module posixver.
19564         * m4/posixver.m4: New file.
19565
19566         Module quotearg.
19567         * m4/quotearg.m4: New file.
19568
19569         Module quote.
19570         * m4/quote.m4: New file.
19571
19572         Module readutmp.
19573         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
19574
19575         Module sig2str.
19576         * m4/sig2str.m4: New file.
19577
19578         Other.
19579         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
19580         ulonglong.m4.
19581         * m4/intmax_t.m4: New file.
19582         * m4/d-type.m4: Indentation.
19583         * m4/jm-macros.m4: Update.
19584         * m4/prereq.m4 (jm_PREREQ): Update.
19585         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
19586         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
19587         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
19588         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
19589         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
19590         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
19591         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
19592         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
19593         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
19594         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
19595         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
19596         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
19597         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
19598         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
19599         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
19600         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
19601         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
19602         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
19603         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
19604
19605 2002-12-24  Bruno Haible  <bruno@clisp.org>
19606
19607         * MODULES.txt: Update according to m4/ changes.
19608
19609         Module gettext.
19610         * config.rpath: New file, from gettext-0.11.5.
19611
19612         * modules/*: New module descriptions.
19613         * gnulib-tool: New file.
19614         * MODULES.html.sh: New file.
19615
19616 2002-12-21  Karl Berry  <karl@gnu.org>
19617
19618         * doc/fdl.texi: update to version 1.2.
19619
19620 2002-12-19  Karl Berry  <karl@gnu.org>
19621
19622         * config/config.guess: update from prep.
19623
19624 2002-12-18  Bruno Haible  <bruno@clisp.org>
19625
19626         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
19627         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
19628
19629 2002-12-17  Bruno Haible  <bruno@clisp.org>
19630
19631         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
19632         stdlib.h, string.h.
19633
19634 2002-12-17  Bruno Haible  <bruno@clisp.org>
19635
19636         * lib/canon-host.c (strdup): Remove unused declaration.
19637
19638         * lib/fsusage.c: Include full_read.h.
19639         (get_fs_usage): Use full_read instead of safe_read.
19640
19641         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
19642
19643 2002-12-12  Karl Berry  <karl@gnu.org>
19644
19645         * config/config.guess: update from prep.
19646
19647 2002-12-11  Bruno Haible  <bruno@clisp.org>
19648
19649         * m4/setenv.m4: New file, from gettext-0.11.5.
19650
19651 2002-12-11  Bruno Haible  <bruno@clisp.org>
19652
19653         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
19654         not unsetenv().
19655         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
19656         modifications:
19657
19658         2002-12-11  Bruno Haible  <bruno@clisp.org>
19659
19660                 * setenv.c (alloca): Fall back to malloc.
19661                 (freea): New macro.
19662                 (setenv): Use freea() to free memory allocated with alloca().
19663
19664         2002-11-13  Bruno Haible  <bruno@clisp.org>
19665
19666                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
19667                 function declarations.
19668                 * unsetenv.c (unsetenv): Likewise.
19669
19670         2002-03-04  Bruno Haible  <bruno@clisp.org>
19671
19672                 Portability to AIX 4.3.3.
19673                 * unsetenv.c: New file, extracted from setenv.c.
19674                 * setenv.c: Move the unsetenv() function to unsetenv.c.
19675
19676         2001-12-20  Bruno Haible  <bruno@clisp.org>
19677
19678                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
19679                 use malloc instead. For SunOS 4.
19680
19681         2001-12-11  Bruno Haible  <bruno@clisp.org>
19682
19683                 * setenv.c: Declare alloca.
19684                 (compar_fn_t): New typedef.
19685                 (KNOWN_VALUE, STORE_VALUE): Use it.
19686
19687         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
19688         setenv.h.
19689
19690 2002-12-10  Paul Eggert  <eggert@twinsun.com>
19691
19692         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
19693         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
19694         Choose values that are less likely to collide with system fnmatch
19695         options.
19696         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
19697         defined (e.g., a pure POSIX system).
19698         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
19699         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
19700
19701 2002-12-06  Paul Eggert  <eggert@twinsun.com>
19702
19703         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
19704         a pain in practice to deal with generated m4 files.  This change
19705         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
19706
19707         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
19708         and jm-glibc-io.m4, as they are no longer a special case.
19709         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
19710         kludge and the auto-generation stuff.  Check only whether the
19711         functions are declared, not whether they exist, since older hosts
19712         that don't declare the functions can't use the optimization anyway.
19713
19714 2002-12-06  Jim Meyering  <jim@meyering.net>
19715
19716         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
19717
19718         Merge in changes from libc's misc/error.c, in preparation
19719         for the merge of gnulib's changes back into libc.
19720
19721         * lib/error.c (_): Define only if not already defined.
19722         Move definition to follow all #include directives.
19723         Include unlocked-io.h only if !_LIBC.
19724         [_LIBC]: Include <libio/libioP.h>.
19725         [USE_IN_LIBIO]: Include <libio/iolibio.h>
19726         (fflush): Tweak definition to use INTUSE.
19727         (putc): Define.
19728
19729 2002-12-05  Paul Eggert  <eggert@twinsun.com>
19730
19731         * lib/alloca.c [defined emacs]: Include "lisp.h".
19732         (xalloc_die) [defined emacs]: New macro.
19733         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
19734         [! defined emacs]: Include <xalloc.h>.
19735         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
19736         (pointer): Typedef to POINTER_TYPE *.
19737         (malloc): Remove decl; we now always use xmalloc.
19738         (alloca): Use old-style definition, since Emacs needs this.
19739         Check for arithmetic overflow when computing combined size.
19740
19741 2002-12-04  Paul Eggert  <eggert@twinsun.com>
19742
19743         Do not generate unlocked-io.h automatically, since it's easier to
19744         maintain it by hand.
19745
19746         * lib/unlocked-io.h: New file, from GNU diffutils,
19747         but with proper copyright notice and attribution.
19748         * lib/gen-uio: Remove.
19749         * lib/Makefile.am: Add copyright notice.
19750         (libfetish_a_SOURCES): Add unlocked-io.h.
19751         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
19752         (DISTCLEANFILES, io_functions): Remove macros.
19753         (EXTRA_DIST): Remove gen_uio.
19754         (unlocked-io.h): Remove rule.
19755
19756 2002-12-04  Jim Meyering  <jim@meyering.net>
19757
19758         Reflect the fact that stat.c and lstat.c are no longer generated.
19759         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
19760         (DISTCLEANFILES): Likewise.
19761         (EXTRA_DIST): Likewise.
19762         (all_local): Don't depend on stat.c or lstat.c.
19763         (stat.c, lstat.c): Remove rules.
19764         (EXTRA_DIST): Remove xstat.in.
19765
19766         * lib/xstat.in: Remove file.  Contents moved into stat.c.
19767         * lib/stat.c: New file.  Contents mostly from xstat.in.
19768         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
19769         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
19770
19771         * lib/safe-read.c: Rework so that it may serve to define safe_write,
19772         too.
19773         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
19774
19775 2002-12-03  Jim Meyering  <jim@meyering.net>
19776
19777         * lib/safe-read.c, safe-write.c: Change variable names and comments,
19778         but not semantics, to minimize the differences between these two files.
19779         (safe_read): Change comment to mention SAFE_READ_ERROR.
19780
19781         * lib/safe-read.c (IS_EINTR): Define.
19782         (safe_read): Use IS_EINTR in place of in-function cpp directives.
19783
19784 2002-12-02  Jim Meyering  <jim@meyering.net>
19785
19786         * lib/safe-read.c (EINTR): Define.
19787         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
19788         (INT_MAX): Provide fallback.
19789         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
19790
19791         * lib/safe-read.h (SAFE_READ_ERROR): Define.
19792
19793 2002-12-02  Bruno Haible  <bruno@clisp.org>
19794
19795         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
19796         Define, taken from safe-read.c.
19797         (INT_MAX): Provide fallback.
19798         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
19799         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
19800
19801         * lib/safe-read.c (EINTR): Remove definition.
19802         (safe_read): Don't use EINTR if it is absent.
19803
19804 2002-12-01  Jim Meyering  <jim@meyering.net>
19805
19806         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
19807         zero.
19808         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
19809
19810 2002-11-27  Paul Eggert  <eggert@twinsun.com>
19811
19812         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
19813         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
19814         with `if (! (value < limit)) abort ();', for readability.
19815
19816 2002-11-26  Karl Berry  <karl@gnu.org>
19817
19818         * lib/strdup.c: copy from libc again, with jim's ok.
19819         * lib/.cppi-disable: re-add strdup.c
19820
19821 2002-11-25  Karl Berry  <karl@gnu.org>
19822
19823         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
19824         instead of "strtol.c".
19825
19826 2002-11-25  Karl Berry  <karl@gnu.org>
19827
19828         * config/install-sh: update from automake for variable quoting, $0 in
19829         error msgs, etc.
19830
19831         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
19832         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
19833         entry.
19834
19835 2002-11-25  Jim Meyering  <jim@meyering.net>
19836
19837         * lib/mktime.c: Sync from libc, now that it has the latest fix.
19838
19839 2002-11-24  Karl Berry  <karl@gnu.org>
19840
19841         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
19842         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
19843
19844 2002-11-24  Jim Meyering  <jim@meyering.net>
19845
19846         Update from coreutils:
19847
19848         * lib/mktime.c: Merge in changes from libc.
19849
19850         Avoid a link-time failure on some Linux systems.
19851         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
19852         (otherwise).
19853         (__mon_yday): Declare with the STATIC attribute.
19854         (__mktime_internal): Likewise.
19855         Based on a report from Greg Schafer.
19856
19857 2002-11-23  Jim Meyering  <jim@meyering.net>
19858
19859         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
19860         Use `unsigned', not `int', as type of index.
19861
19862         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
19863
19864         * lib/fsusage.c: Remove unneeded parentheses around operands of
19865         `defined'.
19866
19867 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19868
19869         * lib/quotearg.h: Allow multiple inclusion by surrounding with
19870         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
19871         so that we can be included first.
19872         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
19873         * lib/quotearg.c: Include quotearg.h immediately after config.h.
19874         No need to include stddef.h or sys/types.h any more.
19875         Surround local include files with "", not "<>".
19876         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
19877         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
19878         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
19879         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19880         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19881         (ISPRINT): Remove; no longer needed now that we assume C89.
19882
19883         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
19884         Preserve errno.
19885
19886         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
19887         quotearg_char): Use SIZE_MAX rather than
19888         (size_t) -1 when we are talking about "infinity".
19889
19890         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
19891
19892 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19893
19894         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
19895         hint that one should use `if (! x) abort ();' rather than `assert
19896         (x);', and anyway it's one less thing to worry about configuring.
19897         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
19898         hash_rehash, hash_insert): Use abort rather than assert.
19899
19900 2002-11-22  Bruno Haible  <bruno@clisp.org>
19901
19902         * lib/safe-read.h: Assume C89. Add comments.
19903         (safe_read): Change return type to size_t.
19904         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
19905         byte counts > SSIZE_MAX correctly.
19906         * lib/safe-write.h: New file.
19907         * lib/safe-write.c: New file.
19908         * lib/full-read.h: New file.
19909         * lib/full-read.c: New file.
19910         * lib/full-write.h: Assume C89. Add comments.
19911         * lib/full-write.c: Include safe-write.h.
19912         (full_write): Rewritten to use safe_write.
19913         Suggested by Jim Meyering and Paul Eggert.
19914
19915 2002-11-21  Jim Meyering  <jim@meyering.net>
19916
19917         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
19918
19919         Merge in changes from the coreutils.
19920
19921         2002-09-25  Paul Eggert  <eggert@twinsun.com>
19922         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
19923         <stdint.h>.
19924         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
19925         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
19926         int.  Work more efficiently if X is the same width as uintmax_t.
19927         Do not compare X to -1, to avoid bogus compiler warning.
19928         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
19929         Don't assume that f_frsize and f_bsize are the same type.
19930
19931         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
19932         warning on FreeBSD.
19933
19934         * lib/makepath.c (make_path): Restore umask *before* creating the final
19935         component.
19936         (make_path): Minor reformatting.
19937
19938         * lib/xmalloc.c: Adjust to work with new autoconf macros,
19939         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
19940         HAVE_MALLOC/HAVE_REALLOC.
19941
19942         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
19943         dummy ones.  At least on GNU/Linux systems, `auto' means something
19944         else.
19945         From Michael Stone.
19946
19947 2002-11-21  Bruno Haible  <bruno@clisp.org>
19948
19949         Remove case insensitive option matching.
19950         * lib/argmatch.h (argcasematch): Remove declaration.
19951         (ARGCASEMATCH): Remove macro.
19952         (__xargmatch_internal): Remove case_sensitive argument.
19953         (XARGMATCH): Update.
19954         (XARGCASEMATCH): Remove macro.
19955         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
19956         case_sensitive argument.
19957         (argcasematch): Remove function.
19958         (__xargmatch_internal): Remove case_sensitive argument.
19959         (main): Use XARGMATCH instead of XARGCASEMATCH.
19960
19961         * lib/xmalloc.c: Change compile-time error message. Add comment about
19962         required autoconf version.
19963
19964 2002-11-20  Paul Eggert  <eggert@twinsun.com>
19965
19966         Merge argmatch cleanups from Bison.  Assume C89.
19967
19968         * lib/argmatch.c: Include config.h here, not in argmatch.h.
19969         Include stdlib.h, for EXIT_FAILURE.
19970         Always include <string.h>, since we assume C89.
19971         (EXIT_FAILURE): Remove pre-C89 bug workaround.
19972         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
19973         Include <stddef.h> instead, since it's all we need for size_t.
19974         (PARAMS): Remove.  All uses removed.
19975         (ARRAY_CARDINALITY): Do not bother to #undef.
19976         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
19977         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
19978         Remove unnecessary parentheses.
19979         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
19980         Insert necessary parentheses.
19981         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
19982         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
19983
19984 2002-11-19  Bruno Haible  <bruno@clisp.org>
19985
19986         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
19987         * lib/mbswidth.h: Include <stddef.h>, for size_t.
19988
19989         * lib/mbswidth.h (PARAMS): Remove macro.
19990         (mbswidth, mbsnwidth): Use ANSI C function declarations.
19991         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
19992
19993         * lib/gcd.h (PARAMS): Remove macro.
19994         (gcd): Use ANSI C function declarations.
19995         * lib/gcd.c (gcd): Likewise.
19996
19997 2002-11-15  Bruno Haible  <bruno@clisp.org>
19998
19999         * lib/strcspn.c: Include <stddef.h>.
20000         (strcspn): Use ANSI C function declaration. Change return type to
20001         size_t. Use NULL.
20002         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
20003         (strpbrk): Use NULL.
20004         * lib/strpbrk.h (PARAMS): Remove macro.
20005         (strpbrk): Use ANSI C function declaration.
20006         * lib/strstr.c: Don't include <sys/types.h>.
20007         * lib/strstr.h (PARAMS): Remove macro.
20008         (strstr): Use ANSI C function declarations.
20009
20010 2002-11-14  Karl Berry  <karl@gnu.org>
20011
20012         * config/mkinstalldirs: `do' on separate line, instead of
20013         `for var; do'.
20014
20015 2002-11-06  Bruno Haible  <bruno@clisp.org>
20016
20017         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
20018         * lib/gcd.c (gcd): Likewise.
20019
20020 2002-11-05  Bruno Haible  <bruno@clisp.org>
20021
20022         * lib/gcd.h: New file, from gettext-0.11.5.
20023         * lib/gcd.c: New file, from gettext-0.11.5.
20024
20025 2002-11-05  Bruno Haible  <bruno@clisp.org>
20026
20027         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20028         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20029         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20030         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20031
20032         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
20033         <libintl.h>.
20034         * lib/makepath.c: Include gettext.h instead of <locale.h> and
20035         <libintl.h>.
20036
20037         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
20038         * lib/human.c: Include gettext.h instead of <libintl.h>.
20039         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
20040         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
20041         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
20042         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
20043         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
20044         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
20045         (textdomain): Remove definition.
20046         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
20047
20048         * lib/long-options.c: Remove include of <libintl.h> and definition of
20049         _.
20050         * lib/same.c: Remove include of <libintl.h> and definition of _.
20051
20052 2002-11-04  Owen Taylor  <otaylor@redhat.com>
20053
20054         * lib/config.charset: A few additions for Solaris.
20055
20056 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20057
20058         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
20059         * lib/localcharset.c (locale_charset): Declare as extern "C".
20060
20061 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20062
20063         * lib/config.charset: msdos in uk_UA uses CP1125.
20064
20065 2002-11-04  Bruno Haible  <bruno@clisp.org>
20066
20067         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
20068         * lib/strcase.h: New file, from GNU gettext-0.11.5.
20069         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
20070         * lib/strstr.h: New file, from GNU gettext-0.11.5.
20071         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
20072
20073 2002-11-04  Bruno Haible  <bruno@clisp.org>
20074
20075         * lib/localcharset.c (locale_charset): Don't return an empty string.
20076
20077 2002-11-04  Bruno Haible  <bruno@clisp.org>
20078
20079         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
20080         aliases.
20081
20082 2002-11-04  Bruno Haible  <bruno@clisp.org>
20083
20084         * lib/config.charset: Update for newest glibc. Add canonical names
20085         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
20086
20087 2002-11-04  Bruno Haible  <bruno@clisp.org>
20088
20089         * lib/config.charset: Add support for NetBSD.
20090
20091 2002-11-04  Bruno Haible  <bruno@clisp.org>
20092
20093         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
20094
20095 2002-11-01  Bruno Haible  <bruno@clisp.org>
20096
20097         * configure.in: Add AC_CONFIG_AUX_DIR call.
20098         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
20099         test/Makefile.
20100         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
20101
20102 2002-09-28  Karl Berry  <karl@gnu.org>
20103
20104         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
20105         installed automake until the next release, since changes have been
20106         made.
20107
20108 2002-09-25  Karl Berry  <karl@gnu.org>
20109
20110         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
20111         * lib/getopt*: copy from libc/posix.
20112         * lib/gettext.h: copy from gettext.
20113         * lib/.cppi-disable: add strdup.c, gettext.h.
20114
20115 2002-09-25  Karl Berry  <karl@gnu.org>
20116
20117         * config/srclist.txt: enable gettext.h check.
20118         * config/config.{guess,sub}: update from prep.
20119         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
20120                 from automake 1.6.3.
20121         See srclist*.
20122
20123 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
20124
20125         * regex.c (PATFETCH): Remove the translating fetch.
20126         (PATFETCH_RAW): Rename to PATFETCH.
20127         (set_image_of_range): New fun.
20128         (SET_RANGE_TABLE_WORK_AREA): Use it.
20129         (regex_compile): Don't translate the pattern chars so eagerly.
20130         Only do it when inserting an `exactn' bytecode or when handling
20131         a char-range.
20132         (mutually_exclusive_p): Avoid empty statement.
20133
20134 2002-07-06  Jim Meyering  <meyering@lucent.com>
20135
20136         * m4/README: Don't mention Makefile.am.in.
20137         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
20138
20139 2002-07-01  Jim Meyering  <meyering@lucent.com>
20140
20141         * lib/c-stack.c: Include sys/time.h.
20142         From Volker Borchert.
20143
20144 2002-06-26  Paul Eggert  <eggert@twinsun.com>
20145
20146         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
20147
20148 2002-06-26  Paul Eggert  <eggert@twinsun.com>
20149
20150         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
20151         New macro.  Use it uniformly instead of
20152         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
20153         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
20154         reported by Vin Shelton.
20155
20156 2002-06-22  Paul Eggert  <eggert@twinsun.com>
20157
20158         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
20159         Do not assume SA_SIGINFO behavior.
20160         Bug reported by Jim Meyering on NetBSD 1.5.2.
20161
20162 2002-06-22  Jim Meyering  <meyering@lucent.com>
20163
20164         * m4/c-stack.m4: New file, from diffutils-2.8.2.
20165         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
20166
20167         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
20168         now that configure.ac uses AC_GNU_SOURCE.
20169         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
20170         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
20171
20172         Update to latest tools.  Suggestions from Paul Eggert.
20173         * m4/stdbool.m4: New file, from diffutils-2.8.2.
20174         * m4/gnu-source.m4: Update from diffutils-2.8.2.
20175         * m4/fnmatch.m4: Likewise.
20176         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
20177         to AC_HEADER_STDBOOL
20178
20179 2002-06-22  Jim Meyering  <meyering@lucent.com>
20180
20181         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
20182         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
20183
20184 2002-06-22  Jim Meyering  <meyering@lucent.com>
20185
20186         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
20187
20188         * lib/exitfail.c, exitfail.h: Likewise.
20189         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
20190
20191         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
20192         of fnmatch.h.
20193         (EXTRA_DIST): Add fnmatch_loop.c.
20194         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
20195
20196         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
20197         * lib/fnmatch.c: Update from diffutils-2.8.2.
20198         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
20199         * lib/fnmatch.h: Remove file.
20200
20201 2002-06-21  Jim Meyering  <meyering@lucent.com>
20202
20203         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
20204         * m4/mbrtowc.m4: Likewise.
20205
20206         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
20207         * m4/mbswidth.m4: Reflect name change:
20208         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
20209         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
20210
20211         * m4/lib-link.m4: Update from gettext-0.11.2.
20212         * m4/gettext.m4: Likewise.
20213
20214         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
20215         From Alfred M. Szmidt.
20216
20217 2002-06-18  Paul Eggert  <eggert@twinsun.com>
20218
20219         * lib/file-type.h: Report an error if neither S_ISREG nor
20220         S_IFREG is defined, instead of using a test specific to glibc
20221         2.2.  This should be safe, since POSIX requires S_ISREG and
20222         Unix Version 7 had S_IFREG.  We don't need to check for
20223         <sys/types.h> since we don't use any symbols that it defines.
20224
20225 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
20226
20227         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
20228         $@-t, so that each temporary file name is unique and valid in the first
20229         8 characters, for operation under DOS.
20230
20231 2002-06-15  Paul Eggert  <eggert@twinsun.com>
20232
20233         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
20234
20235 2002-06-15  Jim Meyering  <meyering@lucent.com>
20236
20237         Work even with DJGPP 2.03, which lacks support for symlinks.
20238         From Richard Dawe.
20239         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
20240         is defined.
20241         * lib/lchown.c (S_ISLNK): Likewise.
20242
20243 2002-06-15  Jim Meyering  <meyering@lucent.com>
20244
20245         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
20246         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
20247         have been included before this file.
20248
20249 2002-06-14  Jim Meyering  <meyering@lucent.com>
20250
20251         * lib/file-type.h: Use the version from diffutils-2.8.2.
20252         * lib/file-type.c: Likewise.
20253
20254 2002-06-07  Jim Meyering  <meyering@lucent.com>
20255
20256         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
20257         They're needed at least for NetBSD 1.5.2.
20258         ($statxfs_includes): Include those same headers.
20259         ($statxfs_includes): Include sys/vfs.h if available.
20260         ($statxfs_includes): Likewise for sys/statvfs.h.
20261         Check for the following members in both structs statfs and statvfs:
20262         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
20263
20264 2002-06-01  Jim Meyering  <meyering@lucent.com>
20265
20266         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
20267         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
20268
20269 2002-05-28  Jim Meyering  <meyering@lucent.com>
20270
20271         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
20272         Reported by Volker Borchert.
20273
20274 2002-05-27  Jim Meyering  <meyering@lucent.com>
20275
20276         Fix a problem seen only on nonconforming systems whereby ls.c's
20277         use of localtime, and then of gettimeofday would cause trouble:
20278         the localtime call used to initialize rpl_gettimeofday's save
20279         mechanism would clobber ls's current local time information so
20280         that in any long listing the first file would always be listed
20281         with date 1970-01-01.  Analysis by Volker Borchert.
20282
20283         * lib/gettimeofday.c (localtime): Undefine.
20284         (rpl_localtime): New function.
20285
20286 2002-05-27  Jim Meyering  <meyering@lucent.com>
20287
20288         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
20289         localtime.
20290
20291         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
20292         use the replacement function; it wouldn't resolve at link time.
20293         Reported by Volker Borchert.
20294
20295 2002-05-22  Jim Meyering  <meyering@lucent.com>
20296
20297         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
20298         file-type.h.
20299         * lib/file-type.h: New file.
20300         * lib/file-type.c (file_type): New file/function.  Extracted from
20301         diffutils.
20302
20303 2002-04-30  Jim Meyering  <meyering@lucent.com>
20304
20305         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
20306
20307 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20308
20309         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
20310
20311 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20312
20313         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
20314         Do not check for alloca.h (no longer used) or stdbool.h (was never
20315         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
20316
20317 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20318
20319         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
20320
20321 2002-04-29  Jim Meyering  <meyering@lucent.com>
20322
20323         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
20324         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
20325         Use AC_FUNC_STRNLEN here instead.
20326
20327         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
20328         With autoconf-2.53a, it's part of AC_PROG_CC.
20329
20330 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20331
20332         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
20333         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
20334
20335 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20336
20337         * lib/sig2str.h, lib/sig2str.c: New files.
20338         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
20339
20340 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20341
20342         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
20343         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
20344         of 127, since 64 is the largest conceivable number for ancient
20345         nonstandard hosts.
20346         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
20347
20348 2002-04-28  Jim Meyering  <meyering@lucent.com>
20349
20350         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
20351
20352 2002-04-24  Jim Meyering  <meyering@lucent.com>
20353
20354         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
20355         (jm_PREREQ): Use it.
20356
20357         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
20358         mach/mach.h fcntl.h.
20359         Check for this function: setlocale.
20360
20361 2002-04-24  Jim Meyering  <meyering@lucent.com>
20362
20363         * lib/gettext.h: New file, from Gettext.
20364         * lib/Makefile.am (INCLUDES): Remove -I../intl.
20365         (libfetish_a_SOURCES): Add gettext.h.
20366
20367 2002-04-16  Jim Meyering  <meyering@lucent.com>
20368
20369         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
20370         ut_pid, ut_id, ut_exit.
20371
20372 2002-04-16  Jim Meyering  <meyering@lucent.com>
20373
20374         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
20375         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
20376         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
20377
20378 2002-04-12  Jim Meyering  <meyering@lucent.com>
20379
20380         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
20381         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
20382         existence of the getmntinfo function.  Needed for Darwin 5.3.
20383
20384         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
20385         This is necessary at least on Darwin 5.3.
20386
20387         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
20388         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
20389         strnlen.o in the library, and that makes some versions of ranlib
20390         object.
20391
20392 2002-04-12  Jim Meyering  <meyering@lucent.com>
20393
20394         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
20395
20396 2002-04-09  Jim Meyering  <meyering@lucent.com>
20397
20398         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
20399         to be more precise.  Rather than saying we're checking whether the
20400         function `works', say what we're testing.
20401         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
20402         Reported by Bruno Haible.
20403
20404 2002-03-10  Jim Meyering  <meyering@lucent.com>
20405
20406         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
20407         Suggestion from Santiago Vila.
20408
20409 2002-03-08  Jim Meyering  <meyering@lucent.com>
20410
20411         * lib/rename.c: Mention that this wrapper is needed also on
20412         mips-dec-ultrix4.4 systems.
20413
20414 2002-03-02  Jim Meyering  <meyering@lucent.com>
20415
20416         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
20417         not HAVE_CLOCK_SETTIME.
20418
20419 2002-02-27  Paul Eggert  <eggert@twinsun.com>
20420
20421         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
20422         Check for clock_settime.
20423
20424 2002-02-27  Paul Eggert  <eggert@twinsun.com>
20425
20426         * lib/nanosleep.h: Rename to....
20427         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
20428
20429         * lib/gettime.c: New file.
20430         * lib/settime.c: New file.
20431         * lib/stime.c: Remove.
20432
20433         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
20434         timespec.h.  Remove nanosleep.h.
20435
20436 2002-02-25  Paul Eggert  <eggert@twinsun.com>
20437
20438         * m4/acl.m4: New file.
20439         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
20440         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
20441
20442 2002-02-25  Paul Eggert  <eggert@twinsun.com>
20443
20444         * lib/acl.c, lib/acl.h: New files.
20445         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
20446
20447 2002-02-24  Jim Meyering  <meyering@lucent.com>
20448
20449         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
20450         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
20451         cause trouble.  Reported by Nelson Beebe.
20452
20453 2002-02-23  Paul Eggert  <eggert@twinsun.com>
20454
20455         * lib/path-concat.c (xpath_concat): Reorder code to pacify
20456         compilers that don't know that xalloc_die never returns.
20457
20458 2002-02-20  Jim Meyering  <meyering@lucent.com>
20459
20460         * lib/getdate.c: Regenerate using bison-1.33.
20461
20462 2002-02-17  Jim Meyering  <meyering@lucent.com>
20463
20464         * config/config.guess (main): Don't use `head -1'; it's no longer
20465         portable. Use `sed 1q' instead.
20466
20467 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
20468
20469         * m4/codeset.m4: Upgrade to gettext-0.11.
20470         * m4/gettext.m4: Upgrade to gettext-0.11.
20471         * m4/glibc21.m4: Upgrade to gettext-0.11.
20472         * m4/iconv.m4: Upgrade to gettext-0.11.
20473         * m4/isc-posix.m4: Upgrade to gettext-0.11.
20474         * m4/lcmessage.m4: Upgrade to gettext-0.11.
20475         * m4/lib-ld.m4: New file, from gettext-0.11.
20476         * m4/lib-link.m4: New file, from gettext-0.11.
20477         * m4/lib-prefix.m4: New file, from gettext-0.11.
20478         * m4/progtest.m4: Upgrade to gettext-0.11.
20479
20480 2002-02-15  Paul Eggert  <eggert@twinsun.com>
20481
20482         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
20483         (jm_PREREQ): Use it.
20484
20485 2002-02-15  Paul Eggert  <eggert@twinsun.com>
20486
20487         * lib/posixver.c, lib/posixver.h: New files.
20488         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
20489
20490 2002-02-02  Paul Eggert  <eggert@twinsun.com>
20491             Bruno Haible  <bruno@clisp.org>
20492
20493         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
20494         (fwrite_success_callback): New declaration.
20495         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
20496         print_unicode_char. Call failure callback instead of error.
20497         (fwrite_success_callback): New function.
20498         (exit_failure_callback): New function.
20499         (fallback_failure_callback): New function.
20500         (print_unicode_char): Call unicode_to_mb.
20501
20502 2002-01-26  Jim Meyering  <meyering@lucent.com>
20503
20504         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
20505         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
20506
20507 2002-01-26  Jim Meyering  <meyering@lucent.com>
20508
20509         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
20510
20511 2002-01-22  Paul Eggert  <eggert@twinsun.com>
20512
20513         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
20514
20515 2002-01-22  Jim Meyering  <meyering@lucent.com>
20516
20517         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
20518         Otherwise, some versions of automake would omit the rule that makes
20519         Makefile from Makefile.in.
20520
20521 2002-01-21  Paul Eggert  <eggert@twinsun.com>
20522
20523         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
20524         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
20525         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
20526         (memcoll): Set errno to zero if there is no error.
20527
20528         * lib/quotearg.c (quotearg_buffer_restyled):
20529         Fix bug with quoting buffers containing NUL when backslashing escapes.
20530         This bug was exposed by the other changes in this patch.
20531         (quotearg_n_options): New arg ARGSIZE.
20532         All callers changed.
20533         (quoting_options_from_style): New function.
20534         (quotearg_n_style): Use it.
20535         (quotearg_n_style_mem): New function.
20536
20537         * lib/quotearg.h (quotearg_n_style_mem): New function.
20538
20539 2002-01-19  Jim Meyering  <meyering@lucent.com>
20540
20541         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
20542         Remove useless quotes: DF_PROG="df".
20543         * m4/strnlen.m4: New file.
20544
20545 2002-01-16  Paul Eggert  <eggert@twinsun.com>
20546
20547         * lib/backupfile.c (ISDIGIT): Comment fix.
20548         * lib/getdate.y (ISDIGIT): Likewise.
20549         * lib/posixtm.c (ISDIGIT, year): Likewise.
20550         * lib/strverscmp.c (ISDIGIT): Likewise.
20551         * lib/userspec.c (ISDIGIT): Likewise.
20552
20553 2002-01-16  Jim Meyering  <meyering@lucent.com>
20554
20555         * lib/getdate.y: Add three semicolons, each just before a closing
20556         brace. Bison (as of version 1.31) no longer papers over that mistake.
20557
20558 2002-01-05  Jim Meyering  <meyering@lucent.com>
20559
20560         * lib/version-etc.c (version_etc_copyright): Update copyright year.
20561
20562 2001-12-19  Paul Eggert  <eggert@twinsun.com>
20563
20564         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
20565         not silently exit merely because the output buffer happens to
20566         have nothing pending.
20567
20568 2001-12-18  Paul Eggert  <eggert@twinsun.com>
20569
20570         See the big note in ../ChangeLog.
20571         * lib/human.c (suffixes): Prefer K to k for 1024.
20572         (generate_suffix_backwards): New function.
20573         (human_readable_inexact): Use it.
20574         * lib/xstrtol.c (__xstrtol): If there is no number but there
20575         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
20576         Accept 'K' as well as 'k'.
20577
20578 2001-12-15  Jim Meyering  <meyering@lucent.com>
20579
20580         * lib/regex.h (__restrict_arr): Update from libc.
20581
20582         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
20583         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
20584         (STREQ): Define.
20585
20586 2001-12-14  Jim Meyering  <meyering@lucent.com>
20587
20588         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
20589         Suggestion from Bruno Haible.
20590
20591 2001-12-10  Jim Meyering  <meyering@lucent.com>
20592
20593         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
20594         xrealloc, Instead, include "xalloc.h".
20595         (initbuffer): Don't cast xmalloc return value to char*.
20596         (readline): Reword comment.
20597         Don't cast xrealloc return value to char*
20598         Return NULL, not 0.
20599
20600 2001-12-09  Jim Meyering  <meyering@lucent.com>
20601
20602         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
20603         about `signed and unsigned type in conditional expression'.
20604         * lib/posixtm.c (posix_time_parse): Likewise.
20605
20606         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
20607
20608         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
20609         to avoid a pedantic warning.
20610
20611         * lib/getstr.c: Don't include assert.h.
20612         (getstr): Remove warning-evoking assertions.
20613         Return -1 if offset parameter is out of bounds.
20614         Change the type of a local from int to size_t.
20615
20616         * lib/strftime.c (my_strftime_localtime_r): Include this function
20617         definition in the `#if ! HAVE_TM_GMTOFF' block.
20618
20619         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
20620         Include xalloc.h instead.
20621
20622 2001-12-02  Jim Meyering  <meyering@lucent.com>
20623
20624         * lib/tempname.c: Don't declare getenv, thus reverting the change of
20625         2001-11-18.  It's no longer necessary, now that stdlib.h is always
20626         included.
20627
20628         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
20629         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
20630
20631 2001-11-30  Akim Demaille  <akim@epita.fr>
20632
20633         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
20634         before being defined.
20635
20636 2001-11-27  Paul Eggert  <eggert@twinsun.com>
20637
20638         * lib/quotearg.h (quotearg_n, quotearg_n_style):
20639         First arg is int, not unsigned.
20640         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20641         (SIZE_MAX, UINT_MAX): New macros.
20642         (quotearg_n_options): Abort if N is negative.
20643         Avoid overflow check on hosts where size_t is 64 bits and int
20644         is 32 bits, as overflow is impossible there.
20645         Fix off-by-one typo that caused unnecessary reallocation.
20646
20647 2001-11-27  Jim Meyering  <meyering@lucent.com>
20648
20649         * lib/tempname.c: Merge with version from libc.
20650         * lib/regex.c: Likewise.
20651
20652         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
20653         systems for which STDC_HEADERS is 0, it was not included, resulting in
20654         a warning about an integer-to-pointer conversion problem with getenv.
20655         Reported by Volker Borchert.
20656
20657 2001-11-26  Jim Meyering  <meyering@lucent.com>
20658
20659         * lib/gtod.h: Remove file.
20660         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
20661         * lib/gettimeofday.c: Don't include gtod.h.
20662         (GTOD_init): Remove function.
20663         (rpl_gettimeofday): Do its job here instead, rather than aborting.
20664         Suggestion from Volker Borchert.
20665
20666 2001-11-23  Jim Meyering  <meyering@lucent.com>
20667
20668         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
20669         it.
20670         * lib/hash.c (struct hash_table): Define it here instead.
20671
20672 2001-11-22  Jim Meyering  <meyering@lucent.com>
20673
20674         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
20675
20676 2001-11-20  Jim Meyering  <meyering@lucent.com>
20677
20678         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
20679         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
20680
20681 2001-11-19  Jim Meyering  <meyering@lucent.com>
20682
20683         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
20684         directory.  Use "conftestXXXXXX" as the template.
20685         Suggestion from Paul Eggert.
20686
20687         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
20688         immediately, so the test doesn't mistakenly hit the max-open-files
20689         limit.
20690
20691 2001-11-18  Paul Eggert  <eggert@twinsun.com>
20692
20693         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
20694         (TEMPORARIES): New macro.
20695         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
20696         removes an artificial limitation (e.g. HP-UX 10.20, where
20697         TMP_MAX is 17576).
20698
20699 2001-11-18  Jim Meyering  <meyering@lucent.com>
20700
20701         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
20702
20703 2001-11-18  Jim Meyering  <meyering@lucent.com>
20704
20705         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
20706         on SunOS 4.
20707
20708         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
20709         files will be created before anything else.
20710
20711 2001-11-17  Paul Eggert  <eggert@twinsun.com>
20712
20713         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
20714         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
20715
20716 2001-11-17  Jim Meyering  <meyering@lucent.com>
20717
20718         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
20719         Prompted by a report from Bob Proulx.
20720
20721         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
20722         Instead, require UTILS_FUNC_MKSTEMP.
20723
20724 2001-11-17  Jim Meyering  <meyering@lucent.com>
20725
20726         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
20727         Now, that's done as part of AC_FUNC_STRTOD.
20728
20729 2001-11-17  Jim Meyering  <meyering@lucent.com>
20730
20731         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
20732         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
20733         rather than group writable.  Patch by Juan F. Codagnone.
20734
20735         * lib/readtokens.c: Remove explicit declarations of xmalloc and
20736         xrealloc, Instead, include "xalloc.h".
20737
20738         * lib/mountlist.c: Include unlocked-io.h after all system headers.
20739         Remove explicit declarations of xmalloc, xrealloc,
20740         and xstrdup.  Instead, include "xalloc.h".
20741
20742         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
20743         unlocked-io.h.
20744         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
20745         Likewise.
20746         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
20747
20748         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
20749         Reported by Padraig Brady.
20750
20751         * lib/mkstemp.c: #undef mkstemp.
20752         Include config.h.
20753         (rpl_mkstemp): Rename from mkstemp.
20754         Protoize.
20755
20756 2001-11-16  Jim Meyering  <meyering@lucent.com>
20757
20758         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
20759         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
20760         determine the amount of total physical memory, use pstat_getstatic.
20761         HPUX-11 doesn't define _SC_PHYS_PAGES.
20762         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
20763         If sysconf couldn't be used to determine the amount of available
20764         physical memory, use both pstat_getstatic and pstat_getdynamic.
20765         Based on a patch from Bob Proulx.
20766
20767 2001-11-10  Jim Meyering  <meyering@lucent.com>
20768
20769         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
20770         (jm_PREREQ): Use it.
20771
20772 2001-11-09  Jim Meyering  <meyering@lucent.com>
20773
20774         * m4/jm-macros.m4: Require autoconf-2.52f.
20775         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
20776         Use these AC_-prefixed names, not the AM_-prefixed ones.
20777
20778         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
20779
20780 2001-11-05  Jim Meyering  <meyering@lucent.com>
20781
20782         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
20783
20784 2001-11-04  Jim Meyering  <meyering@lucent.com>
20785
20786         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
20787         $DEFS.
20788
20789 2001-11-03  Jim Meyering  <meyering@lucent.com>
20790
20791         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
20792         of AC_DEFUN.
20793
20794         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
20795         know the name of the variable in the macro definition.
20796
20797 2001-11-03  Jim Meyering  <meyering@lucent.com>
20798
20799         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
20800         in argmatch_to_argument call.
20801
20802         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
20803         argument.
20804
20805         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
20806         e.g., a fault due to an attempt to free a NULL pointer.
20807
20808 2001-11-01  Jim Meyering  <meyering@lucent.com>
20809
20810         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
20811         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
20812
20813 2001-11-01  Jim Meyering  <meyering@lucent.com>
20814
20815         * lib/dirfd.c, lib/dirfd.h: New files.
20816         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
20817
20818         * lib/hash.c (hash_print) [TESTING]: Clean up.
20819
20820 2001-10-22  Paul Eggert  <eggert@twinsun.com>
20821
20822         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
20823         to avoid a warning if -Wall.
20824
20825 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
20826
20827         * README: New file
20828         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
20829         (per RMS's instructions, this is now the canonical source)
20830         * lgpl/, gpl/: New directories.
20831
20832 2001-10-21  Paul Eggert  <eggert@twinsun.com>
20833
20834         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
20835
20836 2001-10-21  Jim Meyering  <meyering@lucent.com>
20837
20838         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
20839         this code would end up calling gettext even in packages built
20840         with --disable-nls.
20841         * lib/getopt.c (_): Likewise.
20842         * lib/regex.c (_): Likewise.
20843
20844 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20845
20846         * m4/error.m4 (jm_PREREQ_ERROR):
20847         Do not invoke AC_CHECK_FUNCS with strerror_r, as
20848         AC_FUNC_STRERROR_R does that.
20849         Check for strerror declaration.
20850
20851         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
20852         are supposed to have them these days.
20853         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
20854         Merge changes from latest Autoconf CVS.
20855         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
20856         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
20857         POSIX decided to standardize on the int flavor of strerror_r.
20858
20859 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20860
20861         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
20862         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
20863         Use strerror_r that is only a macro, even if it is not a function.
20864         (strerror): Check for HAVE_DECL_STRERROR before declaring.
20865         (private_strerror): Use prototypes, not old-style function definition.
20866         (print_errno_message): New function.
20867         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
20868         char*-flavored one.
20869         (error_tail, error, error_at_line): Use it.
20870
20871 2001-10-11  Jim Meyering  <meyering@lucent.com>
20872
20873         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
20874         and quote_n (1, ... to avoid clobbering a buffer.
20875
20876 2001-10-05  Jim Meyering  <meyering@lucent.com>
20877
20878         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
20879         hash-pjw.h.
20880         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
20881         * lib/hash-pjw.h: New file.
20882
20883 2001-09-30  Jim Meyering  <meyering@lucent.com>
20884
20885         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
20886         `struct fsstat' has the `f_fstypename' member.
20887         Use that to define FS_TYPE, which is now used to make
20888         the getfsstat link test tighter.
20889
20890 2001-09-30  Jim Meyering  <meyering@lucent.com>
20891
20892         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
20893         Include <sys/ucred.h>, for Apple Darwin.
20894         Include sys/mount.h and sys/fs_types.h only if available.
20895         (FS_TYPE): Define.
20896         (read_filesystem_list): Use FS_TYPE.
20897
20898 2001-09-29  Paul Eggert  <eggert@twinsun.com>
20899
20900         * lib/exclude.c (excluded_filename): 0 -> false, since it's
20901         a boolean context.
20902
20903 2001-09-29  Jim Meyering  <meyering@lucent.com>
20904
20905         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20906         [one-argument getmntent function]): Include stdio.h before mntent.h.
20907         SunOS 4.1.x needs it for the declaration of `FILE'.
20908         Patch by Volker Borchert.
20909
20910         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20911         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
20912         sys/fs_types.h, and make the link-test for getfsstat guard #include
20913         directives with appropriate #if HAVE_*_H tests so that we can
20914         detect getfsstat on Apple Darwin1.3.7 systems.
20915         Reported by Nelson Beebe.
20916         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
20917
20918 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20919
20920         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20921         #defines strtoimax.  Also treat the other strto* functions
20922         like strtoimax.
20923
20924         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
20925         Check for strtoul and strtoumax,
20926         as those declarations are made even in the signed case.
20927         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
20928         Likewise, for strtol and strtoimax.
20929
20930 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20931
20932         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20933         #defines strtoimax.  Also treat the other strto* functions
20934         like strtoimax.
20935
20936         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
20937         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
20938         (strtoimax, strtoumax): Do not declare if already defined as a macro.
20939
20940 2001-09-26  Jim Meyering  <meyering@lucent.com>
20941
20942         Most macros in unlocked-io.h had the wrong number of arguments.
20943         * lib/gen-uio: New script.
20944         (USE_UNLOCKED_IO): Define to 1 if not already defined.
20945         * lib/unlocked-io.hin: Remove file.
20946         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
20947         rather than trying to embed it here.
20948         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
20949         Reported by Padraig Brady.
20950
20951 2001-09-25  Volker Borchert  <bt@teknon.de>
20952
20953         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
20954         `result'.
20955
20956 2001-09-24  Jim Meyering  <meyering@lucent.com>
20957
20958         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
20959
20960 2001-09-23  Jim Meyering  <meyering@lucent.com>
20961
20962         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
20963         instead of the mere test for existence of mntent.h.  The latter
20964         would get a false-positive on AIX 3.4 systems.
20965         In the outer getmntent if-block, don't die if neither of the getmntent
20966         tests succeeds.  Instead, just fall through and continue with the
20967         remaining tests.
20968
20969 2001-09-23  Jim Meyering  <meyering@lucent.com>
20970
20971         * lib/mountlist.c: Remove useless parentheses in #if directives.
20972         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
20973         the deprecated MOUNTED symbol is no longer defined in mntent.h.
20974
20975 2001-09-22  Jim Meyering  <meyering@lucent.com>
20976
20977         * m4/gettext.m4: New file.  From gettext.
20978         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
20979         * m4/progtest.m4: Likewise
20980         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
20981         * m4/glibc21.m4: Likewise.
20982
20983         * m4/libintl.m4: Remove.  No longer used.
20984
20985 2001-09-22  Jim Meyering  <meyering@lucent.com>
20986
20987         * lib/localcharset.c: Update from latest gettext.
20988         * lib/config.charset: Likewise.
20989
20990 2001-09-20  Jim Meyering  <meyering@lucent.com>
20991
20992         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
20993         strtoimax.
20994         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
20995         strtoumax.
20996
20997 2001-09-20  Jim Meyering  <meyering@lucent.com>
20998
20999         * lib/xstrtol.c (strtoimax): Guard declaration with
21000         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
21001         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
21002         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
21003         (strtoumax): Likewise, for completeness (it wasn't necessary).
21004
21005 2001-09-17  Paul Eggert  <eggert@twinsun.com>
21006
21007         * lib/strtoimax.c (HAVE_LONG_LONG):
21008         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
21009         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
21010         to work around bug in IBM C compiler.
21011
21012 2001-09-17  Jim Meyering  <meyering@lucent.com>
21013
21014         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
21015         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
21016         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
21017         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
21018         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
21019         whenever the right hand side need not be expanded by the shell.
21020
21021 2001-09-16  Paul Eggert  <eggert@twinsun.com>
21022
21023         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
21024         library.  It's not correct, as some older glibcs are buggy.
21025         fnmatch wasn't fixed until glibc 2.2.
21026
21027         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
21028         special shell magic here.
21029
21030 2001-09-16  Jim Meyering  <meyering@lucent.com>
21031
21032         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
21033         * m4/jm-macros.m4: Require it.
21034
21035 2001-09-16  Jim Meyering  <meyering@lucent.com>
21036
21037         * lib/mkdir.c: New file.
21038
21039 2001-09-15  Jim Meyering  <meyering@lucent.com>
21040
21041         * m4/jm-macros.m4: Check for help2man.
21042
21043 2001-09-11  Jim Meyering  <meyering@lucent.com>
21044
21045         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
21046         The body, by Paul Eggert, was moved here from configure.in.
21047         * m4/jm-macros.m4: Require UTILS_HOST_OS.
21048
21049 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21050
21051         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
21052         (jm_PREREQ): Use it.
21053
21054 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21055
21056         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
21057         Use ssize_t, not int, to store result of readlink.
21058         Check for ssize_t overflow as well as size_t overflow,
21059         as POSIX says the result of readlink is implementation-defined
21060         when ssize_t overflows.
21061         Remove unnecessary cast to char*.
21062         Use free+malloc instead of realloc, as the storage doesn't need
21063         to be preserved and it's clearer and can be more efficient that way.
21064         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
21065         * lib/xreadlink.h (xreadlink): Update prototype.
21066
21067 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21068
21069         * lib/xgetcwd.c: Revert some of the previous change; intead,
21070         fix the HAVE_GETCWD_NULL code to behave more like the
21071         !HAVE_GETCWD_NULL code used to.
21072
21073         Include "xalloc.h".
21074         (xgetcwd): Do not return NULL when memory is exhausted; instead,
21075         invoke xalloc_die.
21076
21077 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21078
21079         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
21080         sys/param.h, as pathmax.h includes them.
21081
21082 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21083
21084         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
21085         (jm_PREREQ_XGETCWD): New macro.
21086
21087         * m4/getcwd.m4: New file.
21088
21089 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21090
21091         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
21092         like the HAVE_GETCWD_NULL code.
21093         Include pathmax.h if not HAVE_GETCWD.
21094         Do not include xalloc.h.
21095         (INITIAL_BUFFER_SIZE): New symbol.
21096         Do not use xmalloc / xrealloc, since the caller is responsible for
21097         handling errors.  Preserve errno around `free' during failure.
21098         Do not overrun buffer when using getwd.
21099
21100 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21101
21102         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
21103         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
21104         getcwd (NULL, 0).
21105
21106 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21107
21108         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
21109         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
21110         spotted by Jim Meyering.
21111
21112 2001-09-03  Jim Meyering  <meyering@lucent.com>
21113
21114         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
21115         failure.
21116
21117 2001-09-02  Jim Meyering  <meyering@lucent.com>
21118
21119         * lib/error.c: Update from GNU libc.
21120
21121 2001-09-01  Jim Meyering  <meyering@lucent.com>
21122
21123         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
21124         Used by df.
21125
21126 2001-09-01  Jim Meyering  <meyering@lucent.com>
21127
21128         * lib/xreadlink.c: New file.
21129         * lib/xreadlink.h: New file.
21130         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
21131         xreadlink.h.
21132
21133         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
21134         doesn't conflict with sparc Solaris 7's definition in
21135         /usr/include/sys/int_types.h.
21136
21137         * lib/exclude.c: Use `""', not `<>' to #include non-system header
21138         files.
21139         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
21140         and strncasecmp as r-values.  Unixware didn't have declarations.
21141
21142 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21143
21144         * lib/xstrtol.h: Add copyright notice.
21145         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
21146         LONGINT_INVALID_SUFFIX_CHAR.
21147
21148 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21149
21150         * lib/xstrtol.c (strtoimax): New decl.
21151
21152 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21153
21154         * lib/xgetcwd.c: Don't include pathmax.h.
21155         Include stdlib.h and unistd.h if available.
21156         Include xalloc.h.
21157         (xmalloc, xstrdup, free): Remove decls.
21158         (xgetcwd): Don't assume sizes fit in unsigned.
21159         Check for overflow when computing sizes.
21160         Simplify reallocation code.
21161
21162 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21163
21164         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
21165         a directory's st_size can have an arbitrary value, so the old
21166         usage could waste an arbitrary amount of memory.  All uses
21167         changed.
21168         * lib/savedir.h: Update prototype.
21169
21170 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21171
21172         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
21173
21174         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
21175         old strtoimax.c.
21176
21177         Also, make the following further changes to make this file's
21178         configuration more similar to that of strtol.c:
21179         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
21180         (strtoumax, uintmax_t, strtoull, strtol): Remove.
21181         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
21182         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
21183         changed to signed values.
21184
21185         And make the following changes as well:
21186         Fix copyright notice, as 1999 was missing.
21187         (verify): New macro.
21188         (strtoimax): Check sizes at compile-time, not run-time.
21189         Prefer strtol to strtoll if both work.
21190         (main): Remove; it was not that useful and was a pain to maintain.
21191
21192         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
21193
21194 2001-08-31  Jim Meyering  <meyering@lucent.com>
21195
21196         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
21197         Use an initial, malloc'd, buffer of length 128 rather than
21198         a statically allocated one of length 1024.
21199
21200 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21201
21202         Simplify code, partly by assuming autoconf 2.52 semantics.
21203
21204         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
21205
21206         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
21207         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
21208         All uses removed.
21209         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
21210         Move AC_REQUIRE to next-to-top level, to avoid confusion.
21211         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
21212         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
21213         jm_AC_HEADER_INTTYPES_H.
21214         * m4/jm-macros.m4 (jm_MACROS): Likewise.
21215
21216         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
21217
21218         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
21219         Quote first arg of AC_DEFUN.
21220         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
21221         since they are needed to parse the include file even if we need
21222         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
21223         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
21224         but with opposite signedness.
21225
21226 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21227
21228         Merge 'exclude' changes from tar 1.13.22.
21229         This fixes one or two unlikely storage allocation overflow bugs,
21230         but doesn't change user-visible behavior otherwise.
21231
21232 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21233
21234         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
21235         (jm_PREREQ_EXCLUDE): New macro.
21236
21237 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21238
21239         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21240         tm to be declared.
21241
21242 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21243
21244         * lib/hash.c: Remove '2001' from copyright notice.
21245
21246 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21247
21248         * lib/full-write.h: New file.
21249         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
21250         * lib/full-write.c: Correct credits, as cccp.c no longer
21251         exists and anyway it was so heavily changed from the old cccp
21252         code as to be unrecognizable.  Include full-write.h.
21253         (full_write) Return size_t, with short writes meaning failure.
21254         All callers changed.  This fixes a bug with large buffers
21255         on 64-bit hosts.
21256         * lib/utime.c: Include full-write.h.
21257
21258 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21259
21260         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
21261         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
21262         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
21263         Include if available.
21264         (<xalloc.h>): Include
21265         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
21266         (verify): New macro.  Use it to verify that EXCLUDE macros do not
21267         collide with FNM macros.
21268         (struct patopts): New struct.
21269         (struct exclude): Use it, as exclude patterns now come with options.
21270         (new_exclude): Support above changes.
21271         (new_exclude, add_exclude_file):
21272         Initial size must now be a power of two to simplify overflow checking.
21273         (free_exclude, fnmatch_no_wildcards): New function.
21274         (excluded_filename): No longer requires options arg, as the options
21275         are determined by add_exclude.  Now returns bool, not int.
21276         (excluded_filename, add_exclude):
21277         Add support for the fancy new exclusion options.
21278         (add_exclude, add_exclude_file): Now takes int options arg.
21279         Check for arithmetic overflow when computing sizes.
21280         (add_exclude_file): xrealloc might modify errno, so don't
21281         realloc until after errno might be used.
21282
21283         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
21284         New macros.
21285         (free_exclude): New decl.
21286         (add_exclude, add_exclude_file): Now takes int options arg.
21287         (excluded_filename): No longer requires options arg, as the options
21288         are determined by add_exclude.  Now returns bool, not int.
21289
21290 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21291
21292         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
21293
21294 2001-08-27  Jim Meyering  <meyering@lucent.com>
21295
21296         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
21297
21298         * lib/version-etc.c (N_): Remove definition.
21299         Revert most of last change.
21300         Instead, simply don't mark the `Copyright...' string for translation.
21301         Based on advice from Paul Eggert.
21302
21303         * lib/strtoxmax.c: Tweak comment.
21304
21305 2001-08-26  Jim Meyering  <meyering@lucent.com>
21306
21307         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
21308
21309         * m4/xstrtoimax.m4: New file.
21310         * m4/xstrtoumax.m4: Add comments explaining why we
21311         AC_REPLACE_FUNCS(strtol).
21312
21313 2001-08-26  Jim Meyering  <meyering@lucent.com>
21314
21315         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
21316         of copyright with `%s' so translators don't get an untranslated
21317         message in 2002.
21318         (COPYRIGHT_YEAR): Define.
21319         (version_etc): Use fprintf rather than fputs.
21320         Suggestion from Ulrich Drepper.
21321
21322         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
21323
21324         * lib/strtoll.c: New file, from GNU libc.
21325         * lib/xstrtoimax.c: New file.
21326
21327         * lib/xstrtol.h: Add xstrtoimax.
21328         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
21329         * lib/strtoimax.c: New file.  Likewise, but first define
21330         STRTOUXMAX_SIGNED.
21331
21332         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
21333         ...
21334         * lib/strtoxmax.c: ... then renamed to this.
21335
21336 2001-08-18  Paul Eggert  <eggert@twinsun.com>
21337
21338         * m4/inttypes.m4: Add AC_PREREQ(2.13).
21339         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
21340         (jm_AC_TYPE_INTMAX_T): New macro.
21341         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
21342
21343         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
21344
21345         * m4/longlong.m4: Renamed from ulonglong.m4.
21346         * m4/inttypes.m4: Renamed from inttypes_h.m4.
21347         * m4/uintmax_t.m4: Removed.
21348
21349 2001-08-13  Paul Eggert  <eggert@twinsun.com>
21350
21351         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
21352         Port to Solaris 8, where 'sed' requires a space after the 'r'
21353         command, and where sh dislikes "$/".  Clean up the spacing a bit.
21354         Redirect output to $tmp just once.
21355
21356 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
21357
21358         * lib/addext.c (<errno.h>): Include.
21359         (errno): Declare if not defined.
21360         (addext): Work correctly when pathconf returns -1 and leaves
21361         errno alone because there is no limit.  Also, work even if
21362         pathconf returns a value greater than SIZE_MAX.
21363
21364 2001-08-12  Jim Meyering  <meyering@lucent.com>
21365
21366         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
21367         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
21368         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
21369         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
21370         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
21371         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
21372         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
21373         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
21374         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
21375         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
21376         utime.m4, utimes.m4, xstrtoumax.m4:
21377         Quote the first argument in each use of AC_DEFUN.
21378
21379 2001-08-12  Jim Meyering  <meyering@lucent.com>
21380
21381         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
21382         Simply `return getcwd (NULL, 0);'.
21383         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
21384         Use 1300 as initial value for length, not PATH_MAX.
21385
21386         * lib/pathmax.h: Clean up cpp syntax.
21387
21388 2001-08-12  Jim Meyering  <meyering@lucent.com>
21389
21390         * lib/gettimeofday.c: New file.
21391         * lib/gtod.h: New file.
21392         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
21393
21394 2001-08-05  Jim Meyering  <meyering@lucent.com>
21395
21396         * m4/jm-macros.m4: Require autoconf-2.52.
21397
21398 2001-08-04  Jim Meyering  <meyering@lucent.com>
21399
21400         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
21401         stmt, to get in sync with glibc.
21402
21403 2001-08-03  Paul Eggert  <eggert@twinsun.com>
21404
21405         The following changes are from gettext 0.10.39 as maintained by
21406         Bruno Haible.
21407
21408         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
21409         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
21410         with inverted sense.  All uses changed.
21411
21412         * lib/mbswidth.c: Don't include <limits.h>.
21413         Include <stdlib.h> and <string.h> unconditionally.
21414         (iswcntrl, mbsinit, ISCNTRL): New macros.
21415         (mbsnwidth): Use K&R style function declarations.
21416         Don't bother checking for MB_LEN_MAX == 1, since the compiler
21417         can optimize it when MB_CUR_MAX == 1.
21418         The width of control characters is zero, not 1.
21419
21420 2001-08-03  Paul Eggert  <eggert@twinsun.com>
21421
21422         The following changes are from gettext 0.10.39 as maintained by
21423         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
21424
21425         * m4/codeset.m4: Upgrade to serial AM1.
21426         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
21427         all uses changed.  Quote first arg of AC_DEFUN.
21428         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
21429
21430         * m4/iconv.m4: Upgrade to serial AM2.
21431         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
21432         Add --with-libconv-prefix.
21433         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
21434         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
21435         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
21436         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
21437         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
21438
21439         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
21440         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
21441         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
21442         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
21443         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
21444         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
21445         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
21446         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
21447         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
21448
21449         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
21450         string.h any more.
21451
21452         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
21453         not the default value.
21454
21455         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
21456         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
21457         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
21458         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
21459         Also check for iswcntrl, used for wcwidth fallback.
21460         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
21461         to Autoconf 2.13.
21462
21463 2001-08-03  Jim Meyering  <meyering@lucent.com>
21464
21465         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
21466         as it was in the original.  Reported by Paul Eggert.
21467
21468 2001-07-16  Jim Meyering  <meyering@lucent.com>
21469
21470         * m4/gettimeofday.m4: New file.
21471         Prompted by a report from Bernhard Baehr.
21472
21473 2001-07-15  Jim Meyering  <meyering@lucent.com>
21474
21475         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
21476         stuff. Now it's in ../Makefile.cfg.
21477
21478 2001-07-15  Jim Meyering  <meyering@lucent.com>
21479
21480         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
21481         (BUILT_SOURCES): Add unlocked-io.h.
21482         (io_functions): Define.
21483         (unlocked-io.h): New rule.
21484         (DISTCLEANFILES): Add unlocked-io.h.
21485         (all-local): Depend on unlocked-io.h, to ensure it is created.
21486
21487         * lib/unlocked-io.hin: New file
21488
21489         * lib/regex.c: Update from glibc.
21490
21491 2001-07-05  Jim Meyering  <meyering@lucent.com>
21492
21493         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
21494         recommendation.
21495         (libfetish_a_SOURCES): Put all .h files here instead.
21496         Remove a thus-exposed (better checks in automake) duplicate and
21497         two unnecessary .h files.
21498
21499 2001-07-04  Jim Meyering  <meyering@lucent.com>
21500
21501         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
21502         that generates jm-glibc-io.m4 so that it doesn't trigger any make
21503         distcheck failure.
21504
21505 2001-07-02  Jim Meyering  <meyering@lucent.com>
21506
21507         The following changes were prompted by suggestions from Bruno Haible.
21508
21509         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
21510         is now generated.
21511         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
21512         definition of EXTRA_DIST.
21513         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
21514         ensure that the generated file is created/updated whenever the list
21515         of $(unlocked_functions) is changed.
21516         (jm-glibc-io.m4): New rule.
21517         (unlocked-io.h): New rule -- currently unused.
21518
21519 2001-06-24  Jim Meyering  <meyering@lucent.com>
21520
21521         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
21522         unmatched right bracket, rather than kludging it with an extra,
21523         falsely-matching quote in a comment.  Patch by Akim Demaille.
21524
21525 2001-06-11  Jim Meyering  <meyering@lucent.com>
21526
21527         * lib/regex.c: Update from GNU libc.
21528
21529 2001-05-27  Jim Meyering  <meyering@lucent.com>
21530
21531         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
21532         Check for ut_type in struct utmp.
21533
21534 2001-05-27  Jim Meyering  <meyering@lucent.com>
21535
21536         * lib/readutmp.h (UT_TYPE): Define.
21537
21538 2001-05-24  Jim Meyering  <meyering@lucent.com>
21539
21540         * lib/argmatch.c: Include "quote.h".
21541         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
21542         quote function.  Reported by Göran Uddeborg.
21543
21544 2001-05-22  Jim Meyering  <meyering@lucent.com>
21545
21546         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
21547         now that we use the package-supplied version unconditionally.
21548         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
21549
21550 2001-05-21  Jim Meyering  <meyering@lucent.com>
21551
21552         * m4/regex.m4: Change a couple backticks to single quotes to avoid
21553         shell syntax errors.
21554
21555 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
21556
21557         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
21558
21559 2001-05-20  Paul Eggert  <eggert@twinsun.com>
21560
21561         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
21562         Don't bother to check library strftime, since
21563         we'll be using our own my_strftime function anyway.
21564         Define my_strftime instead of strftime.
21565
21566 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
21567
21568         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
21569         which is not yet declared.
21570
21571 2001-05-15  Jim Meyering  <meyering@lucent.com>
21572
21573         * m4/regex.m4: Use proper quoting so brackets appear in the test
21574         program.
21575         Reported by, and with help from, Bruno Haible.
21576
21577 2001-05-13  Jim Meyering  <meyering@lucent.com>
21578
21579         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
21580         undefined.
21581
21582 2001-05-11  Paul Eggert  <eggert@twinsun.com>
21583
21584         dirname code cleanup.  base_name now behaves more compatibly
21585         with POSIX basename when given file names that have trailing
21586         slashes, and similarly for dir_name.  Add new primitives
21587         base_len and dir_len.  Put the directory-name-related decls
21588         into dirname.h.
21589
21590         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
21591         * lib/backupfile.c (base_name): Likewise.
21592         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
21593         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
21594         * lib/makepath.c (strip_trailing_slashes): Likewise.
21595         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
21596         ISSLASH): Likewise.
21597         * lib/rename.c (strip_trailing_slashes): Likewise.
21598         * lib/same.c (base_name): Likewise.
21599         * lib/stripslash.c (ISSLASH): Likewise.
21600
21601         * lib/addext.c: Include <dirname.h> after size_t is defined.
21602         * lib/backupfile.c: Likewise.
21603
21604         * lib/addext.c (addext): Use base_len to trim redundant
21605         trailing slashes instead of doing it ourselves.
21606         But do not trim the last slash if it is not redundant.
21607
21608         * lib/backupfile.c (find_backup_file_name,
21609         max_backup_version): Use base_len instead of rolling it ourselves.
21610         Handle the case of "" and (on DOS) "C:" correctly.
21611
21612         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
21613         needed. Include <string.h>, <dirname.h>.
21614         (base_name): Allow file names ending in slashes, other than names
21615         that are all slashes.  In this case, return the basename followed
21616         by the slashes.  This is more general, and can be used in places
21617         where the original base_name purposely had an assertion failure.
21618         (base_len): New function.
21619
21620         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
21621         Do not include <assert.h>; no longer needed.
21622         Include xalloc.h.
21623         (memrchr): Remove decl.
21624         (dir_name_r): Remove.
21625         (dir_len): Renamed from dirlen.  All callers changed.
21626         Rewrite in terms of base_name, for simplicity and consistency.
21627         (dir_name): Never return NULL.  All callers changed.
21628         Do not include <stdlib.h> in test program; no longer needed.
21629         return 0; is fine for test program.
21630
21631         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
21632         New macros.
21633         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
21634
21635         * lib/path-concat.c (path_concat): Use base_len to compute
21636         base length, not strlen; this means we cannot rely on memcpy
21637         to null-terminate.
21638
21639         * lib/same.c (STREQ): Remove.
21640         (same_name): Handle the case where the basename ends in trailing '/'.
21641
21642         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
21643         a slash was stripped.  Do not strip the last slash after a
21644         file system prefix.
21645
21646 2001-05-11  Paul Eggert  <eggert@twinsun.com>
21647
21648         * lib/Makefile.am (libfetish_a_SOURCES):
21649         Add strftime.c, since we now compile it on all hosts.
21650
21651         * lib/strftime.c (my_strftime):
21652         Define to nstrftime if emacs, but only if my_strftime is not defined.
21653         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
21654         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
21655         Add one more extra argument: a nanoseconds value.
21656         All uses changed.
21657         (ns): New macro.
21658         (my_strftime function): Add %N format.
21659         (emacs_strftimeu): Renamed from emacs_strftime,
21660         with extra ut argument.
21661
21662 2001-05-09  Paul Eggert  <eggert@twinsun.com>
21663
21664         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
21665
21666 2001-04-21  Jim Meyering  <meyering@lucent.com>
21667
21668         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
21669         doesn't interfere.
21670
21671 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
21672
21673         * m4/ftruncate.m4: Check for chsize.
21674         Link with ftruncate.o unconditionally if ftruncate is missing.
21675         This was required when cross-compiling to i586-mingw32msvc.
21676
21677 2001-04-08  Jim Meyering  <meyering@lucent.com>
21678
21679         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
21680         recomputed; that's necessary when the offset spans a DST transition.
21681         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
21682
21683 2001-04-02  Jim Meyering  <meyering@lucent.com>
21684
21685         * lib/regex.h, regex.c: Update from GNU libc.
21686
21687 2001-03-24  Jim Meyering  <meyering@lucent.com>
21688
21689         * m4/jm-macros.m4: Require autoconf-2.49d.
21690
21691 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
21692
21693         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
21694
21695 2001-03-19  Paul Eggert  <eggert@twinsun.com>
21696
21697         * lib/version-etc.c (version_etc_copyright): Update to 2001.
21698
21699 2001-03-17  Jim Meyering  <meyering@lucent.com>
21700
21701         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
21702         now that the version in autoconf is equivalent.
21703         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
21704
21705         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
21706         Suggestion from Akim Demaille.
21707
21708         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
21709         (jm_PREREQ_TEMPNAME): New function.
21710
21711 2001-03-16  Paul Eggert  <eggert@twinsun.com>
21712
21713         * lib/tempname.c (uint64_t): Define to uintmax_t if
21714         not defined, and if UINT64_MAX is not defined.
21715         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
21716         Reported by John David Anglin.
21717
21718 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
21719
21720         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
21721         resolve alias if codeset is empty.
21722         * lib/config.charset (BeOS): Use wildcard syntax.
21723
21724 2001-03-13  Jim Meyering  <meyering@lucent.com>
21725
21726         * lib/path-concat.c (path_concat)
21727         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
21728         concatenating e.g., `C:' and `foo'.
21729         From Bruno Haible.
21730
21731 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
21732
21733         * lib/localcharset.c (locale_charset): Don't use
21734         setlocale(LC_CTYPE,NULL). Don't return NULL.
21735         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
21736
21737 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
21738
21739         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
21740         support for DOS/DJGPP.
21741
21742 2001-03-01  Paul Eggert  <eggert@twinsun.com>
21743
21744         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
21745         lacks mkstemp.  Compile our own tempname.c if we compile our own
21746         mkstemp.c, as mkstemp relies on tempname.
21747
21748 2001-03-01  Jim Meyering  <meyering@lucent.com>
21749
21750         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
21751         AH_VERBATIM really does output its argument verbatim.
21752
21753 2001-02-28  Paul Eggert  <eggert@twinsun.com>
21754
21755         * lib/Makefile.am (libfetish_a_SOURCES):
21756         Add dup-safer.c, fopen-safer.c.
21757         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
21758
21759         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
21760         * lib/unistd-safer.h: New files.
21761
21762 2001-02-25  Paul Eggert  <eggert@twinsun.com>
21763
21764         The mkstemp replacement is taken from glibc 2.2.2, with some
21765         portability fixes for use outside glibc, as follows:
21766
21767         * lib/tempname.c (struct_stat64): New macro.
21768         (direxists, __gen_tempname): Use it.
21769         This avoids a portability problem with Solaris 8.
21770
21771         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
21772         (<stddef.h>, <stdint.h>, <string.h>):
21773         Include only if STDC_HEADERS || _LIBC.
21774         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
21775         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
21776         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
21777         (__set_errno): Define this macro if <errno.h> doesn't.
21778         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
21779         Define these macros if <stdio.h> doesn't.
21780         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
21781         Define these macros if <sys/stat.h>
21782         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
21783         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
21784         __xstat64): Define if not _LIBC.
21785         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
21786         (__gen_tempname): Invoke gettimeofday only if
21787         HAVE_GETTIMEOFDAY || _LIBC;
21788         otherwise, fall back on plain "time".
21789         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
21790
21791         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
21792
21793         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
21794
21795 2001-02-18  Paul Eggert  <eggert@twinsun.com>
21796
21797         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
21798
21799 2001-02-17  Paul Eggert  <eggert@twinsun.com>
21800
21801         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
21802         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
21803         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
21804         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21805
21806 2001-02-17  Paul Eggert  <eggert@twinsun.com>
21807
21808         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
21809         Remove workaround macros for hosts that have mbrtowc but not
21810         mbstate_t, as we now insist on proper declarations for both
21811         before using mbrtowc.
21812
21813 2001-02-17  Jim Meyering  <meyering@lucent.com>
21814
21815         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
21816         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
21817         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
21818         UnixWare 7.1.1.
21819
21820         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
21821         rather than AC_CACHE_VAL.
21822
21823 2001-02-17  Jim Meyering  <meyering@lucent.com>
21824
21825         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
21826         around included file name.
21827
21828         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
21829
21830         * lib/strftime.c: Update from GNU libc (the only changes were to
21831         comments).
21832
21833 2001-02-17  Jim Meyering  <meyering@lucent.com>
21834
21835         * lib/regex.c: Update from libc.
21836
21837 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
21838
21839         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
21840         clash.
21841
21842 2001-02-16  Paul Eggert  <eggert@twinsun.com>
21843
21844         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
21845         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
21846         Reported by Mark Hounschell via Paul Eggert.
21847
21848 2001-02-07  Jim Meyering  <meyering@lucent.com>
21849
21850         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
21851
21852 2001-02-05  Jim Meyering  <meyering@lucent.com>
21853
21854         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
21855         it includes the patch required for `large file' support with at least
21856         HP-UX's 10.20 /bin/cc.
21857
21858 2001-02-03  Jim Meyering  <meyering@lucent.com>
21859
21860         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
21861         AS_IF, now that it works once again (mysteriously).
21862         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21863
21864 2001-01-30  Jim Meyering  <meyering@lucent.com>
21865
21866         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
21867         * m4/chown.m4: Rename conftestchown to conftest.chown.
21868         * m4/rename.m4: s/conftestdir/conftest.d1/ and
21869         s/conftestdir2/conftest.d2/.
21870         * m4/utimes.m4: s/conftestdata/conftest.data/
21871         Inspired by Pavel Roskin's change in autoconf.
21872
21873 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
21874
21875         * lib/config.charset: Update for FreeBSD 4.2.
21876
21877 2001-01-27  Jim Meyering  <meyering@lucent.com>
21878
21879         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
21880         a use of AS_IF.
21881         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21882
21883 2001-01-26  Jim Meyering  <meyering@lucent.com>
21884
21885         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
21886         quotearg.c includes it.
21887
21888 2001-01-26  Jim Meyering  <meyering@lucent.com>
21889
21890         * lib/quotearg.c: Include stddef.h.
21891         * lib/quote.c: Include stddef.h.
21892         Reported by Axel Kittenberger.
21893
21894         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
21895         line in double quotes so that it evokes a better diagnostic.
21896         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
21897         Reported by Axel Kittenberger.
21898
21899 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
21900
21901         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
21902         as if it was a `charset'.
21903
21904 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21905
21906         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
21907         has const.
21908
21909 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21910
21911         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
21912         to avoid a warning.  Add back 'const' to inptr.
21913
21914 2001-01-20  Jim Meyering  <meyering@lucent.com>
21915
21916         Be sure that headers are checked before used in code compiled
21917         for the type checks.
21918         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
21919         In place of that, invoke jm_CHECK_ALL_TYPES.
21920         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
21921         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
21922         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
21923         The check for ssize_t was mistakenly run before the test for unistd.h.
21924
21925         The configure-time check for stdbool.h was missing.
21926         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
21927         (jm_PREREQ_HASH): New function.
21928
21929 2001-01-17  Jim Meyering  <meyering@lucent.com>
21930
21931         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
21932         for autoconf-2.49c.
21933         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
21934
21935 2001-01-16  Jim Meyering  <meyering@lucent.com>
21936
21937         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
21938         From Bruno Haible.
21939
21940 2001-01-14  Jim Meyering  <meyering@lucent.com>
21941
21942         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
21943         foo and bar.  Create conftestdir/ in the script, not in the C code.
21944         Remove directories in the script, not in the C code.
21945         Remove conftestdir{,2} before trying to create the directory.
21946         Make the entire configure script fail if the mkdir fails.
21947
21948 2001-01-14  Jim Meyering  <meyering@lucent.com>
21949
21950         * lib/rename.c: New file.  From Volker Borchert.
21951         Include stdlib.h, string.h or strings.h, and xalloc.h.
21952         Use strip_trailing_slashes rather than open-coding it.
21953
21954 2001-01-03  Paul Eggert  <eggert@twinsun.com>
21955
21956         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
21957
21958 2001-01-03  Jim Meyering  <meyering@lucent.com>
21959
21960         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
21961         of local `inptr' to avoid warning with some system declarations of
21962         iconv.
21963
21964 2001-01-02  Volker Borchert  <bt@teknon.de>
21965
21966         * m4/rename.m4: New file.
21967         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
21968
21969 2001-01-01  Jim Meyering  <meyering@lucent.com>
21970
21971         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
21972         even on systems with utmpx.h.  It's necessary for the declaration of
21973         utmp's ut_user member.  Reported by Andreas Jaeger.
21974
21975         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
21976         available. They are required for the declarations of getgrgid and
21977         getpwuid resp.
21978         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
21979         Reported by Andreas Jaeger.
21980
21981 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
21982
21983         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
21984         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
21985         so `make install' also works in VPATH builds.
21986
21987 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
21988
21989         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
21990         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
21991         can be used in subdirectories.
21992
21993 2000-12-29  Paul Eggert  <eggert@twinsun.com>
21994
21995         * lib/modechange.c: Do not assume that mode_t uses the
21996         traditional octal encoding.  E.g. "chmod 1 FOO" should set
21997         the other-execute bit of FOO even if S_IXOTH != 1.
21998
21999         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
22000         WOTH, XOTH, ALLM): New macros.
22001         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
22002          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
22003         Use them.
22004         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
22005         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
22006         (mode_compile):
22007         No need to use uintmax_t; unsigned long is long enough.
22008         Don't bother to get suffix since we don't use it.
22009
22010 2000-12-26  Jim Meyering  <meyering@lucent.com>
22011
22012         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
22013         better with autoheader.
22014
22015 2000-12-24  Jim Meyering  <meyering@lucent.com>
22016
22017         * lib/hash.c (is_prime): Return explicit boolean values.
22018         (hash_get_first): Return NULL to appease Irix5.6's 89.
22019         Reported by Nelson Beebe.
22020
22021 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
22022
22023         * lib/localcharset.c (locale_charset): Add support for Win32.
22024
22025 2000-12-18  Paul Eggert  <eggert@twinsun.com>
22026
22027         * lib/physmem.h, lib/physmem.c: New files.
22028
22029         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
22030         (noinst_HEADERS): Add physmem.h.
22031
22032         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
22033         't' for compatibility with Solaris 8 sort.
22034
22035 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
22036
22037         * lib/config.charset: Add support for BeOS.
22038
22039 2000-12-17  Jim Meyering  <meyering@lucent.com>
22040
22041         * m4/dos.m4 (jm_AC_DOS): New file and macro.
22042         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
22043
22044 2000-12-16  Jim Meyering  <meyering@lucent.com>
22045
22046         This bug had a serious impact on chown: `chown N:M FILE' (for integer
22047         N and M) would have treated it like `chown N:N FILE'.
22048
22049         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
22050
22051 2000-12-16  Jim Meyering  <meyering@lucent.com>
22052
22053         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
22054         SHELLS_FILE to a file name that's useful on djgpp systems.
22055         Include stdlib.h.
22056         (ADDITIONAL_DEFAULT_SHELLS): Define.
22057         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
22058         Based mostly on a patch from Prashant TR.
22059
22060 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
22061
22062         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
22063         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
22064         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
22065
22066 2000-12-08  Andreas Schwab  <schwab@suse.de>
22067
22068         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
22069         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
22070
22071 2000-12-07  Jim Meyering  <meyering@lucent.com>
22072
22073         * lib/stripslash.c (ISSLASH): Define.
22074         (strip_trailing_slashes): Use ISSLASH rather than comparing against
22075         `/'.
22076         From Prashant TR.
22077
22078         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
22079         (dir_name_r): Declare this function as static.
22080         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
22081         manifest itself on a name containing a mix of slashes and
22082         backslashes.
22083         Make this function work with names starting with a DOS-style
22084         drive letter and colon prefix.
22085         (dir_name): Append `.' if necessary.
22086         Based mostly on patches from Prashant TR and Eli Zaretskii.
22087
22088         * lib/dirname.h (dir_name_r): Remove prototype.
22089
22090 2000-12-06  Paul Eggert  <eggert@twinsun.com>
22091
22092         * m4/off_t-format.m4: Remove this file.
22093         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
22094
22095 2000-12-06  Jim Meyering  <meyering@lucent.com>
22096
22097         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
22098         replacement strtoull, we may well need the replacement strtoul, too.
22099         Check for declarations of strtoul and strtoull.
22100         Check for strtol.  Mainly as a cue to cause automake to include
22101         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
22102         Check for limits.h -- strtol.c needs it.
22103
22104 2000-12-05  Jim Meyering  <meyering@lucent.com>
22105
22106         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
22107
22108 2000-12-04  Jim Meyering  <meyering@lucent.com>
22109
22110         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
22111         Also include memory.h, stdlib.h, unistd.h if appropriate.
22112         Reported by Andreas Jaeger (conflicting declaration of malloc).
22113
22114 2000-12-02  Jim Meyering  <meyering@lucent.com>
22115
22116         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
22117         * m4/jm-macros.m4 (jm_MACROS): require it.
22118
22119 2000-12-02  Jim Meyering  <meyering@lucent.com>
22120
22121         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
22122
22123 2000-12-01  Paul Eggert  <eggert@twinsun.com>
22124
22125         * lib/memrchr.c: Include <config.h> before any system include file.
22126
22127 2000-11-30  Jim Meyering  <meyering@lucent.com>
22128
22129         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
22130
22131 2000-11-30  Jim Meyering  <meyering@lucent.com>
22132
22133         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
22134
22135 2000-11-29  Paul Eggert  <eggert@twinsun.com>
22136
22137         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
22138
22139 2000-11-26  Jim Meyering  <meyering@lucent.com>
22140
22141         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
22142
22143 2000-11-22  Paul Eggert  <eggert@twinsun.com>
22144
22145         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
22146         size of (size_t) -1; it's not portable.
22147
22148 2000-11-17  Jim Meyering  <meyering@lucent.com>
22149
22150         * lib/strstr.c: Update from GNU libc.
22151
22152 2000-11-17  Akim Demaille  <akim@epita.fr>
22153
22154         * lib/obstack.h: Formatting changes.
22155         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
22156         prevent type checking.
22157         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22158         cast the value to (void *): assigning a `foo *' to a `void *'
22159         variable is valid.
22160         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22161
22162 2000-11-16  Jim Meyering  <meyering@lucent.com>
22163
22164         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
22165
22166 2000-11-11  Jim Meyering  <meyering@lucent.com>
22167
22168         * lib/error.c: Add a couple #includes, merging from GNU libc version.
22169
22170 2000-11-10  Jim Meyering  <meyering@lucent.com>
22171
22172         * lib/obstack.h: Update from GNU libc.
22173         * lib/obstack.c: Likewise.
22174
22175 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
22176
22177         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
22178
22179 2000-11-06  Paul Eggert  <eggert@twinsun.com>
22180
22181         * lib/getusershell.c (setusershell): Use rewind rather than
22182         fseek/fseeko, to avoid configuration hassles with fseeko.
22183         Don't bother opening SHELLS_FILE if shellstream is NULL;
22184         it's not necessary.
22185
22186 2000-11-05  Jim Meyering  <meyering@lucent.com>
22187
22188         * lib/makepath.h (make_dir): Declare.
22189         * lib/makepath.c (make_dir): Remove `static' attribute.
22190         Tweak a comment.
22191
22192 2000-11-04  Jim Meyering  <meyering@lucent.com>
22193
22194         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
22195
22196 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
22197
22198         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
22199         last one in a bucket, advance to the next bucket.
22200
22201 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
22202
22203         * lib/fnmatch.c: Do not comment out all the code if we are using
22204         the GNU C library, because in some cases we are replacing buggy
22205         code in the GNU C library itself.
22206
22207 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
22208
22209         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
22210         (regex_compile): Catch bogus \(\1\).
22211
22212 2000-10-30  Paul Eggert  <eggert@twinsun.com>
22213
22214         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
22215         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
22216         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
22217
22218 2000-10-30  Paul Eggert  <eggert@twinsun.com>
22219
22220         * lib/error.h, getline.h, modechange.h:
22221         Remove "2000" from Copyright line, as the file hasn't been
22222         changed this year other than in the copyright notice.
22223
22224         * lib/xalloc.h: Add "2000" to Copyright line, as this file
22225         was changed this year.
22226
22227 2000-10-29  Jim Meyering  <meyering@lucent.com>
22228
22229         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
22230         renaming.
22231         * m4/ls-mntd-fs.m4: Likewise
22232
22233 2000-10-29  Jim Meyering  <meyering@lucent.com>
22234
22235         * lib/xstat.in: Fix grammar in comment.
22236
22237 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
22238
22239         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
22240         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
22241         doesn't define __restrict_arr.
22242
22243 2000-10-28  Jim Meyering  <meyering@lucent.com>
22244
22245         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
22246         (jm_PREREQ_MEMCHR): New function.
22247
22248 2000-10-28  Jim Meyering  <meyering@lucent.com>
22249
22250         * lib/memchr.c: Update from libc.
22251         Adjust for portability:
22252         [HAVE_STDLIB_H]: Include stdlib.h.
22253         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
22254         Undef __memchr, too.
22255         [!weak_alias]: Define __memchr to memchr.
22256
22257         * lib/regex.c: Update from libc.
22258         * lib/regex.h: Likewise.
22259         * lib/getopt1.c: Likewise.
22260         * lib/memcmp.c: Likewise.
22261
22262         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
22263         Avoid using fseek, when possible -- it's broken by design.
22264         Patch by Ulrich Drepper.
22265
22266 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
22267
22268         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
22269         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
22270         Giving in to popular pressure to shut up the compiler with casts.
22271
22272 2000-10-26  Jim Meyering  <meyering@lucent.com>
22273
22274         * lib/strftime.c: Update from libc.
22275
22276 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
22277
22278         * regex.c: More `unsigned char' -> `re_char' changes.
22279         Also change several `int' into `re_wchar_t'.
22280         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
22281         (PUSH_FAILURE_POINTER): Don't cast any more.
22282         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
22283         We want GCC to complain, since this piece of code makes
22284         re_match non-reentrant, which *should* be fixed.
22285         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
22286         (EXTEND_BUFFER): Use RETALLOC.
22287         (SET_LIST_BIT): Don't cast.
22288         (re_wchar_t): New type.
22289         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
22290         that those two functions will always properly return.
22291         (IMMEDIATE_QUIT_CHECK): Cast to void.
22292         (analyse_first): Use recursion rather than an explicit stack.
22293         (re_compile_fastmap): Can't fail anymore.
22294         (re_search_2): Don't check re_compile_fastmap for failure.
22295         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
22296         Now also sets the new value (passed in a new argument).
22297         (re_match_2_internal): Use it.
22298         Also, use a new var `reg' of type size_t when looping through regs
22299         rather than reuse the inappropriate `mcnt'.
22300
22301 2000-10-25  Jim Meyering  <meyering@lucent.com>
22302
22303         * lib/obstack.c: Update from libc.
22304
22305 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
22306
22307         * regex.c (regex_compile): Change the way of handling a range from
22308         a char less than 256 to a char not less than 256.
22309
22310 2000-10-24  Andrew Innes  <andrewi@gnu.org>
22311
22312         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
22313         NT-Emacs only.
22314         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
22315         so that re_search functions only quit when callers expect them to.
22316
22317 2000-10-23  Jim Meyering  <meyering@lucent.com>
22318
22319         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
22320         wrong.  That set_locale call must not have any side effects.
22321         From Paul Eggert.
22322
22323 2000-10-22  Jim Meyering  <meyering@lucent.com>
22324
22325         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
22326         [CYCLIC]: Remove now-unused definition.
22327
22328         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
22329         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
22330         Suggestion from Ulrich Drepper.
22331
22332 2000-10-21  Jim Meyering  <meyering@lucent.com>
22333
22334         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
22335         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
22336         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
22337
22338 2000-10-21  Jim Meyering  <meyering@lucent.com>
22339
22340         * lib/dirname.c (memrchr): Declare if necessary.
22341         (dir_name): Remove the restriction that there be no
22342         trailing slashes.  Now, this code skips past them, effectively
22343         ignoring them.
22344         [TEST_DIRNAME] (main): New unit tests.
22345
22346         * lib/memrchr.c: New file from GNU libc.
22347         Undef __memrchr, too.
22348         [!weak_alias]: Define __memrchr to memrchr.
22349         Guard weak_alias use with `#ifdef weak_alias'.
22350
22351 2000-10-21  Jim Meyering  <meyering@lucent.com>
22352
22353         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
22354         (dir_name): Use dir_name_r.
22355         * lib/dirname.h (dir_name_r): Declare it.
22356
22357 2000-10-17  Jim Meyering  <meyering@lucent.com>
22358
22359         * lib/quote.h (PARAMS): Define and use.
22360         Reported by Akim Demaille.
22361
22362         * lib/getopt.c: Update from libc.
22363
22364 2000-10-16  Jim Meyering  <meyering@lucent.com>
22365
22366         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
22367         setlocale.
22368         From Jan Fedak.
22369
22370 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
22371
22372         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
22373
22374 2000-09-25  Jim Meyering  <meyering@lucent.com>
22375
22376         * lib/md5.h (rol): Define (from GnuPG).
22377
22378         * lib/sha.c: Give credit (GnuPG) where due.
22379         (M): Use rol rather than open-coding it.
22380         Add a FIXME comment.
22381
22382 2000-09-21  Jim Meyering  <meyering@lucent.com>
22383
22384         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
22385         Reported by Michael Stone.
22386
22387 2000-09-20  Jim Meyering  <meyering@lucent.com>
22388
22389         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
22390         (noinst_HEADERS): Add sha.h.
22391         Based on code from Scott G. Miller and from GnuPG.
22392
22393 2000-09-18  Jim Meyering  <meyering@lucent.com>
22394
22395         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
22396         LIBS. Otherwise, everyone ends up linking with -lelf for some
22397         configurations.
22398         Reported by Mike Stone.
22399
22400 2000-09-15  Jim Meyering  <meyering@lucent.com>
22401
22402         * lib/regex.c: Update from libc.
22403
22404 2000-09-10  Jim Meyering  <meyering@lucent.com>
22405
22406         * lib/getopt.c (_getopt_internal): Update from glibc.
22407
22408 2000-09-09  Jim Meyering  <meyering@lucent.com>
22409
22410         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
22411         think it should be used as a general replacement for isascii.
22412         * lib/fnmatch.c: Likewise.
22413         * lib/mbswidth.c: Likewise
22414         * lib/regex.c: Likewise.
22415
22416         Don't use atoi.
22417         * lib/userspec.c: Include sys/param.h and limits.h.
22418         Include xstrtol.h.
22419         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22420         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
22421         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
22422         UID, GID.  Check range.
22423
22424 2000-09-06  Jim Meyering  <meyering@lucent.com>
22425
22426         * lib/getopt.c (_getopt_internal): Update from glibc.
22427
22428 2000-08-30  Jim Meyering  <meyering@lucent.com>
22429
22430         * lib/strftime.c: Merge in changes from GNU libc.
22431
22432 2000-08-26  Jim Meyering  <meyering@lucent.com>
22433
22434         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
22435         * m4/fpending.m4: New file.
22436
22437 2000-08-26  Jim Meyering  <meyering@lucent.com>
22438
22439         * lib/closeout.c: Include "__fpending.h".
22440         (close_stdout_status): Return right away if there's nothing to flush.
22441
22442         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
22443         * lib/__fpending.c: New file.
22444         * lib/__fpending.h: New file.
22445
22446 2000-08-20  Jim Meyering  <meyering@lucent.com>
22447
22448         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
22449         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
22450         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
22451
22452 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
22453
22454         Improve fileutils installation on systems where running
22455         programs (like install) can't be unlinked.
22456         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
22457         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
22458
22459 2000-08-07  Paul Eggert  <eggert@twinsun.com>
22460
22461         Standardize on "memory exhausted" instead of "Memory exhausted"
22462         or "virtual memory exhausted".
22463         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
22464         "virtual memory exhausted".
22465         * lib/same.c (same_name): Invoke xalloc_die instead of printing
22466         our own message.
22467         * lib/userspec.c (parse_user_spec): Likewise.
22468         * lib/bumpalloc.h: comment fix
22469         * lib/same.c, userspec.c: Include xalloc.h.
22470
22471         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
22472         not char *const and pointing to a constant array.
22473         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
22474         (xrealloc): Comment fix.
22475
22476         * lib/userspec.c (parse_user_spec):
22477         Don't translate a message until just before returning,
22478         to avoid unnecessary translation.
22479
22480 2000-08-07  Jim Meyering  <meyering@lucent.com>
22481
22482         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
22483         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
22484         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
22485         getgroups.c, gethostname.c, getopt.h, group-member.c,
22486         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
22487         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
22488         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
22489         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
22490         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
22491         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
22492         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
22493         yesno.c: Back out Copyright date changes for each file with no change
22494         this year.  This eases coordination with other programs using the same
22495         source code modules.  From Paul Eggert.
22496
22497 2000-08-06  Paul Eggert  <eggert@twinsun.com>
22498
22499         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
22500         not char, for compatibility with glibc 2.1.3 strftime.c.
22501
22502 2000-08-03  Greg McGary  <greg@mcgary.org>
22503
22504         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
22505         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
22506         (EXTEND_BUFFER): Use them.
22507
22508 2000-08-01  Jim Meyering  <meyering@lucent.com>
22509
22510         * lib/dirname.c (ISSLASH): Define.
22511         (BACKSLASH_IS_PATH_SEPARATOR): Define.
22512         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
22513         both `\' and `/' may be use as path separators.
22514         Based on a patch from Prashant TR.
22515
22516 2000-07-31  Paul Eggert  <eggert@twinsun.com>
22517
22518         * lib/quotearg.c (quotearg_n_options): Don't make the initial
22519         slot vector a constant, since it might get modified.
22520
22521 2000-07-31  Jim Meyering  <meyering@lucent.com>
22522
22523         * lib/xmalloc.c: Use `virtual memory exhausted', not
22524         `Memory exhausted'.
22525         * lib/obstack.c (print_and_abort): Likewise.
22526
22527 2000-07-30  Paul Eggert  <eggert@twinsun.com>
22528
22529         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
22530         buffer, so that the caller can always quote one small
22531         component of a "memory exhausted" message in slot 0.
22532         From a suggestion by Jim Meyering.
22533
22534 2000-07-30  Jim Meyering  <meyering@lucent.com>
22535
22536         * lib/makepath.c (make_path): Quote the other instance, too.
22537
22538         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
22539         (STATIC_BUF_SIZE): Define.
22540         (quotearg_n_options): Use only statically allocated storage when
22541         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
22542         than STATIC_BUF_SIZE.
22543
22544 2000-07-29  Jim Meyering  <meyering@lucent.com>
22545
22546         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
22547         * lib/dirname.c (dir_name): Likewise.
22548
22549         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
22550         `/'.
22551
22552         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
22553         (dir_name): Assert that there are no trailing slashes.
22554
22555 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
22556
22557         * lib/mbswidth.h (mbswidth): Add a flags argument.
22558         (mbswidth): New declaration.
22559         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
22560         * lib/mbswidth.c (mbswidth): Add a flags argument.
22561         (mbsnwidth): New function.
22562
22563 2000-07-24  Jim Meyering  <meyering@lucent.com>
22564
22565         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
22566
22567 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22568
22569         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
22570
22571 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22572
22573         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
22574         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
22575         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
22576         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
22577         invoke multibyte primitives.
22578
22579 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22580
22581         * lib/quotearg.c:
22582         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
22583         so that mbstate_t is always defined.
22584
22585         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
22586         be 1 in at least one GCC installation, and this configuration
22587         error is likely to be common.  Ignoring MB_LEN_MAX hurts
22588         performance on hosts that have mbrtowc but have only unibyte
22589         locales, but I assume these hosts are rare.
22590
22591 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22592
22593         * lib/mbswidth.c (_XOPEN_SOURCE):
22594         Don't define; this causes problems on Solaris 7.
22595         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
22596
22597 2000-07-23  Jim Meyering  <meyering@lucent.com>
22598
22599         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
22600         too: getgrgid, getpwuid, getuid.
22601
22602 2000-07-23  Jim Meyering  <meyering@lucent.com>
22603
22604         * lib/basename.c (base_name): Add an assertion.
22605
22606 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
22607
22608         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
22609         shadow its mbsinit function.
22610
22611 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
22612
22613         * lib/mbswidth.h: New file.
22614         * lib/mbswidth.c: New file.
22615         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
22616         (noinst_HEADERS): Add mbswidth.h.
22617
22618 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
22619
22620         * lib/config.charset: Add support for FreeBSD. Improve support for
22621         HP-UX and IRIX 6.
22622
22623 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
22624
22625         * m4/mbswidth.m4: New file.
22626         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
22627
22628 2000-07-15  Jim Meyering  <meyering@lucent.com>
22629
22630         * lib/makepath.c: Include quote.h.
22631         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
22632         corresponding argument in a `quote (...)' call.
22633         Give better diagnostics.
22634
22635         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
22636         (noinst_HEADERS): Add quote.h.
22637
22638         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
22639         from tar's src/misc.c.
22640         * lib/quote.h: New file.  Prototypes for same.
22641
22642 2000-07-14  Paul Eggert  <eggert@twinsun.com>
22643
22644         From a suggestion by Bruno Haible.
22645         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
22646         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
22647         to decide whether to define the BeOS workaround macro;
22648         this adjusts to the change to AC_MBSTATE_T.
22649
22650 2000-07-14  Jim Meyering  <meyering@lucent.com>
22651
22652         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
22653         jm_AC_TYPE_UINTMAX_T.
22654
22655 2000-07-13  Paul Eggert  <eggert@twinsun.com>
22656
22657         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
22658
22659         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
22660         quotearg_buffer_restyled): Add support for
22661         clocale_quoting_style.  Undo previous change to
22662         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
22663         and "{RIGHT QUOTATION MARK}" msgids.
22664
22665 2000-07-10  Paul Eggert  <eggert@twinsun.com>
22666
22667         From a suggestion by Bruno Haible.
22668         * m4/mbstate_t.m4 (AC_MBSTATE_T):
22669         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
22670         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
22671         and mbstate_t, to a single-part test that simply defines mbstate_t.
22672         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
22673         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
22674
22675 2000-07-10  Jim Meyering  <meyering@lucent.com>
22676
22677         * m4/strerror_r.m4: Mirror the correction made in autoconf.
22678
22679         * m4/gnu-source.m4: Output to confdefs.h directly.
22680         Suggestion from Akim Demaille.
22681
22682 2000-07-09  Paul Eggert  <eggert@twinsun.com>
22683
22684         The old behavior of quoting `like this' doesn't look good with
22685         newer, ISO-style fonts.  See:
22686         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
22687
22688         Instead, quote "like this" by default.  Let the translator
22689         tailor the locale-specific quoting behavior by providing
22690         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
22691
22692         * lib/quotearg.c (N_): New macro.
22693         (gettext_default): New function.
22694         (quotearg_buffer_restyled): Use
22695         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
22696         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
22697
22698 2000-07-09  Jim Meyering  <meyering@lucent.com>
22699
22700         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
22701         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
22702
22703         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
22704         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
22705
22706 2000-07-09  Jim Meyering  <meyering@lucent.com>
22707
22708         * lib/Most files: Update copyright dates to include 2000.
22709
22710 2000-07-08  Jim Meyering  <meyering@lucent.com>
22711
22712         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
22713         if not defined.
22714         (xgethostname): Remove now-unnecessary #ifdef.
22715         Move declaration of `err' into loop where it's used.
22716
22717 2000-07-05  Paul Eggert  <eggert@twinsun.com>
22718         and Bruno Haible  <haible@clisp.cons.org>
22719
22720         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
22721         only if the test for an object-type mbstate_t fails.  This
22722         prevents us from mistakenly reporting that mbstate_t is a
22723         system object type after we "#define mbstate_t int" to work
22724         around its lack.
22725
22726 2000-07-05  Paul Eggert  <eggert@twinsun.com>
22727         and Bruno Haible  <haible@clisp.cons.org>
22728
22729         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
22730
22731 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22732
22733         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
22734         to strerror_r.
22735         Include <ctype.h> for use of isalpha.
22736
22737 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22738
22739         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
22740         by allocating a larger buffer. Test the gethostname return value for
22741         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
22742         returns an error and ENAMETOOLONG isn't defined.
22743
22744 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22745
22746         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
22747         dimension.
22748
22749 2000-07-04  Jim Meyering  <meyering@lucent.com>
22750
22751         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
22752         of the deprecated AC_CHECKING.
22753
22754 2000-07-04  Jim Meyering  <meyering@lucent.com>
22755
22756         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
22757         Reported by Bruno Haible.
22758
22759 2000-07-04  Jim Meyering  <meyering@lucent.com>
22760
22761         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
22762         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
22763         lacks mbrtowc.
22764
22765 2000-07-03  Paul Eggert  <eggert@twinsun.com>
22766
22767         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
22768         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
22769
22770 2000-07-03  Paul Eggert  <eggert@twinsun.com>
22771         and Bruno Haible  <haible@clisp.cons.org>
22772
22773         * lib/quotearg.c (mbrtowc):
22774         Assign to *pwc, and return 1 only if result is nonzero.
22775         (iswprint): Use ISPRINT when substituting our own mbrtowc.
22776
22777 2000-07-03  Jim Meyering  <meyering@lucent.com>
22778
22779         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
22780
22781 2000-07-03  Jim Meyering  <meyering@lucent.com>
22782
22783         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
22784         This is necessary to get a definition of e.g., UTMP_FILE on
22785         HP-UX 10.20.
22786         From Bob Proulx.
22787
22788 2000-07-02  Jim Meyering  <meyering@lucent.com>
22789
22790         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
22791
22792         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
22793         AC_LIBOBJ(function_name).
22794         * m4/chown.m4: Likewise.
22795         * m4/fnmatch.m4: Likewise.
22796         * m4/ftruncate.m4: Likewise.
22797         * m4/getgroups.m4: Likewise.
22798         * m4/getline.m4: Likewise.
22799         * m4/group-member.m4: Likewise.
22800         * m4/jm-macros.m4: Likewise.
22801         * m4/lstat.m4: Likewise.
22802         * m4/malloc.m4: Likewise.
22803         * m4/memcmp.m4: Likewise.
22804         * m4/nanosleep.m4: Likewise.
22805         * m4/putenv.m4: Likewise.
22806         * m4/realloc.m4: Likewise.
22807         * m4/regex.m4: Likewise.
22808         * m4/stat.m4: Likewise.
22809         * m4/strftime.m4: Likewise.
22810
22811 2000-07-02  Jim Meyering  <meyering@lucent.com>
22812
22813         * lib/quotearg.c (mbstate_t): Don't define here.
22814
22815 2000-07-02  Jim Meyering  <meyering@lucent.com>
22816
22817         * lib/nanosleep.c (SIGCONT): Define if not already defined.
22818
22819 2000-07-01  Jim Meyering  <meyering@lucent.com>
22820
22821         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
22822
22823 2000-07-01  Jim Meyering  <meyering@lucent.com>
22824
22825         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
22826         problem.
22827
22828 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22829
22830         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
22831         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
22832
22833 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22834
22835         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
22836         per change in ../m4/ls-mntd-fs.m4.
22837         (read_filesystem_list): Ignore symbolic links.
22838
22839 2000-06-29  Jim Meyering  <meyering@lucent.com>
22840
22841         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
22842         for declaration of strcmp.
22843
22844         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
22845
22846         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
22847         Avoid warning by casting result to `char *' to remove `const'.
22848
22849 2000-06-28  Jim Meyering  <meyering@lucent.com>
22850
22851         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
22852         included by quotearg.c, for which we perform this test.  From
22853         Bruno Haible.
22854
22855 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22856
22857         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
22858         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
22859         <utmpx.h> exists, put readutmp.o into LIBOBJS.
22860
22861 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22862
22863         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
22864
22865 2000-06-26  Paul Eggert  <eggert@twinsun.com>
22866
22867         savedir now sets errno on failure and invokes xmalloc to get memory.
22868         Fix a couple of other minor bugs while we're at it.
22869
22870         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
22871         (NAMLEN): Remove macro.
22872         (malloc, realloc): Remove decls.
22873         (stpcpy): Likewise.
22874         ("xalloc.h"): Include.
22875         (NAME_SIZE_DEFAULT): New macro.
22876         (savedir): Use xmalloc / xrealloc to allocate memory.
22877         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
22878         Skip "" directory entries.
22879         Use strlen to calculate directory entry length, since the old method
22880         is rarely used these days and isn't worth supporting.
22881         Don't use a pointer after freeing it.
22882         Check for integer overflow when calculating allocation size.
22883         Use memcpy to copy entries, instead of stpcpy.
22884         Set errno properly when returning NULL.
22885         Check for readdir error.
22886
22887 2000-06-26  Jim Meyering  <meyering@lucent.com>
22888
22889         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
22890
22891 2000-06-25  Jim Meyering  <meyering@lucent.com>
22892
22893         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
22894         Linux header bug when _XOPEN_SOURCE is defined to 500.
22895
22896 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22897
22898         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
22899         deficiency.
22900
22901 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22902
22903         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
22904         Include xalloc.h.
22905         Don't include <stdlib.h>.  Don't declare malloc, realloc.
22906
22907 2000-06-24  Jim Meyering  <meyering@lucent.com>
22908
22909         * m4/strerror_r.m4: Revive this file -- to try out an experimental
22910         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
22911         for which strerror does return char*, but which lacks a conveniently
22912         accessible declaration of the function.  If the compile-test says
22913         strerror_r doesn't work, then resort to a `run'-test that works on
22914         BeOS and segfaults on DEC Unix.
22915
22916 2000-06-24  Jim Meyering  <meyering@lucent.com>
22917
22918         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
22919
22920 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22921
22922         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
22923         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
22924
22925 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22926
22927         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
22928         (mbrtowc, mbstate_t): Define substitutes if
22929         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
22930         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
22931         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
22932
22933 2000-06-23  Jim Meyering  <meyering@lucent.com>
22934
22935         * m4/afs.m4: Add missing AC_MSG_RESULT.
22936         Reported by Bruno Haible.
22937
22938         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
22939         Suggestion from Bruno Haible.
22940
22941 2000-06-23  Jim Meyering  <meyering@lucent.com>
22942
22943         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
22944
22945 2000-06-21  Jim Meyering  <meyering@lucent.com>
22946
22947         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
22948
22949 2000-06-21  Jim Meyering  <meyering@lucent.com>
22950
22951         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
22952         (noinst_HEADERS): Add getstr.h.
22953
22954         * lib/getline.c (getstr): Move into a separate file.
22955         * lib/getstr.c (getstr): New file, extracted from getline.c, with
22956         the following changes: new parameter, delim2; both delim[12]
22957         parameters have type `int', not `char'.  The latter would lose
22958         with 8-bit delimiters.
22959         * lib/getstr.h: New file.
22960
22961 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22962
22963         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
22964         than 1024, return a memory chunk of least possible size, instead
22965         of size PATH_MAX + 2. In the loop, increment the size proportionally.
22966         Use free/xmalloc instead of xrealloc to avoid copying for very long
22967         paths.
22968
22969 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22970
22971         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
22972         the empty string.
22973
22974 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22975
22976         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
22977         address, not strdup.  Include <stdlib.h> and don't declare free().
22978
22979 2000-06-19  Jim Meyering  <meyering@lucent.com>
22980
22981         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
22982
22983 2000-06-18  Jim Meyering  <meyering@lucent.com>
22984
22985         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
22986
22987         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
22988         `checking whether...' message to be consistent with that of the
22989         lstat test.
22990
22991 2000-06-18  Jim Meyering  <meyering@lucent.com>
22992
22993         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
22994         Besides, these days every porting target provides a mkdir function.
22995
22996         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
22997         needed. (this snippet comes from src/system.h).
22998
22999 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
23000
23001         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
23002
23003 2000-06-15  Paul Eggert  <eggert@twinsun.com>
23004
23005         * lib/human.c (adjust_value): New function.
23006         (human_readable_inexact): Apply rounding style even when
23007         printing approximate values.
23008
23009 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23010
23011         * lib/human.c (human_readable_inexact): Allow an input block
23012         size that is not a multiple of the output block size, and vice versa.
23013         Reported by Piergiorgio Sartor.
23014
23015 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23016
23017         * lib/getdate.y (get_date): Apply relative times after time
23018         zone indicator, not before.  Reported by Todd A. Jacobs.
23019
23020 2000-06-13  Jim Meyering  <meyering@lucent.com>
23021
23022         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
23023
23024         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
23025
23026 2000-06-12  Paul Eggert  <eggert@twinsun.com>
23027
23028         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
23029
23030 2000-06-12  Jim Meyering  <meyering@lucent.com>
23031
23032         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
23033         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
23034         optional argument.
23035         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
23036         the optional argument, `lib'.
23037
23038 2000-06-08  Jim Meyering  <meyering@lucent.com>
23039
23040         * m4/largefile.m4: Remove file (now that it's part of autoconf).
23041
23042 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23043
23044         Rewrite largefile configuration so that we don't need to run
23045         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
23046         AC_CANONICAL_HOST in configure.in -- jmm]
23047
23048         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
23049         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
23050         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
23051         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
23052         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
23053         All uses changed.
23054         Instead of inspecting the output of getconf, try to compile the
23055         test program without and with the macro definition.
23056         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
23057         for getconf.  Instead, check for the needed flags by compiling
23058         test programs.
23059
23060 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23061
23062         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
23063
23064 2000-06-04  Jim Meyering  <meyering@lucent.com>
23065
23066         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
23067         SunOS 4.1.4 for which gid_t is an unsigned type.
23068
23069 2000-06-03  Jim Meyering  <meyering@lucent.com>
23070
23071         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
23072         now that autoconf requires that.
23073
23074         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
23075         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
23076         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
23077
23078 2000-06-03  Jim Meyering  <meyering@lucent.com>
23079
23080         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
23081
23082 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
23083
23084         * m4/glibc21.m4: New file.
23085         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
23086
23087 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
23088
23089         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
23090         newer, don't install charset.alias.
23091         * lib/config.charset: Change the Linux/glibc rules so they become empty
23092         on glibc-2.1 or newer.
23093
23094 2000-06-02  Jim Meyering  <meyering@lucent.com>
23095
23096         * lib/mountlist.c: Back out last change.  Instead, do this...
23097         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
23098         me_dummy member using the same `ignore'-testing code.
23099         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
23100         fs_type strings.
23101         From Mark D. Roth.
23102
23103 2000-05-29  Jim Meyering  <meyering@lucent.com>
23104
23105         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
23106         mounts with the `ignore' attribute.  Based on a patch from
23107         Mark D. Roth.
23108
23109 2000-05-28  Jim Meyering  <meyering@lucent.com>
23110
23111         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
23112         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23113         * m4/stat.m4: Likewise.
23114         * m4/lstat.m4: Likewise.
23115         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
23116
23117         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
23118         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
23119
23120 2000-05-26  Jim Meyering  <meyering@lucent.com>
23121
23122         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
23123
23124 2000-05-24  Jim Meyering  <meyering@lucent.com>
23125
23126         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
23127         autoconf requires that.
23128         * m4/lib-check.m4: Likewise.
23129         * m4/jm-macros.m4: Likewise.
23130         * m4/strftime.m4: Likewise.
23131
23132         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
23133         AC_CHECK_DECLS, now that autoconf requires that.
23134
23135 2000-05-22  Jim Meyering  <meyering@lucent.com>
23136
23137         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23138         * m4/lstat.m4: Likewise.
23139
23140 2000-05-22  Jim Meyering  <meyering@lucent.com>
23141
23142         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
23143
23144 2000-05-20  Jim Meyering  <meyering@lucent.com>
23145
23146         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
23147         (jm_PREREQ): Use it.
23148
23149 2000-05-18  Jim Meyering  <meyering@lucent.com>
23150
23151         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
23152         back, too, since it may have been modified by allocate_entry.
23153         (hash_delete): Rewrite to use neither the assignment operator
23154         nor the comma operator in an if-expression.
23155
23156 2000-05-15  Paul Eggert  <eggert@twinsun.com>
23157
23158         * lib/closeout.c:
23159         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
23160         Remove; no longer needed.
23161         "quotearg.h": Add include.
23162         (file_name): Do not bother to explicitly initialize to NULL; it's less
23163         efficient on some hosts.
23164         (close_stdout_status): Remove test as to whether stdout was already
23165         closed; it breaks for the case "echo x | sort >&-".
23166         Quote file name colons.
23167         Do not assume that _("write error") lacks format strings.
23168
23169 2000-05-15  Jim Meyering  <meyering@lucent.com>
23170
23171         * lib/version-etc.c (version_etc_copyright): Update the copyright
23172         string used in all --version output.
23173
23174 2000-05-14  Jim Meyering  <meyering@lucent.com>
23175
23176         * lib/closeout.c (close_stdout_set_file_name): New function.
23177         (close_stdout_status): Use new file-scoped global.
23178         Return right away if fstat says the stdout file descriptor is invalid.
23179         * lib/closeout.h (close_stdout_set_file_name): Declare.
23180
23181 2000-05-10  Jim Meyering  <meyering@lucent.com>
23182
23183         * lib/closeout.c [default_exit_status]: New file-scoped variable.
23184         (close_stdout_set_status): New function.
23185         * lib/closeout.h (close_stdout_set_status): Declare.
23186
23187 2000-05-09  Jim Meyering  <meyering@lucent.com>
23188
23189         * m4/gettext.m4: Rename this...
23190         * m4/libintl.m4: ...to this.
23191
23192 2000-05-08  Jim Meyering  <meyering@lucent.com>
23193
23194         * lib/long-options.c: Don't include closeout.h.
23195         (parse_long_options): Don't call close_stdout for --version.
23196
23197 2000-05-06  Paul Eggert  <eggert@twinsun.com>
23198
23199         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
23200         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
23201         2.1.3 bug.  This avoids a clash when files like regex.c define
23202         _GNU_SOURCE.
23203
23204 2000-05-06  Jim Meyering  <meyering@lucent.com>
23205
23206         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
23207         (AC_REPLACE_FUNCS): Add strnlen.
23208
23209         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
23210         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
23211
23212         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
23213         AC_SEARCH_LIBS call for nanosleep.
23214         (LIB_NANOSLEEP): Set and AC_SUBST.
23215
23216 2000-05-06  Jim Meyering  <meyering@lucent.com>
23217
23218         * lib/strnlen.c: Undefine __strnlen and strnlen.
23219         [!weak_alias]: Define __strnlen to strnlen.
23220
23221         * lib/atexit.c: New file, from libiberty.
23222
23223 2000-05-06  Jim Meyering  <meyering@lucent.com>
23224
23225         * lib/closeout.c (close_stdout_status): Also check for errors on the
23226         stderr stream.
23227
23228 2000-05-05  Jim Meyering  <meyering@lucent.com>
23229
23230         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
23231         AC_SEARCH_LIBS call for clock_gettime.
23232         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
23233
23234         * m4/search-libs.m4: Update from autoconf.
23235
23236         su doesn't work on Solaris 2.6.
23237         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
23238         <shadow.h>.  Reported by Dragos Harabor.
23239
23240 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
23241
23242         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
23243         memcpy instead of xmalloc, xrealloc, path_concat.
23244         (locale_charset): Treat empty environment variables as absent.
23245         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
23246
23247 2000-05-04  Jim Meyering  <meyering@lucent.com>
23248
23249         * lib/getopt.c: Update from glibc.
23250         * lib/obstack.c: Likewise.
23251         * lib/obstack.h: Likewise.
23252         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
23253         file
23254
23255         * lib/regex.h: Likewise.
23256         * lib/strndup.c: Likewise.
23257         * lib/strnlen.c: New file, from glibc.
23258
23259 2000-05-03  Jim Meyering  <meyering@lucent.com>
23260
23261         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
23262
23263 2000-05-02  Paul Eggert  <eggert@twinsun.com>
23264
23265         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
23266         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
23267         compile-time test, rather than inspecting host and OS, to
23268         decide whether to define _LARGEFILE_SOURCE.
23269
23270 2000-05-01  Jim Meyering  <meyering@lucent.com>
23271
23272         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
23273
23274         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
23275         Based on a patch from Bruno Haible.
23276
23277 2000-05-01  Jim Meyering  <meyering@lucent.com>
23278
23279         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
23280
23281 2000-04-29  Jim Meyering  <meyering@lucent.com>
23282
23283         * lib/path-concat.c: Declare strdup only if it's not defined.
23284         * lib/canon-host.c: Likewise.
23285
23286 2000-04-28  Jim Meyering  <meyering@lucent.com>
23287
23288         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
23289         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
23290         is included first, then limits.h is included by locale.h by libintl.h.
23291         From John David Anglin.
23292
23293 2000-04-25  Jim Meyering  <meyering@lucent.com>
23294
23295         * lib/makepath.c (S_IRWXUGO): Define.
23296         (make_path): Always perform explicit chmod if MODE specifies any
23297         of the `special' permission bits.  Prompted by a bug report against
23298         install from Mate Wierdl and Joost van Baal.
23299
23300 2000-04-18  Jim Meyering  <meyering@lucent.com>
23301
23302         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
23303         (jm_PREREQ): Use it.
23304
23305 2000-04-18  Jim Meyering  <meyering@lucent.com>
23306
23307         * lib/README: New file.
23308
23309         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
23310         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
23311
23312 2000-04-17  Jim Meyering  <meyering@lucent.com>
23313
23314         Get it right :-)
23315         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
23316         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
23317         Suggestion from Akim Demaille.
23318
23319 2000-04-17  Jim Meyering  <meyering@lucent.com>
23320
23321         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
23322         the definition of it to rpl_strftime also defined-away the system's
23323         declaration.
23324
23325 2000-04-15  Jim Meyering  <meyering@lucent.com>
23326
23327         Use `C' to denote so-called `contiguous' files, the same way
23328         that tar does.
23329         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
23330         (ftypelet): Use S_ISCTG.
23331         From Michael Deutschmann.
23332
23333 2000-04-14  Jim Meyering  <meyering@lucent.com>
23334
23335         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
23336         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
23337         clobbered.
23338
23339 2000-04-14  Jim Meyering  <meyering@lucent.com>
23340
23341         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
23342
23343 2000-04-13  Jim Meyering  <meyering@lucent.com>
23344
23345         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
23346         AH_VERBATIM to insert required #ifndef into config.h.in.
23347         Suggestion from Akim Demaille.
23348
23349 2000-04-12  Jim Meyering  <meyering@lucent.com>
23350
23351         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
23352         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
23353         Christian Krackowizer.
23354
23355         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
23356         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
23357         (AC_SYS_LARGEFILE): Require.
23358         (AM_C_PROTOTYPES): Require.
23359
23360 2000-04-08  Jim Meyering  <meyering@lucent.com>
23361
23362         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
23363         names don't conflict.  Reported by Eli Zaretskii.
23364
23365 2000-04-07  Jim Meyering  <meyering@lucent.com>
23366
23367         * lib/putenv.c: Move inclusion of errno.h so it follows that of
23368         sys/types.h, to work around system header problems on AIX 3.2.5.
23369         From Bruno Haible.
23370
23371 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
23372
23373         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
23374         bug.  Deal with the different error behavior of Irix iconv.
23375
23376 2000-04-05  Paul Eggert  <eggert@twinsun.com>
23377
23378         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
23379         IRIX if the installer said otherwise.
23380
23381 2000-04-05  Jim Meyering  <meyering@lucent.com>
23382
23383         Portability tweaks required for ultrix4.3.
23384         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
23385         (jm_CHECK_DECLS): Add getutent to the list of functions.
23386         (_jm_DECL_HEADERS): Add utmpx.h.
23387         From John David Anglin.
23388
23389         * m4/strftime.m4: Back out the 2000-04-02 change.
23390         Instead of that change, simply undefine putenv in the test program.
23391
23392 2000-04-05  Jim Meyering  <meyering@lucent.com>
23393
23394         Portability tweaks required for ultrix4.3.
23395         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
23396         getutent.
23397         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
23398         * lib/canon-host.c: Declare strdup.
23399         * lib/path-concat.c: Likewise.
23400         From John David Anglin.
23401
23402 2000-04-04  Jim Meyering  <meyering@lucent.com>
23403
23404         Be more DOS 8.3-friendly.
23405         * lib/ref-add.sin: Renamed from ref-add.sed.in.
23406         * lib/ref-del.sin: Renamed from ref-del.sed.in.
23407         * lib/Makefile.am: Reflect renaming.
23408         Reported by Eli Zaretskii.
23409
23410         Use a temporary file name that won't clash with `charset.alias'
23411         in the DOS 8.3 name space.
23412         * lib/Makefile.am (charset_tmp): Define.
23413         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
23414         (uninstall-local): Likewise.
23415         Reported by Eli Zaretskii.
23416
23417 2000-04-03  Jim Meyering  <meyering@lucent.com>
23418
23419         * m4/gettext.m4: Fix typo in comment.
23420
23421         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
23422         textutils/configure.in).  Suggestion from Paul Eggert.
23423         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
23424
23425 2000-04-02  Paul Eggert  <eggert@twinsun.com>
23426
23427         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
23428         variable in the shell rather than using putenv, which isn't
23429         portable.  This avoids the configure-time inter-test dependency
23430         on the potentially-renamed putenv function.
23431
23432 2000-03-30  Paul Eggert  <eggert@twinsun.com>
23433
23434         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
23435         before checking struct stat.st_blksize, so that
23436         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
23437
23438 2000-03-29  Paul Eggert  <eggert@twinsun.com>
23439
23440         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
23441         since strftime.c uses HAVE_STRFTIME to decide whether to use
23442         the underlying strftime.
23443
23444 2000-03-29  Paul Eggert  <eggert@twinsun.com>
23445
23446         * lib/time/strftime.c (my_strftime): Make sure we call the system
23447         strftime, not ourselves, when invoking the underlying strftime.
23448
23449 2000-03-24  Jim Meyering  <meyering@lucent.com>
23450
23451         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
23452         (charset_alias): Define.
23453         (install-exec-local): Factor out common code.
23454         (uninstall-local): Split lines longer than 80.
23455         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
23456         (SUFFIXES): Define.
23457         (.sed.in.sed): New rule.  Don't redirect directly to $@.
23458         (CLEANFILES): Add ref-add.sed and ref-del.sed.
23459
23460 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
23461
23462         * lib/config.charset: Output a line containing "Packages using this
23463         file".
23464         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
23465         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
23466         ref-del.sed): New rules.
23467
23468 2000-03-17  Jim Meyering  <meyering@lucent.com>
23469
23470         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
23471         Otherwise, include <strings.h>
23472
23473 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
23474
23475         * lib/unicodeio.c (utf8_wctomb): New function.
23476         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
23477         format instead of in UCS-4 with platform dependent endianness.
23478
23479 2000-03-10  Jim Meyering  <meyering@lucent.com>
23480
23481         * m4/lib-check.m4: Look for getspnam in -lgen, too.
23482         From Marco Franzen.
23483
23484 2000-03-07  Paul Eggert  <eggert@twinsun.com>
23485
23486         * lib/savedir.c (savedir): Work even if directory size is
23487         negative; this can happen with some screwy NFS configurations.
23488
23489 2000-03-06  Jim Meyering  <meyering@lucent.com>
23490
23491         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
23492         if it's NULL (because we ran out of memory).  From Bruno Haible.
23493
23494 2000-03-05  Jim Meyering  <meyering@lucent.com>
23495
23496         * lib/localcharset.c ("path-concat.h"): Include.
23497         (get_charset_aliases): Use path_concat instead of ANSI string
23498         concatenation.
23499
23500         * lib/unicodeio.h (PARAMS): Define.
23501         Use it to guard prototype.
23502
23503 2000-03-04  Jim Meyering  <meyering@lucent.com>
23504
23505         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
23506         for lib/localcharset.c.
23507
23508 2000-03-04  Jim Meyering  <meyering@lucent.com>
23509
23510         * lib/Makefile.am (install-exec-local): Create $(libdir) before
23511         installing into it.
23512         (uninstall-local): Uncomment this rule so `make distcheck' works
23513         once again.
23514
23515         * lib/unicodeio.c (<errno.h>): Include it.
23516         (errno): Declare if not defined.
23517
23518         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
23519
23520         * lib/config.charset: New version, incorporating remarks from a linux
23521         i18n mailing list.  From Bruno Haible.
23522
23523 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
23524
23525         * m4/codeset.m4: New file.
23526         * m4/iconv.m4: New file.
23527         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
23528
23529 2000-03-03  Jim Meyering  <meyering@lucent.com>
23530
23531         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
23532
23533 2000-03-02  Jim Meyering  <meyering@lucent.com>
23534
23535         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
23536         the messages come out on separate lines.
23537
23538         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
23539         rather than jm_CHECK_DECLARATIONS.
23540         * m4/decl.m4: Remove now-unused file.
23541
23542         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
23543         geteuid.
23544
23545 2000-03-02  Jim Meyering  <meyering@lucent.com>
23546
23547         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
23548
23549 2000-03-01  Jim Meyering  <meyering@lucent.com>
23550
23551         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
23552         * lib/unicodeio.c: Likewise.
23553
23554 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
23555
23556         * lib/config.charset: New file.
23557         * lib/localcharset.c: New file.
23558         * lib/unicodeio.h, lib/unicodeio.c: New files.
23559         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
23560         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
23561         (noinst_HEADERS): Add unicodeio.h.
23562         (all-local, install-exec-local, charset.alias): New targets.
23563
23564 2000-02-28  Paul Eggert  <eggert@twinsun.com>
23565
23566         * lib/quotearg.c (ALERT_CHAR): New macro.
23567         (quotearg_buffer_restyled): Use it.
23568
23569 2000-02-27  Jim Meyering  <meyering@lucent.com>
23570
23571         * m4/check-decl.m4: Add getenv to the list.
23572
23573 2000-02-27  Jim Meyering  <meyering@lucent.com>
23574
23575         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
23576         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
23577
23578         * lib/backupfile.c: Guard inclusion of stdlib.h with
23579         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
23580         Declare malloc if needed.
23581
23582         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
23583         `#ifndef HAVE_DECL..'
23584         now that autoconf always defines the HAVE_DECL_ symbols.
23585         * lib/human.c: Likewise.
23586         * lib/same.c: Likewise.
23587         * lib/strtoumax.c: Likewise.
23588
23589         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
23590         declaration check was not run.
23591         * lib/hash.c: Likewise.
23592         * lib/human.c: Likewise.
23593         * lib/same.c: Likewise.
23594         * lib/strtoumax.c: Likewise.
23595
23596         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
23597         `.', then first look up the entire `.'-containing string as a login
23598         name.
23599
23600 2000-02-23  Jim Meyering  <meyering@lucent.com>
23601
23602         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
23603         in place of my hack.
23604
23605 2000-02-18  Paul Eggert  <eggert@twinsun.com>
23606
23607         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
23608         (textint): New typedef.
23609         (parser_control): Member year changed from int to textint.
23610         All uses changed.
23611         (YYSTYPE): Removed; replaced by %union with int and textint members.
23612         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
23613         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
23614         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
23615         (tSNUMBER, tUNUMBER): Now of type <textintval>.
23616         (date, number, to_year): Use width of number in digits, not its value,
23617         to determine whether it's a 2-digit year, or a 2-digit time.
23618         (yylex): Store number of digits of numeric tokens.
23619         Reported by John Kendall.
23620
23621         (parser_control): Changed from struct parser_control to typedef (for
23622         consistency).  All uses changed.
23623
23624         (tID): Removed; not used.
23625         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
23626
23627 2000-02-14  Paul Eggert  <eggert@twinsun.com>
23628
23629         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
23630         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
23631
23632 2000-02-12  Jim Meyering  <meyering@lucent.com>
23633
23634         * lib/userspec.c (ISDIGIT): Define it.
23635         (isdigit): Remove definition.
23636         (is_number): Use ISDIGIT, not isdigit.
23637         <libintl.h>: Include.
23638         (_ and N_): Define.
23639         (parse_user_spec): Mark translatable strings.
23640
23641 2000-02-10  Jim Meyering  <meyering@lucent.com>
23642
23643         With these changes, nanosleep.[ch] are finally enough like the other
23644         lib/* replacement files to compile on a few more losing systems.
23645
23646         * lib/nanosleep.h: Don't include config.h.
23647         Remove prototype from declaration of nanosleep.
23648         (PARAMS): Remove now-unneeded definition.
23649         * lib/nanosleep.c: #undef nanosleep.
23650         (rpl_nanosleep): Rename from nanosleep.
23651
23652 2000-02-10  Jim Meyering  <meyering@lucent.com>
23653
23654         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
23655         gnu_nanosleep to rpl_nanosleep.
23656
23657 2000-02-09  Jim Meyering  <meyering@lucent.com>
23658
23659         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
23660         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
23661
23662 2000-02-08  Akim Demaille  <akim@epita.fr>
23663
23664         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
23665         `[' and `]' and remove uses of `changequote'.
23666         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
23667         (AC_SYS_LARGEFILE): Likewise.
23668         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
23669         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
23670         of changequote.
23671         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
23672         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
23673         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
23674         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
23675
23676 2000-02-05  Jim Meyering  <meyering@lucent.com>
23677
23678         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
23679         Remove explicit use of AC_HEADER_TIME.  It is required by
23680         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
23681         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
23682         in autoconf whereby the expansion of the latter ended up preceding
23683         the expansion of its prerequisite, AC_HEADER_TIME.
23684         Reported by Volker Borchert.
23685
23686 2000-02-03  Jim Meyering  <meyering@lucent.com>
23687
23688         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
23689
23690 2000-02-03  Jim Meyering  <meyering@lucent.com>
23691
23692         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
23693         rather than with `#if HAVE_UTMPNAME'.
23694
23695 2000-02-02  Jim Meyering  <meyering@lucent.com>
23696
23697         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
23698         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
23699         Reported by Eli Zaretskii.
23700
23701 2000-02-01  Jim Meyering  <meyering@lucent.com>
23702
23703         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
23704
23705 2000-01-31  Jim Meyering  <meyering@lucent.com>
23706
23707         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
23708         functions.  Add the time.h and sys/time.h headers along with the
23709         AC_REQUIRE'ment of AC_HEADER_TIME.
23710
23711 2000-01-31  Jim Meyering  <meyering@lucent.com>
23712
23713         * lib/nanosleep.h (nanosleep): Guard declaration with
23714         `#if ! HAVE_DECL_NANOSLEEP'.
23715         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
23716         the declaration in that vendor's sys/timers.h.
23717         Reported by Christian Krackowizer.
23718
23719         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
23720         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
23721         (ISPRINT): Likewise.
23722         Reported by Tom Tromey.
23723
23724 2000-01-30  Jim Meyering  <meyering@lucent.com>
23725
23726         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
23727
23728         * m4/prereq.m4 (utmp_includes): Define.
23729         Check for ut_user and ut_name members in both struct utmpx
23730         and struct utmp.
23731
23732 2000-01-30  Jim Meyering  <meyering@lucent.com>
23733
23734         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
23735         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
23736         header files where only utmpx.ut_user is declared.
23737
23738         * lib/readutmp.h (UT_USER): Define.
23739
23740 2000-01-29  Jim Meyering  <meyering@lucent.com>
23741
23742         * m4/lib-check.m4: New file containing library-related checks from
23743         fileutils and sh-utils (textutils had none).
23744
23745 2000-01-28  Jim Meyering  <meyering@lucent.com>
23746
23747         * m4/perl.m4: Change format of warning message to look more like that
23748         from the missing script.  Suggestion from François Pinard.
23749
23750 2000-01-25  Jim Meyering  <meyering@lucent.com>
23751
23752         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
23753         well as time.h in the compile check.
23754         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
23755         Fix typo in cross-compiling case: s/yes/no/.
23756
23757 2000-01-23  Jim Meyering  <meyering@lucent.com>
23758
23759         * m4/jm-macros.m4: Move df-related tests here from
23760         fileutils/configure.in
23761
23762         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
23763         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
23764
23765         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
23766         s/space/ac_fsusage_space/.
23767         (jm_FILE_SYSTEM_USAGE): Take two parameters.
23768
23769         * m4/ftruncate.m4: New file (derived from part of
23770         fileutils/configure.in).
23771         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
23772         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
23773
23774         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
23775         AC_SUBST these here, rather than just in sh-util/configure.in, so
23776         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
23777         all the same.
23778         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
23779         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
23780         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
23781         (AC_SUBST(POW_LIBM)): Likewise.
23782         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
23783
23784 2000-01-23  Jim Meyering  <meyering@lucent.com>
23785
23786         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
23787         obstack.c.
23788
23789 2000-01-22  Jim Meyering  <meyering@lucent.com>
23790
23791         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
23792
23793         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
23794
23795         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
23796         configure.in
23797         (AC_CHECK_HEADERS): Likewise for sh-utils.
23798         (AC_CHECK_HEADERS): Likewise for textutils.
23799         Merge the three lists of headers.
23800
23801         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
23802         from fileutils' configure.in.
23803
23804         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
23805         code. Moved tests into their own function (_jm_DECL_HEADERS) in
23806         check-decl.m4.
23807
23808         * m4/check-decl.m4: Use #if rather than #ifdef.
23809         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
23810         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
23811         (_jm_DECL_HEADERS): Define new function.
23812         (jm_CHECK_DECLARATIONS): Require it.
23813
23814 2000-01-22  Jim Meyering  <meyering@lucent.com>
23815
23816         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
23817         [! HAVE_DECL_STRTOULL]: Declare strtoull.
23818         Required for some AIX systems.  Reported by Christian Krackowizer.
23819         [TESTING] (main): New function.
23820
23821         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
23822         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
23823         letters.
23824
23825         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
23826         iswprint.
23827
23828         * lib/strverscmp.c (ISDIGIT): Define.
23829         (strverscmp): Use ISDIGIT, not isdigit.
23830
23831 2000-01-19  Jim Meyering  <meyering@lucent.com>
23832
23833         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
23834         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
23835         defines `struct timespec' in <sys/time.h>
23836
23837         * m4/c-bs-a.m4: Remove uses of changequote altogether.
23838         Thanks to Akim for explaining.
23839
23840 2000-01-17  Paul Eggert  <eggert@twinsun.com>
23841
23842         * lib/nanosleep.c (nanosleep):
23843         Don't use SA_INTERRUPT to decide whether to call sigaction, as
23844         POSIX.1 doesn't require SA_INTERRUPT and some systems
23845         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
23846         it's been part of POSIX.1 since day 1 (in 1988).
23847
23848 2000-01-17  Jim Meyering  <meyering@lucent.com>
23849
23850         * lib/interlock: Remove unused file.  Reported by François Pinard.
23851
23852 2000-01-16  Paul Eggert  <eggert@twinsun.com>
23853
23854         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
23855         alert, backslash, formfeed, and vertical tab unnecessarily in
23856         shell quoting style.
23857
23858 2000-01-16  Jim Meyering  <meyering@lucent.com>
23859
23860         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
23861         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
23862         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
23863         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
23864
23865 2000-01-16  Jim Meyering  <meyering@lucent.com>
23866
23867         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
23868         because the latter didn't work.
23869
23870 2000-01-15  Jim Meyering  <meyering@lucent.com>
23871
23872         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
23873         (AC_REPLACE_FUNCS): Add memcpy and memset.
23874         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
23875         Add strpbrk.
23876         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
23877
23878 2000-01-12  Jim Meyering  <meyering@lucent.com>
23879
23880         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
23881         (jm_PREREQ): Use it.
23882         (jm_PREREQ_READUTMP): New macro.
23883         (jm_PREREQ): Use it.
23884
23885 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23886
23887         Quote multibyte characters correctly.
23888         * m4/c-bs-a.m4: New file.
23889         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
23890         (jm_PREREQ): Use it.
23891
23892 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23893
23894         * m4/uintmax_t.m4: Port to autoconf 2.13.
23895
23896 2000-01-08  Jim Meyering  <meyering@ascend.com>
23897
23898         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
23899         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
23900
23901 2000-01-04  Jim Meyering  <meyering@ascend.com>
23902
23903         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
23904         jm_STRUCT_DIRENT_D_TYPE.
23905         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
23906         jm_STRUCT_DIRENT_D_INO.
23907         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
23908         jm_STRUCT_UTIMBUF.
23909         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
23910         renamings.
23911         * m4/utime.m4: Likewise.
23912
23913         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
23914         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
23915
23916 2000-01-03  Paul Eggert  <eggert@twinsun.com>
23917
23918         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
23919         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
23920
23921 2000-01-02  Jim Meyering  <meyering@ascend.com>
23922
23923         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
23924         remember if this is necessary.
23925
23926 1999-12-26  Jim Meyering  <meyering@ascend.com>
23927
23928         * m4/jm-macros.m4: Use it here.
23929         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
23930
23931 1999-12-23  Jim Meyering  <meyering@ascend.com>
23932
23933         * m4/jm-macros.m4: Check for clock_gettime (moved from
23934         fileutils/configure.in)
23935         Check for gettimeofday.
23936
23937 1999-12-20  Jim Meyering  <meyering@ascend.com>
23938
23939         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
23940         autoconf-2.14a-1999-12-20.
23941
23942 1999-12-19  Jim Meyering  <meyering@ascend.com>
23943
23944         * m4/lstat-slash.m4: New file.
23945         * m4/jm-macros.m4: Use the new macro:
23946         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23947
23948 1999-12-07  Jim Meyering  <meyering@ascend.com>
23949
23950         * m4/perl.m4: Require that File::Compare be available, too.
23951         Too many systems seem to lack it.
23952
23953         * m4/strftime.m4: Add checks for most of the cpp macros tested in
23954         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
23955
23956 1999-11-18  Paul Eggert  <eggert@twinsun.com>
23957
23958         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
23959         problem with the QNX 4.25 shell, which doesn't propagate exit
23960         status of failed commands inside shell assignments.
23961
23962 1999-11-17  Jim Meyering  <meyering@ascend.com>
23963
23964         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
23965
23966 1999-11-07  Jim Meyering  <meyering@ascend.com>
23967
23968         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
23969
23970 1999-11-06  Jim Meyering  <meyering@ascend.com>
23971
23972         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
23973         * m4/jm-macros.m4 (jm_MACROS): Use it here.
23974
23975 1999-11-05  Jim Meyering  <meyering@ascend.com>
23976
23977         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
23978         configure.in of textutils, fileutils, and sh-utils into this one
23979         (shared between those packages) file.
23980         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
23981         AC_STRUCT_ST_BLKSIZE.
23982
23983 1999-11-03  Jim Meyering  <meyering@ascend.com>
23984
23985         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
23986         of AC_CHECK_TYPE checks includes unistd.h.
23987         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
23988         Suggestion from Akim Demaille.
23989
23990 1999-10-30  Jim Meyering  <meyering@ascend.com>
23991
23992         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
23993         m4-quoted string.
23994         * m4/ls-mntd-fs.m4: Likewise.
23995         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
23996         * m4/jm-winsz1.m4: Likewise.
23997
23998         * m4/const.m4: Remove file, since the fix made it into the experimental
23999         version of autoconf.
24000         * m4/mktime.m4: Likewise.
24001
24002         * m4/check-type.m4: Remove file, now that the latest version of
24003         AC_CHECK_TYPE takes a third arg to specify additional #includes.
24004
24005         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
24006         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
24007         AC_CHECK_TYPE.
24008
24009 1999-10-04  Jim Meyering  <meyering@ascend.com>
24010
24011         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
24012
24013 1999-09-22  Paul Eggert  <eggert@twinsun.com>
24014
24015         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
24016         2.95.1 bug with HP-UX 10.20.
24017
24018 1999-09-17  Jim Meyering  <meyering@ascend.com>
24019
24020         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
24021         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
24022         due to missing strdup (against sh-utils-2.0).
24023
24024 1999-08-29  Jim Meyering  <meyering@ascend.com>
24025
24026         * m4/jm-macros.m4: Require jm_BISON.
24027         * m4/bison.m4: New file.
24028
24029 1999-08-17  Paul Eggert  <eggert@twinsun.com>
24030
24031         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
24032         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
24033
24034 1999-08-05  Jim Meyering  <meyering@ascend.com>
24035
24036         * m4/getline.m4: Rename test file from conftestdata to conftest.data
24037         to avoid conflicts with `conftest' on 8+3 filesystems.
24038         Suggestion from Eli Zaretskii.
24039
24040 1999-08-04  Jim Meyering  <meyering@ascend.com>
24041
24042         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
24043         fileutils and sh-utils (textutils's getline test was inadequate).
24044         (AM_FUNC_GETLINE): Run this test.
24045         (AC_CHECK_FUNCS): Check for getdelim.
24046         Reported by Bob Proulx.
24047
24048 1999-08-02  Jim Meyering  <meyering@ascend.com>
24049
24050         * m4/jm-macros.m4: Add a comment.
24051
24052 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24053
24054         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
24055         <inttypes.h> defines strtoumax as a macro (and not as a
24056         function).
24057
24058 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24059
24060         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
24061         that we can shift, multiply and divide unsigned long long
24062         values; Ultrix cc can't do it.
24063
24064 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24065
24066         * m4/mktime.m4: New file, which is a preview of what should appear
24067         in the next public autoconf release.
24068
24069 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24070
24071         * m4/lfs.m4: Remove this file.
24072         * m4/largefile.m4: New file.  It contains the old contents of
24073         lfs.m4, except that all names with prefix AC_LFS have been
24074         changed to use the prefix AC_SYS_LARGEFILE instead, to be
24075         compatible with future autoconf versions.  Also, some minor m4
24076         quoting problems have been fixed.
24077
24078 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24079
24080         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
24081         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
24082         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
24083         and simplify the shell code.
24084
24085 1999-08-01  Jim Meyering  <meyering@ascend.com>
24086
24087         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
24088         m4.
24089
24090 1999-07-20  Jim Meyering  <meyering@ascend.com>
24091
24092         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
24093
24094 1999-07-15  Jim Meyering  <meyering@ascend.com>
24095
24096         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
24097
24098 1999-05-22  Jim Meyering  <meyering@ascend.com>
24099
24100         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
24101
24102 1999-05-20  Jim Meyering  <meyering@ascend.com>
24103
24104         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
24105         Add a colon after each `then' in case $4 is empty.
24106
24107 1999-05-16  Jim Meyering  <meyering@ascend.com>
24108
24109         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
24110
24111 1999-05-10  Jim Meyering  <meyering@ascend.com>
24112
24113         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
24114
24115         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
24116         AC_FUNC_MKTIME.
24117
24118 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
24119
24120         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
24121
24122 1999-05-04  Paul Eggert  <eggert@twinsun.com>
24123
24124         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
24125         not CPPFLAGS, so that linking works correctly in IRIX.
24126
24127 1999-04-30  Paul Eggert  <eggert@twinsun.com>
24128
24129         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
24130
24131 1999-04-20  Paul Eggert  <eggert@twinsun.com>
24132
24133         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
24134         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
24135         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
24136         jm_AC_TYPE_UNSIGNED_LONG_LONG.
24137         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
24138
24139         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
24140
24141 1999-04-20  Jim Meyering  <meyering@ascend.com>
24142
24143         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
24144         AC_REPLACE xstroull if necessary.  From Paul Eggert.
24145         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
24146
24147 1999-04-18  Jim Meyering  <meyering@ascend.com>
24148
24149         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
24150         * m4/jm-macros.m4: Use it.
24151
24152 1999-04-06  Jim Meyering  <meyering@ascend.com>
24153
24154         * m4/strftime.m4: Remove test for %f.
24155
24156 1999-03-29  Jim Meyering  <meyering@ascend.com>
24157
24158         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
24159         superset of the AC_TYPE_* checks in the textutils, fileutils,
24160         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
24161         AC_TYPE_PID_T.
24162
24163 1999-03-28  Jim Meyering  <meyering@ascend.com>
24164
24165         * m4/jm-macros.m4: Define GNU_PACKAGE here.
24166         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
24167         replaced e.g., in the *.sh files of the sh-utils.
24168
24169 1999-03-20  Jim Meyering  <meyering@ascend.com>
24170
24171         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
24172         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
24173         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
24174
24175 1999-03-19  Jim Meyering  <meyering@ascend.com>
24176
24177         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
24178
24179 1999-03-12  Jim Meyering  <meyering@ascend.com>
24180
24181         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
24182
24183 1999-03-07  Jim Meyering  <meyering@ascend.com>
24184
24185         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
24186         declared.
24187
24188 1999-02-17  Jim Meyering  <meyering@ascend.com>
24189
24190         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
24191         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
24192
24193 1999-02-07  Jim Meyering  <meyering@ascend.com>
24194
24195         * m4/group-member.m4: New file -- extracted from sh-utils'
24196         configure.in.
24197
24198         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
24199         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
24200
24201 1999-02-06  Jim Meyering  <meyering@ascend.com>
24202
24203         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
24204         * m4/fnmatch.m4: Likewise.
24205         * m4/getgroups.m4: Likewise.
24206         * m4/lstat.m4: Likewise.
24207         * m4/malloc.m4: Likewise.
24208         * m4/putenv.m4: Likewise.
24209         * m4/realloc.m4: Likewise.
24210         * m4/regex.m4: Likewise.
24211         * m4/stat.m4: Likewise.
24212         * m4/strftime.m4: Likewise.
24213         Suggestion from Alain Magloire.
24214
24215         * m4/chown.m4: Use `.$ac_objext', not `.o'.
24216         * m4/fnmatch.m4: Likewise.
24217         * m4/getgroups.m4: Likewise.
24218         * m4/getline.m4: Likewise.
24219         * m4/lstat.m4: Likewise.
24220         * m4/malloc.m4: Likewise.
24221         * m4/memcmp.m4: Likewise.
24222         * m4/putenv.m4: Likewise.
24223         * m4/realloc.m4: Likewise.
24224         * m4/regex.m4: Likewise.
24225         * m4/stat.m4: Likewise.
24226         * m4/strftime.m4: Likewise.
24227         Suggestion from Alain Magloire.
24228
24229         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
24230         an argument.
24231
24232         * m4/regex.m4: Add a run-time Test for proper operation of
24233         re_compile_pattern.
24234
24235 1999-01-31  Jim Meyering  <meyering@ascend.com>
24236
24237         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
24238
24239 1999-01-30  Jim Meyering  <meyering@ascend.com>
24240
24241         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
24242
24243         * m4/jm-mktime.m4: Make this a wrapper around the official
24244         AM_FUNC_MKTIME rather than my private copy, now that the official one
24245         is up to date.
24246         * m4/mktime.m4: Remove file.
24247
24248         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
24249         * m4/uptime.m4: Likewise.
24250         * m4/uintmax_t.m4: Likewise.
24251
24252 1999-01-28  Jim Meyering  <meyering@ascend.com>
24253
24254         * m4/jm-macros.m4: Use jm_AFS.
24255         * m4/afs.m4: New file (from fileutils' configure.in).
24256
24257         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
24258         * m4/chown.m4: Likewise.
24259         * m4/d-ino.m4: Likewise.
24260         * m4/d-type.m4: Likewise.
24261         * m4/fnmatch.m4: Likewise.
24262         * m4/getgroups.m4: Likewise.
24263         * m4/gettext.m4: Likewise.
24264         * m4/jm-mktime.m4: Likewise.
24265         * m4/jm-winsz2.m4: Likewise.
24266         * m4/lcmessage.m4: Likewise.
24267         * m4/ls-mntd-fs.m4: Likewise.
24268         * m4/malloc.m4: Likewise.
24269         * m4/memcmp.m4: Likewise.
24270         * m4/putenv.m4: Likewise.
24271         * m4/realloc.m4: Likewise.
24272         * m4/st_mtim.m4: Likewise.
24273         * m4/strftime.m4: Likewise.
24274
24275 1999-01-16  Jim Meyering  <meyering@ascend.com>
24276
24277         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
24278         (ARGMATCH_DIE_DECL): Define.
24279
24280 1999-01-12  Jim Meyering  <meyering@ascend.com>
24281
24282         * m4/Makefile.am.in: Rewrite to avoid using fmt.
24283         Reported by Lars Hecking.
24284
24285 1999-01-10  Jim Meyering  <meyering@ascend.com>
24286
24287         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
24288         gross kludge.
24289         * m4/inttypes_h.m4: Likewise.
24290         * m4/lstat.m4: Likewise.
24291         * m4/malloc.m4: Likewise.
24292         * m4/readdir.m4: Likewise.
24293         * m4/realloc.m4: Likewise.
24294         * m4/st_dm_mode.m4: Likewise.
24295         * m4/stat.m4: Likewise.
24296         * m4/utimbuf.m4: Likewise.
24297         * m4/utimes.m4: Likewise.
24298
24299         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
24300         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
24301         comments in config.h.in are meaningful.
24302
24303         * m4/jm-macros.m4: Require autoconf-2.13 here.
24304
24305         * m4/regex.m4: By default, don't use the included regex.c on systems
24306         with glibc 2.  Suggestion from Uli Drepper.
24307
24308 1999-01-02  Jim Meyering  <meyering@ascend.com>
24309
24310         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
24311
24312 1998-12-18  Jim Meyering  <meyering@ascend.com>
24313
24314         * m4/Makefile.am.in (Makefile.am): Simplify rule.
24315         Based on a suggestion from Lars Hecking.
24316
24317 1998-11-16  Paul Eggert  <eggert@twinsun.com>
24318
24319         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
24320
24321 1998-11-16  Jim Meyering  <meyering@ascend.com>
24322
24323         * m4/lfs.m4: Double-quote the `uname...` expression.
24324
24325 1998-11-14  Jim Meyering  <meyering@ascend.com>
24326
24327         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
24328         * m4/stat.m4: Likewise.
24329
24330 1998-11-03  Jim Meyering  <meyering@ascend.com>
24331
24332         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
24333         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
24334
24335 1998-10-18  Jim Meyering  <meyering@ascend.com>
24336
24337         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
24338
24339 1998-10-17  Jim Meyering  <meyering@ascend.com>
24340
24341         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
24342         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
24343         calls for those previously hard-coded headers.  Instead, take a new
24344         parameter.
24345         (jm_CHECK_DECLARATIONS): Reflect interface change.
24346         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
24347         (jm_CHECK_DECL_LOCALTIME_R): New macro.
24348
24349         * m4/mktime.m4: Test for spring-forward gap before long-running test.
24350
24351 1998-10-14  Jim Meyering  <meyering@ascend.com>
24352
24353         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
24354         instead of "TZ=America/Vancouver".  From Paul Eggert.
24355
24356 1998-10-11  Jim Meyering  <meyering@ascend.com>
24357
24358         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
24359         This adds a test for a recently added compatibility fix for mktime.c.
24360         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
24361
24362 1998-09-27  Jim Meyering  <meyering@ascend.com>
24363
24364         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
24365
24366         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
24367         ../configure.in, including a change from Gordon Matzigkeit to allow
24368         cross-compiling for the Hurd.
24369
24370         * m4/glibc.m4: New file/macro to test for the GNU C Library
24371         versions 1 and 2.  From Gordon Matzigkeit.
24372         Indent.
24373
24374 1998-09-21  Jim Meyering  <meyering@ascend.com>
24375
24376         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
24377
24378 1998-08-18  Paul Eggert  <eggert@twinsun.com>
24379
24380         Port nanosecond-resolution times to UnixWare 2.1.2 and
24381         pedantic Solaris 2.6.
24382
24383         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
24384         AC_STRUCT_ST_MTIM.
24385         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
24386         Generate name of ns member, instead of just 1 or undef.
24387         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
24388
24389 1998-08-15  Jim Meyering  <meyering@ascend.com>
24390
24391         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
24392         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
24393         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
24394         instead of jm_TYPE_SSIZE_T.
24395
24396 1998-08-12  Jim Meyering  <meyering@ascend.com>
24397
24398         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
24399
24400 1998-08-02  Jim Meyering  <meyering@ascend.com>
24401
24402         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
24403         in acconfig.h manually.
24404
24405 1998-07-31  Paul Eggert  <eggert@twinsun.com>
24406
24407         * m4/st_mtim.m4: New file.
24408
24409 1998-07-28  Jim Meyering  <meyering@ascend.com>
24410
24411         * m4/utimes.m4: Undef stat.
24412
24413 1998-07-25  Jim Meyering  <meyering@ascend.com>
24414
24415         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
24416         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
24417
24418 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
24419
24420         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
24421         uid and gid actually remain unchanged.
24422
24423 1998-07-07  Jim Meyering  <meyering@ascend.com>
24424
24425         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
24426
24427 1998-07-04  Jim Meyering  <meyering@ascend.com>
24428
24429         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
24430         to prove that this macro can be used in packages without regex.c.
24431
24432 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
24433
24434         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
24435         is to be used.
24436
24437 1998-07-03  Jim Meyering  <meyering@ascend.com>
24438
24439         * m4/gettext.m4: Add -lintl if it's found to be necessary.
24440
24441         * m4/gettext.m4: New file -- from gettext-0.10.35.
24442         * m4/lcmessage.m4: Likewise.
24443         * m4/progtest.m4: Likewise.
24444
24445         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
24446         * m4/jm-macros.m4: Require the new macro.
24447
24448 1998-06-29  Jim Meyering  <meyering@ascend.com>
24449
24450         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
24451         for the definition of NGROUPS (used in a system header included
24452         by sys/mount.h).
24453
24454 1998-06-28  Jim Meyering  <meyering@ascend.com>
24455
24456         * m4/ls-mntd-fs.m4: New file.
24457         * m4/fstypename.m4: New file.
24458
24459         * m4/jm-macros.m4: Require the new macro.
24460         * m4/jm-glibc-io.m4: New file.
24461
24462 1998-05-19  Jim Meyering  <meyering@ascend.com>
24463
24464         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
24465         * m4/lchown.m4: New file.
24466
24467         * m4/Makefile.am.in: New file.
24468         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
24469
24470 1998-05-14  Jim Meyering  <meyering@ascend.com>
24471
24472         * m4/Makefile.am (EXTRA_DIST): Add them.
24473         * m4/jm-macros.m4: New file.
24474         * m4/utimbuf.m4: New file.
24475
24476 1998-05-12  Jim Meyering  <meyering@ascend.com>
24477
24478         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
24479
24480 1998-05-11  Jim Meyering  <meyering@ascend.com>
24481
24482         * m4/isc-posix.m4: New file.
24483
24484 1998-05-10  Jim Meyering  <meyering@ascend.com>
24485
24486         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
24487
24488 1998-05-09  Jim Meyering  <meyering@ascend.com>
24489
24490         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
24491         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
24492         with automake.
24493
24494         * m4/ssize_t.m4: New file.
24495         * m4/mktime.m4: Remove file -- the new automake has this now.
24496
24497 1998-04-26  Jim Meyering  <meyering@ascend.com>
24498
24499         * m4/assert.m4: New file.
24500         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
24501
24502 1998-04-05  Jim Meyering  <meyering@ascend.com>
24503
24504         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
24505         (jm_PREREQ): Use it here.
24506
24507 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
24508
24509         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
24510         in acconfig.h.
24511
24512 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
24513
24514         * m4/prereq.m4: New file.
24515         * m4/error.m4: New file.
24516         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
24517
24518 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
24519
24520         * m4/getline.m4: Don't set am_cv_func_working_getline before the
24521         cache-check for the same variable -- that defeated the purpose of
24522         the test; the test program was never run.  This was a problem only
24523         on systems with losing getline functions -- HP-UX 10.20 is one.
24524         Reported by Bjorn Helgaas.
24525
24526 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
24527
24528         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
24529
24530 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
24531
24532         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
24533
24534         * m4/const.m4: New file.  Use an initializer in this declaration
24535         typedef int charset[2]; const charset x;
24536         Reported by Bob Glickstein.
24537
24538 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
24539
24540         * m4/chown.m4: Fix reversed types on -1 args to chown.
24541         From Kaveh Ghazi.
24542
24543 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
24544
24545         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
24546         Add lseek and memchr.
24547
24548         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
24549         T.E.Dickey <dickey@clark.net> said that some older preprocessors
24550         have a 20-character limit on names.
24551
24552 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
24553
24554         * m4/inttypes_h.m4: New file.
24555         * m4/uintmax_t.m4: New file.
24556         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
24557
24558 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
24559   Free Software Foundation, Inc.
24560 Copying and distribution of this file, with or without modification,
24561 are permitted provided the copyright notice and this notice are preserved.