5e56c758bc62077b328d715b1fca2ceb06f734bd
[gnulib.git] / ChangeLog
1 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
2
3         Import the following change from libc; problem reported by
4         Sven Verdoolaege.
5
6         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
7
8         [BZ #1373]
9         * lib/argp.h: Remove __NTH for __argp_usage inline function.
10
11 2006-12-28  Jim Meyering  <jim@meyering.net>
12
13         * build-aux/announce-gen: Do not assume that the package
14         builds any of tar.gz, tar.bz2, and .xdelta files.
15         Suggestion from Simon Josefsson.
16
17 2006-12-28  Simon Josefsson  <simon@josefsson.org>
18
19         * modules/announce-gen: New file.
20
21 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
22
23         * lib/mbchar.h: Just include <wctype.h>; the wctype module
24         handles its gotchas now.
25         * lib/mbswidth.c: Likewise.
26         * lib/wcwidth.h: Likewise.
27         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
28         and iswcntrl; the wctype module does this stuff now.
29         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
30         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
31         * modules/mbchar (Depends-on): Add wctype.
32         * modules/mbswidth (Depends-on): Likewise.
33         * modules/wcwidth (Depends-on): Likewise.
34
35 2006-12-27  Eric Blake  <ebb9@byu.net>
36
37         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
38         module uses more than what <wctype.h> is required to provide.
39
40 2006-12-26  Eric Blake  <ebb9@byu.net>
41
42         * gnulib-tool (sed_extract_prog): Avoid space-tab.
43
44 2006-12-26  Eric Blake  <ebb9@byu.net>
45
46         * modules/absolute-header: New module.
47         * modules/fcntl (Depends-on): Depend on it.
48         * modules/inttypes (Depends-on): Likewise.
49         * modules/stdint (Depends-on): Likewise.
50         * modules/sys_stat (Depends-on): Likewise.
51         * modules/wctype (Depends-on): Likewise.
52         * MODULES.html.sh (Support for building libraries and
53         executables): Document it.
54
55 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
56
57         * gnulib-tool (SED): Remove, undoing previous change.
58         The problem was that it broke coreutils on Solaris, because
59         "sed --posix" leaked into a makefile.
60         (sed): New alias, if 'alias' and GNU sed.
61
62 2006-12-24  Jim Meyering  <jim@meyering.net>
63
64         Work around an fchownat bug in glibc-2.4:
65         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
66         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
67         in spite of the -P option.
68         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
69         New macros.
70         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
71         * modules/openat (Files): Add lib/fchownat.c.
72         * lib/openat.c (fchownat): Don't define here.  Move to...
73         * lib/fchownat.c: ...this new file.
74
75 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
76
77         Fix bug reported by Bruno Haible in
78         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
79         where quotearg.c didn't compile on Mac OS X 10.2 because it
80         lacks <wchar.h> and wint_t.
81         * lib/wctype_.h (__wctype_wint_t): New type.
82         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
83         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
84         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
85         Arg is now of type __wctype_wint_t, not wint_t.
86         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
87         substitute HAVE_WINT_T.
88         * modules/wctype (Files): Add m4/wint_t.m4.
89         (wctype.h): Substitute HAVE_WINT_T.
90
91 2006-12-23  Bruno Haible  <bruno@clisp.org>
92
93         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
94
95 2006-12-23  Bruno Haible  <bruno@clisp.org>
96
97         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
98         S_ISLNK.
99         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
100         mingw.
101
102 2006-12-22  Bruno Haible  <bruno@clisp.org>
103
104         * lib/copy-file.c: Include acl.h.
105         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
106         Close the file descriptors only after being done with copy_acl.
107         * modules/copy-file (Depends-on): Add acl.
108
109 2006-12-22  Bruno Haible  <bruno@clisp.org>
110
111         * gnulib-tool (SED): New variable.
112         Use $SED instead of sed everywhere.
113
114 2006-12-22  Bruno Haible  <bruno@clisp.org>
115
116         * modules/no-c++: New file.
117         * m4/no-c++.m4: New file.
118         * MODULES.html.sh (Support for building libraries and executables):
119         Add no-c++.
120
121 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
122
123         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
124         Include <limits.h>, and use its INT_MAX to rewrite the
125         j loop so that it does not overflow 'int'.  Problem reported by
126         Ralf Wildenhues in
127         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
128         Play it safe by shifting left by 1 rather than multiplying by 2,
129         as GCC is less likely to optimize this away when the value
130         is signed (when it assumes overflow leads to undefined behavior).
131         Also, don't assume time_t uses two's complement.
132
133 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
134
135         * MODULES.html.sh: New module wctype.
136         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
137         * lib/fnmatch.c: Don't bother to include <wchar.h> before
138         <wctype.h>, since the new wctype module should fix this.
139         * lib/quotearg.c: Include <wctype.h> unconditionally, since
140         the wctype module should arrange for it.
141         * lib/regex_internal.h: Likewise.
142         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
143         since the wctype module should handle this now.
144         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
145         * modules/fnmatch (Depends-on): Add wctype.
146         * modules/quotearg (Depends-on): Likewise.
147         * modules/regex (Depends-on): Likewise.
148
149 2006-12-19  Bruno Haible  <bruno@clisp.org>
150
151         * lib/strdup.h [C++]: Wrap definitions in extern "C".
152         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
153
154 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
155
156         * modules/savewd (Depends-on): Fix dependency on fcntl.
157
158 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
159
160         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
161         conforms to C99, rather than relying on the user's environment
162         setting of STDINT_H.
163
164 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
165         and Eric Blake  <ebb9@byu.net>
166
167         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
168         This is more consistent with the other defines here.
169         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
170         Port to z/OS.  Problem reported by Paul Gilmartin.
171         Change local vars to use gl_ prefix rather than ac_.
172         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
173         with other defines.
174         * modules/double-slash-root: New module.
175         * modules/dirname (Files): Remove m4/double-slash-root.m4.
176         (Depends-on): Add double-slash-root.
177         * MODULES.html.sh (File system functions): Mention new module.
178
179 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
180
181         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
182         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
183         This is for the benefit of gzip, which doesn't do i18n.
184
185 2006-12-12  Jim Meyering  <jim@meyering.net>
186
187         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
188         Reported by Andreas Schwab <schwab@suse.de>.
189
190 2006-12-12  Bruno Haible  <bruno@clisp.org>
191
192         Merge these changes.
193         2006-09-05  Bruno Haible  <bruno@clisp.org>
194         * lib/iconvme.c (iconv_string): No need to save and restore errno when
195         iconv_alloc succeeded.
196         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
197         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
198         test for " && dest " at the end - dest is always != NULL there. Call
199         iconv with 4xNULL arguments initially, to reset the state. Call iconv
200         with 2xNULL arguments, also to flush the state storage. Handle the
201         IRIX iconv behaviour. Realloc the final result, to throw away unused
202         memory.
203
204 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
205
206         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
207         and fchmodat unconditionally, since glibc 2.4 has them.
208         Problem reported by Arkadiusz Miskiewicz.
209
210 2006-12-10  Bruno Haible  <bruno@clisp.org>
211
212         * gnulib-tool (func_import): Show the include files only for those
213         modules that are copied and specified.
214         Reported by Karl Berry.
215
216 2006-12-08  Jim Meyering  <jim@meyering.net>
217
218         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
219         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
220
221         * build-aux/announce-gen: Add two new options, both optional:
222         --bootstrap-tools=TOOL_LIST
223               a comma-separated list of tools, e.g.,
224               autoconf,automake,bison,gnulib
225         --gnulib-snapshot-date=DATE
226               if gnulib is in the bootstrap tool list,
227               then report this as the snapshot date.
228               If not specified, use the current date/time.
229               If you specify a date here, be sure it's UTC.
230
231 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
232
233         * tests/test-argp-2.sh: Fix test to match actual output.
234         (func_compare): Fix sed script to be portable.
235
236 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
237
238         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
239         workaround for this case.  It is not autoconfigured now; offhand
240         it's hard to see how to autoconfigure it.
241
242 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
243
244         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
245         a directory that is about to be chowned.  Such a directory's
246         initial file permissions should permit the owner only and this
247         should not be changed until after the chown, since the group and
248         other bits would be incorrect if they granted permission before
249         the chown.
250
251         Fix porting problem for iswctype reported by Georg Schwarz in:
252         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
253         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
254         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
255         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
256         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
257
258 2006-12-03  Jim Meyering  <jim@meyering.net>
259
260         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
261         p->fts_statp may not yet be defined.
262         (fts_read): Instead, set it in the caller, once p->fts_statp is
263         sure to be defined, and corresponds to a top-level directory.
264         This bug made du -x fail.  Here's the coreutils test case:
265         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
266         Reported by Mike Frysinger.
267
268 2006-12-01  Jim Meyering  <jim@meyering.net>
269
270         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
271         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
272         Reported by Simon Josefsson.
273
274 2006-11-30  Jim Meyering  <jim@meyering.net>
275
276         * m4/warning.m4: Use the all-permissive copyright notice
277         recommended by RMS (rather than LGPL).
278         * m4/vararrays.m4: Likewise.
279         * m4/flexmember.m4: Likewise.
280
281 2006-11-29  Bruno Haible  <bruno@clisp.org>
282
283         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
284         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
285         using +=.
286         Reported by Simon Josefsson <simon@josefsson.org>.
287
288 2006-11-28  James Youngman <jay@gnu.org>
289
290         * README: Advise users that they might find the bug-gnulib@gnu.org
291         and autotools-announce@gnu.org mailing lists useful.
292
293 2006-11-28  Bruno Haible  <bruno@clisp.org>
294
295         * m4/ptrdiff_max.m4: Remove file.
296
297 2006-11-21  Bruno Haible  <bruno@clisp.org>
298
299         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
300         _AC_COMPUTE_INT.
301         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
302         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
303         _AC_COMPUTE_INT.
304         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
305         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
306         _AC_COMPUTE_INT.
307         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
308
309 2006-11-28  Jim Meyering  <jim@meyering.net>
310
311         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
312         warning from "gcc -Wshadow" about shadowing the builtin.
313
314 2006-11-27  Bruno Haible  <bruno@clisp.org>
315
316         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
317         _AC_COMPUTE_INT.
318         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
319
320 2006-11-27  Bruno Haible  <bruno@clisp.org>
321             Paul Eggert  <eggert@cs.ucla.edu>
322
323         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
324
325 2006-11-26  Bruno Haible  <bruno@clisp.org>
326
327         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
328         noinst_LTLIBRARIES.
329
330 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
331             Bruno Haible  <bruno@clisp.org>
332
333         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
334         if compiling with "gcc -ansi".
335
336 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
337
338         Fix some incompatibilities with gcc -ansi -pedantic.
339         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
340         if compiling pedantically with GCC, unless it's C99 or later.
341         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
342         it mishandles gcc -ansi -pedantic as well.
343         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
344         if gcc -pedantic.
345         * lib/regexec.c (check_node_accept_bytes): Don't use auto
346         initializers for struct if -pedantic, unless it's C99 or later.
347
348 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
349
350         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
351         Don't close an fd more than once. Identical atimes indicate
352         success, not failure.
353
354 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
355
356         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
357
358 2006-11-23  Jim Meyering  <jim@meyering.net>
359
360         * build-aux/announce-gen: New file.  From coreutils.
361
362 2006-11-22  Jim Meyering  <jim@meyering.net>
363
364         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
365         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
366         (fts_read): Use a temporary to narrow the overused st_size member
367         before using it in a switch statement.  Reported by Matthew Woehlke.
368
369         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
370         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
371
372 2006-11-20  Bruno Haible  <bruno@clisp.org>
373
374         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
375         changequote instead of pairs of brackets.
376         Reported by Andreas Schwab <schwab@suse.de>.
377
378 2006-11-21  Jim Meyering  <jim@meyering.net>
379
380         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
381         so as to remain compatible with older compilers.
382         Patch from Michael Deutschmann.
383
384 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
385
386         * MODULES.html.sh (File system functions): Add openat.
387
388         * lib/openat.h (rpl_fstatat): New macro, if
389         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
390         (fstatat): Define to rpl_fstatat under the same conditions,
391         unless COMPILING_FSTATAT.
392         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
393         seems to have the bug.
394         * lib/fstatat.c: New file.
395         * modules/openat (Files): Add it.
396
397 2006-11-20  Bruno Haible  <bruno@clisp.org>
398
399         * Makefile: New file.
400
401 2006-11-20  Jim Meyering  <jim@meyering.net>
402
403         The beginnings of syntax-related checks for gnulib.
404         * lib/Makefile: New file.
405         * lib/t-idcache: New script.  Ensure that the two halves of
406         idcache.c stay in sync.
407
408         * lib/idcache.c: Adjust comments in user- and group- portions to
409         be more accurate, and to be consistent with one another.
410
411 2006-11-20  Jim Meyering  <jim@meyering.net>
412
413         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
414         continue using the flexible array member (thus, this module performs
415         half as many malloc calls), with the addition that...
416         (getgroup, getuser): Consistently record a non-match via an empty
417         "name" string, and map an empty string match to a NULL return value.
418         * modules/idcache (Depends-on): Re-add flexmember.
419
420         * lib/idcache.c (getuser): Remove all uses of the register keyword.
421         (getuidbyname, getgroup, getgidbyname): Likewise.
422
423         Use cleaner syntax: NULL rather than 0.
424         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
425
426 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
427
428         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
429         It mishandled the case where the group was missing.
430         Problem reported by Greg Schafer.
431         * modules/idcache: Likewise.
432
433 2006-11-18  Jim Meyering  <jim@meyering.net>
434
435         * check-module (%exempt_header): Add exception for some
436         conditionally-included headers.
437
438         * modules/i-ring (Depends-on): Add verify.
439         (License): Change to LGPL.
440
441 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
442
443         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
444         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
445         and inttostr.h.  Use snprintf rather than uinttostr, so that
446         LGPLed code doesn't depend on GPLed.
447
448 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
449
450         * modules/inline (License): Change from GPL to LGPL.
451
452 2006-11-17  Jim Meyering  <jim@meyering.net>
453
454         * modules/d-type (License): Switch to LGPL.
455
456 2006-11-15  Bruno Haible  <bruno@clisp.org>
457
458         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
459
460 2006-11-15  Eric Blake  <ebb9@byu.net>
461
462         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
463         the module dependency.
464
465 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
466             Bruno Haible  <bruno@clisp.org>
467
468         * gnulib-tool (func_create_testdir): Add license consistency check.
469
470 2006-11-15  Eric Blake  <ebb9@byu.net>
471
472         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
473         random "(cached)" in configure output.
474
475 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
476
477         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
478         test for conforming inttypes.h is both announced and cached.
479
480         * MODULES.html.sh (seen_modules, seen_files): New variables.
481         (func_module): Rewrite to use a few less gnulib-tool and sed
482         invocations.  Avoid a couple of quadratic algorithms for ...
483         (missed_modules, missed_files): ... these, with ...
484         (func_append, func_tmpdir): ... these new functions, from
485         gnulib-tool.  Analogously, install traps for cleanup.
486
487         * tests/test-gc.c (main): Remove unused variables.
488         * tests/test-read-file.c: Include stdlib.h, for 'free'.
489
490 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
491
492         * modules/inttostr (License): Change to LGPL.
493
494 2006-11-14  Eric Blake  <ebb9@byu.net>
495
496         * modules/tempname (License): Change to LGPL.
497
498 2006-11-14  Eric Blake  <ebb9@byu.net>
499
500         * doc/functions.texi (Function Portability): *printf functions on
501         Cygwin now understand all POSIX size specifiers.
502
503 2006-11-14  Bruno Haible  <bruno@clisp.org>
504
505         * modules/c-ctype (License): Change to LGPL.
506
507 2006-11-12  Bruno Haible  <bruno@clisp.org>
508
509         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
510         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
511         for GNOME libraries, for which the include files are installed in
512         subdirectories of $prefix/include.
513
514 2006-11-12  Bruno Haible  <bruno@clisp.org>
515
516         * m4/lib-link.m4: Require at least autoconf-2.54.
517         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
518         name to underscores for the --with option.
519
520 2006-11-13  Bruno Haible  <bruno@clisp.org>
521
522         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
523         the tests directory.
524         Reported by Ralf Wildenhues.
525
526 2006-11-13  Bruno Haible  <bruno@clisp.org>
527
528         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
529         (func_emit_initmacro_end): Undo the override here.
530         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
531         Works around the famous automake error in coreutils.
532
533 2006-11-13  Eric Blake  <ebb9@byu.net>
534
535         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
536         element, not its node.
537
538 2006-11-12  Bruno Haible  <bruno@clisp.org>
539
540         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
541         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
542
543 2006-11-12  Bruno Haible  <bruno@clisp.org>
544
545         * gnulib-tool: New option --local-symlink.
546         (func_usage): Document it.
547         (lsymbolic): New variable.
548         (func_import, func_create_testdir): If --symlink was not specified,
549         test whether --local-symlink was specified and the file comes from
550         the local_gnulib_dir.
551
552 2006-11-12  Bruno Haible  <bruno@clisp.org>
553
554         * gnulib-tool (func_ln): New function.
555         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
556
557 2006-11-12  Bruno Haible  <bruno@clisp.org>
558
559         Finish support for source files in subdirectories.
560         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
561         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
562         AUTOMAKE_OPTIONS.
563         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
564
565 2006-11-12  Bruno Haible  <bruno@clisp.org>
566
567         * gnulib-tool (func_get_automake_snippet): Synthesize also an
568         EXTRA_lib_SOURCES augmentation.
569         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
570
571 2006-11-12  Jim Meyering  <jim@meyering.net>
572
573         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
574         file descriptors.  This also averts a failure on systems with
575         native openat support when a traversed directory lacks "x" access.
576         * lib/fts_.h: Include "i-ring.h"
577         (struct FTS) [fts_fd_ring]: New member.
578         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
579         (FCHDIR): Add parentheses.
580         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
581         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
582         When descending, rather than simply closing the previous
583         fts_cwd_fd value, push that file descriptor onto the ring.
584         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
585         (fts_open): Initialize the new fd_ring member.
586         (fts_close): Clear the ring.
587         (fts_safe_changedir): When possible, use our new fd_ring to skip
588         the diropen and fstat and dev/ino comparison that would normally
589         accompany a virtual `chdir ("..")'.
590
591         * modules/fts (Depends-on): Add i-ring.
592         * modules/i-ring: New module.
593         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
594         * m4/i-ring.m4: New file.
595
596 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
597
598         * gnulib-tool (func_create_testdir): Fix replacement of
599         `build-aux' in configure.ac.  Run autotools in gltests
600         subdirectory.
601         (func_create_testdir, func_create_megatestdir, test): There is
602         no need for '--force' in most autotool invocations in a new
603         tree.  Actually fail the whole test if any of the tools, or the
604         configure or make stages fail.
605
606         Sync from Automake.
607         * build-aux/gnupload: Revert last change.  Add pointer to upload
608         instructions of the GNU Maintenance Instructions.
609         Suggestion by Karl Berry.
610
611 2006-11-10  Jim Meyering  <jim@meyering.net>
612
613         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
614
615 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
616
617         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
618         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
619         (bind_textdomain_codeset) [! ENABLE_NLS]:
620         Evaluate all the arguments.  That way, callers get compatible behavior
621         if the arguments have side effects.  Also, it avoids some GCC
622         diagnostics in some cases; Joel E. Denny reported problems when Bison
623         was configured with --enable-gcc-warnigs.
624
625 2006-11-10  Jim Meyering  <jim@meyering.net>
626
627         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
628         relevant options in CFLAGS (like -O, -fno-inline) are taken into
629         account.
630
631 2006-11-10  Jim Meyering  <jim@meyering.net>
632
633         * modules/inline: New file/module.
634         * modules/xalloc (Files): Remove m4/inline.m4.
635         (Depends-on): Add inline, instead.
636         * modules/oset: Likewise.
637         * modules/list: Likewise.
638
639 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
640
641         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
642         Problem reported by Matthew Woehlke.
643
644 2006-11-09  Bruno Haible  <bruno@clisp.org>
645
646         * lib/tempname.c (gen_tempname): Remove variant that invokes
647         __gen_tempname.
648         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
649         __gen_tempname.
650
651 2006-11-08  Bruno Haible  <bruno@clisp.org>
652
653         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
654         to 'yes' instead of 'cross-compiling'.
655
656 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
657
658         * lib/quotearg.h (quotearg_free): New decl.
659         * lib/quotearg.c (quotearg_free): New function.
660         (slot0, nslots, slotvec0, slotvec):
661         Now file-scope so that quotearg_free can get at them.
662
663 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
664
665         Sync from Automake.
666         * build-aux/gnupload: Add missing 'gnu' to example URL.
667         Report by Karl Berry.
668
669 2006-11-08  Bruno Haible  <bruno@clisp.org>
670
671         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
672         Suggested by Paul Eggert.
673
674 2006-11-08  Jim Meyering  <jim@meyering.net>
675
676         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
677         It's already included if !_LIBC.
678         (fts_safe_changedir): Add a comment.
679
680 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
681
682         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
683         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
684         Matthew Woehlke.
685
686         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
687         definitions up, to avoid colliding with change below.
688         (static_inline) [HAVE_INLINE]: New macro.
689         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
690         Provide extern decls when !HAVE_INLINE.  Do not define unless
691         static_inline is defined, either by us or by xmalloc.c.  Use
692         static_inline rather than static inline.
693         (XCALLOC): Optimize sizeof(T) = 1 case.
694         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
695
696 2006-11-07  Bruno Haible  <bruno@clisp.org>
697
698         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
699         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
700         AC_C_INLINE.
701         * modules/xalloc (Files): Add m4/inline.m4.
702
703 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
704
705         * README: Fix typo.
706         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
707         (Miscellanous Notes): ...from this.
708
709 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
710
711         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
712         Mention that offsetof should be used instead of sizeof.
713         From Bruno Haible.
714
715 2006-11-07  Bruno Haible  <bruno@clisp.org>
716
717         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
718
719 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
720
721         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
722         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
723         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
724         (gl_tree_add_before, gl_tree_add_after):
725         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
726         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
727         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
728         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
729         (gl_linked_add_after, gl_linked_add_at): Likewise.
730         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
731         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
732         (gl_tree_add_before, gl_tree_add_after): Likewise.
733         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
734         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
735         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
736
737 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
738
739         * lib/gl_oset.h: Use C comment style, not C++ comment style.
740
741 2006-11-06  Bruno Haible  <bruno@clisp.org>
742
743         * m4/inline.m4: New file.
744         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
745         * modules/list (Files): Add m4/inline.m4.
746         * modules/oset (Files): Likewise.
747
748 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
749
750         * lib/idcache.c: Include <stddef.h>, for offsetof.
751         (struct userid.name): Change from char * to a flexible array member.
752         All uses changed.
753         * modules/idcache (Depends-on): Add flexmember.
754
755         * MODULES.html.sh (Core language properties): New module flexmember.
756         * modules/flexmember, m4/flexmember.m4: New files.
757
758         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
759         inline functions that are identical with the old xnmalloc_inline,
760         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
761         that we can avoid some unnecessary integer multiplications and
762         divisions in the common case where the element size is known at
763         compile time.
764         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
765         needed.
766         (xnboundedmalloc): Remove.
767         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
768         arguments, for consistency with rest of this header.
769         (xcharalloc): Rewrite using XNMALLOC.
770         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
771         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
772         versions have been moved to lib/xalloc.h and renamed to be the
773         non-*_inline versions.
774         (xmalloc, xrealloc): Implement without reference to the xnmalloc
775         and xnrealloc functions, since those functions are now inline and
776         now call us.
777         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
778         renaming described above.
779         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
780         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
781         captures the dependency in AC_C_INLINE.
782
783         New module canonicalize-lgpl, proposed by Charles Wilson in
784         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
785         with a few small changes afterwards.
786         * MODULES.html.sh (File system functions): New module
787         canonicalize-lgpl.
788         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
789         and canonicalize_file_name.
790         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
791         * modules/canonicalize-lgpl: New files.
792
793 2006-11-05  Bruno Haible  <bruno@clisp.org>
794
795         * gnulib-tool (func_import, func_create_testdir): Create directories
796         also for files in subdirectories of lib/.
797
798 2006-11-05  Bruno Haible  <bruno@clisp.org>
799
800         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
801         ANSI C compliant.
802
803 2006-11-03  Bruno Haible  <bruno@clisp.org>
804
805         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
806         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
807         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
808         (xnboundedmalloc): New inline function.
809         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
810         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
811         xmalloc.
812         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
813         xmalloc.
814         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
815         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
816         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
817         xmalloc.
818         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
819         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
820         xmalloc.
821         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
822         gl_tree_add_after): Use XMALLOC instead of xmalloc.
823         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
824         xmalloc.
825         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
826         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
827         gl_tree_add_after): Use XMALLOC instead of xmalloc.
828         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
829         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
830         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
831         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
832
833 2006-11-03  Bruno Haible  <bruno@clisp.org>
834
835         * lib/c-ctype.h [C++]: Define functions without name mangling.
836         * lib/fwriteerror.h [C++]: Likewise.
837         * lib/gcd.h [C++]: Likewise.
838         * lib/linebreak.h [C++]: Likewise.
839
840 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
841
842         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
843         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
844         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
845         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
846         Check for functions and headers just once.
847         Check for declaration of canonicalize_file_name.
848         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
849
850 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
851
852         * gnulib-tool (func_import): Fix typo in actioncmd.
853
854 2006-11-02  Bruno Haible  <bruno@clisp.org>
855
856         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
857         newline sequence in the Makefile.am snippet as a space, like "make"
858         does.
859         Reported by Roger Persson <perrog@gmail.com>.
860
861 2006-11-01  Bruno Haible  <bruno@clisp.org>
862
863         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
864         already declared in <string.h>.
865         * lib/strcase.h (strncasecmp): Don't declare it if yes.
866
867 2006-11-01  Bruno Haible  <bruno@clisp.org>
868
869         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
870         * lib/strcase.h: Include <string.h>.
871         (strcasecmp): Define to rpl_strcasecmp here.
872
873 2006-11-01  Bruno Haible  <bruno@clisp.org>
874
875         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
876
877 2006-11-01  Eric Blake  <ebb9@byu.net>
878
879         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
880
881         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
882
883 2006-10-29  Bruno Haible  <bruno@clisp.org>
884
885         Make it compile in C++ mode.
886         * lib/full-write.c (full_rw): Add a cast.
887
888 2006-11-01  Bruno Haible  <bruno@clisp.org>
889
890         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
891         be POSIX compliant.
892         Reported by Roger Persson <perrog@gmail.com>.
893
894 2006-11-01  Eric Blake  <ebb9@byu.net>
895
896         * lib/getopt_.h: Fix comments.
897
898 2006-10-31  Eric Blake  <ebb9@byu.net>
899
900         * modules/tmpdir (Depends-on): Add sys_stat.
901         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
902         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
903         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
904         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
905         tempname.
906
907 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
908
909         Avoid some C++ diagnostics reported by Bruno Haible.
910         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
911         xmalloc.
912         (quotearg_alloc): Use xcharalloc rather than xmalloc.
913         (struct slotvec): Move to top level.
914         (quotearg_n_options): Rewrite to avoid xmalloc.
915         * lib/xalloc.h (xcharalloc): New function.
916         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
917         [defined __cplusplus]: Add function template that provides result
918         type propagation.  This part of the change is from Bruno Haible.
919
920 2006-10-29  Bruno Haible  <bruno@clisp.org>
921
922         Make it compile in C++ mode.
923         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
924         * lib/strnlen1.c (strnlen1): Cast memchr result.
925         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
926         * lib/clean-temp.c (string_equals, string_hash): Add casts.
927         (create_temp_dir): Rename local variable 'template'.
928         (compile_csharp_using_sscli): Add cast.
929         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
930         * lib/findprog.c (find_in_path): Likewise.
931         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
932         * lib/wait-process.c (register_slave_subprocess): Likewise.
933
934 2006-10-22  Bruno Haible  <bruno@clisp.org>
935
936         * modules/tsearch: New file.
937         * lib/tsearch.h: New file.
938         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
939         * m4/tsearch.m4: New file.
940         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
941
942 2006-10-29  Eric Blake  <ebb9@byu.net>
943
944         * lib/arcfour.c: Assume config.h.
945         * lib/arctwo.c: Likewise.
946         * lib/base64.c: Likewise.
947         * lib/check-version.c: Likewise.
948         * lib/crc.c: Likewise.
949         * lib/des.c: Likewise.
950         * lib/gc-gnulib.c: Likewise.
951         * lib/gc-libgcrypt.c: Likewise.
952         * lib/gc-pbkdf2-sha1.c: Likewise.
953         * lib/getaddrinfo.c: Likewise.
954         * lib/getdelim.c: Likewise.
955         * lib/getline.c: Likewise.
956         * lib/hmac-md5.c: Likewise.
957         * lib/hmac-sha1.c: Likewise.
958         * lib/iconvme.c: Likewise.
959         * lib/md2.c: Likewise.
960         * lib/md4.c: Likewise.
961         * lib/memxor.c: Likewise.
962         * lib/read-file.c: Likewise.
963         * lib/readline.c: Likewise.
964         * lib/rijndael-alg-fst.c: Likewise.
965         * lib/rijndael-api-fst.c: Likewise.
966         * lib/xgetdomainname.c: Likewise.
967
968 2006-10-28  Eric Blake  <ebb9@byu.net>
969
970         * lib/xstrndup.c: Assume config.h.
971
972 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
973
974         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
975         stat-macros.h is now for our own macros, whereas stat_h is for
976         macros in the <sys/stat.h> name space.
977         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
978         (STAT_MACROS_H): Remove.
979         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
980         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
981         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
982         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
983         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
984         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
985         Move these macros to ...
986         * lib/stat_.h: here.  Don't include stat-macros.h.
987         * lib/canonicalize.c: Don't include stat-macros.h.
988         * lib/chown.c: Likewise.
989         * lib/euidaccess.c: Likewise.
990         * lib/file-type.c: Likewise.
991         * lib/filemode.c: Likewise.
992         * lib/glob.c: Likewise.
993         * lib/isapipe.c: Likewise.
994         * lib/lchown.c: Likewise.
995         * lib/lstat.c: Likewise.
996         * lib/mkdir-p.c: Likewise.
997         * lib/rmdir.c: Likewise.
998         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
999         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
1000         unless mkdir isn't declared, to speed up 'configure'.
1001         Always create sys/stat.h, since it's unlikely any real sys/stat.h
1002         would define all the S_* symbols.
1003         * modules/canonicalize (Depends-on):
1004         Depend on sys_stat, not stat-macros.
1005         * modules/chown: Likewise.
1006         * modules/euidaccess: Likewise.
1007         * modules/filemode: Likewise.
1008         * modules/file-type: Likewise.
1009         * modules/glob: Likewise.
1010         * modules/isapipe: Likewise.
1011         * modules/lchown: Likewise.
1012         * modules/lstat: Likewise.
1013         * modules/mkancesdirs: Likewise.
1014         * modules/rmdir: Likewise.
1015         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
1016         * modules/modechange: Likewise.
1017         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
1018         (configure.ac): Remove gl_STAT_MACROS.
1019         * modules/sys_stat (Depends-on): Remove stat-macros.
1020
1021 2006-10-27  Bruno Haible  <bruno@clisp.org>
1022
1023         * m4/signed.m4: Remove file.
1024         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
1025         invocation.
1026         * modules/vasnprintf (Files): Remove m4/signed.m4.
1027
1028 2006-10-27  Bruno Haible  <bruno@clisp.org>
1029
1030         Update to GNU gettext 0.16.
1031         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
1032         m4/inttypes-h.m4, m4/signed.m4.
1033         * m4/gettext.m4: Update to GNU gettext 0.16.
1034         * m4/intl.m4: New file, from GNU gettext.
1035         * m4/intldir.m4: New file, from GNU gettext.
1036         * config/srclist.txt: Update
1037
1038 2006-10-27  Eric Blake  <ebb9@byu.net>
1039
1040         * MODULES.html.sh: Document tempname.
1041         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
1042         dependencies.
1043         (Files): Move lib/tempname.c...
1044         * modules/tempname: ...to this new module.
1045         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
1046         (gl_PREREQ_TEMPNAME): Move...
1047         * m4/tempname.m4: ...to this new file.
1048         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
1049         * modules/sys_stat (Depends-on): Add stat-macros.
1050         * lib/stat_.h (includes): Pick up stat macros.
1051         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
1052         if stat macros are broken.
1053         * lib/tempname.c (includes): No need to include "stat-macros.h".
1054         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
1055         (direxists, __path_search) [!_LIBC]: Don't compile these in
1056         gnulib; the tmpdir module covers that.
1057         * lib/tempname.h: New file.
1058
1059 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
1060
1061         * COPYING: Explain how gnulib-tool converts licence headers.
1062         Almost all wording by Eric Blake.
1063
1064 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
1065
1066         * lib/mbchar.h (is_basic_table): Make read-only.
1067         * lib/mbchar.c (is_basic_table): Likewise.
1068         Reported by John Darrington.
1069
1070 2006-10-25  Bruno Haible  <bruno@clisp.org>
1071
1072         * lib/progname.h (set_program_name): Undefine before defining.
1073
1074 2006-10-25  Bruno Haible  <bruno@clisp.org>
1075
1076         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
1077         false for non-gcc C++ compilers.
1078         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
1079
1080 2006-10-24  Bruno Haible  <bruno@clisp.org>
1081
1082         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
1083         iconv implementations like Irix iconv.
1084
1085 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1086
1087         * modules/vararrays: New file.
1088         * m4/vararrays.m4: New file, taken from diffutils.
1089         * MODULES.html.sh: New module vararrays.
1090
1091 2006-10-24  Karl Berry  <karl@gnu.org>
1092
1093         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
1094         Don't call GNU Unix.
1095
1096 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1097
1098         * users.txt: Add Libtool.
1099
1100         Sync from Libtool:
1101
1102         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1103
1104         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
1105         to gnulib's policy of including config.h unconditionally.
1106
1107 2006-10-24  Bruno Haible  <bruno@clisp.org>
1108
1109         * modules/wcwidth (Files): Add m4/wint_t.m4.
1110         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
1111         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
1112
1113 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1114
1115         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
1116         to pacify GCC with some -W flags enabled.  Problem reported by
1117         Bruno Haible.
1118
1119 2006-10-24  Jim Meyering  <jim@meyering.net>
1120
1121         * MODULES.html.sh: Remove uinttostr.  It's not a module.
1122         Reported by Karl Berry.
1123
1124 2006-10-23  Bruno Haible  <bruno@clisp.org>
1125
1126         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
1127
1128 2006-10-24  Bruno Haible  <bruno@clisp.org>
1129
1130         * lib/gl_list.h: Use C comment style, not C++ comment style.
1131
1132 2006-10-23  Eric Blake  <ebb9@byu.net>
1133
1134         * lib/getaddrinfo.c (includes): Add missing include.
1135
1136 2006-10-23  Bruno Haible  <bruno@clisp.org>
1137             Paul Eggert  <eggert@cs.ucla.edu>
1138
1139         Ability to rename obstack_free.
1140         * lib/obstack.h (__obstack_free): New macro. Declare instead of
1141         obstack_free.
1142         (obstack_free): Invoke the __obstack_free macro.
1143         * lib/obstack.c (obstack_free): Use __obstack_free macro.
1144
1145 2006-10-23  Bruno Haible  <bruno@clisp.org>
1146             Paul Eggert  <eggert@cs.ucla.edu>
1147
1148         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
1149         __argc, __argv from the declaration. (They are defined as macros on
1150         mingw.)
1151
1152 2006-10-22  Bruno Haible  <bruno@clisp.org>
1153
1154         * doc/gnulib-intro.texi: New file.
1155         * doc/gnulib.texi: Include it.
1156
1157 2006-10-21  Bruno Haible  <bruno@clisp.org>
1158
1159         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
1160         "Introduction", "Miscellanous Notes", "Particular Modules".
1161
1162 2006-10-21  Bruno Haible  <bruno@clisp.org>
1163
1164         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1165         Change mostlyclean-local rule to avoid sh syntax error from bash
1166         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
1167
1168 2006-10-23  Jim Meyering  <jim@meyering.net>
1169
1170         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
1171         in place of snprintf.
1172
1173         * modules/inttostr (Files): Add lib/uinttostr.c.
1174         * lib/uinttostr.c (inttostr): New file/function.
1175         * lib/inttostr.h (uinttostr): Declare.
1176         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
1177         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
1178         Add uinttostr.
1179         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
1180
1181 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
1182
1183         * lib/canonicalize.c (ELOOP): Define if not already defined.
1184         Problem reported by Bruno Haible in
1185         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
1186
1187 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
1188
1189         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
1190         Problem reported by Perry Smith and Ville Laurikari.
1191
1192         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
1193         uses.
1194
1195 2006-10-19  Bruno Haible  <bruno@clisp.org>
1196
1197         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
1198         for mingw.
1199
1200 2006-10-19  Bruno Haible  <bruno@clisp.org>
1201
1202         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
1203         Needed for mingw.
1204
1205 2006-10-19  Bruno Haible  <bruno@clisp.org>
1206
1207         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
1208
1209 2006-10-19  Bruno Haible  <bruno@clisp.org>
1210
1211         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
1212         it.
1213
1214 2006-10-19  Bruno Haible  <bruno@clisp.org>
1215
1216         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
1217         invocation.
1218
1219 2006-10-19  Bruno Haible  <bruno@clisp.org>
1220
1221         * gnulib-tool (func_create_testdir): Don't include ftruncate and
1222         mountlist by default.
1223
1224 2006-10-16  Bruno Haible  <bruno@clisp.org>
1225
1226         * lib/c-strstr.c: Include c-strstr.h.
1227
1228 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1229
1230         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
1231         in a slash.
1232
1233 2006-10-18  Bruno Haible  <bruno@clisp.org>
1234
1235         * lib/lock.h [C++]: Wrap definitions in extern "C".
1236
1237 2006-10-18  Bruno Haible  <bruno@clisp.org>
1238
1239         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
1240         gl_LIBOBJS list.
1241
1242 2006-10-18  Bruno Haible  <bruno@clisp.org>
1243
1244         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
1245
1246 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
1247
1248         * lib/xstrtol.h: Include gettext.h.
1249         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
1250         Problem reported by Eric Blake.
1251         * modules/xstrtol (Depends-on): Add gettext-h.
1252
1253 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
1254
1255         * lib/strftime.c (advance): New macro.
1256         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
1257         incomplete type, so you can't add 0 to it.  Problem and patch
1258         reported by Eelco Dolstra for dietlibc.
1259
1260 2006-10-18  Jim Meyering  <jim@meyering.net>
1261
1262         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
1263         type for a local, and rename it: s/up/user_proc/.
1264
1265 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
1266
1267         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
1268         READ_UTMP_USER_PROCESS.
1269         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
1270
1271 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
1272
1273         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
1274         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
1275
1276 2006-10-17  Eric Blake  <ebb9@byu.net>
1277
1278         * lib/sigprocmask.c (sigprocmask): Fix typo.
1279
1280         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
1281
1282         * modules/clean-temp (Makefile.am): Don't add to make output...
1283         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
1284         config.h.
1285
1286 2006-10-17  Bruno Haible  <bruno@clisp.org>
1287
1288         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
1289         differently if DEFAULT_TEXT_DOMAIN is set.
1290
1291 2006-10-16  Bruno Haible  <bruno@clisp.org>
1292
1293         * lib/clean-temp.c: Include fwriteerror.h.
1294
1295 2006-10-16  Bruno Haible  <bruno@clisp.org>
1296
1297         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
1298
1299 2006-10-16  Bruno Haible  <bruno@clisp.org>
1300
1301         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
1302         * lib/sigprocmask.h: Include <sys/types.h>.
1303         (sigset_t): Use the system's definition if present.
1304
1305 2006-10-17  Eric Blake  <ebb9@byu.net>
1306
1307         * lib/xvasprintf.c (includes): Assume config.h.
1308         * lib/xasprintf.c (includes): Likewise.
1309
1310 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
1311
1312         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
1313         at least as wide as intmax_t.
1314
1315 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
1316
1317         (Imported from Automake.)
1318         * build-aux/gnupload: Update to version 1.1 of directive file.
1319
1320 2006-10-16  Eric Blake  <ebb9@byu.net>
1321
1322         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
1323         match Automake 1.10a.
1324
1325 2006-10-14  Bruno Haible  <bruno@clisp.org>
1326
1327         * modules/sigprocmask: New file.
1328         * lib/sigprocmask.h: New file.
1329         * lib/sigprocmask.c: New file.
1330         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
1331         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
1332         request sigprocmask.o.
1333         (gl_PREREQ_SIGPROCMASK): New macro.
1334         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
1335         (Depends-on): Add sigprocmask.
1336         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
1337         gt_SIGNALBLOCKING. Test for 'raise' only once.
1338         * lib/fatal-signal.c: Include sigprocmask.h.
1339         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
1340         unblock_fatal_signals): Define always.
1341         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1342         sigprocmask.
1343
1344 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
1345
1346         Sync from Automake.
1347         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
1348         which incorrectly sets the mode of an existing destination
1349         directory.  In some cases the unpatched install-sh could do the
1350         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
1351         system.  We hope this is rare in practice, but it's clearly worth
1352         fixing.  Problem reported by Alex Unleashed in
1353         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
1354         Also, don't bother to check for -m bugs unless we're using -m;
1355         suggested by Stepan Kasal.
1356
1357 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1358
1359         Sync from Automake.
1360         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
1361         `-c' flag, so they appear at the same position as in %FASTDEP%
1362         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
1363         which ignores unknown options only after the first non-option.
1364         Bug report against M4 by Nelson H. F. Beebe.
1365
1366 2006-10-13  Jim Meyering  <jim@meyering.net>
1367
1368         Fix a bug in yesterday's change.
1369         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
1370         p->fts_statp->st_dev would be used uninitialized.
1371         Ensures that we always call fts_stat on the very first entry.
1372         Miklos Szeredi reported that find -xdev stopped working.
1373
1374 2006-10-12  Bruno Haible  <bruno@clisp.org>
1375
1376         * gnulib-tool (func_get_automake_snippet): Append an automatically
1377         computed EXTRA_DIST augmentation.
1378         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
1379         * modules/alloca-opt (Makefile.am): Likewise.
1380         * modules/allocsa (Makefile.am): Likewise.
1381         * modules/arcfour (Makefile.am): Likewise.
1382         * modules/arctwo (Makefile.am): Likewise.
1383         * modules/argmatch (Makefile.am): Likewise.
1384         * modules/argz (Makefile.am): Likewise.
1385         * modules/atexit (Makefile.am): Likewise.
1386         * modules/backupfile (Makefile.am): Likewise.
1387         * modules/byteswap (Makefile.am): Likewise.
1388         * modules/c-strtod (Makefile.am): Likewise.
1389         * modules/c-strtold (Makefile.am): Likewise.
1390         * modules/calloc (Makefile.am): Likewise.
1391         * modules/canon-host (Makefile.am): Likewise.
1392         * modules/canonicalize (Makefile.am): Likewise.
1393         * modules/chdir-long (Makefile.am): Likewise.
1394         * modules/chdir-safer (Makefile.am): Likewise.
1395         * modules/check-version (Makefile.am): Likewise.
1396         * modules/chown (Makefile.am): Likewise.
1397         * modules/cloexec (Makefile.am): Likewise.
1398         * modules/close-stream (Makefile.am): Likewise.
1399         * modules/closeout (Makefile.am): Likewise.
1400         * modules/crc (Makefile.am): Likewise.
1401         * modules/csharpexec (Makefile.am): Likewise.
1402         * modules/cycle-check (Makefile.am): Likewise.
1403         * modules/des (Makefile.am): Likewise.
1404         * modules/dev-ino (Makefile.am): Likewise.
1405         * modules/dirfd (Makefile.am): Likewise.
1406         * modules/dirname (Makefile.am): Likewise.
1407         * modules/dup2 (Makefile.am): Likewise.
1408         * modules/eealloc (Makefile.am): Likewise.
1409         * modules/error (Makefile.am): Likewise.
1410         * modules/euidaccess (Makefile.am): Likewise.
1411         * modules/exclude (Makefile.am): Likewise.
1412         * modules/exitfail (Makefile.am): Likewise.
1413         * modules/fcntl-safer (Makefile.am): Likewise.
1414         * modules/fcntl (Makefile.am): Likewise.
1415         * modules/file-type (Makefile.am): Likewise.
1416         * modules/fileblocks (Makefile.am): Likewise.
1417         * modules/filemode (Makefile.am): Likewise.
1418         * modules/filenamecat (Makefile.am): Likewise.
1419         * modules/fnmatch (Makefile.am): Likewise.
1420         * modules/fopen-safer (Makefile.am): Likewise.
1421         * modules/fpending (Makefile.am): Likewise.
1422         * modules/fprintftime (Makefile.am): Likewise.
1423         * modules/free (Makefile.am): Likewise.
1424         * modules/fsusage (Makefile.am): Likewise.
1425         * modules/ftruncate (Makefile.am): Likewise.
1426         * modules/fts (Makefile.am): Likewise.
1427         * modules/gc-arcfour (Makefile.am): Likewise.
1428         * modules/gc-des (Makefile.am): Likewise.
1429         * modules/gc-hmac-md5 (Makefile.am): Likewise.
1430         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
1431         * modules/gc-md4 (Makefile.am): Likewise.
1432         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
1433         * modules/gc-sha1 (Makefile.am): Likewise.
1434         * modules/gc (Makefile.am): Likewise.
1435         * modules/getaddrinfo (Makefile.am): Likewise.
1436         * modules/getcwd (Makefile.am): Likewise.
1437         * modules/getdelim (Makefile.am): Likewise.
1438         * modules/getdomainname (Makefile.am): Likewise.
1439         * modules/getgroups (Makefile.am): Likewise.
1440         * modules/gethostname (Makefile.am): Likewise.
1441         * modules/gethrxtime (Makefile.am): Likewise.
1442         * modules/getline (Makefile.am): Likewise.
1443         * modules/getloadavg (Makefile.am): Likewise.
1444         * modules/getlogin_r (Makefile.am): Likewise.
1445         * modules/getndelim2 (Makefile.am): Likewise.
1446         * modules/getopt (Makefile.am): Likewise.
1447         * modules/getpagesize (Makefile.am): Likewise.
1448         * modules/getpass-gnu (Makefile.am): Likewise.
1449         * modules/getpass (Makefile.am): Likewise.
1450         * modules/getsubopt (Makefile.am): Likewise.
1451         * modules/gettime (Makefile.am): Likewise.
1452         * modules/gettimeofday (Makefile.am): Likewise.
1453         * modules/getugroups (Makefile.am): Likewise.
1454         * modules/getusershell (Makefile.am): Likewise.
1455         * modules/glob (Makefile.am): Likewise.
1456         * modules/group-member (Makefile.am): Likewise.
1457         * modules/hard-locale (Makefile.am): Likewise.
1458         * modules/hash (Makefile.am): Likewise.
1459         * modules/hmac-md5 (Makefile.am): Likewise.
1460         * modules/hmac-sha1 (Makefile.am): Likewise.
1461         * modules/human (Makefile.am): Likewise.
1462         * modules/idcache (Makefile.am): Likewise.
1463         * modules/imaxabs (Makefile.am): Likewise.
1464         * modules/imaxdiv (Makefile.am): Likewise.
1465         * modules/inet_ntop (Makefile.am): Likewise.
1466         * modules/inet_pton (Makefile.am): Likewise.
1467         * modules/intprops (Makefile.am): Likewise.
1468         * modules/inttostr (Makefile.am): Likewise.
1469         * modules/inttypes (Makefile.am): Likewise.
1470         * modules/isapipe (Makefile.am): Likewise.
1471         * modules/javaversion (Makefile.am): Likewise.
1472         * modules/lchmod (Makefile.am): Likewise.
1473         * modules/lchown (Makefile.am): Likewise.
1474         * modules/localcharset (Makefile.am): Likewise.
1475         * modules/long-options (Makefile.am): Likewise.
1476         * modules/lstat (Makefile.am): Likewise.
1477         * modules/malloc (Makefile.am): Likewise.
1478         * modules/mathl (Makefile.am): Likewise.
1479         * modules/mbchar (Makefile.am): Likewise.
1480         * modules/md2 (Makefile.am): Likewise.
1481         * modules/md4 (Makefile.am): Likewise.
1482         * modules/md5 (Makefile.am): Likewise.
1483         * modules/memcasecmp (Makefile.am): Likewise.
1484         * modules/memchr (Makefile.am): Likewise.
1485         * modules/memcmp (Makefile.am): Likewise.
1486         * modules/memcoll (Makefile.am): Likewise.
1487         * modules/memcpy (Makefile.am): Likewise.
1488         * modules/memmem (Makefile.am): Likewise.
1489         * modules/memmove (Makefile.am): Likewise.
1490         * modules/mempcpy (Makefile.am): Likewise.
1491         * modules/memrchr (Makefile.am): Likewise.
1492         * modules/memset (Makefile.am): Likewise.
1493         * modules/memxor (Makefile.am): Likewise.
1494         * modules/mkancesdirs (Makefile.am): Likewise.
1495         * modules/mkdir-p (Makefile.am): Likewise.
1496         * modules/mkdir (Makefile.am): Likewise.
1497         * modules/mkdtemp (Makefile.am): Likewise.
1498         * modules/mkstemp (Makefile.am): Likewise.
1499         * modules/mktime (Makefile.am): Likewise.
1500         * modules/modechange (Makefile.am): Likewise.
1501         * modules/mountlist (Makefile.am): Likewise.
1502         * modules/nanosleep (Makefile.am): Likewise.
1503         * modules/obstack (Makefile.am): Likewise.
1504         * modules/openat (Makefile.am): Likewise.
1505         * modules/pagealign_alloc (Makefile.am): Likewise.
1506         * modules/pathmax (Makefile.am): Likewise.
1507         * modules/physmem (Makefile.am): Likewise.
1508         * modules/poll (Makefile.am): Likewise.
1509         * modules/posixtm (Makefile.am): Likewise.
1510         * modules/posixver (Makefile.am): Likewise.
1511         * modules/putenv (Makefile.am): Likewise.
1512         * modules/quote (Makefile.am): Likewise.
1513         * modules/quotearg (Makefile.am): Likewise.
1514         * modules/raise (Makefile.am): Likewise.
1515         * modules/read-file (Makefile.am): Likewise.
1516         * modules/readline (Makefile.am): Likewise.
1517         * modules/readlink (Makefile.am): Likewise.
1518         * modules/readtokens (Makefile.am): Likewise.
1519         * modules/readutmp (Makefile.am): Likewise.
1520         * modules/realloc (Makefile.am): Likewise.
1521         * modules/regex (Makefile.am): Likewise.
1522         * modules/rename-dest-slash (Makefile.am): Likewise.
1523         * modules/rename (Makefile.am): Likewise.
1524         * modules/rijndael (Makefile.am): Likewise.
1525         * modules/rmdir (Makefile.am): Likewise.
1526         * modules/rpmatch (Makefile.am): Likewise.
1527         * modules/safe-read (Makefile.am): Likewise.
1528         * modules/safe-write (Makefile.am): Likewise.
1529         * modules/same-inode (Makefile.am): Likewise.
1530         * modules/same (Makefile.am): Likewise.
1531         * modules/save-cwd (Makefile.am): Likewise.
1532         * modules/savedir (Makefile.am): Likewise.
1533         * modules/setenv (Makefile.am): Likewise.
1534         * modules/settime (Makefile.am): Likewise.
1535         * modules/sha1 (Makefile.am): Likewise.
1536         * modules/sig2str (Makefile.am): Likewise.
1537         * modules/snprintf (Makefile.am): Likewise.
1538         * modules/stat-macros (Makefile.am): Likewise.
1539         * modules/stat-time (Makefile.am): Likewise.
1540         * modules/stdbool (Makefile.am): Likewise.
1541         * modules/stdint (Makefile.am): Likewise.
1542         * modules/stdlib-safer (Makefile.am): Likewise.
1543         * modules/stpcpy (Makefile.am): Likewise.
1544         * modules/stpncpy (Makefile.am): Likewise.
1545         * modules/strcase (Makefile.am): Likewise.
1546         * modules/strcasestr (Makefile.am): Likewise.
1547         * modules/strchrnul (Makefile.am): Likewise.
1548         * modules/strcspn (Makefile.am): Likewise.
1549         * modules/strdup (Makefile.am): Likewise.
1550         * modules/strerror (Makefile.am): Likewise.
1551         * modules/strftime (Makefile.am): Likewise.
1552         * modules/strndup (Makefile.am): Likewise.
1553         * modules/strnlen (Makefile.am): Likewise.
1554         * modules/strpbrk (Makefile.am): Likewise.
1555         * modules/strsep (Makefile.am): Likewise.
1556         * modules/strstr (Makefile.am): Likewise.
1557         * modules/strtod (Makefile.am): Likewise.
1558         * modules/strtoimax (Makefile.am): Likewise.
1559         * modules/strtok_r (Makefile.am): Likewise.
1560         * modules/strtol (Makefile.am): Likewise.
1561         * modules/strtoll (Makefile.am): Likewise.
1562         * modules/strtoul (Makefile.am): Likewise.
1563         * modules/strtoull (Makefile.am): Likewise.
1564         * modules/strtoumax (Makefile.am): Likewise.
1565         * modules/strverscmp (Makefile.am): Likewise.
1566         * modules/sys_socket (Makefile.am): Likewise.
1567         * modules/sys_stat (Makefile.am): Likewise.
1568         * modules/sysexits (Makefile.am): Likewise.
1569         * modules/time_r (Makefile.am): Likewise.
1570         * modules/timegm (Makefile.am): Likewise.
1571         * modules/timespec (Makefile.am): Likewise.
1572         * modules/tmpfile-safer (Makefile.am): Likewise.
1573         * modules/trim (Makefile.am): Likewise.
1574         * modules/unistd-safer (Makefile.am): Likewise.
1575         * modules/unlinkdir (Makefile.am): Likewise.
1576         * modules/unlocked-io (Makefile.am): Likewise.
1577         * modules/userspec (Makefile.am): Likewise.
1578         * modules/utime (Makefile.am): Likewise.
1579         * modules/utimecmp (Makefile.am): Likewise.
1580         * modules/utimens (Makefile.am): Likewise.
1581         * modules/vasnprintf (Makefile.am): Likewise.
1582         * modules/vasprintf (Makefile.am): Likewise.
1583         * modules/vsnprintf (Makefile.am): Likewise.
1584         * modules/xalloc (Makefile.am): Likewise.
1585         * modules/xgetcwd (Makefile.am): Likewise.
1586         * modules/xnanosleep (Makefile.am): Likewise.
1587         * modules/xreadlink (Makefile.am): Likewise.
1588         * modules/xstrtod (Makefile.am): Likewise.
1589         * modules/xstrtol (Makefile.am): Likewise.
1590         * modules/xstrtold (Makefile.am): Likewise.
1591         * modules/yesno (Makefile.am): Likewise.
1592         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
1593
1594 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
1595
1596         * modules/error (Makefile.am): Distribute files through
1597         EXTRA_DIST, not lib_SOURCES.
1598
1599 2006-10-12  Eric Blake  <ebb9@byu.net>
1600
1601         * modules/error (Makefile.am): Distribute files in /lib.
1602         * modules/obstack (Makefile.am): Likewise.
1603
1604 2006-10-12  Bruno Haible  <bruno@clisp.org>
1605
1606         * modules/acl (Makefile.am): Distribute all files in lib/ through
1607         EXTRA_DIST.
1608         * modules/arcfour (Makefile.am): Likewise.
1609         * modules/arctwo (Makefile.am): Likewise.
1610         * modules/argmatch (Makefile.am): Likewise.
1611         * modules/argz (Makefile.am): Likewise.
1612         * modules/atexit (Makefile.am): Likewise.
1613         * modules/backupfile (Makefile.am): Likewise.
1614         * modules/c-strtod (Makefile.am): Likewise.
1615         * modules/c-strtold (Makefile.am): Likewise.
1616         * modules/calloc (Makefile.am): Likewise.
1617         * modules/canon-host (Makefile.am): Likewise.
1618         * modules/canonicalize (Makefile.am): Likewise.
1619         * modules/chdir-long (Makefile.am): Likewise.
1620         * modules/chdir-safer (Makefile.am): Likewise.
1621         * modules/check-version (Makefile.am): Likewise.
1622         * modules/chown (Makefile.am): Likewise.
1623         * modules/cloexec (Makefile.am): Likewise.
1624         * modules/close-stream (Makefile.am): Likewise.
1625         * modules/closeout (Makefile.am): Likewise.
1626         * modules/crc (Makefile.am): Likewise.
1627         * modules/cycle-check (Makefile.am): Likewise.
1628         * modules/des (Makefile.am): Likewise.
1629         * modules/dirfd (Makefile.am): Likewise.
1630         * modules/dirname (Makefile.am): Likewise.
1631         * modules/dup2 (Makefile.am): Likewise.
1632         * modules/euidaccess (Makefile.am): Likewise.
1633         * modules/exclude (Makefile.am): Likewise.
1634         * modules/exitfail (Makefile.am): Likewise.
1635         * modules/fcntl-safer (Makefile.am): Likewise.
1636         * modules/file-type (Makefile.am): Likewise.
1637         * modules/fileblocks (Makefile.am): Likewise.
1638         * modules/filemode (Makefile.am): Likewise.
1639         * modules/filenamecat (Makefile.am): Likewise.
1640         * modules/fnmatch (Makefile.am): Likewise.
1641         * modules/fopen-safer (Makefile.am): Likewise.
1642         * modules/fpending (Makefile.am): Likewise.
1643         * modules/fprintftime (Makefile.am): Likewise.
1644         * modules/free (Makefile.am): Likewise.
1645         * modules/fsusage (Makefile.am): Likewise.
1646         * modules/ftruncate (Makefile.am): Likewise.
1647         * modules/fts (Makefile.am): Likewise.
1648         * modules/gc (Makefile.am): Likewise.
1649         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
1650         * modules/getaddrinfo (Makefile.am): Likewise.
1651         * modules/getcwd (Makefile.am): Likewise.
1652         * modules/getdelim (Makefile.am): Likewise.
1653         * modules/getdomainname (Makefile.am): Likewise.
1654         * modules/getgroups (Makefile.am): Likewise.
1655         * modules/gethostname (Makefile.am): Likewise.
1656         * modules/gethrxtime (Makefile.am): Likewise.
1657         * modules/getline (Makefile.am): Likewise.
1658         * modules/getloadavg (Makefile.am): Likewise.
1659         * modules/getlogin_r (Makefile.am): Likewise.
1660         * modules/getopt (Makefile.am): Likewise.
1661         * modules/getpass (Makefile.am): Likewise.
1662         * modules/getpass-gnu (Makefile.am): Likewise.
1663         * modules/getsubopt (Makefile.am): Likewise.
1664         * modules/gettime (Makefile.am): Likewise.
1665         * modules/gettimeofday (Makefile.am): Likewise.
1666         * modules/getugroups (Makefile.am): Likewise.
1667         * modules/getusershell (Makefile.am): Likewise.
1668         * modules/glob (Makefile.am): Likewise.
1669         * modules/group-member (Makefile.am): Likewise.
1670         * modules/hard-locale (Makefile.am): Likewise.
1671         * modules/hash (Makefile.am): Likewise.
1672         * modules/hmac-md5 (Makefile.am): Likewise.
1673         * modules/hmac-sha1 (Makefile.am): Likewise.
1674         * modules/human (Makefile.am): Likewise.
1675         * modules/idcache (Makefile.am): Likewise.
1676         * modules/imaxabs (Makefile.am): Likewise.
1677         * modules/imaxdiv (Makefile.am): Likewise.
1678         * modules/inet_ntop (Makefile.am): Likewise.
1679         * modules/inet_pton (Makefile.am): Likewise.
1680         * modules/inttostr (Makefile.am): Likewise.
1681         * modules/isapipe (Makefile.am): Likewise.
1682         * modules/lchown (Makefile.am): Likewise.
1683         * modules/long-options (Makefile.am): Likewise.
1684         * modules/lstat (Makefile.am): Likewise.
1685         * modules/malloc (Makefile.am): Likewise.
1686         * modules/mathl (Makefile.am): Likewise.
1687         * modules/mbchar (Makefile.am): Likewise.
1688         * modules/md2 (Makefile.am): Likewise.
1689         * modules/md4 (Makefile.am): Likewise.
1690         * modules/md5 (Makefile.am): Likewise.
1691         * modules/memcasecmp (Makefile.am): Likewise.
1692         * modules/memchr (Makefile.am): Likewise.
1693         * modules/memcmp (Makefile.am): Likewise.
1694         * modules/memcoll (Makefile.am): Likewise.
1695         * modules/memcpy (Makefile.am): Likewise.
1696         * modules/memmem (Makefile.am): Likewise.
1697         * modules/memmove (Makefile.am): Likewise.
1698         * modules/mempcpy (Makefile.am): Likewise.
1699         * modules/memrchr (Makefile.am): Likewise.
1700         * modules/memset (Makefile.am): Likewise.
1701         * modules/memxor (Makefile.am): Likewise.
1702         * modules/mkancesdirs (Makefile.am): Likewise.
1703         * modules/mkdir (Makefile.am): Likewise.
1704         * modules/mkdir-p (Makefile.am): Likewise.
1705         * modules/mkdtemp (Makefile.am): Likewise.
1706         * modules/mkstemp (Makefile.am): Likewise.
1707         * modules/mktime (Makefile.am): Likewise.
1708         * modules/modechange (Makefile.am): Likewise.
1709         * modules/mountlist (Makefile.am): Likewise.
1710         * modules/nanosleep (Makefile.am): Likewise.
1711         * modules/openat (Makefile.am): Likewise.
1712         * modules/pagealign_alloc (Makefile.am): Likewise.
1713         * modules/physmem (Makefile.am): Likewise.
1714         * modules/poll (Makefile.am): Likewise.
1715         * modules/posixtm (Makefile.am): Likewise.
1716         * modules/posixver (Makefile.am): Likewise.
1717         * modules/putenv (Makefile.am): Likewise.
1718         * modules/quote (Makefile.am): Likewise.
1719         * modules/quotearg (Makefile.am): Likewise.
1720         * modules/raise (Makefile.am): Likewise.
1721         * modules/read-file (Makefile.am): Likewise.
1722         * modules/readline (Makefile.am): Likewise.
1723         * modules/readlink (Makefile.am): Likewise.
1724         * modules/readtokens (Makefile.am): Likewise.
1725         * modules/readutmp (Makefile.am): Likewise.
1726         * modules/realloc (Makefile.am): Likewise.
1727         * modules/regex (Makefile.am): Likewise.
1728         * modules/rename (Makefile.am): Likewise.
1729         * modules/rename-dest-slash (Makefile.am): Likewise.
1730         * modules/rijndael (Makefile.am): Likewise.
1731         * modules/rmdir (Makefile.am): Likewise.
1732         * modules/rpmatch (Makefile.am): Likewise.
1733         * modules/safe-read (Makefile.am): Likewise.
1734         * modules/safe-write (Makefile.am): Likewise.
1735         * modules/same (Makefile.am): Likewise.
1736         * modules/save-cwd (Makefile.am): Likewise.
1737         * modules/savedir (Makefile.am): Likewise.
1738         * modules/setenv (Makefile.am): Likewise.
1739         * modules/settime (Makefile.am): Likewise.
1740         * modules/sha1 (Makefile.am): Likewise.
1741         * modules/sig2str (Makefile.am): Likewise.
1742         * modules/snprintf (Makefile.am): Likewise.
1743         * modules/stdlib-safer (Makefile.am): Likewise.
1744         * modules/stpcpy (Makefile.am): Likewise.
1745         * modules/stpncpy (Makefile.am): Likewise.
1746         * modules/strcase (Makefile.am): Likewise.
1747         * modules/strcasestr (Makefile.am): Likewise.
1748         * modules/strchrnul (Makefile.am): Likewise.
1749         * modules/strcspn (Makefile.am): Likewise.
1750         * modules/strdup (Makefile.am): Likewise.
1751         * modules/strerror (Makefile.am): Likewise.
1752         * modules/strftime (Makefile.am): Likewise.
1753         * modules/strndup (Makefile.am): Likewise.
1754         * modules/strnlen (Makefile.am): Likewise.
1755         * modules/strpbrk (Makefile.am): Likewise.
1756         * modules/strsep (Makefile.am): Likewise.
1757         * modules/strstr (Makefile.am): Likewise.
1758         * modules/strtod (Makefile.am): Likewise.
1759         * modules/strtoimax (Makefile.am): Likewise.
1760         * modules/strtok_r (Makefile.am): Likewise.
1761         * modules/strtol (Makefile.am): Likewise.
1762         * modules/strtoll (Makefile.am): Likewise.
1763         * modules/strtoul (Makefile.am): Likewise.
1764         * modules/strtoull (Makefile.am): Likewise.
1765         * modules/strtoumax (Makefile.am): Likewise.
1766         * modules/strverscmp (Makefile.am): Likewise.
1767         * modules/time_r (Makefile.am): Likewise.
1768         * modules/timegm (Makefile.am): Likewise.
1769         * modules/tmpfile-safer (Makefile.am): Likewise.
1770         * modules/unistd-safer (Makefile.am): Likewise.
1771         * modules/unlinkdir (Makefile.am): Likewise.
1772         * modules/userspec (Makefile.am): Likewise.
1773         * modules/utime (Makefile.am): Likewise.
1774         * modules/utimecmp (Makefile.am): Likewise.
1775         * modules/utimens (Makefile.am): Likewise.
1776         * modules/vasnprintf (Makefile.am): Likewise.
1777         * modules/vasprintf (Makefile.am): Likewise.
1778         * modules/vsnprintf (Makefile.am): Likewise.
1779         * modules/xalloc (Makefile.am): Likewise.
1780         * modules/xgetcwd (Makefile.am): Likewise.
1781         * modules/xnanosleep (Makefile.am): Likewise.
1782         * modules/xreadlink (Makefile.am): Likewise.
1783         * modules/xstrtod (Makefile.am): Likewise.
1784         * modules/xstrtol (Makefile.am): Likewise.
1785         * modules/xstrtold (Makefile.am): Likewise.
1786         * modules/yesno (Makefile.am): Likewise.
1787
1788 2006-10-12  Jim Meyering  <jim@meyering.net>
1789
1790         * m4/getloadavg.m4: Revert the change below.
1791
1792         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
1793         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
1794         fail with a symlink, which is what coreutils' ./bootstrap now
1795         creates by default.
1796
1797 2006-10-12  Bruno Haible  <bruno@clisp.org>
1798
1799         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
1800         mingw.
1801         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
1802         MSVC and mingw explicitly.
1803
1804 2006-10-11  Simon Josefsson  <jas@extundo.com>
1805             Bruno Haible  <bruno@clisp.org>
1806
1807         Add support for multiple gnulib-tool invocations in the scope of a
1808         single configure.ac file.
1809         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
1810         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
1811         with the same contents as the _LIBADD variable.
1812         (func_emit_initmacro_start, func_emit_initmacro_end,
1813         func_emit_initmacro_done): New functions.
1814         (func_import, func_create_testdir): Invoke them. Allow the identifiers
1815         gl_LIBOBJS and gl_LTLIBOBJS.
1816
1817 2006-10-11  Bruno Haible  <bruno@clisp.org>
1818
1819         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
1820         (func_create_testdir): Don't create po/Makefile.am, don't invoke
1821         autoreconf. Instead, invoke autopoint explicitly but move back the
1822         *.m4 files from gnulib.
1823
1824 2006-10-11  Bruno Haible  <bruno@clisp.org>
1825
1826         * gnulib-tool (func_usage): Make module names after --create-testdir
1827         optional.
1828         (func_create_testdir): If no module was specified, use nearly all
1829         modules.
1830
1831 2006-10-12  Jim Meyering  <jim@meyering.net>
1832
1833         Big performance improvement for fts-based tools that use FTS_NOSTAT.
1834         Avoid spurious inode-mismatch problems on non-POSIX file systems.
1835         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
1836         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
1837         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
1838         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
1839         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
1840         (fts_set_stat_required): New function.
1841         (fts_open): Defer the calls to fts_stat, if possible or requested.
1842         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
1843         into fts_stat itself.
1844         (fts_read): Perform any required (deferred) fts_stat call.
1845         (fts_build): Likewise, for the directory we're about to open and read.
1846         In the readdir loop, carefully decide whether each entry will require
1847         an eventual call to fts_stat, using dirent.d_type info if available.
1848         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
1849         a command line argument into this function.  Update all callers.
1850         Map a return value of FTS_DOT to FTS_D for a command line argument.
1851         * modules/fts (Depends-on): Add d-type.  Alphabetize.
1852         Thanks to Miklos Szeredi for his tenacity and for the initial
1853         bug report about "find" failing on a FUSE-based file system.
1854
1855         * lib/fts.c (fts_open): Use consistent indentation.
1856
1857 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
1858
1859         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
1860         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
1861         reported by Jim Meyering.  All uses of cache variables renamed
1862         to match Autoconf's.
1863         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
1864         the other one.
1865
1866         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
1867         Fix misspelling in diagnostic.
1868
1869 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1870
1871         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
1872         defined.  Problem reported by Matthew Woehlke.
1873
1874         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
1875         Add support for Tandem NonStop R series.
1876         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
1877         Use new macro.
1878
1879         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
1880         (has_trailing_slash): Omit size arg; all callers changed.
1881         Omit 'inline', since it doesn't help performance and we'd
1882         need to configure it.
1883         Don't count //, ///, etc. as having a trailing slash.
1884         As a side effect, this removes a C99ism reported by Matthew Woehlke.
1885         (rpl_rename_dest_slash): On failure, use rename's errno rather
1886         than (in some cases) an incorrect or junk errno.
1887         Simplify code by removing need to compute length; this does
1888         cause it to make two passes instead of one over the file name,
1889         but it's worth it.
1890
1891         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
1892         change, since Autoconf's version may no longer be appropriate now
1893         that we are using CVS Autoconf's version.  Add support for Tandem.
1894
1895 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1896             Bruno Haible  <bruno@clisp.org>
1897
1898         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
1899         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
1900         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
1901         gl_AC_TYPE_LONG_LONG.
1902
1903         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
1904         instead of HAVE_LONG_LONG.
1905         * lib/printf-args.c (printf_fetchargs): Likewise.
1906         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
1907         * lib/vasnprintf.c (VASNPRINTF): Likewise.
1908         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
1909         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
1910         gl_AC_TYPE_LONG_LONG.
1911
1912 2006-10-11  Bruno Haible  <bruno@clisp.org>
1913
1914         * m4/longlong.m4: Add comments.
1915         * m4/ulonglong.m4: Likewise.
1916
1917 2006-10-10  Bruno Haible  <bruno@clisp.org>
1918
1919         Make it possible to #define stpcpy, strdup to aliases.
1920         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
1921         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
1922
1923 2006-10-10  Bruno Haible  <bruno@clisp.org>
1924
1925         Make it possible to #define gcd to an alias.
1926         * lib/gcd.c: Include config.h.
1927
1928 2006-10-10  Bruno Haible  <bruno@clisp.org>
1929
1930         Make it possible to #define c_isascii to an alias.
1931         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
1932         defined. Undefine the macros before defining them, to avoid gcc
1933         warnings.
1934         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
1935         define NO_C_CTYPE_MACROS early.
1936
1937 2006-10-10  Bruno Haible  <bruno@clisp.org>
1938
1939         Make it possible to #define set_program_name to an alias.
1940         * lib/progname.c: Don't undefine set_program_name; instead, undefine
1941         ENABLE_RELOCATABLE early.
1942
1943 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
1944
1945         Port to Tandem NSK OSS, which has 64-bit signed int but at most
1946         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
1947         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
1948         More generally, don't assume that 64-bit signed int is available
1949         if unsigned int is, and vice versa.
1950         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
1951         unsigned symbols, not on their signed counterparts.
1952         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
1953         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
1954         (UINT64_C, UINTMAX_C):
1955         Likewise.
1956         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
1957         unsigned counterparts.
1958         (Have_long_long, Unsigned): New macros.
1959         (Int): Renamed from INT.
1960         (strtoimax): Use the new macros.
1961         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
1962         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
1963         * modules/inttypes (inttypes.h): Substitute
1964         HAVE_UNSIGNED_LONG_LONG_INT.
1965         * modules/stdint (stdint.h): Likewise.
1966         (Files): Add m4/ulonglong.m4.
1967
1968 2006-10-10  Bruno Haible  <bruno@clisp.org>
1969
1970         Fix a gcc -Wshadow warning.
1971         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
1972         to 'bucket'.
1973         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
1974         gl_linked_indexof_from_to): Likewise.
1975         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
1976         Likewise.
1977         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
1978         Likewise.
1979         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
1980         Reported by Eric Blake.
1981
1982 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
1983
1984         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
1985         for NetBSD.  Problem reported by Bruno Haible.
1986
1987 2006-10-09  Jim Meyering  <jim@meyering.net>
1988
1989         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
1990         Patch from Bruno Haible.
1991
1992 2006-10-09  Jim Meyering  <jim@meyering.net>
1993
1994         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
1995         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
1996         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
1997
1998 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1999
2000         Don't include <config.h> twice; this doesn't work in some cases,
2001         e.g., when config.h has "#define intmax_t long long int" and
2002         we include <config.h>, <inttypes.h>, <config.h> in that order.
2003         Problem reported by Matthew Woehlke in:
2004         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
2005         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
2006         * lib/fts-cycle.c: Don't include config.h.
2007         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
2008         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
2009         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
2010         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
2011         inttypes.h.
2012         * lib/xstrtoumax.c: Likewise.
2013         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
2014         __strtol and the like, so that this module is more like its siblings.
2015         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
2016         Remove; no longer needed now that we assume gnulib inttypes.h.
2017
2018 2006-10-08  Bruno Haible  <bruno@clisp.org>
2019
2020         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
2021         option.
2022
2023 2006-10-07  Jim Meyering  <jim@meyering.net>
2024
2025         * modules/inttypes (inttypes.h): Revert what seems to have been
2026         an inadvertent part of today's change: use "|", not "/" in the
2027         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
2028
2029 2006-10-07  Bruno Haible  <bruno@clisp.org>
2030
2031         * modules/sublist: New file.
2032
2033 2006-10-07  Bruno Haible  <bruno@clisp.org>
2034
2035         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
2036         * modules/argz (argz.h): Likewise.
2037         * modules/arpa_inet (arpa/inet.h): Likewise.
2038         * modules/byteswap (byteswap.h): Likewise.
2039         * modules/configmake (configmake.h): Likewise.
2040         * modules/fcntl (fcntl.h): Likewise.
2041         * modules/fnmatch (fnmatch.h): Likewise.
2042         * modules/getopt (getopt.h): Likewise.
2043         * modules/glob (glob.h): Likewise.
2044         * modules/inttypes (inttypes.h): Likewise.
2045         * modules/netinet_in (netinet/in.h): Likewise.
2046         * modules/poll (poll.h): Likewise.
2047         * modules/stdbool (stdbool.h): Likewise.
2048         * modules/stdint (stdint.h): Likewise.
2049         * modules/sys_select (sys/select.h): Likewise.
2050         * modules/sys_socket (sys/socket.h): Likewise.
2051         * modules/sys_stat (sys/stat.h): Likewise.
2052         * modules/sysexits (sysexits.h): Likewise.
2053         * modules/unistd (unistd.h): Likewise.
2054         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2055         Add a "DO NOT EDIT" comment to the generated file.
2056         (func_import): Likewise for gnulib-comp.m4.
2057
2058 2006-10-07  Bruno Haible  <bruno@clisp.org>
2059
2060         * lib/gl_sublist.h: New file.
2061         * lib/gl_sublist.c: New file.
2062
2063 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
2064
2065         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
2066         name (relative to the original working directory) and the file
2067         name component (relative to the temporary working directory).  All
2068         callers changed.
2069         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
2070         * lib/mkdir-p.c (make_dir_parents): Likewise.
2071         * lib/mkdir-p.h (make_dir_parents): Likewise.
2072
2073 2006-10-06  Eric Blake  <ebb9@byu.net>
2074
2075         Define several macros for use by the clean-temp module.
2076         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
2077         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
2078         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
2079
2080         * lib/clean-temp.h (close_stream_temp): New declaration.
2081         * lib/clean-temp.c (includes): Pull in headers according to what
2082         other modules are in use.
2083         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
2084
2085 2006-10-06  Bruno Haible  <bruno@clisp.org>
2086
2087         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
2088         instead of fopen, fwriteerror.
2089
2090 2006-10-06  Bruno Haible  <bruno@clisp.org>
2091
2092         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
2093         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
2094         int.
2095         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
2096         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
2097         Return an error indicator.
2098         Suggested by Eric Blake.
2099
2100 2006-10-06  Bruno Haible  <bruno@clisp.org>
2101
2102         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
2103         Reported by Eric Blake.
2104
2105 2006-10-06  Bruno Haible  <bruno@clisp.org>
2106
2107         * modules/closeout (Description): Mention stderr too.
2108
2109 2006-10-06  Bruno Haible  <bruno@clisp.org>
2110         and Paul Eggert  <eggert@cs.ucla.edu>
2111
2112         * lib/closeout.c (close_stdout): Also close stderr.
2113         * lib/closeout.h: Update comment.
2114
2115 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
2116
2117         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
2118         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
2119         * lib/dirchownmod.c: Include lchown.h.
2120         * lib/lchown.c: Don't include files that lchown.h now includes.
2121         Don't declare chown, since lchown.h now does that.
2122         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
2123         (lchown): Define to rpl_chown if lchown is declared but
2124         does not exist.  Declare using a prototype if lchown is not
2125         declared.  Add a copyright notice.
2126         * lib/mkstemp.h: Include <unistd.h>.
2127         * lib/openat.c: Include lchown.h.
2128
2129         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
2130         we now test for that separately.
2131         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
2132         rather than O_NOFOLLOW, when testing whether it's possible to
2133         avoid a race condition reliably.
2134         * lib/savewd.c (savewd_chdir): Likewise.
2135
2136         Remove macros that are no longer needed now that stdint.h is
2137         reliable.
2138         * lib/fsusage.c (UINTMAX_MAX): Remove.
2139         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
2140         * lib/utimecmp.c (SIZE_MAX): Remove.
2141
2142         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
2143
2144         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
2145         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
2146         O_NOATIME works.
2147
2148 2006-10-05  Bruno Haible  <bruno@clisp.org>
2149
2150         * lib/gl_list.h (gl_sortedlist_search_from_to,
2151         gl_sortedlist_indexof_from_to): New declarations.
2152         (gl_list_implementation): New fields sortedlist_search_from_to,
2153         sortedlist_indexof_from_to.
2154         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
2155         inline functions.
2156         * lib/gl_list.c (gl_sortedlist_search_from_to,
2157         gl_sortedlist_indexof_from_to): New functions.
2158         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
2159         function.
2160         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
2161         (gl_array_sortedlist_search_from_to): New function.
2162         (gl_array_list_implementation): Update.
2163         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
2164         function.
2165         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
2166         (gl_carray_sortedlist_search_from_to): New function.
2167         (gl_carray_list_implementation): Update.
2168         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
2169         gl_linked_sortedlist_indexof_from_to): New functions.
2170         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
2171         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
2172         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
2173         gl_tree_sortedlist_indexof_from_to): New functions.
2174         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
2175         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
2176         Update.
2177         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
2178         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
2179         Update.
2180
2181 2006-10-05  Bruno Haible  <bruno@clisp.org>
2182
2183         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
2184         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
2185         (struct gl_list_implementation): Add fields search_from_to,
2186         indexof_from_to. Remove fields search, indexof.
2187         (gl_list_search): Use the search_from_to method.
2188         (gl_list_search_from, gl_list_search_from_to): New functions.
2189         (gl_list_indexof): Use the indexof_from_to method.
2190         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
2191         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
2192         (gl_list_search_from, gl_list_search_from_to): New functions.
2193         (gl_list_indexof): Use the indexof_from_to method.
2194         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
2195         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
2196         gl_array_indexof. Add start_index, end_index arguments.
2197         (gl_array_search_from_to): Renamed from gl_array_search. Add
2198         start_index, end_index arguments.
2199         (gl_array_remove, gl_array_list_implementation): Update.
2200         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
2201         gl_carray_indexof. Add start_index, end_index arguments.
2202         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
2203         start_index, end_index arguments.
2204         (gl_carray_remove, gl_carray_list_implementation): Update.
2205         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
2206         gl_linked_search. Add start_index, end_index arguments.
2207         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
2208         start_index, end_index arguments.
2209         (gl_linked_remove): Update.
2210         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
2211         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
2212         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
2213         field to 'size_t'.
2214         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
2215         gl_tree_search. Add start_index, end_index arguments.
2216         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
2217         start_index, end_index arguments.
2218         (gl_tree_remove): Update.
2219         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
2220         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
2221         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
2222         function.
2223         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
2224         gl_tree_search. Add start_index, end_index arguments.
2225         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
2226         start_index, end_index arguments.
2227         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
2228         Update.
2229         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
2230
2231 2006-10-05  Bruno Haible  <bruno@clisp.org>
2232
2233         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
2234
2235         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
2236         fwriteerror_temp): New declarations.
2237         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
2238         (descriptors): New variable.
2239         (cleanup): First, close the descriptors.
2240         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
2241         fclose_temp, fwriteerror_temp): New functions.
2242
2243 2006-10-04  Jim Meyering  <jim@meyering.net>
2244
2245         * lib/fts.c (fts_open): Tiny comment change.
2246
2247 2006-10-04  Bruno Haible  <bruno@clisp.org>
2248
2249         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
2250         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
2251         gl_LOCK_BODY.
2252         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
2253         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
2254         gl_LOCK_EARLY_BODY.
2255         (gl_LOCK): Require gl_LOCK_BODY.
2256
2257 2006-10-04  Bruno Haible  <bruno@clisp.org>
2258
2259         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
2260         (gl_oset_search_atleast): New declaration.
2261         (struct gl_oset_implementation): Add field 'search_atleast'.
2262         (gl_oset_search_atleast): New inline function.
2263         * lib/gl_oset.c (gl_oset_search_atleast): New function.
2264         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
2265         (gl_array_oset_implementation): Update.
2266         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
2267         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
2268         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
2269
2270 2006-10-04  Bruno Haible  <bruno@clisp.org>
2271
2272         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
2273
2274 2006-10-03  Bruno Haible  <bruno@clisp.org>
2275
2276         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
2277         from gl_avltreehash_list_implementation.
2278
2279 2006-10-03  Bruno Haible  <bruno@clisp.org>
2280
2281         * lib/gl_oset.c (gl_oset_add): Fix return type.
2282
2283 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
2284
2285         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
2286
2287 2006-10-02  Eric Blake  <ebb9@byu.net>
2288
2289         * modules/strnlen (Depends-on): Add extensions.
2290
2291 2006-10-02  Eric Blake  <ebb9@byu.net>
2292
2293         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
2294         definition in 2.60+.
2295
2296 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
2297
2298         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
2299         checks.
2300
2301 2006-10-02  Bruno Haible  <bruno@clisp.org>
2302
2303         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
2304         to the AUTOMAKE_OPTIONS.
2305         Reported by Jim Meyering.
2306
2307 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
2308
2309         Work around bug in Solaris 10 /proc file system:
2310         /proc/self/fd/NNN/.. isn't the parent directory of
2311         the directory whose file descriptor is NNN.  This needs to
2312         be worked around at run time, not compile time, since a
2313         program might be built on Solaris 8, where things work, and
2314         run on Solaris 10.
2315         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
2316         to use the following interface instead:
2317         (OPENAT_BUFFER_SIZE): New macro.
2318         (openat_proc_name): New function.
2319         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
2320         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
2321         Likewise.
2322         * lib/openat-proc.c: New file.
2323         * modules/openat (Files): Add lib/openat-proc.c.
2324         (Depends-on): Add same-inode, stdbool.
2325         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
2326
2327 2006-09-29  Bruno Haible  <bruno@clisp.org>
2328
2329         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
2330         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
2331         argument. Set stdout_closed before testing for ferror, not after.
2332         (fwriteerror, fwriteerror_no_ebadf): New functions.
2333
2334 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2335
2336         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
2337
2338 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
2339
2340         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
2341         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
2342
2343 2006-09-28  Jim Meyering  <jim@meyering.net>
2344
2345         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
2346         Include <unistd.h>.
2347
2348 2006-09-28  Bruno Haible  <bruno@clisp.org>
2349
2350         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
2351         * modules/linkedhash-list (Depends-on): Likewise.
2352         * modules/rbtreehash-list (Depends-on): Likewise.
2353
2354 2006-09-28  Bruno Haible  <bruno@clisp.org>
2355
2356         * lib/strndup.h: Simplify the redefinition of strndup.
2357         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
2358         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
2359
2360 2006-09-28  Bruno Haible  <bruno@clisp.org>
2361
2362         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
2363         * lib/gl_linkedhash_list.c: Likewise.
2364         * lib/gl_rbtreehash_list.c: Likewise.
2365
2366 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
2367
2368         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
2369         getaddrinfo.
2370
2371         * lib/__fpending.h: Don't include <stdio_ext.h> unless
2372         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
2373         it causes <stdio_ext.h> to cause a compile-time error.
2374         Problem reported by Nelson H. F. Beebe.
2375         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
2376         of HAVE_DECL___PENDING.
2377
2378         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
2379         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
2380         declaration.
2381
2382 2006-09-27  Jim Meyering  <jim@meyering.net>
2383
2384         This file could end up with a definition for a function
2385         named __strndup, rather than rpl_strndup on a system with
2386         incomplete weak_alias support.
2387         * lib/strndup.c (strndup): Rename from __strndup.
2388         Remove #defines that used to map __strndup to strndup.
2389         Don't use K&R prototypes.
2390         Remove LIBC-related code, since this file is not sync'd with glibc.
2391         * lib/strndup.h: Revamp, accordingly.
2392         * m4/strndup.m4: Modernize.
2393
2394 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
2395
2396         * modules/savewd (Depends-on): Add 'raise'.
2397         * lib/savewd.c: Include <signal.h>, for 'raise'.
2398
2399 2006-09-26  Jim Meyering  <jim@meyering.net>
2400
2401         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
2402         when we detect Darwin 8.7.0's acl_get_file bug.
2403         Rearrange to perform the new (below) run-test while $LIBS
2404         contains any acl-related library.  Set USE_ACL at the end.
2405         (gl_ACL_GET_FILE): New function.
2406
2407 2006-09-26  Eric Blake  <ebb9@byu.net>
2408
2409         * lib/verror.c: Include <config.h> unconditionally.
2410
2411 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
2412
2413         * modules/clock-time (Maintainer): Add self.
2414         * modules/getlogin_r (Depends-on): Add extensions.
2415
2416 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2417
2418         * modules/clock-time: New module.
2419         * modules/nanosleep (Depends-on): Add clock-time.
2420         * modules/gethrxtime (Depends-on): Likewise.
2421         * modules/gettime (Depends-on): Likewise.
2422         * modules/settime (Depends-on): Likewise.
2423
2424         * modules/fts-lgpl: Depend on openat.
2425         * modules/mkancesdirs: Depend on savewd.
2426         * modules/mkdir-p: Likewise.
2427
2428 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2429
2430         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
2431
2432         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
2433         `gl_have_arbitrary_file_name_length_limit' to
2434         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
2435         actually works between configure runs.
2436
2437 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2438             Bruno Haible  <bruno@clisp.org>
2439
2440         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
2441
2442 2006-09-25  Jim Meyering  <jim@meyering.net>
2443
2444         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
2445         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
2446
2447 2006-09-25  Eric Blake  <ebb9@byu.net>
2448
2449         * gnulib-tool (func_import, func_create_testdir): Fix typos in
2450         exec's in 2006-09-18 patch when shuffling fds.
2451
2452 2006-09-25  Bruno Haible  <bruno@clisp.org>
2453
2454         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
2455         Reported by Jim Meyering.
2456
2457 2006-09-24  Jim Meyering  <jim@meyering.net>
2458
2459         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
2460         compare a pointer against a literal "0".  That caused failures with
2461         at least HP-UX's hpcc.
2462
2463 2006-09-22  Simon Josefsson  <jas@extundo.com>
2464
2465         * modules/gc-sha1:
2466         * modules/gc-md4:
2467         * modules/gc-hmac-sha1:
2468         * modules/gc-hmac-md5:
2469         * modules/gc-des:
2470         * modules/gc-arcfour: Distribute more files.
2471
2472 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2473
2474         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
2475         (gl_linked_iterator_from_to): Initialize struct completely.
2476         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
2477         (gl_tree_iterator_from_to): Likewise
2478         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
2479         * lib/gl_array_list.c [lint] (gl_array_iterator)
2480         (gl_array_iterator_from_to): Likewise.
2481         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
2482         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
2483         (gl_carray_iterator_from_to): Likewise.
2484
2485         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
2486         * lib/md4.c (md4_process_block): Remove unused variable.
2487         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
2488         parentheses for clarity.
2489
2490 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2491
2492         * modules/bison-i18n (Depends-on): Add gettext.
2493
2494 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2495
2496         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
2497         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
2498         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
2499         also add missing comma that caused broken test.
2500         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
2501         stdlib.h, for `abort'.
2502         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
2503         variables.
2504         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
2505         include unistd.h if present, for `rmdir'.
2506         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
2507         variables.
2508         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
2509         in the process include standard headers for prototypes.
2510         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
2511         gets declared on GNU/Linux.
2512         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
2513         unistd.h, for `rmdir'.
2514         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
2515
2516         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
2517         always true.
2518         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
2519
2520         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
2521
2522 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2523
2524         * gnulib-tool (func_version): Create output all at once.  This
2525         may help avoid triggering unnecessary SIGPIPEs, and at any
2526         rate it doesn't hurt.
2527
2528 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2529             Bruno Haible  <bruno@clisp.org>
2530
2531         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
2532         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2533         * m4/signed.m4 (bh_C_SIGNED): Likewise.
2534
2535         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
2536         (gl_FUNC_VASPRINTF): Invoke it.
2537
2538 2006-09-22  Bruno Haible  <bruno@clisp.org>
2539
2540         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
2541         getloadavg.c as first argument.
2542
2543 2006-09-22  Bruno Haible  <bruno@clisp.org>
2544
2545         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
2546         at the beginning of the gl_INIT macro.
2547         * modules/getloadavg (configure.ac): Pass $gl_source_base to
2548         gl_GETLOADAVG.
2549
2550 2006-09-22  Bruno Haible  <bruno@clisp.org>
2551
2552         * gnulib-tool (func_create_megatestdir): Don't include the config-h
2553         module.
2554         Suggested by Ralf Wildenhues.
2555
2556 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
2557
2558         Import this patch from libc:
2559
2560         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
2561
2562         * lib/regex_internal.c (re_string_reconstruct): Handle
2563         offset < pstr->valid_raw_len && pstr->offsets_needed case.
2564         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
2565         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
2566         re_string_context_at.
2567
2568         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
2569         now requires it.
2570         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
2571         gl_REGEX now does it for us.
2572         (gl_REGEX): Add test taken from
2573         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
2574
2575         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
2576         Check that large offsets work.  Modernize Autoconf usages.
2577         Prefer "yes" to mean a good thing rather than a bad.
2578         Don't put "#define mkstemp" in config.h, as this might interfere
2579         with standard system headers that "#define mkstemp mkstemp64".
2580
2581         * modules/mkstemp (Depends-on): Add extensions, so that
2582         mkstemp is visible on some platforms.
2583         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
2584         (Include): Change to "mkstemp.h" from <stdlib.h>.
2585         (Files): Add mkstemp.h.
2586
2587         * lib/mkstemp.h: New file, since some standard headers
2588         #define mkstemp.
2589         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
2590         Include "mkstemp.h".
2591         Make the _LIBC code resemble glibc original more,
2592         e.g., use K&R style.
2593         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
2594         (mkstemp): Remove, since mkstemp.h does this for us.
2595         * lib/stdlib--.h: Include mkstemp.h.
2596
2597         Import this patch from libc:
2598
2599         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
2600
2601         * lib/tempname.c (__gen_tempname): Change attempts_min
2602         into a macro.  Use preprocessor to decide how to initialize
2603         attempts [Coverity CID 67].
2604
2605 2006-09-20  Bruno Haible  <bruno@clisp.org>
2606
2607         * lib/mkdtemp.c: Import from libc.
2608         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
2609                 * sysdeps/posix/tempname.c (__gen_tempname): Change
2610                 attempts_min into a macro.  Use preprocessor to decide how to
2611                 initialize attempts [Coverity CID 67].
2612         2001-11-27  Paul Eggert  <eggert@twinsun.com>
2613                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
2614                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
2615
2616 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2617
2618         * gnulib-tool (func_exit): New function, to allow to pass the
2619         exit status portably through the trap.  Use everywhere.
2620         (--help, --version): Signal a write error.
2621         (trap): catch SIGPIPE, for write errors.
2622         Exit at the end of the trap, with the correct exit status.
2623
2624 2006-09-19  Karl Berry  <karl@gnu.org>
2625
2626         * doc/gnulib.texi: note about the license texinfo files.
2627
2628 2006-09-19  Eric Blake  <ebb9@byu.net>
2629
2630         * gnulib-tool: Avoid space-tab.
2631
2632 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
2633
2634         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
2635         that prevented coreutils 6.1 from building.  Problem reported
2636         by Petter Reinholdtsen.
2637
2638 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
2639
2640         * gnulib-tool (avoidlist): Fix typo that broke options like
2641         --avoid=lock that are used by coreutils bootstrap.
2642
2643 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
2644
2645         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
2646         more systematically.
2647
2648 2006-09-18  Jim Meyering  <jim@meyering.net>
2649
2650         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
2651
2652 2006-09-18  Bruno Haible  <bruno@clisp.org>
2653
2654         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
2655
2656 2006-09-18  Bruno Haible  <bruno@clisp.org>
2657
2658         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
2659         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
2660         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
2661         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
2662         * m4/gettext.m4: Require autoconf >= 2.52.
2663         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
2664         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
2665         of gl_cv_header_inttypes_h.
2666
2667 2006-09-18  Bruno Haible  <bruno@clisp.org>
2668
2669         * lib/javaversion.c: Include configmake.h.
2670
2671 2006-09-18  Bruno Haible  <bruno@clisp.org>
2672
2673         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
2674         avoid that the while loops be executed in a subshell.
2675
2676 2006-09-18  Bruno Haible  <bruno@clisp.org>
2677
2678         * MODULES.html.sh (func_module): Break long lines.
2679         Suggested by Bruce Korb <bkorb@gnu.org>.
2680
2681 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2682
2683         Speed up by a factor of 1.12.
2684         * gnulib-tool (nl): New variable.
2685         (func_import): Rewrite include directive extraction to only read each
2686         directive once.
2687
2688 2006-09-17  Bruno Haible  <bruno@clisp.org>
2689
2690         * modules/javaversion (Makefile.am): Remove DEFS setting.
2691         (Depends-on): Add configmake, for PKGDATADIR definition.
2692
2693 2006-09-17  Bruno Haible  <bruno@clisp.org>
2694
2695         * gnulib-tool (func_create_testdir): Rewrite all files at once.
2696
2697 2006-09-17  Bruno Haible  <bruno@clisp.org>
2698
2699         * gnulib-tool (func_append): New function, stolen from libtool.m4.
2700         (func_modules_transitive_closure, func_modules_add_dummy,
2701         func_modules_to_filelist, func_import, func_create_testdir,
2702         func_create_megatestdir, ...): Use it wherever possible.
2703         Suggested by Ralf Wildenhues.
2704
2705 2006-09-16  Karl Berry  <karl@gnu.org>
2706
2707         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
2708         to avoid sectioning errors.
2709         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
2710         [ifinfo]: blank line after @center-ed titles.
2711         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
2712         Spell FSF address consistently with others.
2713         (These changes approved by rms.)
2714
2715 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2716
2717         Speed up by a factor of 1.61.
2718         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
2719         already checked module names again.
2720
2721 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2722
2723         Speed up by a factor of 1.13.
2724         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
2725         for new_files, and the input to func_add_or_update.
2726
2727 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2728
2729         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
2730         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
2731
2732 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2733
2734         * modules/mkancesdirs (Depends-on): Add fcntl.
2735         * modules/savewd: New file.
2736         * MODULES.html.sh (File system functions): Add savewd.
2737
2738         * modules/configmake (Makefile.am): Add support for the
2739         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
2740
2741 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2742
2743         * m4/savewd.m4: New file.
2744
2745 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2746
2747         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
2748         (dirchownmod): New arg FD.  All callers changed.
2749         Use FD rather than opening the directory ourself, as opening is
2750         now the caller's responsibility.
2751         * lib/dirchownmod.h: Likewise.
2752         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
2753         hosts that require <sys/types.h> before <sys/stat.h>.  Include
2754         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
2755         (test_dir): Remove.
2756         (mkancesdirs): Return length of prefix of FILE that has already
2757         been made, or -2 if there is a child doing the work.  Redo
2758         algorithm so that it is O(N) rather than O(N**2).  Optimize away
2759         ".", and treat ".." specially since it might stray back into
2760         already-created areas.  Use a subprocess if necessary.  New arg
2761         WD; all users changed.  MAKE_DIR function should now return 1
2762         if it creates a directory that is not readable.  Return -2 if
2763         a child process is spun off.
2764         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
2765         Adjust signature to match code.
2766         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
2767         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
2768         all users changed.
2769         * lib/savewd.c, lib/savewd.h: New files.
2770
2771 2006-09-15  Jim Meyering  <jim@meyering.net>
2772
2773         * modules/rename-dest-slash: New module.
2774         * MODULES.html.sh (posix_compat): Add it here.
2775
2776         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
2777
2778 2006-09-15  Jim Meyering  <jim@meyering.net>
2779
2780         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
2781         file.
2782
2783         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
2784
2785 2006-09-15  Jim Meyering  <jim@meyering.net>
2786
2787         * lib/rename-dest-slash.c (has_trailing_slash): Use
2788         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
2789         (rpl_rename_dest_slash): Perform the cheaper trailing slash
2790         test before testing whether SRC is a directory.
2791         Suggestions from Bruno Haible.
2792
2793         Avoid a warning about an unused variable.
2794         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
2795         into the #ifdef block where it's used.
2796
2797         * lib/rename-dest-slash.c: New file.
2798
2799 2006-09-14  Bruno Haible  <bruno@clisp.org>
2800
2801         * lib/allocsa.c: Include <config.h> unconditionally.
2802         * lib/asnprintf.c: Likewise.
2803         * lib/asprintf.c: Likewise.
2804         * lib/c-strcasecmp.c: Likewise.
2805         * lib/c-strcasestr.c: Likewise.
2806         * lib/c-strncasecmp.c: Likewise.
2807         * lib/c-strstr.c: Likewise.
2808         * lib/classpath.c: Likewise.
2809         * lib/clean-temp.c: Likewise.
2810         * lib/concatpath.c: Likewise.
2811         * lib/copy-file.c: Likewise.
2812         * lib/csharpcomp.c: Likewise.
2813         * lib/csharpexec.c: Likewise.
2814         * lib/execute.c: Likewise.
2815         * lib/fatal-signal.c: Likewise.
2816         * lib/findprog.c: Likewise.
2817         * lib/fwriteerror.c: Likewise.
2818         * lib/gl_array_list.c: Likewise.
2819         * lib/gl_array_oset.c: Likewise.
2820         * lib/gl_avltree_list.c: Likewise.
2821         * lib/gl_avltree_oset.c: Likewise.
2822         * lib/gl_avltreehash_list.c: Likewise.
2823         * lib/gl_carray_list.c: Likewise.
2824         * lib/gl_linked_list.c: Likewise.
2825         * lib/gl_linkedhash_list.c: Likewise.
2826         * lib/gl_list.c: Likewise.
2827         * lib/gl_oset.c: Likewise.
2828         * lib/gl_rbtree_list.c: Likewise.
2829         * lib/gl_rbtree_oset.c: Likewise.
2830         * lib/gl_rbtreehash_list.c: Likewise.
2831         * lib/imaxabs.c: Likewise.
2832         * lib/imaxdiv.c: Likewise.
2833         * lib/javacomp.c: Likewise.
2834         * lib/javaexec.c: Likewise.
2835         * lib/javaversion.c: Likewise.
2836         * lib/linebreak.c: Likewise.
2837         * lib/localcharset.c: Likewise.
2838         * lib/lock.c: Likewise.
2839         * lib/mbchar.c: Likewise.
2840         * lib/mbswidth.c: Likewise.
2841         * lib/mkdtemp.c: Likewise.
2842         * lib/pipe.c: Likewise.
2843         * lib/printf-args.c: Likewise.
2844         * lib/printf-parse.c: Likewise.
2845         * lib/progname.c: Likewise.
2846         * lib/progreloc.c: Likewise.
2847         * lib/readlink.c: Likewise.
2848         * lib/sh-quote.c: Likewise.
2849         * lib/stpcpy.c: Likewise.
2850         * lib/stpncpy.c: Likewise.
2851         * lib/strcasecmp.c: Likewise.
2852         * lib/strcasestr.c: Likewise.
2853         * lib/strcspn.c: Likewise.
2854         * lib/striconv.c: Likewise.
2855         * lib/strncasecmp.c: Likewise.
2856         * lib/strnlen1.c: Likewise.
2857         * lib/strstr.c: Likewise.
2858         * lib/strtok_r.c: Likewise.
2859         * lib/tls.c: Likewise.
2860         * lib/tmpdir.c: Likewise.
2861         * lib/unicodeio.c: Likewise.
2862         * lib/unsetenv.c: Likewise.
2863         * lib/vasnprintf.c: Likewise.
2864         * lib/vasprintf.c: Likewise.
2865         * lib/wait-process.c: Likewise.
2866         * lib/xallocsa.c: Likewise.
2867         * lib/xsetenv.c: Likewise.
2868         * lib/xstriconv.c: Likewise.
2869
2870 2006-09-13  Simon Josefsson  <jas@extundo.com>
2871
2872         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
2873         that internally, suggested by Ralf Wildenhues
2874         <Ralf.Wildenhues@gmx.de>.
2875
2876 2006-09-13  Simon Josefsson  <jas@extundo.com>
2877
2878         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
2879         @LIBOBJS@.
2880         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2881
2882 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
2883
2884         * lib/_fpending.c: Include <config.h> unconditionally, since we no
2885         longer worry about uses that don't define HAVE_CONFIG_H.
2886         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
2887         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
2888         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
2889         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
2890         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
2891         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
2892         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
2893         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
2894         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
2895         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
2896         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
2897         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
2898         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
2899         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
2900         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
2901         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
2902         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
2903         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
2904         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
2905         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
2906         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
2907         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
2908         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
2909         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
2910         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
2911         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
2912         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
2913         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
2914         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
2915         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
2916         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
2917         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
2918         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
2919         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
2920         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
2921         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
2922         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
2923         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
2924         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
2925         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
2926         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
2927         Likewise.
2928
2929 2006-09-13  Eric Blake  <ebb9@byu.net>
2930
2931         * lib/getopt.c: Fix typo in last commit.
2932
2933 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2934
2935         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
2936         dgettext.
2937
2938 2006-09-12  Jim Meyering  <jim@meyering.net>
2939
2940         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
2941         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
2942         Reported by Nelson H. F. Beebe.
2943
2944 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
2945
2946         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
2947         program_invocation_name and program_invocation_short_name are
2948         initialized.
2949         * lib/argp-namefrob.h: Move declarations of program_invocation_name
2950         and program_invocation_short_name to argp.h, so they are visible
2951         to user programs.
2952         * lib/argp.h: Likewise
2953
2954 2006-09-10  Bruno Haible  <bruno@clisp.org>
2955
2956         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
2957         m4/inttypes_h.m4, m4/uintmax_t.m4.
2958
2959 2006-09-10  Bruno Haible  <bruno@clisp.org>
2960
2961         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
2962         gl_AC_TYPE_UINTMAX_T.
2963
2964 2006-09-10  Bruno Haible  <bruno@clisp.org>
2965
2966         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
2967
2968 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
2969
2970         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
2971         convention.  Text proposed by Bruno Haible.
2972         (struct argp_option): Document the use of N_() wrappers.
2973
2974         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
2975         '\v', and translate the two parts separately, instead of feeding
2976         the whole string to gettext.  This allows to exclude
2977         '\v' from the strings visible to the translator by writing doc
2978         strings as N_("..") "\v" N_("..").
2979
2980 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
2981
2982         * config/srclist.txt: Undo latest change; the bug was fixed.
2983
2984 2006-09-09  Bruno Haible  <bruno@clisp.org>
2985
2986         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
2987         assignments if building a library without libtool.
2988         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
2989         in func_emit_lib_Makefile_am.
2990         (func_import): When building a static library libfoo.a, arrange to
2991         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
2992         (func_create_testdir): Likewise.
2993         * modules/gc (configure.ac, Makefile.am): If building statically,
2994         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
2995         * modules/iconvme (configure.ac, Makefile.am): Likewise.
2996         * modules/striconv (configure.ac, Makefile.am): Likewise.
2997         Based on a suggestion by Ralf Wildenhues.
2998
2999 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3000
3001         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
3002         Check for unistd.h too, since Autoconf doesn't assume POSIX.
3003         Also:
3004
3005         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3006         Add year_2050_test to catch glibc bug 2821
3007         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3008
3009         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3010         Prefer #ifdef to #if.
3011
3012         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
3013         Return from 'main' instead of calling 'exit'.
3014
3015 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3016
3017         * lib/mktime.c (guess_time_tm): Fix bug where mktime
3018         returned the maximum time_t value rather than (time_t) -1.
3019         Problem originally reported by William Bardwell
3020         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3021
3022         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3023         Moved to here ...
3024         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3025         ... from here.
3026
3027 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3028
3029         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
3030         2821 is fixed.
3031
3032 2006-09-08  Jim Meyering  <jim@meyering.net>
3033
3034         Don't make generated files read-only.  That would bother too many
3035         people.  However, do retain the ability to work when targets are
3036         read-only: remove the destination and temporary files before writing
3037         them (when generated via sed or echo), or by using the -f option for
3038         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
3039         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3040         * modules/byteswap, modules/configmake, modules/fcntl:
3041         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3042         * modules/localcharset, modules/netinet_in, modules/poll:
3043         * modules/stdbool, modules/stdint, modules/sys_select:
3044         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3045
3046 2006-09-08  Jim Meyering  <jim@meyering.net>
3047
3048         Avoid new build failure on FreeBSD 6.0.
3049         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
3050         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
3051         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
3052
3053 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3054
3055         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
3056
3057 2006-09-07  Jim Meyering  <jim@meyering.net>
3058
3059         Fix global typo in last change: use chmod u-w, not chmod u-x.
3060         Spotted by Paul Eggert and Bruce Korb.
3061         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3062         * modules/byteswap, modules/configmake, modules/fcntl:
3063         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3064         * modules/localcharset, modules/netinet_in, modules/poll:
3065         * modules/stdbool, modules/stdint, modules/sys_select:
3066         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3067
3068 2006-09-06  Jim Meyering  <jim@meyering.net>
3069
3070         Make generated files be read-only.
3071         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
3072         Ensure that each generated file is now read-only.
3073         * modules/argz: Likewise.
3074         * modules/arpa_inet: Likewise.
3075         * modules/byteswap: Likewise.
3076         * modules/configmake: Likewise.
3077         * modules/fcntl: Likewise.
3078         * modules/fnmatch: Likewise.
3079         * modules/getopt: Likewise.
3080         * modules/glob: Likewise.
3081         * modules/inttypes: Likewise.
3082         * modules/netinet_in: Likewise.
3083         * modules/poll: Likewise.
3084         * modules/stdbool: Likewise.
3085         * modules/stdint: Likewise.
3086         * modules/sys_select: Likewise.
3087         * modules/sys_socket: Likewise.
3088         * modules/sys_stat: Likewise.
3089         * modules/sysexits: Likewise.
3090         * modules/localcharset: Same as above, but continue using temporary
3091         file named "t-$@" (why different?) rather than the "$@-t" used
3092         everywhere else.
3093
3094         * modules/sysexits (Makefile.am): Replace literal occurrences
3095         of "sysexit.h" more readable, and more consistent, "$@".
3096
3097 2006-09-06  Bruno Haible  <bruno@clisp.org>
3098
3099         * modules/striconv: New file.
3100         * modules/xstriconv: New file.
3101         * MODULES.html.sh (Internationalization functions): Add striconv,
3102         xstriconv.
3103
3104 2006-09-06  Bruno Haible  <bruno@clisp.org>
3105
3106         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
3107         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
3108         not using libtool correctly.
3109
3110 2006-09-06  Bruno Haible  <bruno@clisp.org>
3111
3112         * lib/striconv.h: New file.
3113         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
3114         iconvstring.c.
3115         * lib/xstriconv.h: New file.
3116         * lib/xstriconv.c: New file.
3117
3118 2006-09-06  Bruno Haible  <bruno@clisp.org>
3119
3120         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3121         lib_..._LDFLAGS.
3122
3123 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3124
3125         * lib/argz_.h: Sync from Libtool.
3126
3127         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
3128                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3129
3130         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
3131
3132 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
3133
3134         * modules/trim: New file.
3135
3136 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
3137
3138         * lib/trim.h: New file.
3139         * lib/trim.c: New file.
3140
3141 2006-09-05  Bruno Haible  <bruno@clisp.org>
3142
3143         * MODULES.html.sh (String handling): Add trim.
3144
3145 2006-09-04  Karl Berry  <karl@gnu.org>
3146
3147         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
3148         until next release.
3149
3150 2006-09-03  Bruno Haible  <bruno@clisp.org>
3151
3152         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
3153         correctly.
3154
3155 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3156
3157         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
3158         not gl_GETLOADAVG.  Omit unneeded semicolons.
3159         Problems reported by Ralf Wildenhues in
3160         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
3161         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
3162         at the end, which is the usual gnulib style.
3163
3164         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
3165         of doing all the work ourselves.
3166         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
3167         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
3168
3169 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3170
3171         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
3172         Problem reported by Ralf Wildenhues in
3173         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
3174
3175         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
3176         HAVE_STRUCT_STATFS_F_FSTYPENAME.
3177
3178 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3179
3180         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
3181         yesterday's patch by changing test -n to test -z.
3182
3183 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3184
3185         * modules/getloadavg (Files): Add m4/getloadavg.m4.
3186         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
3187         the former is now obsolescent.
3188
3189         * modules/chdir-long (Depends-on): Add fcntl.
3190
3191 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3192
3193         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
3194         obsolescent, and programs should use gnulib instead.
3195         * m4/getloadavg.m4: New file, with contents taken from Autoconf
3196         but with prefixes changed.
3197
3198 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3199
3200         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
3201         or stdbool.h, because they might not exist while configuring.
3202
3203         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
3204         Don't include unistd.h or limits.h; not needed, since chdir-long.h
3205         does that for us.
3206         (O_DIRECTORY): Remove.
3207
3208 2006-08-31  Eric Blake  <ebb9@byu.net>
3209
3210         * gnulib-tool: Don't let emacs change spaces to TAB.
3211
3212 2006-08-31  Bruno Haible  <bruno@clisp.org>
3213
3214         * gnulib-tool: When calling func_import more than once, do it in a
3215         subshell.
3216         Reported by Eric Blake <ebb9@byu.net>.
3217
3218 2006-08-31  Bruno Haible  <bruno@clisp.org>
3219
3220         * gnulib-tool (nl): Remove variable.
3221         (sed_transform_lib_file): Use more robust test for config-h module.
3222         (func_import): Fix typo in 2006-08-25 patch.
3223
3224 2006-08-31  Bruno Haible  <bruno@clisp.org>
3225
3226         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
3227         specified, augment Makefile.am variables instead of assigning them.
3228
3229 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3230
3231         Work around a bug in both the Linux and SunOS 64-bit kernels:
3232         nanosleep mishandles sleeps for longer than 2**31 seconds.
3233         Problem reported by Frank v Waveren in
3234         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
3235         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
3236         Check for nanosleep bug.
3237         (LIB_NANOSLEEP): Append clock_gettime library if needed.
3238
3239 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3240
3241         Work around a bug in both the Linux and SunOS 64-bit kernels:
3242         nanosleep mishandles sleeps for longer than 2**31 seconds.
3243         Problem reported by Frank v Waveren in
3244         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
3245         * lib/nanosleep.c (BILLION): New constant.
3246         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
3247         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
3248         implementation.
3249
3250 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3251
3252         * modules/nanosleep (Depends-on): Add gettime.
3253
3254 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3255         and Simon Josefsson  <jas@extundo.com>
3256         and Oskar Liljeblad  <oskar@osk.mine.nu>
3257
3258         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
3259         * gnulib-tool (func_import): New license type 'unmodifiable license
3260         text'.
3261         * modules/fdl: Use it.  Longer description.
3262         * module/gpl, module/lgpl: New files.
3263
3264 2006-08-30  Jim Meyering  <jim@meyering.net>
3265
3266         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
3267         shadowing the parameter.
3268
3269 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3270
3271         Sync from Libtool:
3272
3273         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3274
3275         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
3276         sharing with gnulib.  Report by Eric Blake.
3277
3278 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3279
3280         * modules/isapipe: New file.
3281         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
3282
3283 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3284
3285         * modules/configmake (Makefile.am): Add a comment, and omit
3286         the CONFIGMAKE_ prefix from generated macro names.  Suggested
3287         by Bruno Haible.
3288
3289 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3290
3291         * m4/isapipe.m4: New file.
3292
3293 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3294
3295         * lib/isapipe.c, lib/isapipe.h: New files.
3296
3297 2006-08-29  Jim Meyering  <jim@meyering.net>
3298
3299         * modules/configmake (Makefile.am): Make configmake.h depend on
3300         Makefile.  Otherwise, a stale configmake.h could hang around.
3301
3302 2006-08-29  Eric Blake  <ebb9@byu.net>
3303
3304         * lib/error.c (error_at_line, print_errno_message): Match libc, after
3305         resolution of upstream bug 3044.
3306
3307 2006-08-29  Bruno Haible  <bruno@clisp.org>
3308
3309         * modules/localcharset (Depends-on): Add configmake.
3310         (Makefile.am): Remove setting of LIBDIR through DEFS.
3311
3312 2006-08-29  Bruno Haible  <bruno@clisp.org>
3313
3314         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
3315         defined.
3316
3317 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3318
3319         * modules/fcntl: New file.
3320         * modules/chdir-safer (Depends-on): Add fcntl.
3321         * modules/fts: Likewise.
3322         * modules/mkdir-p: Likewise.
3323
3324         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
3325         This undoes the most recent change, since we're now addressing the
3326         problem in a different way.
3327
3328         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
3329         into output, since the output might be called Makefile.am even
3330         if $makefile_name is something different.
3331         (func_import): Use $makefile_am rather than
3332         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
3333         empty.
3334
3335         * modules/inttypes (Files): Add m4/inttypes-h.m4.
3336
3337 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3338
3339         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
3340         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
3341         recent change to stdint.m4, since we're now addressing the problem in a
3342         different way.
3343
3344 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3345
3346         * m4/fcntl_h.m4: New file.
3347
3348 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3349
3350         * lib/fcntl_.h: New file.
3351         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
3352         the fcntl module.
3353         * lib/dirchownmod.c: Likewise.
3354         * lib/fts.c: Likewise.
3355
3356         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
3357         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
3358         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
3359         just before including <inttypes.h>, to avoid circular inclusion.
3360
3361 2006-08-28  Jim Meyering  <jim@meyering.net>
3362
3363         * doc/visibility.texi: Actually read and correct the grammar of the
3364         sentence affected by yesterday's change.
3365
3366 2006-08-28  Eric Blake  <ebb9@byu.net>
3367
3368         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
3369         needs wrapper.
3370
3371 2006-08-28  Eric Blake  <ebb9@byu.net>
3372
3373         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
3374
3375 2006-08-28  Eric Blake  <ebb9@byu.net>
3376
3377         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
3378
3379 2006-08-28  Bruno Haible  <bruno@clisp.org>
3380
3381         * modules/c-strstr: New file, from GNU gettext.
3382         * MODULES.html.sh (String handling): Add c-strstr.
3383
3384 2006-08-28  Bruno Haible  <bruno@clisp.org>
3385
3386         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
3387         macros.
3388         Reported by Eric Blake.
3389
3390 2006-08-28  Bruno Haible  <bruno@clisp.org>
3391
3392         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
3393         (VASNPRINTF): Return a string of length > INT_MAX without failing.
3394         * lib/vasprintf.c: Include errno.h, limits.h.
3395         (EOVERFLOW): New fallback definition.
3396         (vasprintf): Test here whether the string length is > INT_MAX.
3397         * lib/vsnprintf.c: Include errno.h, limits.h.
3398         (EOVERFLOW): New fallback definition.
3399         (vsnprintf): Fix bug when generated string was too long for the buffer.
3400         Test here whether the string length is > INT_MAX.
3401
3402 2006-08-28  Bruno Haible  <bruno@clisp.org>
3403
3404         * lib/inttypes_.h (SCNX*): Remove definitions.
3405         Reported by Eric Blake.
3406
3407 2006-08-28  Bruno Haible  <bruno@clisp.org>
3408
3409         * lib/c-strstr.h: New file, from GNU gettext.
3410         * lib/c-strstr.c: New file, from GNU gettext.
3411
3412 2006-08-28  Bruno Haible  <bruno@clisp.org>
3413
3414         * gnulib-tool: Reorder some statements.
3415
3416 2006-08-28  Bruno Haible  <bruno@clisp.org>
3417
3418         * gnulib-tool: New option --makefile-name.
3419         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
3420         $makefile_name.
3421         (func_import): Write $makefile_name to the cache file, and read it from
3422         there unless explicitly specified. Use $makefile_name as file name
3423         instead of Makefile.am. Adjust the recommendations accordingly.
3424
3425 2006-08-28  Bruno Haible  <bruno@clisp.org>
3426
3427         * gnulib-tool (func_verify_module): Check against misapplying patch.
3428
3429 2006-08-28  Bruno Haible  <bruno@clisp.org>
3430
3431         * gnulib-tool (func_relativize, func_relconcat): New functions.
3432         Give an error if --local-dir is given with --update.
3433         Remove trailing slashes from $local_gnulib_dir.
3434         (func_import): Store the relativized $local_gnulib_dir in
3435         gnulib-cache.m4, and read it from there if not specified explicitly.
3436
3437 2006-08-28  Bruno Haible  <bruno@clisp.org>
3438
3439         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
3440         is the current directory. Respect also $local_gnulib_dir.
3441
3442 2006-08-28  Bruno Haible  <bruno@clisp.org>
3443             Simon Josefsson  <jas@extundo.com>
3444
3445         BeOS portability.
3446         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
3447
3448 2006-08-27  Jim Meyering  <jim@meyering.net>
3449
3450         * doc/visibility.texi: Remove duplicate word: "pointer".
3451
3452 2006-08-26  Bruno Haible  <bruno@clisp.org>
3453
3454         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
3455         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
3456         (Makefile.am): Create inttypes.h from inttypes_.h.
3457         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
3458
3459         * modules/imaxabs: New file.
3460
3461         * modules/imaxdiv: New file.
3462
3463 2006-08-26  Bruno Haible  <bruno@clisp.org>
3464
3465         * m4/inttypes.m4: New file.
3466         * m4/_inttypes_h.m4: Remove file.
3467         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
3468         PRI_MACROS_BROKEN.
3469         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
3470
3471         * m4/imaxabs.m4: New file.
3472
3473         * m4/imaxdiv.m4: New file.
3474
3475 2006-08-26  Bruno Haible  <bruno@clisp.org>
3476
3477         * lib/inttypes_.h: New file.
3478         * lib/inttypes.h: Remove file.
3479         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
3480
3481         * lib/imaxabs.c: New file.
3482
3483         * lib/imaxdiv.c: New file.
3484
3485 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
3486
3487         New config-h module, so that "make" output needn't be cluttered
3488         by -DHAVE_CONFIG_H.
3489         * MODULES.html.sh (Support for building libraries and executables):
3490         Add config-h.
3491         * modules/config-h: New file.
3492         * gnulib-tool (nl, sed_transform_lib_file): New vars.
3493         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
3494         the config-h module is used.
3495
3496         New configmake module, so that "make" output needn't be cluttered
3497         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
3498         * MODULES.html.sh (Support for building libraries and executables):
3499         Add configmake.
3500         * modules/configmake: New file.
3501
3502 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
3503
3504         * m4/config-h.m4: New file.
3505
3506 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
3507
3508         * config/srclist.txt: Add elisp-comp.
3509
3510 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
3511
3512         * MODULES.html.sh (Support for building libraries and executables):
3513         Add elisp-comp.
3514         * build-aux/elisp-comp: New file.
3515         * modules/elisp-comp: New file.
3516
3517 2006-08-24  Bruno Haible  <bruno@clisp.org>
3518
3519         * gnulib-tool (func_create_testdir): Use non-default values of
3520         sourcebase and m4base.
3521
3522 2006-08-24  Bruno Haible  <bruno@clisp.org>
3523
3524         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
3525         HTML structure.
3526
3527 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
3528
3529         * modules/openat (Depends-on): Add lchown.
3530
3531 2006-08-23  Bruno Haible  <bruno@clisp.org>
3532
3533         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
3534         of gl_LOCK_EARLY instead of gl_LOCK.
3535
3536 2006-08-23  Bruno Haible  <bruno@clisp.org>
3537
3538         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
3539         on OSF/1 to no.
3540         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
3541
3542 2006-08-23  Bruno Haible  <bruno@clisp.org>
3543
3544         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
3545         as unusable.
3546
3547         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
3548         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
3549         (gl_LOCK): New macro.
3550
3551 2006-08-22  Simon Josefsson  <jas@extundo.com>
3552
3553         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
3554         to md5 module.
3555
3556 2006-08-22  Simon Josefsson  <jas@extundo.com>
3557
3558         * MODULES.html.sh: Add "Support for maintaining and release
3559         projects".
3560
3561         * build-aux/gnupload: New file, from coreutils.
3562
3563 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3564
3565         Avoid the need for AC_LIBSOURCES in m4 macros.
3566         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
3567         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
3568         * modules/check-version (EXTRA_DIST): Add check-version.h.
3569         * modules/crc (EXTRA_DIST): Add crc.h.
3570         * modules/des (EXTRA_DIST): Add des.h.
3571         * modules/gc (EXTRA_DIST): Add gc.h.
3572         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
3573         * modules/getline (EXTRA_DIST): Add getline.h.
3574         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
3575         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
3576         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
3577         * modules/md2 (EXTRA_DIST): Add md2.h.
3578         * modules/md4 (EXTRA_DIST): Add md4.h.
3579         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
3580         * modules/read-file (EXTRA_DIST): Add read-file.h.
3581         * modules/readline (EXTRA_DIST): Add readline.h.
3582         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
3583         rijndael-api-fst.h.
3584
3585 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3586
3587         * m4/rijndael.m4 (gl_ARCFOUR):
3588         * m4/arctwo.m4 (gl_ARCTWO):
3589         * m4/check-version.m4 (gl_CHECK_VERSION):
3590         * m4/crc.m4 (gl_CRC):
3591         * m4/des.m4 (gl_DES):
3592         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
3593         * m4/gc.m4 (gl_GC):
3594         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
3595         * m4/getline.m4 (gl_FUNC_GETLINE):
3596         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
3597         * m4/hmac-md5.m4 (gl_HMAC_MD5):
3598         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
3599         * m4/md2.m4 (gl_MD2):
3600         * m4/md4.m4 (gl_MD4):
3601         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
3602         * m4/read-file.m4 (gl_FUNC_READ_FILE):
3603         * m4/readline.m4 (gl_FUNC_READLINE):
3604         * m4/rijndael.m4 (gl_RIJNDAEL):
3605         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
3606         to get the necessary .h files and whatnot.
3607
3608 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3609
3610         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
3611         gnulib rather than the other way around.
3612         * config/srclistvars.sh (COREUTILS): Remove.
3613
3614 2006-08-22  Jim Meyering  <jim@meyering.net>
3615
3616         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
3617
3618         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
3619
3620 2006-08-22  Eric Blake  <ebb9@byu.net>
3621
3622         * modules/regexprops-generic: New file.
3623         * MODULES.html.sh (Support for building documentation): List it.
3624
3625 2006-08-22  Eric Blake  <ebb9@byu.net>
3626
3627         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
3628         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
3629         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
3630         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
3631
3632 2006-08-22  Bruno Haible  <bruno@clisp.org>
3633
3634         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
3635         and lib_LTLIBRARIES like the other lib_* variables.
3636
3637 2006-08-22  Bruno Haible  <bruno@clisp.org>
3638
3639         * build-aux/x-to-1.in: New file, from GNU gettext.
3640
3641 2006-08-22  Bruno Haible  <bruno@clisp.org>
3642
3643         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
3644         <utmpx.h> exists.
3645
3646 2006-08-22  Bruno Haible  <bruno@clisp.org>
3647
3648         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
3649         <utmpx.h> exists.
3650
3651 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3652
3653         BeOS portability.
3654         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
3655         exist.
3656         Problem reported by Bruno Haible.
3657
3658 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3659
3660         Avoid the need for AC_LIBSOURCES in m4 macros.
3661         * modules/acl (EXTRA_DIST): Add acl.h.
3662         * modules/argmatch (Files): Add m4/argmatch.m4.
3663         (configure.ac): Add gl_ARGMATCH.
3664         (EXTRA_DIST): Renamed from lib_SOURCES, for
3665         consistency with the other modules.  Remove argmatch.c.
3666         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
3667         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
3668         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
3669         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
3670         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
3671         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
3672         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
3673         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
3674         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
3675         * modules/closeout (EXTRA_DIST): Add closeout.h.
3676         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
3677         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
3678         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
3679         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
3680         dirname.h; remove basename.c and stripslash.c.
3681         * modules/exclude (EXTRA_DIST): Add exclude.h.
3682         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
3683         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
3684         * modules/file-type (EXTRA_DIST): Add file-type.h.
3685         * modules/filemode (EXTRA_DIST): Add filemode.h.
3686         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
3687         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
3688         * modules/fpending (EXTRA_DIST): Add __fpending.h.
3689         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
3690         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
3691         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
3692         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
3693         * modules/getdate (EXTRA_DIST): Add getdate.c.
3694         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
3695         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
3696         * modules/getpass (EXTRA_DIST): Add getpass.h.
3697         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
3698         * modules/group-member (EXTRA_DIST): Add group-member.h.
3699         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
3700         * modules/hash (EXTRA_DIST): Add hash.h.
3701         * modules/human (EXTRA_DIST): Add human.h.
3702         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
3703         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
3704         * modules/lchown (EXTRA_DIST): Add lchown.h.
3705         * modules/long-options (EXTRA_DIST): Add long-options.h.
3706         * modules/lstat (EXTRA_DIST): Add lstat.h.
3707         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
3708         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
3709         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
3710         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
3711         * modules/memxor (EXTRA_DIST): Add memxor.h.
3712         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
3713         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
3714         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
3715         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
3716         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
3717         * modules/physmem (EXTRA_DIST): Add physmem.h.
3718         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
3719         * modules/posixver (EXTRA_DIST): Add posixver.h.
3720         * modules/quote (EXTRA_DIST): Add quote.h.
3721         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
3722         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
3723         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
3724         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
3725         regex_internal.h regexec.c.
3726         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
3727         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
3728         * modules/same (EXTRA_DIST): Add same.h.
3729         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
3730         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
3731         * modules/savedir (EXTRA_DIST): Add savedir.h.
3732         * modules/sha1 (EXTRA_DIST): Add sha1.h.
3733         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
3734         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
3735         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
3736         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
3737         * modules/strdup (EXTRA_DIST): Add strdup.h.
3738         * modules/strftime (EXTRA_DIST): Add strftime.h.
3739         * modules/strndup (EXTRA_DIST): Add strndup.h.
3740         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
3741         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
3742         * modules/time_r (EXTRA_DIST): Add time_r.h.
3743         * modules/timespec (EXTRA_DIST): Add timespec.h.
3744         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
3745         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
3746         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
3747         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
3748         * modules/userspec (EXTRA_DIST): Add userspec.h.
3749         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
3750         * modules/utimens (EXTRA_DIST): Add utimens.h.
3751         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
3752         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
3753         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
3754         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
3755         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
3756         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
3757         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
3758         * modules/yesno (EXTRA_DIST): Add yesno.h.
3759
3760 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3761
3762         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
3763
3764         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
3765         * m4/dev-ino.m4, same-inode.m4: Remove.
3766
3767         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
3768         * m4/acl.m4 (AC_FUNC_ACL):
3769         * m4/backupfile.m4 (gl_BACKUPFILE):
3770         * m4/c-strtod.m4 (gl_C99_STRTOLD):
3771         * m4/canon-host.m4 (gl_CANON_HOST):
3772         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3773         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
3774         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
3775         * m4/cloexec.m4 (gl_CLOEXEC):
3776         * m4/close-stream.m4 (gl_CLOSE_STREAM):
3777         * m4/closeout.m4 (gl_CLOSEOUT):
3778         * m4/dirfd.m4 (gl_FUNC_DIRFD):
3779         * m4/dirname.m4 (gl_DIRNAME):
3780         * m4/exclude.m4 (gl_EXCLUDE):
3781         * m4/exitfail.m4 (gl_EXITFAIL):
3782         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
3783         * m4/file-type.m4 (gl_FILE_TYPE):
3784         * m4/filemode.m4 (gl_FILEMODE):
3785         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
3786         * m4/fpending.m4 (gl_FUNC_FPENDING):
3787         * m4/fprintftime.m4 (gl_FPRINTFTIME):
3788         * m4/fts.m4 (gl_FUNC_FTS):
3789         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
3790         * m4/getdate.m4 (gl_GETDATE):
3791         * m4/gethrxtime.m4 (gl_GETHRXTIME):
3792         * m4/getpagesize.m4 (gl_GETPAGESIZE):
3793         * m4/getpass.m4 (gl_FUNC_GETPASS):
3794         * m4/gettime.m4 (gl_GETTIME):
3795         * m4/getugroups.m4 (gl_GETUGROUPS):
3796         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
3797         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
3798         * m4/hard-locale.m4 (gl_HARD_LOCALE):
3799         * m4/hash.m4 (gl_HASH):
3800         * m4/idcache.m4 (gl_IDCACHE):
3801         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
3802         * m4/lchown.m4 (gl_FUNC_LCHOWN):
3803         * m4/long-options.m4 (gl_LONG_OPTIONS):
3804         * m4/lstat.m4 (gl_FUNC_LSTAT):
3805         * m4/md5.m4 (gl_MD5):
3806         * m4/memcasecmp.m4 (gl_MEMCASECMP):
3807         * m4/memcoll.m4 (gl_MEMCOLL):
3808         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
3809         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
3810         * m4/memxor.m4 (gl_MEMXOR):
3811         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
3812         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
3813         * m4/modechange.m4 (gl_MODECHANGE):
3814         * m4/mountlist.m4 (gl_MOUNTLIST):
3815         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
3816         * m4/openat.m4 (gl_FUNC_OPENAT):
3817         * m4/pathmax.m4 (gl_PATHMAX):
3818         * m4/physmem.m4 (gl_PHYSMEM):
3819         * m4/posixtm.m4 (gl_POSIXTM):
3820         * m4/posixver.m4 (gl_POSIXVER):
3821         * m4/quote.m4 (gl_QUOTE):
3822         * m4/quotearg.m4 (gl_QUOTEARG):
3823         * m4/readtokens.m4 (gl_READTOKENS):
3824         * m4/readutmp.m4 (gl_READUTMP):
3825         * m4/regex.m4 (gl_REGEX):
3826         * m4/safe-read.m4 (gl_SAFE_READ):
3827         * m4/safe-write.m4 (gl_SAFE_WRITE):
3828         * m4/same.m4 (gl_SAME):
3829         * m4/save-cwd.m4 (gl_SAVE_CWD):
3830         * m4/savedir.m4 (gl_SAVEDIR):
3831         * m4/settime.m4 (gl_SETTIME):
3832         * m4/sha1.m4 (gl_SHA1):
3833         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
3834         * m4/stat-macros.m4 (gl_STAT_MACROS):
3835         * m4/stat-time.m4 (gl_STAT_TIME):
3836         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
3837         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
3838         * m4/strdup.m4 (gl_FUNC_STRDUP):
3839         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
3840         * m4/strndup.m4 (gl_FUNC_STRNDUP):
3841         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
3842         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
3843         * m4/time_r.m4 (gl_TIME_R):
3844         * m4/timespec.m4 (gl_TIMESPEC):
3845         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
3846         * m4/unlinkdir.m4 (gl_UNLINKDIR):
3847         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
3848         * m4/userspec.m4 (gl_USERSPEC):
3849         * m4/utimecmp.m4 (gl_UTIMECMP):
3850         * m4/utimens.m4 (gl_UTIMENS):
3851         * m4/xalloc.m4 (gl_XALLOC):
3852         * m4/xgetcwd.m4 (gl_XGETCWD):
3853         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
3854         * m4/xreadlink.m4 (gl_XREADLINK):
3855         * m4/xstrtod.m4 (gl_XSTRTOD):
3856         * m4/yesno.m4 (gl_YESNO):
3857         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
3858         to get the necessary .h files and whatnot.
3859
3860 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
3861             Bruno Haible  <bruno@clisp.org>
3862
3863         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
3864         /bin/sh understanding of '!' conditional negation.
3865
3866 2006-08-21  Jim Meyering  <jim@meyering.net>
3867
3868         * modules/openat (Depends-on): Really alphabetize.
3869
3870         * modules/acl (Depends-on): Add error and quote.
3871
3872         * check-module (find_included_lib_files): Add at-func.c to the
3873         ok-to-include-more-than-once white list.
3874
3875         * modules/openat (Depends-on): Add lstat.  Alphabetize.
3876
3877 2006-08-21  Bruno Haible  <bruno@clisp.org>
3878
3879         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3880         Emit a pkgdata_DATA variable only if some snippets add contents to it.
3881         Reported by Martin Lambers <marlam@marlam.de>.
3882
3883 2006-08-21  Bruno Haible  <bruno@clisp.org>
3884
3885         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
3886         specify an installation location, don't emit a noinst_LIBRARIES or
3887         noinst_LTLIBRARIES assignment.
3888
3889 2006-08-21  Bruno Haible  <bruno@clisp.org>
3890
3891         BeOS portability.
3892         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
3893         BeOS has mbrtowc() but no <wctype.h>.
3894
3895 2006-08-21  Bruno Haible  <bruno@clisp.org>
3896
3897         BeOS portability.
3898         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
3899         exist.
3900
3901 2006-08-21  Bruno Haible  <bruno@clisp.org>
3902
3903         BeOS portability.
3904         * lib/mbchar.h: Include <wctype.h> only if it exists.
3905
3906 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3907
3908         Remove files that are no longer needed by their respective modules.
3909         * m4/obstack.m4: Remove.
3910         * m4/strerror_r.m4: Remove.
3911         * m4/uint32_t.m4: Remove.
3912         * m4/uintptr_t.m4: Remove.
3913         * m4/ullong_max.m4: Remove.
3914         * m4/xstrtoimax.m4: Remove.
3915         * m4/xstrtoumax.m4: Remove.
3916
3917         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
3918         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
3919         dependencies now capture this.
3920
3921         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
3922         Do not use AC_LIBSOURCES, since gnulib modules now do this.
3923         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
3924         * m4/human.m4 (gl_HUMAN): Likewise.
3925         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
3926         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
3927
3928         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
3929
3930         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
3931         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
3932         stdint.
3933         * m4/human.m4 (gl_HUMAN): Likewise.
3934         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
3935         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
3936         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3937         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3938         * m4/xstrtol (gl_XSTRTOL): Likewise.
3939
3940         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
3941         AC_TYPE_LONG_LONG_INT.
3942         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3943         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
3944         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
3945         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3946
3947         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
3948         on stdbool.
3949
3950         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
3951         (gl_PREREQ_XSTRTOUL): Remove.
3952
3953         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
3954
3955         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
3956         mode.
3957
3958 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3959
3960         Add and change modules to make it easier for coreutils to use
3961         gnulib-tool.
3962         * modules/backupfile (Files): Remove m4/d-ino.m4.
3963         (Depends-on): Add d-ino.
3964         * modules/cycle-check (Depends-on): Add stdint.
3965         (lib_SOURCES): Add cycle-check.h.
3966         * modules/d-ino: New module.
3967         * modules/d-type: New module.
3968         * modules/error (Files): Remove m4/strerror_r.m4.
3969         * modules/filemode (Files): Add m4/st_dm_mode.m4.
3970         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
3971         m4/inttypes_h.m4, m4/uintmax_t.m4.
3972         (Depends-on): Add stdint.
3973         (lib_SOURCES): Add fsusage.h.
3974         * modules/getcwd (Files): Remove d-ino.m4.
3975         (Depends-on): Add d-ino.
3976         * modules/getndelim2 (Depends-on): Add stdint.
3977         * modules/glob (Files): Remove m4/d-type.m4.
3978         (Depends-on): Add d-type.
3979         * modules/host-os: New module.
3980         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
3981         m4/inttypes_h.m4, m4/uintmax_t.m4.
3982         * Depends-on: Add stdint.
3983         (lib_SOURCES): Add human.h.
3984         * modules/inttostr (Files): Remove m4/intmax_t.m4,
3985         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
3986         m4/uintmax_t.m4, m4/ulonglong.m4.
3987         (Depends-on): Add stdint.
3988         (EXTRA_DIST): Add inttostr.h.
3989         * modules/lchmod: New module.
3990         * modules/link-follow: New module.
3991         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
3992         (Depends-on): Add lchmod.
3993         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
3994         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
3995         (Depends-on): Add stdint.
3996         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
3997         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3998         (Depends-on): Add stdint.
3999         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
4000         * modules/perl: New module.
4001         * modules/regex (Depends-on): Add stdint.
4002         * modules/rmdir-errno: New module.
4003         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4004         m4/intmax_t.m4.
4005         (Depends-on): Add stdint.
4006         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4007         m4/uintmax_t.m4.
4008         (Depends-on): Add stdint.
4009         * modules/unlink-busy: New module.
4010         * modules/utimecmp (Depends-on): Add stdint.
4011         * modules/uptime: New module.
4012         * modules/winsz-ioctl: New module.
4013         * modules/winsz-termios: New module.
4014         * modules/xnanosleep (Depends-on): Add nanosleep.
4015         * modules/ullong_max: Remove.
4016         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
4017         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
4018         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
4019         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
4020         (Depends-on): Add inttypes.
4021         (lib_SOURCES): Add xstrtol.h.
4022         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
4023         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
4024         * MODULES.html.sh: Move 'assert' into the assert section.
4025         Move 'dummy' into the linking section.
4026         Remove ullong_max.
4027         Add section for compatibility checks for POSIX:2001 functions,
4028         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
4029         winsz-ioctl, and winsz-termios into it.
4030         Add lchmod.
4031         Add top-level Misc section and put host-os, perl, and uptime
4032         into it.
4033
4034 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4035
4036         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
4037         now assume the stdint module.  Do not include inttypes.h.
4038         * lib/fsusage.h: Likewise.
4039         * lib/getndelim2.c: Likewise.
4040         * lib/human.h: Likewise.
4041         * lib/inttostr.h: Likewise.
4042         * lib/obstack.c: Likewise.
4043         * lib/regex_internal.h: Likewise.
4044         * lib/tempname.c: Likewise.
4045         * lib/utimecmp.c: Likewise.
4046         * lib/xstrtol.h: Likewise.
4047
4048         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
4049
4050         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
4051         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
4052         * lib/xtime.h: Likewise.
4053
4054 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4055
4056         * modules/openat (Files): Add lib/fchmodat.c.
4057         Fixes problem reported by Jay Youngman.
4058
4059 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4060
4061         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
4062         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
4063
4064 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
4065             Bruno Haible  <bruno@clisp.org>
4066
4067         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4068         and is a script that invokes bison. Tighten the code. Add comments.
4069
4070 2006-08-18  Jim Meyering  <jim@meyering.net>
4071
4072         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
4073         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
4074         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
4075         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
4076
4077 2006-08-18  Bruno Haible  <bruno@clisp.org>
4078
4079         * modules/bison-i18n: New file.
4080         * MODULES.html.sh (Internationalization functions): Add it.
4081
4082 2006-08-18  Bruno Haible  <bruno@clisp.org>
4083
4084         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
4085         sys/statvfs.h. When getmntinfo was found, check its declaration and
4086         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
4087
4088 2006-08-18  Bruno Haible  <bruno@clisp.org>
4089
4090         * m4/bison-i18n.m4: New file, from bison.
4091
4092 2006-08-18  Bruno Haible  <bruno@clisp.org>
4093
4094         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
4095         (ME_DUMMY): Treat "kernfs" as a dummy.
4096         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
4097
4098 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
4099
4100         Update from coreutils.
4101
4102         2006-08-15  Jim Meyering  <jim@meyering.net>
4103
4104         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
4105
4106         2006-01-17  Jim Meyering  <jim@meyering.net>
4107
4108         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
4109
4110         2006-01-11  Jim Meyering  <jim@meyering.net>
4111
4112         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
4113         Check for the lchmod function.
4114
4115 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
4116
4117         Update from coreutils.
4118
4119         * lib/__fpending.h: Add copyright notice.
4120         * lib/fprintftime.h: Likewise.
4121         * lib/savedir.c: Use (C) in copyright notice.
4122         * lib/savedir.h: Likewise.
4123
4124         2006-08-15  Jim Meyering  <jim@meyering.net>
4125
4126         * lib/at-func.c: New file, with the logic of all emulated at-functions.
4127         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
4128         in support of the EXPECTED_ERRNO macro.
4129         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
4130         definitions.  Instead, define the appropriate symbols and include
4131         "at-func.c".
4132         * lib/mkdirat.c (mkdirat): Likewise.
4133         * lib/fchmodat.c (fchmodat): Likewise.
4134         (ENOSYS): Remove definition.
4135         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
4136         it.  Don't include "unistd--.h" -- it wasn't ever used.
4137
4138         2006-01-17  Jim Meyering  <jim@meyering.net>
4139
4140         Rewrite fts.c not to change the current working directory,
4141         by using openat, fstatat, fdopendir, etc..
4142
4143         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
4144         (HAVE_OPENAT_SUPPORT): Define.
4145         [_LIBC] (fchdir): Don't undef or define; no longer used.
4146         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
4147         Now, this `function' always succeeds, and consumes its file descriptor
4148         parameter -- so callers must not close such FDs.  Update callers.
4149         (diropen_fd, opendirat, cwd_advance_fd): New functions.
4150         (diropen): Add parameter, SP.  Adjust all callers.
4151         Implement using diropen_fd, rather than open.
4152         (fts_open): Initialize new member, fts_cwd_fd.
4153         Remove fts_rft-setting code.
4154         (fts_close): Close fts_cwd_fd, if necessary.
4155         (__opendir2): Define in terms of opendir or opendirat,
4156         depending on whether the FST_NOCHDIR flag is set.
4157         (fts_build): Since fts_safe_changedir consumes its FD, and since
4158         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
4159         and close the dup'd file descriptor upon failure.
4160         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
4161         (fts_safe_changedir): Tweak semantics to reflect that this function
4162         now calls cwd_advance_fd and hence consumes its FD argument.
4163         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
4164         [struct FTS] (fts_rft): Remove now-unused member.
4165         [struct FTS] (fts_cycle.state): Improve comment.
4166
4167         * lib/openat.c (openat_needs_fchdir): New function.
4168         * lib/openat.h (openat_needs_fchdir): Declare it.
4169
4170 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
4171
4172         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
4173         Problem and fix reported by Pádraig Brady in
4174         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
4175
4176 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4177
4178         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
4179
4180 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4181
4182         * lib/memcoll.c (memcoll): Optimize for the common case where the
4183         arguments are bytewise equal.
4184
4185 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4186
4187         * doc/regexprops-generic.texi: Add a copyright notice.
4188
4189 2006-08-15  Bruno Haible  <bruno@clisp.org>
4190
4191         * modules/tmpdir (License): Change to LGPL.
4192
4193 2006-08-15  Bruno Haible  <bruno@clisp.org>
4194
4195         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
4196         module.
4197
4198 2006-08-14  Simon Josefsson  <jas@extundo.com>
4199
4200         * config/srclist.txt: Add gnupload.
4201
4202 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4203
4204         Change copyright notice from LGPL 2 to GPL 2, since that's the
4205         standard form used in the gnulib repository.
4206         * tests/test-lock.c: Likewise.
4207         * tests/test-stdint.c: Likewise.
4208         * tests/test-tls.c: Likewise.
4209
4210         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
4211         prelude-manager.  User shorter URLs for GNU projects, without '?'.
4212         Add copyright notice.
4213
4214         * check-module: Add copyright notice.  Output a copyright
4215         notice if "--version" is specified.
4216         * modules/COPYING: New file.
4217         * tests/test-getaddrinfo.c: Add copyright notice.
4218         * tests/test-verify.c: Likewise.
4219
4220 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4221
4222         Change copyright notice from LGPL 2 to GPL 2, since that's the
4223         standard form used in the gnulib repository.
4224         * lib/lock.c: LGPL -> GPL.
4225         * lib/lock.h: Likewise.
4226         * lib/strnlen1.c: Likewise.
4227         * lib/strnlen1.h: Likewise.
4228         * lib/tls.c: Likewise.
4229         * lib/tls.h: Likewise.
4230         * lib/tmpdir.c: Likewise.
4231
4232         * lib/TODO: Remove; this belongs only in coreutils.
4233
4234 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4235
4236         Add copyright notices to long-enough files that lack them, since
4237         otherwise the files aren't clearly free.  Use the same notice that
4238         getdate.texi already uses.
4239         * doc/alloca-opt.texi: Add copyright notice.
4240         * doc/alloca.texi: Likewise.
4241         * doc/ctime.texi: Likewise.
4242         * doc/functions.texi: Likewise.
4243         * doc/gcd.texi: Likewise.
4244         * doc/gnulib-tool.texi: Likewise.
4245         * doc/inet_ntoa.texi: Likewise.
4246         * doc/visibility.texi: Likewise.
4247
4248         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
4249         * doc/quote.texi: Add copyright notice.
4250
4251         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
4252         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
4253         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
4254         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
4255         is now obsolete, and give a pointer to the Sun list.
4256         Add copyright notice.
4257
4258 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4259
4260         * config/srclistvars.sh: Add copyright notice.
4261
4262 2006-08-14  Eric Blake  <ebb9@byu.net>
4263
4264         Import the following change from libc:
4265
4266         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4267
4268         Upstream bug 2997.
4269         * lib/misc/error.c: Add space between program name and message if file
4270         name is missing.
4271
4272 2006-08-12  Karl Berry  <karl@gnu.org>
4273
4274         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
4275         remove, these originate in gnulib now.
4276
4277 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4278
4279         * doc/Makefile (standards.info standards.html standards.dvi):
4280         Also depend on make-stds.texi.
4281
4282 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
4283
4284         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
4285         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
4286
4287         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
4288         in wchar_t.  Problem reported by Eric Blake.
4289
4290         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
4291         LEN is smaller than SIZE.  Suggested by Bruno Haible.
4292         Also, help the compiler to keep LEN in a register.
4293
4294 2006-08-11  Eric Blake  <ebb9@byu.net>
4295
4296         * users.txt: Sort.  Add tar.
4297
4298 2006-08-11  Bruno Haible  <bruno@clisp.org>
4299
4300         * users.txt: New file.
4301
4302 2006-08-11  Bruno Haible  <bruno@clisp.org>
4303
4304         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
4305         before <wchar.h>. Needed for OSF/1 and BSD/OS.
4306
4307 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
4308
4309         * modules/snprintf (Depends-on): Remove minmax.
4310         (Maintainer): Add self and Bruno.
4311
4312 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
4313
4314         * lib/.cppi-disable: Add snprintf.h, socket_.h.
4315         * lib/snprintf.c: Include <errno.h> and <limits.h>.
4316         (EOVERFLOW): Define if the system does not.
4317         Do not include "minmax.h"; it wasn't used.
4318         (snprintf): Don't assume size_t promotes to an unsigned type.
4319         Fix bug when generated string was too long for the buffer: the
4320         buffer's contents are supposed to be the initial prefix of the
4321         output.  Don't assume vasnprintf returns EOVERFLOW if the size
4322         exceeds INT_MAX; do the check ourselves.
4323
4324         Import the following changes from libc:
4325
4326         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
4327
4328         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
4329         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
4330         set wc to the byte which couldn't be converted.
4331         (re_string_reconstruct): Don't clear valid_raw_len before calling
4332         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
4333         tip_context using re_string_context_at.
4334
4335         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
4336
4337         * lib/posix/regex.h: g++ still cannot handled [restrict].
4338
4339         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
4340
4341         * lib/posix/regex.h: Remove special handling for VMS.
4342
4343 2006-08-10  Jim Meyering  <jim@meyering.net>
4344
4345         * modules/same-inode: New module.
4346         * modules/dev-ino: New module.
4347         * modules/cycle-check: Depend on these modules, rather than simply
4348         including their .h files.
4349         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
4350         required via m4/cycle-check.m4.
4351         * modules/same: Depend on new same-inode module, rather than
4352         including same-inode.h.
4353         * modules/chdir-safer: New file.
4354
4355         * modules/chown (Depends-on): Add stat-macros.
4356
4357 2006-08-10  Jim Meyering  <jim@meyering.net>
4358
4359         * m4/cycle-check.m4: New file.
4360         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
4361         * m4/dev-ino.m4, m4/same-inode.m4: New files.
4362
4363 2006-08-10  Eric Blake  <ebb9@byu.net>
4364
4365         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
4366         in from original proposal.
4367
4368 2006-08-10  Eric Blake  <ebb9@byu.net>
4369         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4370
4371         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
4372         namespace.
4373
4374 2006-08-10  Bruno Haible  <bruno@clisp.org>
4375
4376         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
4377         as well.
4378
4379 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4380
4381         Sync from coreutils.
4382
4383         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
4384
4385         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
4386         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
4387
4388 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4389
4390         * modules/restrict: Remove; no longer needed now that we assume
4391         Autoconf 2.59 or later.
4392         * MODULES.html.sh: Remove 'restrict'.
4393         * modules/argp (Depends-on): Remove 'restrict'.
4394         * modules/base64 (Depends-on): Likewise.
4395         * modules/gc (Depends-on): Likewise.
4396         * modules/getaddrinfo (Depends-on): Likewise.
4397         * modules/glob (Depends-on): Likewise.
4398         * modules/inet_ntop (Depends-on): Likewise.
4399         * modules/inet_pton (Depends-on): Likewise.
4400         * modules/memxor (Depends-on): Likewise.
4401         * modules/regex (Depends-on): Likewise.
4402         * modules/strtok_r (Depends-on): Likewise.
4403         * modules/time_r (Depends-on): Likewise.
4404
4405 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4406
4407         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
4408         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
4409         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
4410         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
4411         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
4412         * m4/memxor.m4 (gl_MEMXOR): Likewise.
4413         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
4414         gl_C_RESTRICT replaced by AC_C_RESTRICT.
4415
4416         Merge from coreutils.
4417         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
4418         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
4419         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
4420         * m4/time_r.m4 (gl_TIME_R): Likewise.
4421
4422 2006-08-09  Karl Berry  <karl@gnu.org>
4423
4424         * config/srclist.txt: no more gettext-tools, per Bruno.
4425
4426 2006-08-08  Eric Blake  <ebb9@byu.net>
4427
4428         * modules/verror: New module.
4429         * MODULES.html.sh: Document it.
4430
4431 2006-08-08  Eric Blake  <ebb9@byu.net>
4432
4433         * lib/verror.h, lib/verror.c: New files.
4434
4435 2006-08-08  Eric Blake  <ebb9@byu.net>
4436
4437         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
4438         verror_at_line output complies with GNU Coding Standards even when
4439         file is NULL.
4440
4441 2006-08-07  Bruno Haible  <bruno@clisp.org>
4442
4443         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
4444         versions of AIX.
4445         Reported by Ralf Wildenhues.
4446
4447 2006-08-07  Bruno Haible  <bruno@clisp.org>
4448
4449         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
4450         in an AC_DEFUN. Needed so that the autoconf snippets can use
4451         AC_REQUIRE.
4452
4453 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4454
4455         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4456         Initialize pkgdata_DATA.
4457         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
4458         overriding it.
4459
4460 2006-08-06  Eric Blake  <ebb9@byu.net>
4461
4462         * lib/error.h: Fold in some upstream changes from glibc.
4463         * lib/error.c: Likewise.
4464
4465 2006-08-04  Bruno Haible  <bruno@clisp.org>
4466
4467         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4468         Make the mostlyclean-local rule depend on mostlyclean-generic.
4469         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
4470
4471 2006-07-31  Bruno Haible  <bruno@clisp.org>
4472
4473         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
4474         <stdlib.h>, <string.h>.
4475
4476 2006-07-30  Bruno Haible  <bruno@clisp.org>
4477
4478         * modules/readlink (License): Change to LGPL.
4479
4480 2006-07-30  Bruno Haible  <bruno@clisp.org>
4481
4482         * modules/javaversion (Makefile.am): Distribute javaversion.java and
4483         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
4484         set PKGDATADIR to point to it.
4485
4486 2006-07-30  Bruno Haible  <bruno@clisp.org>
4487
4488         * modules/csharpexec (configure.ac): Comment out macro invocation.
4489         * modules/javaexec (configure.ac): Likewise.
4490         * modules/javacomp-script (configure.ac): Likewise.
4491
4492         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
4493
4494 2006-07-30  Bruno Haible  <bruno@clisp.org>
4495
4496         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
4497         linked-list.
4498
4499 2006-07-30  Bruno Haible  <bruno@clisp.org>
4500
4501         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
4502
4503 2006-07-30  Bruno Haible  <bruno@clisp.org>
4504
4505         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4506         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
4507         get removed.
4508
4509 2006-07-29  Bruno Haible  <bruno@clisp.org>
4510
4511         Make it possible for gnulib-tool to work with locally modified or
4512         augmented gnulib repositories.
4513         * gnulib-tool (func_usage): Document --local-dir option.
4514         (local_gnulib_dir): New variable.
4515         Handle --local-dir option.
4516         (func_lookup_file): New function.
4517         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
4518         (func_get_description, func_get_filelist, func_get_description,
4519         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
4520         func_get_automake_snippet, func_get_include_directive,
4521         func_get_license, func_get_maintainer): Use func_lookup_file.
4522         (func_import, func_create_testdir): Use func_lookup_file.
4523
4524 2006-07-29  Bruno Haible  <bruno@clisp.org>
4525
4526         * modules/setenv (Depends-on): Add unistd.
4527
4528 2006-07-29  Bruno Haible  <bruno@clisp.org>
4529
4530         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
4531
4532 2006-07-29  Bruno Haible  <bruno@clisp.org>
4533
4534         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
4535
4536 2006-07-29  Bruno Haible  <bruno@clisp.org>
4537
4538         * gnulib-tool (import, update): If there is no Makefile.am, look at
4539         aclocal.m4, instead of bailing out.
4540
4541 2006-07-29  Bruno Haible  <bruno@clisp.org>
4542
4543         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
4544         Categorize the options by when they are useful.
4545
4546 2006-07-29  Bruno Haible  <bruno@clisp.org>
4547
4548         * gnulib-tool (func_usage): Document option --no-libtool.
4549         Handle option --no-libtool.
4550         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
4551         for changed semantics of $libtool variable.
4552         (func_import): Likewise. If libtool is not used, show this through
4553         an option --no-libtool.
4554         (func_create_testdir): Update.
4555
4556 2006-07-29  Bruno Haible  <bruno@clisp.org>
4557
4558         * gnulib-tool (func_import): Extend error message about missing
4559         --doc-base.
4560
4561 2006-07-29  Bruno Haible  <bruno@clisp.org>
4562
4563         * gnulib-tool (func_import): Don't create the $docbase directory if
4564         there is no file to store there.
4565
4566 2006-07-29  Bruno Haible  <bruno@clisp.org>
4567
4568         * gnulib-tool (autoconf_minversion): If a --dir option is given and
4569         relevant, look for configure.ac there, not in the current directory.
4570         Also use a simple search for AC_PREREQ, not "autoconf --trace".
4571
4572 2006-07-29  Bruno Haible  <bruno@clisp.org>
4573
4574         * gnulib-tool (SORT): New variable.
4575         (func_usage): Undocument --assume-autoconf option.
4576         Remove --assume-autoconf option handling.
4577         (autoconf_minversion): Determine from the contents of configure.ac.
4578         (func_import): Remove autoconf_minversion handling.
4579         Suggested by Eric Blake.
4580
4581 2006-07-29  Bruno Haible  <bruno@clisp.org>
4582
4583         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
4584
4585 2006-07-29  Bruno Haible  <bruno@clisp.org>
4586
4587         * config/srclist.txt (*setenv.[ch]): Remove rules.
4588
4589 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4590
4591         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
4592
4593 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4594
4595         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
4596         arpa/inet.h.
4597
4598 2006-07-28  Simon Josefsson  <jas@extundo.com>
4599
4600         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
4601         * modules/inet_pton (Depends-on): Likewise.
4602
4603 2006-07-28  Simon Josefsson  <jas@extundo.com>
4604
4605         * m4/netinet_in_h.m4: New file.
4606
4607 2006-07-28  Simon Josefsson  <jas@extundo.com>
4608
4609         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
4610         #include's.
4611
4612 2006-07-28  Simon Josefsson  <jas@extundo.com>
4613
4614         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
4615         #include's.
4616
4617 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
4618
4619         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
4620         setgid on directories only if they set these bits.
4621         * lib/modechange.h: Remove obsolete comment about masks.
4622
4623 2006-07-28  Eric Blake  <ebb9@byu.net>
4624
4625         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
4626         macro expansion.
4627
4628 2006-07-28  Bruno Haible  <bruno@clisp.org>
4629
4630         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
4631
4632 2006-07-28  Bruno Haible  <bruno@clisp.org>
4633
4634         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
4635
4636 2006-07-28  Bruno Haible  <bruno@clisp.org>
4637
4638         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
4639         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
4640         Define fallbacks.
4641         Avoids link error on FreeBSD 4.x.
4642         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
4643
4644         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
4645         encoding.
4646         * lib/mbswidth.c (iswcntrl): Likewise.
4647
4648 2006-07-27  Bruno Haible  <bruno@clisp.org>
4649
4650         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
4651         test.
4652
4653 2006-07-27  Bruno Haible  <bruno@clisp.org>
4654
4655         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
4656         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
4657         defined.
4658
4659 2006-07-26  Eric Blake  <ebb9@byu.net>
4660
4661         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
4662
4663 2006-07-26  Eric Blake  <ebb9@byu.net>
4664
4665         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
4666         like mingw that lack mkstemp.
4667         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
4668         avoid compilation warning on mingw.
4669
4670 2006-07-26  Bruno Haible  <bruno@clisp.org>
4671
4672         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
4673         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
4674         INT_FAST*_MIN, INTPTR_MIN.
4675
4676 2006-07-25  Bruno Haible  <bruno@clisp.org>
4677
4678         * modules/version-etc (Depends-on): Add stdarg.
4679
4680 2006-07-25  Bruno Haible  <bruno@clisp.org>
4681
4682         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
4683         complex commands.
4684
4685 2006-07-25  Bruno Haible  <bruno@clisp.org>
4686
4687         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
4688         defined in <stdarg.h> or config.h.
4689
4690 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
4691
4692         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
4693         (gl_STDIO_SAFER): Remove.
4694
4695 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
4696
4697         * MODULES.html.sh (File stream based Input/Output):
4698         Add fopen-safer, tmpfile-safer; remove stdio-safer.
4699         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
4700         * modules/fopen-safer, modules/tmpfile-safer: New files.
4701         * modules/stdio-safer: Remove.
4702
4703 2006-07-24  Bruno Haible  <bruno@clisp.org>
4704
4705         * modules/tmpdir: New file.
4706         * MODULES.html.sh (File system functions): Add it.
4707
4708 2006-07-24  Bruno Haible  <bruno@clisp.org>
4709
4710         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
4711         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
4712
4713 2006-07-24  Bruno Haible  <bruno@clisp.org>
4714
4715         * modules/clean-temp: New file.
4716
4717 2006-07-24  Bruno Haible  <bruno@clisp.org>
4718
4719         * m4/tmpdir.m4: New file, from GNU gettext.
4720
4721 2006-07-24  Bruno Haible  <bruno@clisp.org>
4722
4723         * lib/tmpdir.h: New file, from GNU gettext.
4724         * lib/tmpdir.c: New file, from GNU gettext.
4725
4726 2006-07-24  Bruno Haible  <bruno@clisp.org>
4727
4728         * lib/clean-temp.h: New file, from GNU gettext.
4729         * lib/clean-temp.c: New file, from GNU gettext.
4730
4731 2006-07-23  Eric Blake  <ebb9@byu.net>
4732
4733         * modules/stdio-safer (Files): Add tmpfile-safer.c.
4734         (Depends-on): Add binary-io.
4735
4736 2006-07-23  Eric Blake  <ebb9@byu.net>
4737
4738         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
4739
4740 2006-07-23  Eric Blake  <ebb9@byu.net>
4741
4742         * lib/tmpfile-safer.c: New file.
4743         * lib/stdio-safer.h (fopen_safer): Add prototype.
4744         * lib/stdio--.h (tmpfile): Make safer.
4745
4746 2006-07-23  Bruno Haible  <bruno@clisp.org>
4747
4748         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
4749         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
4750         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
4751         gl_linked_remove_at): Use it.
4752
4753 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4754         and Simon Josefsson <jas@extundo.com>
4755
4756         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
4757
4758         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
4759
4760 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4761
4762         * modules/close-stream: New file.
4763         * modules/closeout (Description): Make it clear that it exits
4764         with a diagnostic on error.
4765         (Depends-on): Add close-stream.  Remove fpending, stdbool.
4766         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
4767
4768 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4769
4770         * m4/close-stream.m4: New file.
4771
4772 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4773
4774         * lib/close-stream.c, lib/close-stream.h: New files.
4775
4776 2006-07-22  Bruno Haible  <bruno@clisp.org>
4777
4778         Merge from GNU gettext 0.15.
4779
4780         2006-05-01  Bruno Haible  <bruno@clisp.org>
4781
4782                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
4783
4784         2006-07-22  Bruno Haible  <bruno@clisp.org>
4785
4786                 * modules/javaversion: New file.
4787                 * MODULES.html.sh (Java): Add javaversion.
4788
4789         2006-03-12  Bruno Haible  <bruno@clisp.org>
4790
4791                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
4792
4793         2005-12-04  Bruno Haible  <bruno@clisp.org>
4794
4795                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
4796                 (untested).
4797
4798         2006-06-21  Bruno Haible  <bruno@clisp.org>
4799
4800                 Avoid warnings from recent versions of mcs.
4801                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
4802                 -o, -L, -r any more. Use options documented since mcs-1.0
4803                 instead. Similarly for -g.
4804
4805         2005-12-04  Bruno Haible  <bruno@clisp.org>
4806
4807                 * build-aux/csharpcomp.sh.in: Suffix for resources is
4808                 .resources, not .resource.
4809
4810         2005-07-09  Bruno Haible  <bruno@clisp.org>
4811
4812                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
4813                 add a .dll suffix.
4814                 Reported by Mark Junker <mjscod@gmx.de>.
4815
4816         2006-07-22  Bruno Haible  <bruno@clisp.org>
4817
4818                 * modules/gettext: Upgrade to gettext-0.15.
4819                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
4820                 m4/visibility.m4.
4821                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
4822
4823 2006-07-22  Bruno Haible  <bruno@clisp.org>
4824
4825         Merge from GNU gettext 0.15.
4826
4827         2006-03-25  Bruno Haible  <bruno@clisp.org>
4828
4829                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
4830
4831         2006-07-21  Bruno Haible  <bruno@clisp.org>
4832
4833                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
4834                 "1.1".
4835
4836         2006-05-09  Bruno Haible  <bruno@clisp.org>
4837
4838                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
4839                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
4840                 for the conftestver execution.
4841
4842         2006-05-01  Bruno Haible  <bruno@clisp.org>
4843
4844                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
4845                 optional target-version argument. Verify that the compiler
4846                 groks source of the specified source-version, or add -source
4847                 option as necessary. Verify that the compiler produces
4848                 bytecode in the specified target-version, or add -target and
4849                 -source options as necessary. Make the result of the test
4850                 available as variable CONF_JAVAC. Also log error output in
4851                 config.log.
4852
4853         2006-03-11  Bruno Haible  <bruno@clisp.org>
4854
4855                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
4856
4857         2006-05-09  Bruno Haible  <bruno@clisp.org>
4858
4859                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
4860                 CLASSPATH_SEPARATOR to a semicolon.
4861
4862         2006-03-12  Bruno Haible  <bruno@clisp.org>
4863
4864                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
4865                 available as variable CONF_JAVA, for subsequent autoconf
4866                 tests. Also log error output in config.log.
4867
4868         2006-07-19  Bruno Haible  <bruno@clisp.org>
4869
4870                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
4871                 that getline works on glibc2 systems. Needed to avoid trouble
4872                 in relocatable.c.
4873                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
4874
4875         2005-12-04  Bruno Haible  <bruno@clisp.org>
4876
4877                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
4878                 launcher (untested).
4879
4880         2005-12-04  Bruno Haible  <bruno@clisp.org>
4881
4882                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
4883
4884         2006-07-22  Bruno Haible  <bruno@clisp.org>
4885
4886                 * gettext.m4: Update from GNU gettext-0.15.
4887                 * nls.m4: Likewise.
4888                 * po.m4: Likewise.
4889                 * inttypes-pri.m4: Likewise.
4890                 * inttypes-h.m4: Renamed from inttypes.m4.
4891                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
4892
4893 2006-07-22  Bruno Haible  <bruno@clisp.org>
4894
4895         Merge from GNU gettext 0.15.
4896
4897         2005-07-05  Bruno Haible  <bruno@clisp.org>
4898
4899                 * printf-args.c (printf_fetchargs): Work around broken
4900                 definition of wint_t on mingw.
4901
4902         2005-02-12  Bruno Haible  <bruno@clisp.org>
4903
4904                 * xallocsa.h: Add extern "C" for C++.
4905
4906         2006-05-17  Bruno Haible  <bruno@clisp.org>
4907
4908                 Cygwin portability.
4909                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
4910
4911         2006-04-30  Bruno Haible  <bruno@clisp.org>
4912
4913                 * progreloc.c: Include <mach-o/dyld.h> if available.
4914                 (find_executable): Use _NSGetExecutablePath when possible.
4915
4916         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4917
4918                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
4919                 function.
4920
4921         2005-12-29  Bruno Haible  <bruno@clisp.org>
4922
4923                 * progreloc.c (set_program_name_and_installdir): Fix
4924                 compilation error.
4925
4926         2005-12-04  Bruno Haible  <bruno@clisp.org>
4927
4928                 Cygwin portability.
4929                 * progreloc.c: Include <windows.h> also on Cygwin.
4930                 (find_executable): Add support for Cygwin.
4931                 (set_program_name_and_installdir): Handle also platforms with
4932                 nonempty EXEEXT.
4933
4934         2006-07-11  Bruno Haible  <bruno@clisp.org>
4935
4936                 * javacomp.c: Fix a comment.
4937                 Reported by Jim Meyering.
4938
4939         2006-04-30  Bruno Haible  <bruno@clisp.org>
4940
4941                 * javacomp.h (compile_java_class): Add source_version,
4942                 target_version arguments.
4943                 * javacomp.c: Rewritten to choose only a compiler that
4944                 respects the specified source_version and target_version.
4945
4946         2006-06-27  Bruno Haible  <bruno@clisp.org>
4947
4948                 Assume correct S_ISDIR macro.
4949                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
4950
4951         2006-07-22  Bruno Haible  <bruno@clisp.org>
4952
4953                 * javaversion.h: New file, from GNU gettext.
4954                 * javaversion.c: New file, from GNU gettext.
4955                 * javaversion.java: New file, from GNU gettext.
4956                 * javaversion.class: New file, from GNU gettext.
4957
4958         2006-05-17  Bruno Haible  <bruno@clisp.org>
4959
4960                 Cygwin portability.
4961                 * javaexec.c (execute_java_class): Test for jview program
4962                 also on Cygwin.
4963
4964         2006-04-09  Bruno Haible  <bruno@clisp.org>
4965
4966                 * fatal-signal.c: Don't include string.h.
4967                 (at_fatal_signal): Use a copying loop instead of memcpy.
4968
4969         2005-12-04  Bruno Haible  <bruno@clisp.org>
4970
4971                 * csharpexec.c: Add support for 'clix' launcher (untested).
4972                 (execute_csharp_using_sscli): New function.
4973                 (execute_csharp_program): Call it.
4974
4975         2006-06-21  Bruno Haible  <bruno@clisp.org>
4976
4977                 Avoid warnings from recent versions of mcs.
4978                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
4979                 -o, -L, -r any more. Use options documented since mcs-1.0
4980                 instead. Similarly for -g.
4981
4982         2005-07-09  Bruno Haible  <bruno@clisp.org>
4983
4984                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
4985                 add a .dll suffix.
4986                 Reported by Mark Junker <mjscod@gmx.de>.
4987
4988         2006-06-17  Bruno Haible  <bruno@clisp.org>
4989
4990                 * config.charset: Update for NetBSD 3.0.
4991
4992         2006-05-17  Bruno Haible  <bruno@clisp.org>
4993
4994                 Cygwin portability.
4995                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
4996
4997         2006-05-16  Bruno Haible  <bruno@clisp.org>
4998
4999                 * localcharset.c [CYGWIN]: Include <windows.h>.
5000                 (get_charset_aliases): For Cygwin, return the same CPxxx
5001                 aliases list as under WIN32.
5002                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
5003                 the environment variables. Fall back to GetACP().
5004
5005         2006-04-05  Bruno Haible  <bruno@clisp.org>
5006
5007                 * config.charset: Update Juan Manuel Guerrero's address.
5008
5009         2005-02-12  Bruno Haible  <bruno@clisp.org>
5010
5011                 * allocsa.h: Add extern "C" for C++.
5012
5013         2005-02-10  Bruno Haible  <bruno@clisp.org>
5014
5015                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
5016                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
5017
5018         2006-07-22  Bruno Haible  <bruno@clisp.org>
5019
5020                 * gettext.h: Update to GNU gettext-0.15.
5021
5022 2006-07-22  Bruno Haible  <bruno@clisp.org>
5023
5024         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
5025         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
5026         lib-prefix.m4, longdouble.m4, ssize_t.m4.
5027
5028 2006-07-21  Eric Blake  <ebb9@byu.net>
5029
5030         * modules/stdlib-safer: New file.
5031         * MODULES.html.sh (File stream based Input/Output): Add
5032         stdlib-safer.
5033
5034 2006-07-21  Eric Blake  <ebb9@byu.net>
5035
5036         * lib/stdlib-safer.h: New file from coreutils, required by
5037         stdlib--.h.
5038
5039 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
5040
5041         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
5042
5043 2006-07-20  Bruno Haible  <bruno@clisp.org>
5044
5045         * gnulib-tool: Recognize new option --assume-autoconf.
5046         (autoconf_minversion): New variable.
5047         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
5048
5049 2006-07-20  Bruno Haible  <bruno@clisp.org>
5050
5051         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
5052
5053 2006-07-19  Derek R. Price  <derek@ximbiot.com>
5054
5055         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
5056         Reindent and repaginate.
5057
5058 2006-07-19  Derek Price  <derek@ximbiot.com>
5059
5060         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
5061         Correct grammar.
5062
5063 2006-07-17  Bruno Haible  <bruno@clisp.org>
5064
5065         * modules/list: New file.
5066         * modules/array-list: New file.
5067         * modules/carray-list, modules/carray-list-tests: New files.
5068         * modules/linked-list, modules/linked-list-tests: New files.
5069         * modules/avltree-list, modules/avltree-list-tests: New files.
5070         * modules/rbtree-list, modules/rbtree-list-tests: New files.
5071         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
5072         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
5073         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
5074         * modules/oset: New file.
5075         * modules/array-oset: New file.
5076         * modules/avltree-oset, modules/avltree-oset-tests: New files.
5077         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
5078         * tests/test-carray_list.c: New file.
5079         * tests/test-linked_list.c: New file.
5080         * tests/test-avltree_list.c: New file.
5081         * tests/test-rbtree_list.c: New file.
5082         * tests/test-linkedhash_list.c: New file.
5083         * tests/test-avltreehash_list.c: New file.
5084         * tests/test-rbtreehash_list.c: New file.
5085         * tests/test-avltree_oset.c: New file.
5086         * tests/test-rbtree_oset.c: New file.
5087         * MODULES.html.sh (Container data structures): New section.
5088
5089 2006-07-17  Bruno Haible  <bruno@clisp.org>
5090
5091         * m4/gl_list.m4: New file.
5092
5093 2006-07-17  Bruno Haible  <bruno@clisp.org>
5094
5095         * lib/gl_list.h: New file.
5096         * lib/gl_list.c: New file.
5097         * lib/gl_array_list.h: New file.
5098         * lib/gl_array_list.c: New file.
5099         * lib/gl_carray_list.h: New file.
5100         * lib/gl_carray_list.c: New file.
5101         * lib/gl_linked_list.h: New file.
5102         * lib/gl_linked_list.c: New file.
5103         * lib/gl_anylinked_list1.h: New file.
5104         * lib/gl_anylinked_list2.h: New file.
5105         * lib/gl_avltree_list.h: New file.
5106         * lib/gl_avltree_list.c: New file.
5107         * lib/gl_anyavltree_list1.h: New file.
5108         * lib/gl_anyavltree_list2.h: New file.
5109         * lib/gl_rbtree_list.h: New file.
5110         * lib/gl_rbtree_list.c: New file.
5111         * lib/gl_anyrbtree_list1.h: New file.
5112         * lib/gl_anyrbtree_list2.h: New file.
5113         * lib/gl_anytree_list1.h: New file.
5114         * lib/gl_anytree_list2.h: New file.
5115         * lib/gl_linkedhash_list.h: New file.
5116         * lib/gl_linkedhash_list.c: New file.
5117         * lib/gl_anyhash_list1.h: New file.
5118         * lib/gl_anyhash_list2.h: New file.
5119         * lib/gl_avltreehash_list.h: New file.
5120         * lib/gl_avltreehash_list.c: New file.
5121         * lib/gl_rbtreehash_list.h: New file.
5122         * lib/gl_rbtreehash_list.c: New file.
5123         * lib/gl_anytreehash_list1.h: New file.
5124         * lib/gl_anytreehash_list2.h: New file.
5125
5126         * lib/gl_oset.h: New file.
5127         * lib/gl_oset.c: New file.
5128         * lib/gl_array_oset.h: New file.
5129         * lib/gl_array_oset.c: New file.
5130         * lib/gl_avltree_oset.h: New file.
5131         * lib/gl_avltree_oset.c: New file.
5132         * lib/gl_rbtree_oset.h: New file.
5133         * lib/gl_rbtree_oset.c: New file.
5134         * lib/gl_anytree_oset.h: New file.
5135
5136 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5137
5138         * m4/mkancesdirs.m4: New file.
5139         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
5140         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
5141         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
5142         it.
5143
5144 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5145
5146         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
5147         * lib/mkancesdirs.h: New files.
5148         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
5149         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
5150         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
5151         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
5152         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
5153         callers changed.  Revamp internals significantly, by not
5154         attempting to create directories that are temporarily more
5155         permissive than the final results.  Do not attempt to use
5156         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
5157         This removes some race conditions, fixes some bugs, and simplifies
5158         things.  Use new dirchownmod function to do owner and mode changes.
5159         * lib/mkdir-p.h: Likewise.
5160         * lib/modechange.c (octal_to_mode): New function.
5161         (struct mode_change): New member mentioned.
5162         (make_node_op_equals): New arg mentioned.  All callers changed.
5163         (mode_compile): Keep track of which mode bits the user has explicitly
5164         mentioned.
5165         (mode_adjust): New arg DIR, so that we implement the X op correctly.
5166         New arg PMODE_BITS, to keep track of which mode bits the user
5167         mentioned; it treats S_ISUID and S_ISGID speciall.
5168         All callers changed.
5169         * lib/modechange.h: Likewise.
5170
5171 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5172
5173         * MODULES.html.sh: Add mkancestors.
5174         * modules/mkancesdirs: New module.
5175         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
5176         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
5177         The chdir-safer and afs files are now orphans; I'll remove them
5178         unless someone speaks up.
5179         Add lib/dirchownmod.c, lib/dirchownmod.h.
5180         (Depends-on): Remove alloca, chown, save-cwd, dirname.
5181         Add lchown, mkancesdirs.
5182         (Maintainer): Add self.
5183
5184 2006-07-15  Karl Berry  <karl@gnu.org>
5185
5186         * gnulib-tool: help message wording/arrangement.
5187
5188 2006-07-14  Simon Josefsson  <jas@extundo.com>
5189
5190         * doc/gnulib.texi (Libtool and Windows): New section.
5191
5192 2006-07-12  Simon Josefsson  <jas@extundo.com>
5193
5194         * modules/gendocs (License): Fix license, approved by Karl.
5195
5196 2006-07-12  Eric Blake  <ebb9@byu.net>
5197
5198         * MODULES.html.sh: Add gendocs.
5199
5200 2006-07-11  Eric Blake  <ebb9@byu.net>
5201
5202         * modules/fdl: New module, to install doc/fdl.texi.
5203         * MODULES.html.sh: Add new section for documentation modules.
5204         * gnulib-tool: Avoid space-tab.
5205         (--doc-base): New option, to manage files from doc.
5206
5207 2006-07-11  Eric Blake  <ebb9@byu.net>
5208
5209         * m4/absolute-header.m4: Fix comments to match recent change.
5210
5211 2006-07-11  Eric Blake  <ebb9@byu.net>
5212
5213         * gnulib-tool: List --doc-base before --tests-base.
5214
5215 2006-07-11  Derek R. Price  <derek@ximbiot.com>
5216
5217         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
5218
5219 2006-07-11  Bruno Haible  <bruno@clisp.org>
5220
5221         * README: Mention where to put documentation.
5222
5223 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5224
5225         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
5226
5227 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
5228
5229         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
5230         to stdint.m4.
5231
5232 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
5233
5234         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
5235         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
5236         "no/such/file/stdint.h" when there is no such file, so that
5237         the resulting C code can be parsed by dodgy compilers.
5238         Problems reported by Bob Proulx.
5239
5240 2006-07-10  Derek R. Price  <derek@ximbiot.com>
5241
5242         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
5243         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
5244         macros into the GNU _D_EXACT_NAMLEN.
5245         * lib/savedir.c:  Likewise.
5246         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
5247
5248 2006-07-10  Derek R. Price  <derek@ximbiot.com>
5249         and Paul Eggert  <eggert@cs.ucla.edu>
5250
5251         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
5252         * m4/savedir.m4:
5253         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
5254         macros into the GNU _D_EXACT_NAMLEN.
5255
5256 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5257
5258         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
5259         around the absolute name, to work around a problem with the HP-UX
5260         11.23 native C compiler, reported by Bob Proulx.
5261
5262 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5263
5264         * doc/maintain.texi, make-stds.texi: Sync from
5265         <http://savannah.gnu.org/projects/gnustandards>.
5266
5267 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5268
5269         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
5270
5271 2006-07-09  Jim Meyering  <jim@meyering.net>
5272
5273         * m4/glob.m4: Remove a doubled word in a comment.
5274
5275 2006-07-09  Jim Meyering  <jim@meyering.net>
5276
5277         * lib/argp-pv.c: Remove a doubled word in a comment.
5278         * lib/check-version.c (check_version): Likewise.
5279         * lib/javacomp.c (compile_java_class): Likewise.
5280
5281 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
5282
5283         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
5284         for the benefit of people using Autoconf 2.60.  If you want to
5285         support older Autoconf versions you can copy m4/onceonly_2_57.m4
5286         (or m4/onceonly.m4, if pre-2.57) manually.
5287
5288 2006-07-08  Jim Meyering  <jim@meyering.net>
5289
5290         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
5291         comment.
5292         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
5293         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
5294         comment.
5295
5296 2006-07-08  Jim Meyering  <jim@meyering.net>
5297
5298         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
5299
5300 2006-07-07  Simon Josefsson  <jas@extundo.com>
5301
5302         * tests/test-crc.c: Change expected crc value, the test vector
5303         were probably computed using the old broken crc.c?
5304
5305 2006-07-06  Simon Josefsson  <jas@extundo.com>
5306
5307         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
5308         now the canonical place for the M4 file).
5309
5310         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
5311         from the sys_socket dependency now.
5312
5313         * modules/inet_pton (Files): Ditto.
5314
5315         * modules/inet_ntop (Files): Ditto.
5316
5317 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
5318
5319         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
5320         not gl_PREREQ_GETUSERSHELL.
5321
5322 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5323
5324         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
5325         with only one argument, for Autoconf 2.60.
5326         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
5327         expand to nothing, so add a shell command to avoid syntax error.
5328         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
5329
5330 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5331
5332         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
5333
5334 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5335
5336         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
5337         no longer needed.  Check for isblank decl.
5338         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
5339         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
5340         of existence.
5341
5342 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5343
5344         * lib/getloadavg.c: Use __VMS, not VMS.
5345         * lib/getopt.c: Likewise.
5346         * lib/getpagesize.h: Likewise.
5347         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
5348         and probably does not work.
5349
5350 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5351
5352         * lib/.cppi-disable: Add wcwidth.
5353         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
5354         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
5355         (ISGRAPH): Remove.  All uses changed to isgraph.
5356         (FOLD) [!defined _LIBC]: Remove special case.
5357         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
5358         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
5359         HAVE_ISBLANK.
5360         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
5361         case.
5362
5363 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
5364
5365         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
5366         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
5367         brackets.  Other minor changes to suppress some compiler
5368         warnings.
5369
5370 2006-07-06  Derek R. Price  <derek@ximbiot.com>
5371         and Paul Eggert  <eggert@cs.ucla.edu>
5372
5373         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
5374         of invoking obsolescent AC_HEADER_DIRENT macro.
5375         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
5376         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
5377         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
5378         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
5379         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
5380         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5381         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
5382         * m4/readdir.m4: Remove; no longer needed.
5383
5384 2006-07-06  Derek R. Price  <derek@ximbiot.com>
5385         and Paul Eggert  <eggert@cs.ucla.edu>
5386
5387         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
5388         Don't worry about this obsolete case any more.
5389         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
5390         directories.
5391         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
5392         worry about this obsolete case any more.
5393         * lib/fts.c: Likewise.
5394         * lib/getcwd.c: Likewise.
5395         * lib/glob.h: Likewise.
5396         * lib/savedir.c: Likewise.
5397
5398 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
5399
5400         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
5401         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
5402         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
5403         needed.
5404         All uses removed.
5405         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5406         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
5407         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
5408         needed.
5409         * m4/getdate.m4 (gl_GETDATE): Likewise.
5410         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
5411         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
5412         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
5413         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5414         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
5415         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
5416         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
5417         needed.
5418
5419 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
5420
5421         * lib/memcasecmp.c: Include <limits.h>.
5422         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
5423         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
5424         Don't assume isdigit succeeds only on '0' through '9'.
5425
5426 2006-07-05  Eric Blake  <ebb9@byu.net>
5427
5428         * modules/getaddrinfo (Depends-on): Add snprintf.
5429
5430 2006-07-05  Eric Blake  <ebb9@byu.net>
5431
5432         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
5433         to avoid 'header present but could not be compiled' on cygwin.
5434
5435 2006-07-05  Eric Blake  <ebb9@byu.net>
5436
5437         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
5438         missing from netdb.h.
5439         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
5440
5441 2006-07-05  Derek R. Price  <derek@ximbiot.com>
5442
5443         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
5444         no longer needed.
5445         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
5446         * m4/getdate.m4 (gl_GETDATE): Likewise.
5447         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
5448         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
5449         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
5450         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5451         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
5452
5453 2006-07-05  Derek R. Price  <derek@ximbiot.com>
5454
5455         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
5456         All uses of is_space replaced by isspace.
5457         * lib/exit.h: Don't talk about STDC_HEADERS.
5458         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
5459         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
5460         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
5461         replaced by isprint etc.
5462         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
5463         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
5464         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
5465         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
5466         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
5467         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
5468
5469 2006-07-05  Bruno Haible  <bruno@clisp.org>
5470
5471         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
5472         the function exists, before testing against AIX.
5473         Reported by Martin Lambers <marlam@marlam.de>.
5474
5475 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
5476
5477         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
5478         From Mark D. Baushke.
5479
5480 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
5481
5482         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
5483         to the absolute name, not just one, to bypass Sun C 5.8's
5484         "warning: #include of /usr/include/... may be non-portable".
5485
5486 2006-07-04  Eric Blake  <ebb9@byu.net>
5487
5488         * modules/dirname-tests: New test module.
5489         * tests/test-dirname.c: New file, replacing dirname.c
5490         TEST_DIRNAME section that was recently deleted.
5491
5492 2006-07-04  Bruno Haible  <bruno@clisp.org>
5493
5494         Assume ANSI C header files and <ctype.h> functions.
5495         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
5496         (mbsnwidth): Use isprint, iscntrl instead.
5497
5498 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5499
5500         Merge from coreutils.
5501         * MODULES.html.sh: Add xstrtold.
5502         * modules/xstrtold: New file.
5503         * modules/cycle-check (Files): Add lib/same-inode.h.
5504         * modules/dirname (Files): Add m4/double-slash-root.m4.
5505         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
5506         * modules/mkdir-p (Files): Add lib/same-inode.h.
5507         * modules/same (Files): Add lib/same-inode.h.
5508
5509 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5510
5511         * m4/absolute-header.m4: Renamed from full-header-path.m4.
5512         This is to keep the terminology clean; POSIX talks about
5513         "absolute pathnames", not "full pathnames", but the GNU
5514         Coding Standards say to use "path" for something else;
5515         so use "absolute" to keep both sides happy.
5516         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
5517         Set gl_absolute_header, not gl_full_header_path.
5518         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
5519         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
5520         All uses changed.
5521
5522         Merge from coreutils.
5523
5524         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
5525
5526         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
5527         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
5528         want to require the building of c-strtod.o.
5529         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
5530         needs -lm directly.
5531         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
5532
5533         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
5534
5535         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
5536         --as-needed option if available.  Problem reported by Albert Chin in
5537         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
5538         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
5539         cc merely issues a bunch of annoying warnings for --as-needed
5540         (this problem was reported by Bob Proulx).  Also, try linking with
5541         -lm to detect a bug in binutils 2.16 (this problem was reported
5542         by Ralf Wildenhues).
5543
5544         2006-06-18  Jim Meyering  <jim@meyering.net>
5545
5546         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
5547         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
5548         macro.
5549         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
5550         also check for glibc-2.4's abort-inducing bug.
5551
5552         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
5553         Low-probability clean-up should be to use rmdir to get rid of
5554         the just-created directory, not unlink.
5555
5556         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
5557         configure fail, and request a bug report to inform us about it.
5558         Add a comment that, barring reports to the contrary, in 2007 we'll
5559         assume ftruncate is universally available.
5560
5561         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
5562
5563         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
5564
5565         2006-03-12  Jim Meyering  <jim@meyering.net>
5566
5567         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
5568         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
5569         * m4/same.m4 (gl_SAME): Likewise.
5570         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
5571
5572         2006-03-11  Eric Blake  <ebb9@byu.net>
5573
5574         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
5575         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
5576         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
5577         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
5578
5579 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5580
5581         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
5582         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
5583         reported by Mark D. Baushke, one in
5584         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
5585
5586         Merge from coreutils.
5587
5588         * lib/.cppi-disable: Add stdint_.h.
5589         * lib/.cvsignore: Add stdint.h.
5590
5591         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
5592
5593         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
5594         both double and long double versions.
5595         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
5596         * lib/xstrtold.c: New file.
5597         * lib/xstrtod.h (xstrtold): New decl.
5598
5599         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
5600
5601         * lib/filemode.c (setst): Remove.
5602         (strmode): Rewrite to avoid setst.  This makes the code shorter,
5603         (arguably) clearer, and the generated code is a bit smaller on my
5604         Debian GNU/Linux stable x86 host.
5605
5606         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
5607
5608         * lib/filemode.c: Include "filemode.h" first, to test the interface.
5609         Assume that filemode.h includes sys/types.h and sys/stat.h.
5610         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
5611         (ftypelet): Reorder to put common cases first, for efficiency.
5612         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
5613         to do 'M'.
5614         (strmode): Renamed from mode_string, and now stores 12 bytes instead
5615         of 10, for compatibility with FreeBSD.  All callers changed.
5616         (filemodestring): Now stores 12 bytes instead of 10, and sets file
5617         types that can't be deduced solely from st_mode.  First arg is now a
5618         const pointer.
5619         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
5620         (strmode): Renamed from mode_string.
5621         (filemodestring): New decl.
5622         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
5623         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
5624         needed.
5625         (S_ISPORT, S_ISWHT): New macros, if not already defined.
5626
5627         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
5628
5629         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
5630         fsusage.h now does that.  Include fsusage.h first, to test interface.
5631         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
5632         at most one method (the old code could have generated decls that
5633         didn't conform to C89, not that this was ever exercised).
5634         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
5635
5636         2006-03-19  Jim Meyering  <jim@meyering.net>
5637
5638         Work even in a chroot where d_ino values for entries in "/"
5639         don't match the stat.st_ino values for the same names.
5640         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
5641         number, iterate through all entries again, using lstat instead.
5642         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
5643         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
5644
5645         * lib/getcwd.c (__getcwd): Clarify a comment.
5646         Use memcpy in place of a call to strcpy.
5647
5648         2006-03-12  Jim Meyering  <jim@meyering.net>
5649
5650         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
5651         matches that of the current directory (which we're about to chdir ".."
5652         out of), then save the dev-ino of the parent, instead.
5653
5654         * lib/same-inode.h (SAME_INODE): New file/macro.
5655         * lib/chdir-safer.c (SAME_INODE): Remove definition.
5656         Include "same-inode.h", instead.
5657         * lib/same.c: Likewise.
5658         * lib/cycle-check.h: Include "same-inode.h".
5659         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
5660         * lib/cycle-check.c (SAME_INODE): Remove definition.
5661         * lib/root-dev-ino.h: Include "same-inode.h".
5662
5663         2006-03-11  Eric Blake  <ebb9@byu.net>
5664
5665         * lib/same.c (same_name): s/base_name/last_component/
5666         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
5667         * lib/filenamecat.c (file_name_concat): Likewise.
5668
5669         2006-03-11  Eric Blake  <ebb9@byu.net>,
5670                     Paul Eggert  <eggert@cs.ucla.edu>
5671
5672         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
5673         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
5674         drive prefix.
5675         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
5676         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
5677         (last_component): New method.
5678         * lib/dirname.c (dir_len): Determine when drive letters need a
5679         subsequent slash.  Preserve // when it is special.
5680         (dir_name): Don't append dot when drive letter is absolute.
5681         [TEST_DIRNAME]: Move into a full-blown gnulib test.
5682         * lib/basename.c (base_name): New semantics - malloc the result.
5683         Preserve // when it is special.  Preserve relative files that look
5684         like drive letters.
5685         (base_len): Preserve // when it is special.
5686         (last_component): New method, similar to old base_name semantics.
5687         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
5688         base_name.  Strip redundant slashes from ///.
5689
5690 2006-07-03  Jim Meyering  <jim@meyering.net>
5691
5692         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
5693         macro is used before the first cycle_check call.
5694
5695 2006-07-03  Eric Blake  <ebb9@byu.net>
5696
5697         * modules/dirname (Depends-on): Add xstrndup.
5698
5699 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
5700
5701         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
5702         test cases, so that config.log is a bit easier to follow.
5703
5704 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
5705
5706         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
5707         both are 64 bits, since this seems to be the tradition, and this
5708         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
5709         we ever run into a host that prefers long long to long in this
5710         case, we'll need another configure-time test.  Problem reported by
5711         Jim Meyering.
5712
5713 2006-07-02  Eric Blake  <ebb9@byu.net>
5714
5715         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
5716
5717 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5718
5719         * modules/inttypes (Depends-on): No longer depends on stdint.
5720         * modules/stdint (Description): Say more about assumptions.
5721         Say that the fast types might differ.  Say macros are used.
5722         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
5723         (Makefile.am): Revise list of substituted symbols to match
5724         new stdint.m4.
5725         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
5726         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
5727         * tests/test-stdint.c (verify_same_types)
5728         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
5729         the code conforms to C99/C89.
5730         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
5731         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
5732
5733 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5734
5735         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
5736         but fix a bug, by requiring at least 64 bits.
5737         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
5738         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
5739         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
5740         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
5741
5742         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
5743         changes.  Make 2.59 a prerequisite.  Check and substitute for
5744         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
5745         inttypes.h.  Do not use special include files; just use the
5746         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
5747         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
5748         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
5749         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
5750         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
5751         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
5752         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
5753         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
5754         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
5755         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
5756         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
5757         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
5758         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
5759         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
5760         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
5761         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
5762         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
5763         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
5764         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
5765         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
5766         WINT_MAX.  Check for C99 conformance more strictly, by detecting
5767         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
5768         not check for things that C99 does not require, e.g., int8_t.  If
5769         a test isn't needed unless <stdint.h> isn't working, and is
5770         unlikely to be needed for any other reason, then don't do it
5771         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
5772         size_t, since we assume C89 freestanding at least.  Do not check
5773         for sig_atomic_t, wchar_t, or wint_t, since the code now does
5774         the right thing even if the types are not defined.  Instead use:
5775         (gl_STDINT_TYPE_PROPERTIES): New macro.
5776         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
5777         testing whether <sys/types.h> clashes, as Autoconf does this for
5778         us now.  All uses removed.
5779         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
5780         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
5781         (gl_CHECK_TYPE_SAME):
5782         Remove; no longer needed.
5783         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
5784         exists, since we'll return 0 anyway in that case.
5785         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
5786
5787 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5788
5789         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
5790         possible collision with system files.
5791         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
5792         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
5793         WCHAR_MIN and WCHAR_MAX in this case.
5794         (<stddef.h>): Do not include; no longer needed.
5795         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
5796         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
5797         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
5798         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
5799         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
5800         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
5801         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
5802         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
5803         !defined(__c99))]: Include in this case too, since it's harmless
5804         now.
5805         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
5806         dangerous to do so.
5807         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
5808         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
5809         (_STDINT_MIN, _STDINT_MAX): New macros.
5810         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
5811         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
5812         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
5813         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
5814         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
5815         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
5816         macros, not typedefs; this simplifies things quite a bit.
5817         Use long int for all types narrower than int64_t.
5818         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
5819         Define in terms of long long int or int64_t or long int,
5820         not int64_t or int32_t.  This saves some compile-time testing.
5821         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
5822         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
5823         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
5824         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
5825         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
5826         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
5827         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
5828         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
5829         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
5830         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
5831         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
5832         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
5833         undef any previous version and define our own version, for
5834         simplicity and consistency with the new macros for types.
5835         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
5836         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
5837         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
5838         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
5839         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
5840         @WINT_T_SUFFIX@ to keep things simple here.
5841         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
5842         Simplify by assuming typical 8/16/32/64 host, since we're
5843         already doing that elsewhere anyway.
5844         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
5845         and assume long long int is 64 bits if available.  This
5846         speeds up 'configure'.
5847
5848 2006-07-01  Eric Blake  <ebb9@byu.net>
5849
5850         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
5851         Reported by Andreas Buening.
5852
5853 2006-07-01  Eric Blake  <ebb9@byu.net>
5854
5855         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
5856
5857 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
5858
5859         * lib/getaddrinfo.c: fixed typo
5860
5861 2006-06-29  Jim Meyering  <jim@meyering.net>
5862
5863         * modules/strftime (Maintainer): Add my name, since with the
5864         FPRINTFTIME changes strftime.c has forked from glibc.
5865
5866 2006-06-29  Eric Blake  <ebb9@byu.net>
5867
5868         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
5869
5870 2006-06-29  Eric Blake  <ebb9@byu.net>
5871
5872         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
5873
5874 2006-06-29  Eric Blake  <ebb9@byu.net>
5875
5876         * lib/stat_.h: New file.
5877
5878 2006-06-29  Eric Blake  <ebb9@byu.net>
5879
5880         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
5881         unused static function.
5882
5883 2006-06-29  Eric Blake  <ebb9@byu.net>
5884
5885         * doc/functions.texi (Function Portability): Document missing lstat
5886         on mingw.
5887
5888 2006-06-29  Eric Blake  <ebb9@byu.net>
5889
5890         * MODULES.html.sh: Add sys_stat.
5891         * modules/sys_stat: New module.
5892         * modules/mkstemp (Depends-on): Add sys_stat.
5893
5894 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5895
5896         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
5897
5898 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5899
5900         * m4/c-bs-a.m4: Removed.
5901
5902 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5903
5904         * lib/strftime.c: Assume strftime() exists.
5905
5906 2006-06-29  Derek Price  <derek@ximbiot.com>
5907
5908         * modules/c-bs-a: Removed - \a is C89.
5909         * MODULES.html.sh: Remove c-bs-a.
5910
5911 2006-06-29  Bruno Haible  <bruno@clisp.org>
5912
5913         * modules/wcwidth (License): Change to LGPL.
5914
5915 2006-06-28  Simon Josefsson  <jas@extundo.com>
5916
5917         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
5918         on _WIN32.
5919
5920         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
5921         getnameinfo.
5922
5923 2006-06-28  Simon Josefsson  <jas@extundo.com>
5924
5925         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
5926
5927 2006-06-28  Simon Josefsson  <jas@extundo.com>
5928
5929         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
5930         functions there.  It will succeed on Windows XP, but on Windows
5931         2000 and (presumably) earlier, it will fail, and use the internal
5932         re-implementation.
5933         (use_win32_p): New function.
5934         (getaddrinfo): Use strtoul on servname, to support numeric ports.
5935         Support AI_NUMERICSERV to disable getservbyname.
5936         (getnameinfo): New function, only supports
5937         NI_NUMERICHOST|NI_NUMERICSERV for now.
5938
5939         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
5940         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
5941         getnameinfo.
5942
5943 2006-06-28  Eric Blake  <ebb9@byu.net>
5944
5945         * modules/wcwidth: New file.
5946         * modules/mbchar (Depends-on): Add wcwidth.
5947         * modules/mbswidth (Depends-on): Add wcwidth.
5948         * MODULES.html.sh: Add wcwidth.
5949
5950 2006-06-28  Eric Blake  <ebb9@byu.net>
5951
5952         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
5953         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
5954
5955 2006-06-28  Eric Blake  <ebb9@byu.net>
5956
5957         * lib/xvasprintf.h: Fix comments.
5958
5959 2006-06-28  Eric Blake  <ebb9@byu.net>
5960
5961         * lib/mbchar.h (wcwidth): Include wcwidth.h.
5962         * lib/mbswidth.c (wcwidth): Move from here...
5963         * lib/wcwidth.h: ...to this new file.
5964
5965 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5966
5967         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
5968
5969         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
5970         it's obsolete.
5971         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
5972
5973 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5974
5975         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
5976         Autoconf 2.60 says this stuff was obsolete.
5977
5978 2006-06-28  Bruno Haible  <bruno@clisp.org>
5979
5980         * modules/wcwidth (Files): Add m4/wchar_t.m4.
5981
5982 2006-06-28  Bruno Haible  <bruno@clisp.org>
5983
5984         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
5985         gt_TYPE_WCHAR_T.
5986
5987 2006-06-28  Bruno Haible  <bruno@clisp.org>
5988
5989         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
5990         declaration for wcwidth.
5991         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
5992
5993 2006-06-28  Bruno Haible  <bruno@clisp.org>
5994
5995         * lib/mkdtemp.c [MINGW]: Include <io.h>.
5996         (mkdir): Define using _mkdir.
5997
5998 2006-06-28  Bruno Haible  <bruno@clisp.org>
5999
6000         * lib/getaddrinfo.h: Fix POSIX URL.
6001         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
6002         _WIN32.
6003         (use_win32_p): Make static.
6004         (getaddrinfo): Reject service name if it is empty or does not consist
6005         solely of decimal digits, or if its value is > 65535.
6006         (getnameinfo): Remove useless casts.
6007
6008 2006-06-27  Simon Josefsson  <jas@extundo.com>
6009
6010         * modules/sys_select: New file, suggested by Bruno Haible, Paul
6011         Eggert and Martin Lambers.
6012
6013 2006-06-27  Simon Josefsson  <jas@extundo.com>
6014
6015         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
6016         Eggert and Martin Lambers.
6017
6018 2006-06-27  Bruno Haible  <bruno@clisp.org>
6019
6020         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
6021         result to 0, not to empty.
6022         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
6023
6024 2006-06-27  Bruno Haible  <bruno@clisp.org>
6025
6026         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
6027
6028 2006-06-26  Simon Josefsson  <jas@extundo.com>
6029
6030         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
6031         present.
6032
6033 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
6034
6035         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
6036         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
6037         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
6038
6039 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
6040
6041         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
6042
6043 2006-06-26  Bruno Haible  <bruno@clisp.org>
6044
6045         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
6046
6047 2006-06-26  Bruno Haible  <bruno@clisp.org>
6048
6049         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
6050
6051 2006-06-26  Bruno Haible  <bruno@clisp.org>
6052
6053         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
6054         SGI C compiler in pre-C99 mode.
6055         Suggested by Mark D. Baushke and Larry Jones.
6056
6057 2006-06-26  Bruno Haible  <bruno@clisp.org>
6058
6059         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
6060         WCHAR_MAX.
6061         Reported by Mark D. Baushke and Larry Jones.
6062
6063 2006-06-26  Bruno Haible  <bruno@clisp.org>
6064
6065         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
6066         in pre-C99 mode.
6067         Suggested by Mark D. Baushke and Larry Jones.
6068
6069 2006-06-23  Simon Josefsson  <jas@extundo.com>
6070             Bruno Haible  <bruno@clisp.org>
6071
6072         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
6073         Emit mostlyclean-local rule.
6074         (func_emit_tests_Makefile_am): Likewise.
6075         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
6076
6077 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
6078
6079         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
6080
6081 2006-06-23  Bruno Haible  <bruno@clisp.org>
6082
6083         * tests/test-stdint.c: Update to match ISO C 99 Technical
6084         Corrigendum 1.
6085
6086 2006-06-23  Bruno Haible  <bruno@clisp.org>
6087
6088         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
6089
6090 2006-06-23  Bruno Haible  <bruno@clisp.org>
6091
6092         * lib/stdint_.h: Treat IRIX like OpenBSD.
6093
6094 2006-06-23  Bruno Haible  <bruno@clisp.org>
6095
6096         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
6097         ISO C 99 Technical Corrigendum 1.
6098
6099 2006-06-22  Simon Josefsson  <jas@extundo.com>
6100
6101         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
6102         MinGW.
6103
6104 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
6105
6106         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
6107         needed.  Some compiler complained about some of them.  Problem reported
6108         by Larry Jones in
6109         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
6110
6111 2006-06-21  Simon Josefsson  <jas@extundo.com>
6112
6113         * tests/test-getaddrinfo.c: New file.
6114
6115         * modules/getaddrinfo-tests: New file.
6116
6117         * MODULES.html.sh: Add inet_pton.
6118
6119         * modules/inet_pton: New file.
6120
6121 2006-06-21  Simon Josefsson  <jas@extundo.com>
6122
6123         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
6124         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
6125         of using the (limited) gnulib implementation on Windows XP.
6126
6127         * m4/inet_pton.m4: New file.
6128
6129 2006-06-21  Simon Josefsson  <jas@extundo.com>
6130
6131         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
6132         variable.
6133
6134         * lib/socket_.h: Don't define WINVER.
6135
6136         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
6137         slightly modified to work in gnulib.
6138
6139 2006-06-21  Simon Josefsson  <jas@extundo.com>
6140
6141         * doc/gnulib.texi (Windows sockets): Add.
6142
6143 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
6144
6145         * lib/read-file.c (fread_file): Start with buffer allocation of
6146         0 bytes rather than 1 byte; this simplifies the code.
6147         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
6148         code to free buffer and save/restore errno.
6149         (internal_read_file): Remove unused local.
6150
6151 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
6152
6153         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
6154         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
6155         Problem reported by Denis Excoffier in
6156         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
6157
6158 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6159
6160         * modules/sys_socket, modules/socklen: Include sys/types since
6161         FreeBSD 4.x's sys/socket.h needs it.
6162
6163 2006-06-19  Simon Josefsson  <jas@extundo.com>
6164
6165         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
6166
6167 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6168
6169         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
6170
6171 2006-06-19  Bruno Haible  <bruno@clisp.org>
6172
6173         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
6174         and FULL_PATH_INTTYPES_H in angle brackets.
6175         Reported by Mark D. Baushke <mdb@gnu.org>.
6176
6177 2006-06-17  Eric Blake  <ebb9@byu.net>
6178
6179         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
6180         errno.
6181
6182 2006-06-17  Bruno Haible  <bruno@clisp.org>
6183
6184         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
6185         <sys/inttypes.h>.
6186
6187 2006-06-17  Bruno Haible  <bruno@clisp.org>
6188
6189         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
6190         whether errno is declared. Assume <errno.h> declares errno.
6191
6192 2006-06-17  Bruno Haible  <bruno@clisp.org>
6193
6194         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
6195
6196 2006-06-17  Bruno Haible  <bruno@clisp.org>
6197
6198         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
6199         problem on Solaris 2.5.1.
6200
6201 2006-06-16  Eric Blake  <ebb9@byu.net>
6202
6203         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
6204         * lib/unicodeio.c [!defined errno]: Likewise.
6205         * lib/strtol.c [!defined errno]: Likewise.
6206         * lib/strtod.c [!defined errno]: Likewise.
6207
6208 2006-06-15  Eric Blake  <ebb9@byu.net>
6209
6210         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
6211
6212 2006-06-15  Eric Blake  <ebb9@byu.net>
6213
6214         * config/srclist.txt (ssize_t.m4): Lose sync.
6215
6216 2006-06-15  Bruno Haible  <bruno@clisp.org>
6217
6218         * modules/stdint (Files): Include m4/full-header-path.m4,
6219         m4/size_max.m4, m4/wchar_t.m4.
6220         (Makefile.am): Many more substitutions.
6221         * modules/stdint-tests: New file.
6222         * tests/test-stdint.c: New file.
6223
6224 2006-06-15  Bruno Haible  <bruno@clisp.org>
6225
6226         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
6227         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
6228         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
6229         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
6230         gl_CHECK_TYPE_SAME): New macros.
6231
6232 2006-06-15  Bruno Haible  <bruno@clisp.org>
6233
6234         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
6235
6236 2006-06-15  Bruno Haible  <bruno@clisp.org>
6237
6238         * lib/stdint_.h: Rewritten to be fully auto-configured.
6239         Fixes bug on HP-UX/IA64.
6240
6241 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
6242
6243         * lib/getdate.y (__attribute__): Don't define if already defined.
6244         Problem reported by Larry Jones.
6245         * lib/utimens.c (__attribute__): Likewise.
6246
6247 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
6248
6249         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
6250         reported by Andreas Schwab.
6251
6252 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6253             Bruno Haible  <bruno@clisp.org>
6254
6255         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
6256         check for the declaration of strnlen and a run test that exposes the
6257         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
6258         rpl_strndup.
6259
6260 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6261             Bruno Haible  <bruno@clisp.org>
6262
6263         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
6264
6265 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6266
6267         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
6268         compile test, for Tru64 4.0D.
6269
6270 2006-05-28  Karl Berry  <karl@gnu.org>
6271
6272         * config/srclist.txt (printf-args.c): lose sync.
6273
6274 2006-05-26  Martin Lambers  <marlam@marlam.de>
6275
6276         * lib/getpass.c: Updates the test for the native W32 API, and adds
6277         missing includes, thus fixing compilation warnings.
6278
6279 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
6280
6281         * lib/exclude.c (exclude_fnmatch): New function.
6282         (excluded_file_name): Call exclude_fnmatch.
6283         * lib/exclude.h (excluded_file_name): New prototype
6284
6285 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
6286
6287         * lib/tempname.c (small_open, large_open): New macros.
6288         (__open, __open64) [!_LIBC]: Remove.
6289         (__gen_tempname): Use small_open and large_open instead of __open
6290         and __open64.  This fixes a portability bug on HP-UX 11.11i
6291         reported by Simon Wing-Tang in
6292         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
6293
6294 2006-05-24  Bruno Haible  <bruno@clisp.org>
6295
6296         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
6297         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
6298         Reported by Thorsten Maerz <torte@netztorte.de> via
6299         Aaron Stone <aaron@serendipity.cx>.
6300
6301 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
6302
6303         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
6304         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
6305         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
6306         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
6307         not really conditional on the cache.
6308         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
6309
6310 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
6311
6312         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
6313         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
6314         (my_usleep): Don't mishandle maximum value.
6315
6316 2006-05-19  Jim Meyering  <jim@meyering.net>
6317
6318         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
6319
6320 2006-05-17  Bruno Haible  <bruno@clisp.org>
6321
6322         Cygwin portability.
6323         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
6324
6325 2006-05-17  Bruno Haible  <bruno@clisp.org>
6326
6327         * lib/stdint_.h: Fix recognition of Cygwin.
6328
6329 2006-05-15  Bruno Haible  <bruno@clisp.org>
6330
6331         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
6332         on libtool patch by Ralf Wildenhues.
6333
6334 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
6335
6336         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
6337         test for C99 conformance; (bool) 0.5 is an integer constant
6338         expression, but (bool) -0.5 is not.  Problem reported by Fedor
6339         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
6340
6341 2006-05-11  Simon Josefsson  <jas@extundo.com>
6342
6343         * m4/xvasprintf.m4: Fix obvious typo.
6344
6345 2006-05-11  Jim Meyering  <jim@meyering.net>
6346
6347         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
6348         James Lemley.
6349
6350 2006-05-10  Simon Josefsson  <jas@extundo.com>
6351
6352         * lib/md4.c: Typo fix, update copyright years.
6353         (K1, K2): Don't use L because it turn computations into 64-bit on
6354         64-bit platforms.
6355
6356 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
6357
6358         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
6359         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
6360         unwanted sign propagation, e.g., on hosts with 64-bit int.
6361         There still are some problems with reeelly weird theoretical hosts
6362         (e.g., 33-bit int) but it's not worth worrying about now.
6363         * lib/sha1.c (rol): Likewise.
6364         (K1, K2, K3, K4): Remove unnecessary L suffix.
6365
6366 2006-05-10  Bruno Haible  <bruno@clisp.org>
6367
6368         * lib/des.c: Cast to avoid warnings.
6369
6370 2006-05-09  Bruno Haible  <bruno@clisp.org>
6371
6372         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
6373         (Depends-on): Depend also on xsize, stdarg.
6374         (configure.ac): Add gl_XVASPRINTF.
6375
6376 2006-05-09  Bruno Haible  <bruno@clisp.org>
6377
6378         * m4/xvasprintf.m4: New file.
6379
6380 2006-05-09  Bruno Haible  <bruno@clisp.org>
6381
6382         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
6383         (EOVERFLOW): Define fallback value.
6384         (xstrcat): New function.
6385         (xvasprintf): Recognize the special case of a string concatenation.
6386
6387 2006-05-08  Eric Blake  <ebb9@byu.net>
6388
6389         * gnulib-tool (func_version): Base copyright year on CVS date.
6390         (func_emit_copyright_notice): New function.
6391         (func_emit_lib_Makefile_am): Use it.
6392         (func_emit_tests_Makefile_am): Likewise.
6393         (func_import): Likewise.
6394
6395 2006-05-08  Bruno Haible  <bruno@clisp.org>
6396
6397         * modules/stdarg: New file.
6398         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
6399
6400 2006-05-08  Bruno Haible  <bruno@clisp.org>
6401
6402         * m4/stdarg.m4: New file, from GNU gettext.
6403
6404 2006-05-08  Bruno Haible  <bruno@clisp.org>
6405
6406         * config/srclist.txt (build-aux/config.rpath): different from latest
6407         release.
6408
6409 2006-05-08  Bruno Haible  <bruno@clisp.org>
6410
6411         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
6412
6413 2006-05-05  Jim Meyering  <jim@meyering.net>
6414
6415         * m4/warning.m4: New file, derived from bison's file by the same name.
6416
6417 2006-05-03  Bruno Haible  <bruno@clisp.org>
6418
6419         * lib/stdint_.h: Shorter URL.
6420         * lib/inttypes.h: Likewise.
6421
6422 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6423
6424         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
6425
6426 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6427
6428         * lib/verify.h: Document the internals better.  Most of this change
6429         was written by Bruno Haible.
6430
6431 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6432
6433         * doc/verify.texi: New file, partly based on a proposal by
6434         Bruno Haible.
6435
6436 2006-05-02  Bruno Haible  <bruno@clisp.org>
6437
6438         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
6439         test from here...
6440         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
6441
6442 2006-04-29  Bruno Haible  <bruno@clisp.org>
6443
6444         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
6445         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
6446
6447 2006-04-29  Bruno Haible  <bruno@clisp.org>
6448
6449         * gnulib-tool: Make --update option actually work.
6450
6451 2006-04-29  Bruno Haible  <bruno@clisp.org>
6452
6453         * doc/gcd.texi: New file.
6454         * doc/gnulib.texi: Include it.
6455
6456 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
6457
6458         * lib/getdate.y (get_date): When adding relative date, start with the
6459         initial time, not with the result of the first mktime call.
6460
6461 2006-04-25  Bruno Haible  <bruno@clisp.org>
6462
6463         * gnulib-tool (func_import): Output the include directives in three
6464         blocks, sorted separately.
6465         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6466
6467 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
6468
6469         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
6470         to define main with arguments, for C++.  Reported by Eric Blake.
6471         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
6472         Prefer 'int main ()' to 'int main (void)', for C++.
6473         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
6474         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
6475         for 'main', for C99 and C++.
6476
6477 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
6478
6479         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
6480         Don't assume that exit status -1 is valid.
6481         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6482         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
6483         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
6484         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
6485         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
6486         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
6487         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
6488         functions can be used without declaring them, or that you can
6489         exit with status -1.
6490         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
6491
6492 2006-04-24  Karl Berry  <karl@gnu.org>
6493
6494         * config/srclist.txt (longdouble.m4): sync lost.
6495
6496 2006-04-24  Eric Blake  <ebb9@byu.net>
6497
6498         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
6499
6500 2006-04-24  Bruno Haible  <bruno@clisp.org>
6501
6502         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
6503         poll() implementation in AIX.
6504         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6505
6506 2006-04-24  Bruno Haible  <bruno@clisp.org>
6507
6508         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
6509         assigned exactly once.
6510
6511 2006-04-23  Claudio Fontana  <claudio@gnu.org>
6512             Bruno Haible  <bruno@clisp.org>
6513
6514         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
6515         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
6516         for AM_CPPFLAGS.
6517
6518 2006-04-23  Bruno Haible  <bruno@clisp.org>
6519
6520         * modules/copy-file: Depend on unistd.
6521         * modules/execute: Likewise.
6522         * modules/fatal-signal: Likewise.
6523         * modules/findprog: Likewise.
6524         * modules/mkdtemp : Likewise.
6525         * modules/pipe: Likewise.
6526         * modules/wait-process: Likewise.
6527
6528 2006-04-23  Bruno Haible  <bruno@clisp.org>
6529
6530         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
6531         condition was already detected.
6532         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6533
6534 2006-04-23  Bruno Haible  <bruno@clisp.org>
6535
6536         * lib/copy-file.c: Include <unistd.h> unconditionally.
6537         * lib/execute.c: Likewise.
6538         * lib/fatal-signal.c: Likewise.
6539         * lib/findprog.c: Likewise.
6540         * lib/mkdtemp.c: Likewise.
6541         * lib/pipe.h: Likewise.
6542         * lib/pipe.c: Likewise.
6543         * lib/wait-process.h: Likewise.
6544
6545 2006-04-23  Bruno Haible  <bruno@clisp.org>
6546
6547         * gnulib-tool (func_usage): Fix --import description. Document
6548         --update.
6549         (func_import): Create temporary file in a temporary directory, if
6550         --dry-run is specified. Silence errors from 'grep' when there are no
6551         m4 files in $m4dir.
6552         (func_create_testdir): Silence errors from 'grep' when there are no
6553         m4 files in $m4dir.
6554         Reported by Karl Berry <karl@freefriends.org>.
6555
6556 2006-04-20  Bruno Haible  <bruno@clisp.org>
6557
6558         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
6559         one argument, so that the code will be portable to Autoconf 2.60.
6560         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
6561         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6562         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
6563
6564 2006-04-19  Derek Price  <derek@ximbiot.com>
6565             Eric Blake  <ebb9@byu.net>
6566
6567         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
6568         rather than "/full/path.h".  Update comment to match.  Shorten &
6569         generalize m4_translit call via AS_TR_CPP.
6570
6571 2006-04-19  Derek Price  <derek@ximbiot.com>
6572             Eric Blake  <ebb9@byu.net>
6573
6574         * lib/inttypes.h: Correct grammar in comment.
6575
6576 2006-04-18  Derek Price  <derek@ximbiot.com>
6577             Paul Eggert  <eggert@cs.ucla.edu>
6578
6579         * modules/inttypes: New file.
6580         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
6581
6582 2006-04-18  Derek Price  <derek@ximbiot.com>
6583             Paul Eggert  <eggert@cs.ucla.edu>
6584
6585         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
6586         New files.
6587
6588 2006-04-18  Derek Price  <derek@ximbiot.com>
6589             Paul Eggert  <eggert@cs.ucla.edu>
6590
6591         * lib/inttypes.h: New file.
6592         * lib/strtoimax.c: Assume <inttypes.h>.
6593
6594 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
6595
6596         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
6597         isn't mounted.  Problem reported by Kir Kolyshkin.
6598
6599 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
6600
6601         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
6602         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
6603         Derek R. Price.
6604         * lib/regex.h (RE_DUP_MAX): Update comment to match current
6605         implementation.
6606
6607 2006-04-12  Eric Blake  <ebb9@byu.net>
6608
6609         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
6610         is now done automatically by the corresponding Autoconf macro.
6611
6612 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
6613
6614         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
6615         time_r.h.
6616
6617 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6618
6619         Merge regex changes from libc, removing some of our
6620         POSIX-conformance changes that were rejected and redoing them in a
6621         less-intrusive way.
6622
6623         * lib/regcomp.c (re_compile_internal, init_dfa):
6624         Length arg is now size_t, not Idx.  All uses changed.
6625         (peek_token): Forward decl now says internal_function.
6626         (__re_error_msgid, __re_error_msgid_idx):
6627         Now static rather than extern with attribute_hidden.
6628         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
6629         For some reason libc prefers K&R style defns for external functions.
6630         (regerror) [!defined _LIBC]: Likewise.
6631         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
6632         (seek_collating_symbol_entry, lookup_collation_sequence_value):
6633         (build_range_exp, build_collating_symbol):
6634         Use K&R-style defn.
6635         (re_compile_fastmap): Use '\0' to memset, not 0.
6636         (utf8_sb_map): Make the calculations more obvious.
6637         (init_dfa, parse_bracket_exp, build_charclass_op):
6638         Call calloc and cast result, as glibc does.
6639         (init_word_char, fetch_token, peek_token, peek_token_bracket):
6640         (build_range_exp, build_collating_symbol):
6641         Now internal functions.
6642
6643         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
6644
6645         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
6646         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
6647         Don't depend on VMS; depend on __VMS instead, for POSIX
6648         namespace cleanness.
6649         (regoff_t): Define to ssize_t, not long int.
6650
6651         Remove the REG_ macros named below.  Instead, make the old names
6652         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
6653         __USE_GNU_REGEX.
6654         (REG_BACKSLASH_ESCAPE_IN_LISTS):
6655         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
6656         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
6657         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
6658         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
6659         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
6660         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
6661         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
6662         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
6663         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
6664         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
6665         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
6666         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
6667         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
6668         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
6669         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
6670         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
6671         (REG_NREGS):
6672         Remove.  All uses replaced by the old RE_* names.
6673         (RE_BACKSLASH_ESCAPE_IN_LISTS):
6674         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
6675         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
6676         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
6677         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
6678         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
6679         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
6680         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
6681         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
6682         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
6683         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
6684         Don't bother having these macros be independent of each others'
6685         values, since they no longer exist in the POSIX name space.
6686
6687         Rename the following member names back to their old names,
6688         unless !__USE_GNU_REGEX.  All uses changed back.
6689         (buffer): Renamed from re_buffer.
6690         (allocated): Renamed from re_allocated.
6691         (used): Renamed from re_used.
6692         (syntax): Renamed from re_syntax.
6693         (fastmap): Renamed from re_fastmap.
6694         (translate): Renamed from re_translate.
6695         (can_be_null): Renamed from re_can_be_null.
6696         (regs_allocated): Renamed from re_regs_allocated.
6697         (fastmap_accurate): Renamed from re_fastmap_accurate.
6698         (no_sub): Renamed from re_no_sub.
6699         (not_bol): Renamed from re_not_bol.
6700         (not_eol): Renamed from re_not_eol.
6701         (newline_anchor): Renamed from re_newline_anchor.
6702         (num_regs): Renamed from rm_num_regs.
6703         (start): Renamed from rm_start.
6704         (end): Renamed from rm_end.
6705
6706         (free_state): Move up a bit.
6707
6708         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
6709         #define to be empty.
6710         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
6711         when that is what is intended.
6712         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
6713         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
6714         (MAX): New macro.
6715         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
6716         All uses changed back to re_malloc, etc.  It's now the caller's
6717         responsibility to check for overflow; all callers changed.
6718         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
6719         (re_x2nrealloc): Remove.
6720         (free_state): Remove decl.
6721
6722         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
6723         (re_set_registers, re_exec):
6724         Use K&R-style defn.
6725
6726         2006-01-31  Roland McGrath  <roland@redhat.com>
6727
6728         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
6729         Reported by Mike Frysinger <vapier@gentoo.org>.
6730
6731         2006-01-15  Andreas Jaeger  <aj@suse.de>
6732
6733         [BZ #1950]
6734         * lib/regex_internal.c (re_string_reconstruct): Adjust for
6735         build_wcs_upper_buffer change.
6736         (build_wcs_upper_buffer): Change return type.
6737
6738         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
6739
6740         * lib/regex_internal.h: Include <stdint.h> if available.
6741
6742         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
6743
6744         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
6745
6746         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
6747
6748         * lib/regcomp.c: Adjust for changed secondary hash function.
6749
6750         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
6751
6752         * lib/regex.h: Pretty printing.
6753         Clean up namespace a bit.
6754
6755         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
6756
6757         * lib/regexec.c (update_cur_sifted_state, check_arrival,
6758         check_arrival_add_next_nodes): Avoid using uninitialized variable.
6759
6760         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
6761                     Ulrich Drepper  <drepper@redhat.com>
6762
6763         [BZ #1302]
6764         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
6765         changed.
6766         (bitset_word_t): Renamed from bitset_word.  All uses changed.
6767
6768         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
6769
6770         [BZ #281]
6771         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
6772         * lib/regcomp.c: Remove unnecessary uses of
6773         unsigned RE_TRANSLATE_TYPE.
6774         * lib/regex_internal.h: Likewise.
6775         * lib/regex_internal.c: Likewise.
6776         * lib/regexec.c: Likewise.
6777         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
6778
6779         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
6780
6781         * lib/regexec.c (find_recover_state): Remove unnecessary
6782         initialization.
6783         (transit_state_bkref): Make DFA a const pointer.
6784         (get_subexp): Likewise.
6785         (check_arrival): Likewise.
6786         (update_cur_sifted_state): Likewise.
6787         (re_search_internal): Likewise.
6788         (prune_impossible_nodes): Likewise.
6789         (acquire_init_state_context): Likewise.
6790         (proceed_next_node): Likewise.
6791         (set_regs): Likewise.
6792         (free_fail_stack_return): Likewise.
6793         (check_arrival_expand_ecl): Mark DFA parameter as const.
6794         (check_arrival_expand_ecl_sub): Likewise.
6795         (check_subexp_limits): Likewise.
6796         (sub_epsilon_src_nodes):  Likewise.
6797         (add_epsilon_src_nodes):  Likewise.
6798         (merge_state_array): Likewise.
6799         (update_regs): Likewise.
6800         (build_trtable): Likewise.
6801         (sift_states_backward): Mark MCTX parameter as const.
6802         (build_sifted_states): Likewise.
6803         (update_cur_sifted_state): Likewise.
6804         (sift_states_mkref): Likewise.
6805         (check_arrival_expand_ecl): Mark eclosure as const.
6806         (check_dst_limits_calc_pos_1): Likewise.
6807         * lib/regex_internal.h (re_match_context_t): Make dfa a const
6808         pointer.
6809
6810         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
6811
6812         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
6813         (transit_state_sb): Likewise.
6814         (transit_state_mb): Likewise.
6815         (sift_states_iter_mb): Likewise.
6816         (check_arrival_add_next_nodes): Likewise.
6817         (check_node_accept_bytes): Change first parameter to pointer-to-const.
6818         [_LIBC] (re_search_2_stub): Use mempcpy.
6819
6820         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
6821         mbrtowc for very simple UTF-8 case.
6822
6823         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
6824         a pointer-to-const.
6825         (re_acquire_state_context): Likewise.
6826         * lib/regex_internal.h: Adjust prototypes.
6827
6828         * lib/regex.c: Prevent using C++ compilers.
6829
6830         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
6831         (re_acquire_state_context): Likewise.
6832
6833 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6834
6835         * modules/regex (Depends-on): Add ssize_t.
6836
6837 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6838
6839         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
6840         translation table.
6841
6842 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6843
6844         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
6845
6846 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
6847             Bruno Haible  <bruno@clisp.org>
6848
6849         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
6850         <sys/types.h> and <inttypes.h>.
6851
6852 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6853
6854         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
6855         `__error_t_defined', so argp.h will not typedef the former.
6856
6857 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
6858
6859         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
6860         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
6861         glibc names.  Even if glibc is changed to conform to POSIX, the
6862         traditional names will be available anyway, since regex depends on
6863         the extensions module.  Also, fix a longstanding typo in the
6864         implementation of Spencer ERE test #75 from grep 2.3.  Problems
6865         reported by Emanuele Giaquinta.  Also, change sense of cached
6866         variable, so that the message makes sense.
6867
6868 2006-03-24  Simon Josefsson  <jas@extundo.com>
6869
6870         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
6871         including some doc fixes.
6872         (base64_encode_alloc): Fix +1 bug on allocation failures.
6873
6874 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6875
6876         * lib/base64.c (base64_encode): Do not read past end of array with
6877         unsanitized input on systems with CHAR_BIT > 8.
6878
6879 2006-03-24  Eric Blake  <ebb9@byu.net>
6880
6881         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
6882
6883 2006-03-22  Karl Berry  <karl@gnu.org>
6884
6885         * config/srclist.txt (*setenv.[ch]): get from coreutils.
6886         * config/srclistvars.sh (COREUTILS): new var.
6887
6888 2006-03-17  Jim Meyering  <jim@meyering.net>
6889
6890         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
6891         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
6892
6893 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6894
6895         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
6896         no longer needs it.  Instead, check that regoff_t is as least
6897         as wide as ptrdiff_t.
6898
6899         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
6900         so that our regex.h stays compatible with the installed regex.
6901         This is helpful for installers who configure --without-included-regex.
6902         Problem reported by Emanuele Giaquinta.
6903
6904 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6905
6906         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
6907         Typedef to long int, not to off_, as POSIX will likely change
6908         in that direction.
6909
6910 2006-03-15  Eric Blake  <ebb9@byu.net>
6911
6912         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
6913
6914 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6915
6916         * lib/argp-help.c (validate_uparams): Fix typo
6917         * lib/argp-parse.c (argp_default_options): Consistently begin help
6918         messages with a lowercase letter.
6919
6920 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
6921
6922         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
6923         overrun buffers and shouldn't be used (much as gets shouldn't be
6924         used).
6925         * lib/time_r.c (asctime_r, ctime_r): Likewise.
6926
6927 2006-03-08  Simon Josefsson  <jas@extundo.com>
6928
6929         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
6930         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6931
6932 2006-03-08  Simon Josefsson  <jas@extundo.com>
6933
6934         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
6935         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6936
6937 2006-03-08  Simon Josefsson  <jas@extundo.com>
6938
6939         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
6940         signal that configure disabled the device.
6941
6942 2006-03-08  Simon Josefsson  <jas@extundo.com>
6943
6944         * build-aux/maint.mk: Fix refresh-po, to handle no translated
6945         languages.
6946
6947 2006-03-07  Simon Josefsson  <jas@extundo.com>
6948
6949         * modules/getopt (Depends-on): Add unistd.
6950
6951         * modules/unistd: New file.
6952
6953 2006-03-07  Simon Josefsson  <jas@extundo.com>
6954
6955         * modules/gc-random: New file.
6956
6957 2006-03-07  Simon Josefsson  <jas@extundo.com>
6958
6959         * m4/unistd_h.m4: New file.
6960
6961 2006-03-07  Simon Josefsson  <jas@extundo.com>
6962
6963         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
6964         test to be side-effect free by storing the result in the cache
6965         variable gl_cv_lib_readline, and moving the assignment of
6966         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
6967         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6968
6969 2006-03-07  Simon Josefsson  <jas@extundo.com>
6970
6971         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
6972         error on missing devices (the functions will return an error).
6973
6974         * m4/gc.m4: Move random stuff to gc-random.m4
6975
6976 2006-03-07  Simon Josefsson  <jas@extundo.com>
6977
6978         * lib/unistd_.h: New file.
6979
6980 2006-03-07  Simon Josefsson  <jas@extundo.com>
6981
6982         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
6983
6984 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6985
6986         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
6987         Problem reported by Juan Manuel Guerrero.
6988
6989 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6990
6991         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
6992         the unistd module.
6993         * lib/getlogin_r.c: Likewise.
6994         * lib/getlogin_r.h: Likewise.
6995         * lib/glob.c: Likewise.
6996         * lib/pagealign_alloc.c: Likewise.
6997         * lib/unistd_.h: Remove; no longer needed.
6998
6999 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7000
7001         * MODULES.html.sh (Support for systems lacking POSIX:2001):
7002         Add unistd.
7003         * modules/c-stack (Depends-on): Add unistd.
7004         * modules/getlogin_r: Likewise.
7005         * modules/glob: Likewise.
7006         * modules/pagealign_alloc: Likewise.
7007         * modules/unistd (Files): Remove lib/unistd_.h.
7008         (EXTRA_DIST): Remove.
7009         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
7010         need unistd_.h.
7011         (MOSTLYCLEANFILES): Remove unistd.h-t.
7012
7013 2006-03-03  Simon Josefsson  <jas@extundo.com>
7014
7015         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
7016
7017 2006-03-03  Simon Josefsson  <jas@extundo.com>
7018
7019         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
7020         libidn and bison.
7021
7022 2006-03-03  Simon Josefsson  <jas@extundo.com>
7023
7024         * build-aux/maint.mk: Add indent target.
7025
7026 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
7027
7028         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
7029         our replacement poll.h in any case, to avoid a differing
7030         declaration from a system header.  Seen on AIX.
7031
7032 2006-03-01  Simon Josefsson  <jas@extundo.com>
7033
7034         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
7035         <kasal@ucw.cz>.
7036
7037 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7038
7039         * modules/gettime (Depends-on): Add extensions module.
7040         * modules/nanosleep (Depends-on): Likewise.
7041         * modules/settime (Depends-on): Likewise.
7042
7043 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7044
7045         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
7046         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
7047         pedantically.
7048         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7049         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
7050
7051         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
7052         not "==".  Reported by Ralf Wildenhues.
7053
7054 2006-03-01  Karl Berry  <karl@gnu.org>
7055
7056         * doc/Copyright/request-*: new files, synced from gnuorg.
7057
7058 2006-03-01  Karl Berry  <karl@gnu.org>
7059
7060         * config/srclist.txt (Copyright/*): new entries.
7061
7062 2006-02-28  Simon Josefsson  <jas@extundo.com>
7063
7064         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
7065
7066 2006-02-27  Simon Josefsson  <jas@extundo.com>
7067
7068         * lib/base64.h: Indent #define's.  From Jim Meyering
7069         <jim@meyering.net>.
7070
7071 2006-02-27  Jim Meyering  <jim@meyering.net>
7072
7073         Revert the change of 2006-02-24, so these files can continue
7074         to be sync'd from gettext.
7075         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
7076         of `config.h'.
7077
7078 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
7079
7080         * modules/intprops: New file.
7081         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
7082         Add intprops.
7083         * modules/getloadavg (Files): Remove lib/intprops.h.
7084         (Depends-on): Add intprops.
7085         * modules/human: Likewise.
7086         * modules/inttostr: Likewise.
7087         * modules/openat: Likewise.
7088         * modules/sig2str: Likewise.
7089         * modules/userspec: Likewise.
7090         * modules/utimecmp: Likewise.
7091         * modules/xnanosleep: Likewise.
7092         * modules/xstrtol: Likewise.
7093
7094 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
7095
7096         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
7097         * modules/lock-tests (TESTS): Use $(EXEEXT).
7098         * modules/tls-tests: Likewise.
7099         * modules/argp-tests: Likewise.
7100         (check_PROGRAMS): New var, replacing...
7101         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
7102
7103 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7104
7105         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
7106         `config.h'.
7107
7108 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
7109
7110         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
7111
7112 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7113
7114         Sync from coreutils.
7115         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
7116         gl_CHDIR_SAFER.
7117
7118 2006-02-22  Jim Meyering  <jim@meyering.net>
7119
7120         Sync from coreutils.
7121         * m4/chdir-safer.m4: New file.
7122
7123 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
7124
7125         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
7126         AT_FDCWD exceeds INT_MAX.
7127         * lib/openat.h (AT_FDCWD): Likewise.
7128
7129 2006-02-17  Eric Blake  <address@hidden>
7130
7131         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
7132
7133 2006-02-16  Simon Josefsson  <jas@extundo.com>
7134
7135         * modules/getaddrinfo (Depends-on): Add sys_socket.
7136
7137 2006-02-15  Simon Josefsson  <jas@extundo.com>
7138
7139         * build-aux/maint.mk: Add dsyntax-check rule.
7140
7141 2006-02-15  Eric Blake  <ebb9@byu.net>
7142
7143         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
7144         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
7145         'present but cannot compile' warnings on cygwin.
7146         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
7147         use ws2tcpip.h if sys/socket.h works.
7148         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
7149         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
7150
7151 2006-02-14  Simon Josefsson  <jas@extundo.com>
7152
7153         * modules/maintainer-makefile (Files): Rename.
7154
7155         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
7156         and (the local) Makefile.cfg to maint-cfg.mk.
7157
7158         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
7159         to the latter.
7160
7161         * modules/maintainer-makefile: New module.
7162
7163         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
7164         severaly stripped to make it possible to build it up from scratch
7165         with reliable tests.
7166
7167         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
7168         fixes to permit overriding the default actions when configure and
7169         makefile are not available.
7170
7171 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
7172
7173         Sync from coreutils.
7174         * modules/lstat (Depends-on): Don't depend on xalloc.
7175         (License): Change from GPL to LGPL, since this is now simply a
7176         replacement for a libc function.
7177
7178 2006-02-14  Jim Meyering  <jim@meyering.net>
7179
7180         Sync from coreutils.
7181
7182         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
7183         failure on deficient systems, and simplify gnulib lgpl dependencies.
7184         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
7185         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
7186
7187         * lib/xalloc-die.c: Remove unused definition of N_.
7188
7189 2006-02-14  Jim Meyering  <jim@meyering.net>
7190
7191         Sync from coreutils.
7192         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
7193         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
7194         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
7195         double-quote uses of that variable, to accommodate the rare case in
7196         which getmntent is available in none of the libraries checked.  This
7197         happens at least on FreeBSD 5.0.
7198
7199 2006-02-13  Simon Josefsson  <jas@extundo.com>
7200
7201         * gnulib-tool (Usage): Fix --import, from
7202         karl@freefriends.org (Karl Berry).
7203
7204 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7205
7206         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
7207
7208 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
7209
7210         * lib/argp-namefrob.h: Restore changes accidentally lost during the
7211         "autoupdate" on 2005-12-12.
7212
7213 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
7214
7215         * modules/closeout (Depends-on): Remove atexit.
7216
7217 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
7218
7219         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
7220         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
7221
7222 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
7223
7224         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
7225         __EXTENSIONS__ if this causes compilation to fail.  Problem
7226         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
7227         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
7228
7229 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
7230
7231         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
7232         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
7233         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
7234         All uses changed.
7235
7236 2006-01-26  Simon Josefsson  <jas@extundo.com>
7237
7238         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
7239         prototype is visible on mingw32.
7240
7241         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
7242         for mingw32.
7243
7244         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
7245         mingw32).
7246
7247 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
7248
7249         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
7250         attempt to open for write; this always fails, at least on POSIX
7251         hosts.  This reinstates the 2006-01-09 change, which was
7252         inadvertently removed.
7253
7254 2006-01-26  Bruno Haible  <bruno@clisp.org>
7255
7256         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
7257         Reported by Paul Eggert.
7258
7259 2006-01-26  Bruno Haible  <bruno@clisp.org>
7260             Paul Eggert  <eggert@cs.ucla.edu>
7261
7262         * lib/stdbool_.h (_Bool)
7263         [(! (defined __cplusplus || defined __BEOS__)
7264           && !defined __GNUC__
7265           && !(defined __HP_cc || defined __xlc__
7266                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
7267                || defined __sgi))]:
7268         #define to signed char in these cases too; this simplifies
7269         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
7270         etc., separately) and makes it more conservative.
7271
7272 2006-01-25  Simon Josefsson  <jas@extundo.com>
7273
7274         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
7275         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
7276         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
7277
7278 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7279
7280         * lib/argp-namefrob.h: Bugfix. Remove stray #
7281
7282 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
7283
7284         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
7285         so that we test the test.
7286         Check for yet another HP-UX cc bug involving *bool |= bool.
7287
7288 2006-01-25  Karl Berry  <karl@gnu.org>
7289
7290         * config/srclist.txt (vasnprintf.c): sync lost.
7291
7292 2006-01-25  Jim Meyering  <jim@meyering.net>
7293
7294         Sync from the stable (b5) branch of coreutils:
7295
7296         * lib/fts.c (fts_children): Don't let close() clobber errno from
7297         failed fchdir().
7298
7299         * lib/fts.c (fts_stat): When following a symlink-to-directory,
7300         don't necessarily interpret stat-fails+lstat-succeeds as indicating
7301         a dangling symlink.  That can also happen at least for ELOOP.
7302         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
7303         FYI, this bug predates the inclusion of fts.c in coreutils.
7304
7305         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
7306         in their own block, so pre-c99 compilers don't object.
7307
7308         Avoid the double-free (first in fts_read, second in fts_close) that
7309         would occur when an `active' directory is made inaccessible (e.g.,
7310         via chmod a-x) during a traversal.
7311         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
7312         before returning.  Reproduce this failure by
7313         mkdir -p a/b; cd a; chmod a-x . b
7314         Reported by Stavros Passas.
7315
7316 2006-01-25  Jim Meyering  <jim@meyering.net>
7317
7318         * lib/fileblocks.c: Remove more useless parentheses.
7319         * lib/readutmp.h: Likewise.
7320
7321 2006-01-25  Bruno Haible  <bruno@clisp.org>
7322
7323         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
7324         warnings.
7325         Reported by Paul Eggert.
7326
7327 2006-01-25  Bruno Haible  <bruno@clisp.org>
7328
7329         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
7330         rid of a trap command. For Solaris sh.
7331         Reported by Mark D. Baushke <mdb@gnu.org>.
7332
7333 2006-01-24  Simon Josefsson  <jas@extundo.com>
7334
7335         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
7336         Bruno.
7337
7338 2006-01-24  Karl Berry  <karl@gnu.org>
7339
7340         * config/srclist.txt (argp-namefrob.h): sync lost.
7341
7342 2006-01-24  Jim Meyering  <jim@meyering.net>
7343
7344         * modules/openat (Files): Add lib/intprops.h.
7345         From Mark D. Baushke.
7346
7347 2006-01-24  Jim Meyering  <jim@meyering.net>
7348
7349         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
7350         Reported by Mark D. Baushke.
7351
7352 2006-01-24  Jim Meyering  <jim@meyering.net>
7353
7354         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
7355
7356 2006-01-24  Bruno Haible  <bruno@clisp.org>
7357
7358         * modules/strnlen (Maintainer): Change from glibc to all.
7359
7360 2006-01-24  Bruno Haible  <bruno@clisp.org>
7361
7362         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
7363         Patch by Paul Eggert.
7364
7365 2006-01-24  Bruno Haible  <bruno@clisp.org>
7366
7367         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
7368         already has it.
7369         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
7370         2005-11-26.
7371
7372         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
7373         'signed char' to avoid problems with the built-in _Bool type.
7374         Reported by Paul Eggert on 2005-11-26.
7375
7376 2006-01-24  Bruno Haible  <bruno@clisp.org>
7377
7378         * gnulib-tool (func_import): Avoid constructing complicated sed
7379         expressions inside backquote.
7380         Report and solution by Mark D. Baushke <mdb@gnu.org>.
7381
7382 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
7383
7384         These changes imported from libc.
7385         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
7386         test and two separate function calls.
7387         * lib/strndup.c (__strndup): Add libc_hidden_def.
7388
7389 2006-01-23  Simon Josefsson  <jas@extundo.com>
7390
7391         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
7392         Remove the test_*_SOURCES variable: automake infers it by default.
7393         * modules/tls-tests: Likewise.
7394
7395 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7396
7397         Work around porting bugs reported by Dieter in
7398         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
7399         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
7400         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
7401         Include "getopt.h" first, to check interface.
7402         (getenv): Declare only if defined HAVE_DECL_GETENV &&
7403         !HAVE_DECL_GETENV.
7404         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
7405         (__strndup): Revert to K&R-style function dfns, the glibc style.
7406         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
7407         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
7408         Include strnlen.h first, to get prototype properly.
7409         (strnlen): Renamed from __strnlen.
7410         Remove weak alias.
7411
7412 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7413
7414         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
7415
7416 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7417
7418         * config/srclist.txt: Adjust to reflect glibc reorganization.
7419         This affects only comments.
7420
7421 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7422
7423          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
7424          Reported by Bruce Korb <bkorb@gnu.org>.
7425
7426 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7427
7428         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
7429         to pacify gcc -Wswitch-default.
7430
7431 2006-01-22  Bruno Haible  <bruno@clisp.org>
7432
7433         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
7434         temporary buffer for sprintf, take into account the precision also
7435         for 'd', 'i', 'u', 'o', 'x', 'X'.
7436
7437 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7438
7439         * modules/argp-tests: New module
7440         * tests/test-argp.c: New file
7441         * tests/test-argp-2.sh: New file
7442
7443 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7444
7445         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
7446         (__argp_base_name): Removed
7447         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
7448         typo.
7449         (__argp_base_name): Provide macro definition or extern declaration
7450         depending on the configuration
7451
7452 2006-01-20  Simon Josefsson  <jas@extundo.com>
7453
7454         * modules/inet_ntop (Depends-on): Depend on sys_socket.
7455
7456 2006-01-20  Simon Josefsson  <jas@extundo.com>
7457
7458         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
7459
7460 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
7461
7462         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
7463         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
7464         Suggested by Bruno Haible.
7465
7466 2006-01-20  Karl Berry  <karl@gnu.org>
7467
7468         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
7469         until changes propagate, I guess.
7470
7471 2006-01-19  Simon Josefsson  <jas@extundo.com>
7472
7473         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
7474
7475 2006-01-19  Simon Josefsson  <jas@extundo.com>
7476
7477         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
7478
7479 2006-01-19  Simon Josefsson  <jas@extundo.com>
7480
7481         * gnulib-tool: Set check_PROGRAMS.
7482
7483         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
7484         modules/des-tests, modules/gc-arcfour-tests,
7485         modules/gc-arctwo-tests, modules/gc-des-tests,
7486         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
7487         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
7488         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
7489         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
7490         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
7491         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
7492         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
7493         test_*_SOURCES.
7494
7495 2006-01-18  Simon Josefsson  <jas@extundo.com>
7496
7497         * modules/socklen (Depends-on): Depend on sys_socket.
7498
7499 2006-01-18  Simon Josefsson  <jas@extundo.com>
7500
7501         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
7502         modules/des-tests, modules/gc-arcfour-tests,
7503         modules/gc-arctwo-tests, modules/gc-des-tests,
7504         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
7505         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
7506         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
7507         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
7508         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
7509         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
7510         $(EXEEXT) to automake TESTS variable, for mingw32.
7511
7512 2006-01-17  Simon Josefsson  <jas@extundo.com>
7513
7514         * modules/socklen (Include): Need sys/socket.h.
7515
7516 2006-01-17  Bruno Haible  <bruno@clisp.org>
7517
7518         * modules/ssize_t (Include): Add <sys/types.h>.
7519
7520 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
7521
7522         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
7523         it's not portable and it doesn't work with cross-compiles.
7524         Problem reported by Bruno Haible.  Fix missing-$ typo in
7525         'test "gl_cv_ignore_unused_libraries" ...' that prevented
7526         -zignore from being used with Sun's C compiler.
7527
7528 2006-01-12  Simon Josefsson  <jas@extundo.com>
7529
7530         * lib/base64.c: Fix warning, reported by Bruno Haible
7531         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
7532
7533 2006-01-12  Bruno Haible  <bruno@clisp.org>
7534
7535         * modules/ldd: New file.
7536         * build-aux/ldd.sh.in: New file.
7537         * MODULES.html.sh (Support for building libraries and executables): Add
7538         ldd.
7539
7540 2006-01-12  Bruno Haible  <bruno@clisp.org>
7541
7542         * m4/ldd.m4: New file.
7543
7544 2006-01-12  Bruno Haible  <bruno@clisp.org>
7545
7546         * gnulib-tool (func_import, func_create_testdir): Don't go into an
7547         endless loop while replacing $auxdir with build-aux.
7548
7549 2006-01-11  Simon Josefsson  <jas@extundo.com>
7550
7551         * lib/stdint_.h (SIZE_MAX): Add missing (.
7552
7553 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
7554
7555         Sync from coreutils.
7556         * lib/md5.c: Fix commentary typos.
7557         (alignof, UNALIGNED_P): No need for a GCC-specific version.
7558         * lib/md5.h (__attribute__): Remove; unused.
7559         * lib/sha1.c: Fix commentary to match md5 better.
7560         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
7561         so that we don't need to worry about alignment.  All uses changed.
7562         This merges the 2005-10-28 md5 change into sha1.
7563
7564 2006-01-11  Jim Meyering  <jim@meyering.net>
7565
7566         Sync from coreutils.
7567         * lib/md5.c (OP): Fix spacing.
7568
7569 2006-01-11  Bruno Haible  <bruno@clisp.org>
7570
7571         Ensure automatic ordering between gl_LOCK and gl_ARGP.
7572         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
7573         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
7574
7575 2006-01-11  Bruno Haible  <bruno@clisp.org>
7576
7577         Ensure automatic ordering between gl_LOCK and gl_ARGP.
7578         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
7579         the "early" section as well.
7580
7581 2006-01-11  Bruno Haible  <bruno@clisp.org>
7582
7583         Avoid "ar: no archive members specified" error on MacOS X.
7584         * gnulib-tool (func_modules_add_dummy): New function.
7585         (func_import, func_create_testdir): Invoke it.
7586
7587 2006-01-11  Bruno Haible  <bruno@clisp.org>
7588
7589         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
7590         with $auxdir in AC_CONFIG_FILES statements.
7591
7592 2006-01-11  Bruno Haible  <bruno@clisp.org>
7593
7594         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7595         Initialize also noinst_HEADERS to empty.
7596
7597 2006-01-11  Bruno Haible  <bruno@clisp.org>
7598
7599         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
7600         variables.
7601         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
7602         autoreconf.
7603
7604 2006-01-11  Bruno Haible  <bruno@clisp.org>
7605
7606         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
7607         overridable by the user.
7608         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7609
7610 2006-01-10  Simon Josefsson  <jas@extundo.com>
7611
7612         * modules/sys_socket: New file.
7613
7614 2006-01-10  Simon Josefsson  <jas@extundo.com>
7615
7616         * m4/sys_socket_h.m4: New file.
7617
7618 2006-01-10  Simon Josefsson  <jas@extundo.com>
7619
7620         * lib/socket_.h: New file.
7621
7622 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7623
7624         * modules/readutmp (Maintainer): Add myself.
7625
7626 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7627
7628         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
7629         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
7630         People who are still concerned with buggy memcmp implementations
7631         can invoke gl_FUNC_MEMCMP themselves.
7632
7633 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7634
7635         * lib/regex_internal.h (BITSET_WORD_BITS):
7636         Work around a bug in 64-bit PGC (before version 6.1-2), where the
7637         preprocessor mishandles large unsigned values as if they were signed.
7638         Problem reported by Claudio Fontana in
7639         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
7640
7641 2006-01-10  Jim Meyering  <jim@meyering.net>
7642
7643         Avoid the double-free (first in fts_read, second in fts_close) that
7644         would occur when an `active' directory is made inaccessible (e.g.,
7645         via chmod a-x) during a traversal.
7646         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
7647         before returning.  Reproduce this failure by
7648         mkdir -p a/b; cd a; chmod a-x . b
7649         Reported by Stavros Passas.
7650
7651         Sync from coreutils.
7652         * lib/sha1.c: Tweak grammar in a comment.
7653
7654 2006-01-10  Jim Meyering  <jim@meyering.net>
7655
7656         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
7657         Patch by Joerg Sonnenberger.
7658
7659 2006-01-10  Bruno Haible  <bruno@clisp.org>
7660
7661         * modules/readutmp: Depend on module free.
7662         * modules/strtok_r: Depend on module restrict.
7663
7664 2006-01-10  Bruno Haible  <bruno@clisp.org>
7665
7666         * modules/gettext (configure.ac): Add an invocation of
7667         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
7668
7669 2006-01-10  Bruno Haible  <bruno@clisp.org>
7670
7671         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
7672         Reported by Werner Lemberg <wl@gnu.org>.
7673
7674 2006-01-10  Bruno Haible  <bruno@clisp.org>
7675
7676         * lib/localcharset.c: Update from GNU gettext.
7677
7678 2006-01-10  Bruno Haible  <bruno@clisp.org>
7679
7680         * lib/argp.h (__const): Remove macro. Use const instead.
7681         * lib/argp-fmtstream.h (__const): Likewise.
7682         * lib/glob_.h (__const): Remove macro.
7683         * lib/glob-libc.h: Use const instead of __const.
7684
7685 2006-01-10  Bruno Haible  <bruno@clisp.org>
7686
7687         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
7688         variable.
7689         Needed to avoid an automake error regarding the 'gettext' module.
7690
7691 2006-01-09  Simon Josefsson  <jas@extundo.com>
7692
7693         * modules/inet_ntop (Depends-on): Add restrict.
7694
7695 2006-01-09  Simon Josefsson  <jas@extundo.com>
7696
7697         * modules/gc-rijndael-tests (License): Put under LGPL.
7698
7699         * modules/gc-des-tests (License): Likewise.
7700
7701         * modules/gc-arcfour-tests (License): Likewise.
7702
7703         * modules/gc-arctwo-tests (License): Likewise.
7704
7705         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
7706
7707         * modules/gc-hmac-sha1-tests (Files): Likewise.
7708
7709         * modules/gc-hmac-md5-tests (License): Likewise.
7710
7711         * modules/gc-sha1-tests (License): Likewise.
7712
7713         * modules/gc-md5-tests (License): Likewise.
7714
7715         * modules/gc-md4-tests (License): Likewise.
7716
7717         * modules/gc-md2-tests (License): Likewise.
7718
7719         * modules/gc-tests (License): Likewise.
7720
7721         * modules/des-tests (License): Likewise.
7722
7723         * modules/md4-tests (License): Likewise.
7724
7725         * modules/md2-tests (License): Likewise.
7726
7727 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7728
7729         Sync from coreutils:
7730
7731         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
7732         * modules/lib-ignore: New file.
7733         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
7734         chdir-safer.m4, lchmod.m4.
7735         * modules/openat: Add mkdirat.c, openat-priv.h.
7736
7737 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7738
7739         Sync from coreutils.
7740         * m4/lib-ignore.m4: New file.
7741         * m4/lchmod.m4: New file.
7742
7743 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7744
7745         Sync from coreutils.
7746         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
7747         for write access: POSIX says that must fail.
7748         * lib/fts.c (diropen): Likewise.
7749         * lib/save-cwd.c (save_cwd): Likewise.
7750         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
7751         well, for minor improvements on hosts that lack O_DIRECTORY.
7752         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
7753         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
7754         Fall back on chown if open failed with EACCES.
7755
7756         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
7757         Report an error at compile-time if only a 1-second nominal clock
7758         resolution is found.
7759
7760         * lib/lchmod.h: New file.
7761         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
7762         (make_dir_parents): Use lchown rather than chown, and
7763         lchmod rather than chmod.
7764
7765         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
7766         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
7767         "proc" reported by n0dalus.
7768
7769         * lib/mountlist.c: Include <limits.h>.
7770         (dev_from_mount_options)
7771         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
7772         New function.  It no longer assumes "dev=" has the System V meaning
7773         on Linux (since it doesn't).  It also parses "dev=" more carefully.
7774         (read_file_system_list)
7775         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
7776         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
7777         dev= in that case.
7778
7779         * lib/posixtm.h (PDS_PRE_2000): New macro.
7780         * lib/posixtm.c (year): Arg is now syntax_bits rather than
7781         allow_century.  All usages changed.  Reject dates outside the range
7782         1969-1999 if PDS_PRE_2000 is used.
7783
7784 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7785
7786         Sync from coreutils.
7787         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
7788         (Time of day items): Mention the possibility of leap seconds.
7789         Problem reported by Dr. David Alan Gilbert.
7790
7791 2006-01-09  Jim Meyering  <jim@meyering.net>
7792
7793         Sync from coreutils.
7794
7795         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
7796
7797         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
7798
7799         * lib/modechange.c (mode_compile): Reject an invalid mode string
7800         that starts with an octal digit.  From Andreas Gruenbacher.
7801
7802         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
7803         and dup to open_safer and dup_safer, respectively.
7804         (openat_permissive): Fix typo in comment.
7805
7806         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
7807         "gettext.h"; either no longer needed or are guaranteed by openat.h.
7808         (_): Remove; no longer needed.
7809         (openat): Renamed from rpl_openat; no need for rpl_openat
7810         since openat.h renames openat for us.
7811         Replace most of the body with a call to openat_permissive,
7812         to avoid duplicate code.
7813         Port to (probably hypothetical) environments were mode_t is
7814         wider than int.
7815         (openat_permissive): Require mode arg, so that we can check
7816         types better.  Put it just after flags.  Change cwd failure
7817         indicator from pointer-to-bool to pointer-to-errno-value.
7818         All callers changed.
7819         Invoke openat_save_fail and/or openat_restore_fail if
7820         cwd_errno is null, so that openat can call us.
7821         (openat_permissive, fdopendir, fstatat, unlinkat):
7822         Simplify errno handling to avoid some duplicate code,
7823         as it's OK to set errno on success.
7824         * lib/openat.h: Revamp code so that function macros depend on
7825         __OPENAT_PREFIX only, not also on AT_FDCWD.
7826         (openat_ro): Remove.  Caller changed to use openat_permissive.
7827         (openat_permissive): Now a macro, if not a function.
7828         (openat_restore_fail, openat_save_fail): Now always functions,
7829         since mkdirat needs them even if __OPENAT_PREFIX is defined.
7830
7831         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
7832         and openat.c.
7833         * lib/mkdirat.c: Include openat-priv.h.
7834         Remove definitions of macros defined therein.
7835         * lib/openat.c: Likewise.
7836
7837         * lib/mkdirat.c (mkdirat): New file and function.
7838         * lib/openat.h (mkdirat): Declare.
7839
7840         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
7841
7842         * lib/openat.h (openat_permissive): Declare.
7843         (openat_ro): Define.
7844
7845         * lib/openat.c (EXPECTED_ERRNO): New macro.
7846         (openat_permissive): New function -- used in remove.c rewrite.
7847         (all functions): Set errno just before returning, only if there
7848         was an actual failure.
7849         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
7850
7851         Emulate openat-family functions using Linux's procfs, if possible.
7852         Idea and some code based on Ulrich Drepper's glibc changes.
7853
7854         * lib/openat.c: (BUILD_PROC_NAME): New macro.
7855         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
7856         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
7857         before falling back on save_cwd and restore_cwd.
7858         (fdopendir, fstatat, unlinkat): Likewise.
7859
7860         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
7861         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
7862
7863         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
7864         as second argument to va_arg.  Otherwise, some versions of gcc
7865         warn that `if this code is reached, the program will abort'.
7866
7867 2006-01-09  Jim Meyering  <jim@meyering.net>
7868
7869         Sync from coreutils.
7870         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
7871         Require openat-priv.h.
7872
7873 2006-01-09  Bruno Haible  <bruno@clisp.org>
7874
7875         * modules/strnlen (Include): Use strnlen.h.
7876
7877 2006-01-09  Bruno Haible  <bruno@clisp.org>
7878
7879         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
7880
7881 2006-01-09  Bruno Haible  <bruno@clisp.org>
7882
7883         * lib/sysexit_.h (EX_OK): New macro.
7884         Suggested by Martin Lambers <marlam@marlam.de>.
7885
7886 2006-01-09  Bruno Haible  <bruno@clisp.org>
7887
7888         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
7889         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
7890
7891 2006-01-09  Bruno Haible  <bruno@clisp.org>
7892
7893         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
7894         numbers.
7895
7896 2006-01-09  Bruno Haible  <bruno@clisp.org>
7897
7898         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
7899         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
7900         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
7901         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
7902
7903 2006-01-09  Bruno Haible  <bruno@clisp.org>
7904
7905         * build-aux/javacomp.sh.in: New file, moved from lib/.
7906         * modules/javacomp-script (Files): Update.
7907         (configure.ac): Add AC_CONFIG_FILES invocation.
7908         (EXTRA_DIST): Remove variable.
7909
7910         * build-aux/javaexec.sh.in: New file, moved from lib/.
7911         * modules/javaexec (Files): Update.
7912         (configure.ac): Add AC_CONFIG_FILES invocation.
7913         (EXTRA_DIST): Remove javaexec.sh.in.
7914
7915         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
7916         * modules/csharpcomp-script (Files): Update.
7917         (configure.ac): Add AC_CONFIG_FILES invocation.
7918         (EXTRA_DIST): Remove variable.
7919
7920         * build-aux/csharpexec.sh.in: New file, moved from lib/.
7921         * modules/csharpexec (Files): Update.
7922         (configure.ac): Add AC_CONFIG_FILES invocation.
7923         (EXTRA_DIST): Remove csharpexec.sh.in.
7924
7925 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7926
7927         Sync from coreutils.
7928
7929         Add POSIX ACL support
7930         * lib/acl.h (copy_acl, set_acl): Add declarations.
7931         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
7932         systems other than Linux.
7933         (chmod_or_fchmod): New function: use fchmod when possible,
7934         and chmod otherwise.
7935         (file_has_acl): Add a POSIX ACL implementation, with a
7936         Linux-specific subcase.
7937         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
7938         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
7939         acls are unsupported.
7940         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
7941         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
7942         are unsupported.
7943
7944 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7945
7946         Sync from coreutils.
7947         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
7948
7949 2006-01-07  Bruno Haible  <bruno@clisp.org>
7950
7951         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
7952         gl_EARLY.
7953
7954 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7955
7956         * lib/strftime.c (tzname): Don't declare if it is already #defined.
7957         Problem reported for Mingw by Mark Junker.
7958
7959 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7960
7961         * README: Gnulib normally doesn't generate a tarball.
7962
7963 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
7964
7965         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
7966         long int, not int, for nanosecond counts, so that people who are
7967         used to POSIX struct timespec won't be surprised.  Reported by Jim
7968         Meyering.
7969
7970 2005-12-28  Bruno Haible  <bruno@clisp.org>
7971
7972         * build-aux/config.rpath: Update from GNU gettext.
7973
7974 2005-12-16  Jim Meyering  <jim@meyering.net>
7975
7976         * modules/fprintftime: New module.
7977         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
7978
7979 2005-12-16  Jim Meyering  <jim@meyering.net>
7980
7981         * m4/fprintftime.m4: New file.
7982
7983 2005-12-16  Jim Meyering  <jim@meyering.net>
7984
7985         * lib/fprintftime.c, lib/fprintftime.h: New files.
7986
7987 2005-12-15  Simon Josefsson  <jas@extundo.com>
7988
7989         * modules/socklen (configure.ac): Fix M4 macro name, to align with
7990         new m4/socklen.m4.
7991
7992 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7993
7994         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
7995         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
7996
7997 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7998
7999         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
8000         * lib/argp-help.c (fill_in_uparams): Check if the constructed
8001         struct uparams is valid. Fall back to the default values if it is
8002         not.
8003
8004 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8005
8006         * modules/argp (Files): Add argp-pin.c
8007         (Depends-on): dirname
8008         (lib_SOURCES): Add argp-pin.c
8009
8010 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8011
8012         * m4/argp.m4:  Check if program_invocation_name and
8013         program_invocation_short_name are declared and define appropriate
8014         macros if they are not.
8015
8016 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8017
8018         * lib/argp-help.c (__argp_base_name): New function
8019         (__argp_short_program_name): Rewrite using __argp_base_name
8020         * lib/argp-namefrob.h: Define program_invocation_name and
8021         program_invocation_short_name if requested
8022         (__argp_base_name): Add prototype
8023         * lib/argp-parse.c (argp_def): Use gettext wrappers
8024         (argp_default_parser): Use __argp_base_name
8025         * lib/argp-pin.c: New file. Defines program_invocation_name and
8026         program_invocation_short_name on systems that lack them.
8027
8028 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8029
8030         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
8031         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8032         porting problem reported by Georg Schwarz in
8033         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8034
8035 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8036
8037         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
8038         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8039         porting problem reported by Georg Schwarz in
8040         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8041
8042 2005-12-05  Bruno Haible  <bruno@clisp.org>
8043
8044         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
8045         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
8046         Reported by Mark Junker <mjscod@gmx.de>.
8047
8048 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
8049
8050         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
8051         Use implementation from Albert Chin, with some
8052         comments/corrections by Stepan Kasal and myself.
8053
8054 2005-12-02  Bruno Haible  <bruno@clisp.org>
8055
8056         * gnulib-tool (func_import): Accept GPLed build tool modules when
8057         --lgpl is given.
8058         * modules/csharpcomp-script: New file.
8059         * modules/csharpcomp: Depend on it.
8060         * modules/javacomp-script: New file.
8061         * modules/javacomp: Depend on it.
8062         Suggested by Simon Josefsson.
8063
8064 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
8065
8066         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
8067         statement, to work around an HP-UX 10.20 compiler bug reported by
8068         Peter O'Gorman.
8069
8070 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8071
8072         * modules/savedir (Depends-on): Add openat.
8073
8074 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8075
8076         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
8077         (uintmax_t) [defined uintmax_t]: Do not declare.
8078         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
8079         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
8080         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
8081         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
8082         sake of portability to weird hosts that C allows (though we don't
8083         know of any practical examples).
8084
8085         * lib/savedir.h (fdsavedir): New decl.
8086         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
8087         contains most of the former guts of savedir.
8088         (savedir): Use savedirstream.
8089         Include "openat.h".
8090
8091 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
8092
8093         * modules/obstack (Files): Add m4/ulonglong.m4.
8094         Problem reported by Davide Angelocola.
8095
8096 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
8097
8098         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
8099         coreutils no longer futzes with rounding modes.
8100
8101 2005-11-14  Jim Meyering  <jim@meyering.net>
8102
8103         * lib/mkstemp-safer.c: Include <config.h>, required for possible
8104         replacement of mkstemp.
8105
8106 2005-11-10  Simon Josefsson  <jas@extundo.com>
8107
8108         * lib/readline.c: Remove EOL.
8109
8110 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8111
8112         * modules/gethrxtime (Depends-on): Add gettime.
8113
8114 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8115
8116         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
8117         or gettimeofday; no longer needed.
8118
8119 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8120
8121         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
8122         time business.
8123         (gethrxtime) [! (HAVE_NANOUPTIME
8124         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
8125         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
8126         our own approximation.
8127
8128 2005-11-08  Eric Blake  <ebb9@byu.net>
8129
8130         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
8131
8132 2005-11-08  Eric Blake  <ebb9@byu.net>
8133
8134         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
8135
8136 2005-11-04  Bruno Haible  <bruno@clisp.org>
8137
8138         * gnulib-tool: Implement --update mode.
8139
8140 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
8141
8142         Fix porting problem reported by Theodoros V. Kalamatianos.
8143         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
8144         Don't assume that futimes failing means we must fail.
8145
8146 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
8147
8148         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
8149         variables to suggest the intended function of the PATH_MAX check.
8150
8151 2005-10-30  Kean Johnston  <jkj@sco.com>
8152
8153         Trivial changes to support SCO systems.
8154         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
8155         as PATH_MAX.
8156         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
8157         where __ptr is null when no I/O is pending.
8158
8159 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
8160
8161         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
8162         leave errno alone.  Problem reported by Dmitry V. Levin.
8163
8164 2005-10-28  Simon Josefsson  <jas@extundo.com>
8165
8166         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
8167         Test more.
8168
8169         * tests/test-gc-md2.c, tests/test-md2.c: New files.
8170
8171         * modules/md2, modules/md2-tests: New files.
8172
8173 2005-10-28  Simon Josefsson  <jas@extundo.com>
8174
8175         * m4/inet_ntop.m4: More tests.
8176
8177         * m4/gc-md2.m4, md2.m4: New file.
8178
8179 2005-10-28  Simon Josefsson  <jas@extundo.com>
8180
8181         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
8182         "restrict" keywords, as per POSIX.  Protect the function
8183         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
8184         Don't use K&R prototypes.  Check the sprintf return values.
8185         Re-define EAFNOSUPPORT if not present.  Indent.
8186
8187         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
8188         suggested by Bruno Haible <bruno@clisp.org>.
8189
8190         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
8191
8192         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
8193
8194         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
8195         libgcrypt).
8196
8197         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
8198
8199         * lib/md2.h, lib/md2.c: New files.
8200
8201 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
8202
8203         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
8204         errno alone.  Problem reported by Frederic Jolliton.
8205
8206 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
8207
8208         * modules/verify (License): Change from GPL to LGPL.  This is a
8209         tiny module and there are apparently near-equivalents that are
8210         under the BSD license.
8211
8212 2005-10-24  Simon Josefsson  <jas@extundo.com>
8213
8214         * modules/sha1: Relicense to LGPL.
8215
8216 2005-10-24  Simon Josefsson  <jas@extundo.com>
8217
8218         * lib/md4.h: Shrink buffer size, now that we changed the type.
8219
8220 2005-10-23  Simon Josefsson  <jas@extundo.com>
8221
8222         * gnulib-tool (func_import): Fix --tests-base.
8223
8224 2005-10-22  Simon Josefsson  <jas@extundo.com>
8225
8226         * modules/arcfour (Depends-on): Need stdint.
8227
8228 2005-10-22  Simon Josefsson  <jas@extundo.com>
8229
8230         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
8231         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
8232
8233 2005-10-22  Simon Josefsson  <jas@extundo.com>
8234
8235         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
8236         suggested by Bruno Haible <bruno@clisp.org>.
8237
8238 2005-10-22  Simon Josefsson  <jas@extundo.com>
8239
8240         * lib/crc.h: Include stddef.h, for size_t.
8241
8242 2005-10-22  Simon Josefsson  <jas@extundo.com>
8243
8244         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
8245         arcfour_context struct (simplify test vector testing in GNU
8246         Shishi).
8247
8248 2005-10-21  Simon Josefsson  <jas@extundo.com>
8249
8250         * modules/des, modules/des-tests: New files.
8251
8252         * modules/gc-des, modules/gc-des-tests: New files.
8253
8254         * tests/test-des.c, tests/test-gc-des.c: New file.
8255
8256 2005-10-21  Simon Josefsson  <jas@extundo.com>
8257
8258         * modules/arctwo, modules/arctwo-tests: New files.
8259
8260         * tests/test-arctwo.c: New file.
8261
8262         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
8263
8264         * tests/test-gc-arctwo.c: New file.
8265
8266 2005-10-21  Simon Josefsson  <jas@extundo.com>
8267
8268         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
8269         Bruno Haible <bruno@clisp.org>.
8270
8271         * m4/gc-des.m4: New file.
8272
8273 2005-10-21  Simon Josefsson  <jas@extundo.com>
8274
8275         * m4/arctwo.m4: New file.
8276
8277         * m4/gc-arctwo.m4: New file.
8278
8279 2005-10-21  Simon Josefsson  <jas@extundo.com>
8280
8281         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
8282         block.
8283
8284 2005-10-21  Simon Josefsson  <jas@extundo.com>
8285
8286         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
8287         <bruno@clisp.org>.
8288
8289         * lib/hmac-sha1.c (hmac_sha1): Likewise.
8290
8291         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
8292         Bruno Haible <bruno@clisp.org>.
8293
8294         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
8295         <bruno@clisp.org>.
8296
8297 2005-10-21  Simon Josefsson  <jas@extundo.com>
8298
8299         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
8300
8301 2005-10-21  Simon Josefsson  <jas@extundo.com>
8302
8303         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
8304
8305 2005-10-21  Simon Josefsson  <jas@extundo.com>
8306
8307         * lib/des.h, lib/des.c: New files.
8308
8309         * lib/gc-gnulib.c: Support DES.c
8310
8311 2005-10-21  Simon Josefsson  <jas@extundo.com>
8312
8313         * lib/arctwo.h, lib/arctwo.c: New files.
8314
8315         * lib/gc-gnulib.c: Support ARCTWO.
8316
8317 2005-10-21  Simon Josefsson  <jas@extundo.com>
8318
8319         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
8320         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8321
8322 2005-10-21  Simon Josefsson  <jas@extundo.com>
8323
8324         * gnulib-tool (func_import, func_create_testdir): Define automake
8325         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
8326         Makefile.am snippet),
8327         suggested by Bruno Haible <bruno@clisp.org>.
8328
8329         * modules/gc (Makefile.am): Use it.
8330
8331 2005-10-21  Bruno Haible  <bruno@clisp.org>
8332
8333         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
8334         patch.
8335
8336 2005-10-19  Simon Josefsson  <jas@extundo.com>
8337
8338         * tests/test-gc-rijndael.c: New file.
8339
8340         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
8341
8342 2005-10-19  Simon Josefsson  <jas@extundo.com>
8343
8344         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
8345         interface too.
8346
8347 2005-10-19  Simon Josefsson  <jas@extundo.com>
8348
8349         * tests/test-gc-arcfour.c: New file.
8350
8351         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
8352
8353 2005-10-19  Simon Josefsson  <jas@extundo.com>
8354
8355         * modules/gc-md4, modules/gc-md4-tests: New file.
8356
8357         * tests/test-gc-md4.c: New file.
8358
8359 2005-10-19  Simon Josefsson  <jas@extundo.com>
8360
8361         * m4/gc-md4.m4: New file.
8362
8363 2005-10-19  Simon Josefsson  <jas@extundo.com>
8364
8365         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
8366         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
8367         <kasal@ucw.cz>.
8368
8369 2005-10-19  Simon Josefsson  <jas@extundo.com>
8370
8371         * m4/gc-arcfour.m4: New file.
8372
8373         * m4/gc-rijndael.m4: New file.
8374
8375 2005-10-19  Simon Josefsson  <jas@extundo.com>
8376
8377         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
8378
8379 2005-10-19  Simon Josefsson  <jas@extundo.com>
8380
8381         * lib/gc-gnulib.c: Support ARCFOUR.
8382
8383 2005-10-19  Simon Josefsson  <jas@extundo.com>
8384
8385         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
8386         support.
8387
8388         * lib/gc.h: Add ECB enum type.
8389
8390         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
8391
8392 2005-10-18  Simon Josefsson  <jas@extundo.com>
8393
8394         * tests/test-md5.c: New file.
8395
8396         * modules/md5-tests: New file.
8397
8398 2005-10-18  Simon Josefsson  <jas@extundo.com>
8399
8400         * tests/test-md4.c: New file.
8401
8402         * modules/md4, modules/md4-tests: New files.
8403
8404 2005-10-18  Simon Josefsson  <jas@extundo.com>
8405
8406         * m4/md4.m4: New file.
8407
8408 2005-10-18  Simon Josefsson  <jas@extundo.com>
8409
8410         * lib/md4.h, lib/md4.c: New files, based on md5.?.
8411
8412 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
8413
8414         * gnulib-tool (func_create_testdir): Omit the second check whether
8415         BUILT_SOURCES in nonempty.
8416
8417 2005-10-17  Simon Josefsson  <jas@extundo.com>
8418
8419         * tests/test-rijndael.c: New file.
8420
8421 2005-10-17  Simon Josefsson  <jas@extundo.com>
8422
8423         * modules/sha1: Depend on stdint instead of md5.
8424
8425         * modules/md5: Depend on stdint, remove uint32_t.
8426
8427 2005-10-17  Simon Josefsson  <jas@extundo.com>
8428
8429         * modules/gc-sha1-tests: New file.
8430
8431         * tests/test-gc-sha1.c: New file.
8432
8433 2005-10-17  Simon Josefsson  <jas@extundo.com>
8434
8435         * m4/md5.m4: Remove call to uint32_t.m4.
8436
8437 2005-10-17  Simon Josefsson  <jas@extundo.com>
8438
8439         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
8440
8441         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
8442         md5.h.
8443
8444         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
8445
8446         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
8447
8448 2005-10-17  Simon Josefsson  <jas@extundo.com>
8449
8450         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
8451
8452 2005-10-17  Simon Josefsson  <jas@extundo.com>
8453
8454         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
8455
8456 2005-10-17  Simon Josefsson  <jas@extundo.com>
8457
8458         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
8459
8460         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
8461
8462 2005-10-17  Bruno Haible  <bruno@clisp.org>
8463
8464         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
8465         that it can also be used in a test.
8466
8467 2005-10-16  Bruno Haible  <bruno@clisp.org>
8468
8469         * gnulib-tool (func_emit_tests_Makefile_am): Also define
8470         TESTS_ENVIRONMENT, so that individual tests can augment it.
8471
8472         * gnulib-tool (func_create_testdir): Use an intermediate target for
8473         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
8474         macros, like $(ALLOCA_H), which cannot be passed through the command
8475         line.
8476
8477 2005-10-15  Simon Josefsson  <jas@extundo.com>
8478
8479         * modules/rijndael-tests: New file.
8480
8481         * modules/rijndael: New file.
8482
8483 2005-10-15  Simon Josefsson  <jas@extundo.com>
8484
8485         * m4/rijndael.m4: New file.
8486
8487 2005-10-15  Simon Josefsson  <jas@extundo.com>
8488
8489         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
8490
8491         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
8492
8493 2005-10-14  Simon Josefsson  <jas@extundo.com>
8494
8495         * tests/test-arcfour.c: New file.
8496
8497         * modules/arcfour, modules/arcfour-tests: New files.
8498
8499 2005-10-14  Simon Josefsson  <jas@extundo.com>
8500
8501         * m4/arcfour.m4: New file.
8502
8503 2005-10-14  Simon Josefsson  <jas@extundo.com>
8504
8505         * lib/arcfour.h, lib/arcfour.c: New files.
8506
8507 2005-10-14  Roland McGrath  <roland@redhat.com>
8508
8509         Import from libc.  [BZ #1331]
8510         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
8511         macro argument.
8512         Reported by Matej Vela <vela@debian.org>.
8513
8514 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
8515
8516         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
8517         include <wchar.h>; no longer needed.
8518
8519 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
8520
8521         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
8522
8523 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
8524         and  Ulrich Drepper  <drepper@redhat.com>
8525
8526         Import from libc.
8527         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
8528         instead of inline stream orientation test and two separate
8529         function calls.  Pay no attention to USE_IN_LIBIO.
8530
8531 2005-10-13  Simon Josefsson  <jas@extundo.com>
8532
8533         * modules/gc-hmac-md5-tests: New file.
8534
8535         * tests/test-gc-hmac-sha1.c: New file.
8536
8537         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
8538
8539         * modules/gc-hmac-md5-tests: New file.
8540
8541         * tests/test-gc-md5.c: New file.
8542
8543         * modules/gc-md5-tests: New file.
8544
8545 2005-10-13  Simon Josefsson  <jas@extundo.com>
8546
8547         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
8548         Move memory allocation outside of loop.
8549
8550 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
8551
8552         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
8553         intermediate directory is in a read-only file system.  Problem
8554         reported by Eric Blake.
8555
8556 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
8557
8558         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
8559
8560 2005-10-12  Simon Josefsson  <jas@extundo.com>
8561
8562         * tests/test-hmac-sha1.c: New file.
8563
8564         * modules/hmac-sha1-tests: New file.
8565
8566         * modules/hmac-sha1: New file.
8567
8568 2005-10-12  Simon Josefsson  <jas@extundo.com>
8569
8570         * modules/gc-sha1: New file.
8571
8572 2005-10-12  Simon Josefsson  <jas@extundo.com>
8573
8574         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
8575
8576         * tests/test-gc-pbkdf2-sha1.c: New file.
8577
8578 2005-10-12  Simon Josefsson  <jas@extundo.com>
8579
8580         * modules/gc-md5, modules/gc-hmac-md5: New files.
8581
8582         * modules/gc (Files): Remove md5, memxor and hmac files.
8583
8584 2005-10-12  Simon Josefsson  <jas@extundo.com>
8585
8586         * m4/gc-pbkdf2-sha1.m4: New file.
8587
8588         * m4/gc-hmac-sha1.m4: New file.
8589
8590         * m4/gc-sha1: New file.
8591
8592         * m4/hmac-sha1.m4: New file.
8593
8594 2005-10-12  Simon Josefsson  <jas@extundo.com>
8595
8596         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
8597
8598         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
8599
8600 2005-10-12  Simon Josefsson  <jas@extundo.com>
8601
8602         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
8603         suggested by Bruno Haible <bruno@clisp.org>.
8604
8605 2005-10-12  Simon Josefsson  <jas@extundo.com>
8606
8607         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
8608
8609 2005-10-12  Simon Josefsson  <jas@extundo.com>
8610
8611         * lib/gc-pbkdf2-sha1.c: New file.
8612
8613         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
8614
8615 2005-10-12  Simon Josefsson  <jas@extundo.com>
8616
8617         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
8618
8619         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
8620
8621 2005-10-12  Simon Josefsson  <jas@extundo.com>
8622
8623         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
8624         GC_USE_HMAC_MD5, respectively.
8625
8626         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
8627         (gc_md5): Fix typo.
8628
8629         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
8630
8631         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
8632
8633         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
8634
8635 2005-10-12  Bruno Haible  <bruno@clisp.org>
8636
8637         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
8638         Reported by Stepan Kasal <kasal@ucw.cz>.
8639
8640 2005-10-11  Simon Josefsson  <jas@extundo.com>
8641
8642         * tests/test-crc.c: New file.
8643
8644         * modules/crc, modules/crc-tests: New files.
8645
8646 2005-10-11  Simon Josefsson  <jas@extundo.com>
8647
8648         * m4/crc.m4: New file.
8649
8650 2005-10-11  Simon Josefsson  <jas@extundo.com>
8651
8652         * lib/gc.h: Add gc_hash and gc_hash_buffer.
8653
8654         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
8655
8656         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
8657
8658 2005-10-11  Simon Josefsson  <jas@extundo.com>
8659
8660         * lib/crc.h, lib/crc.c: New files.
8661
8662         * lib/gc.h (gc_hash_buffer): Add doc.
8663
8664 2005-10-11  Bruno Haible  <bruno@clisp.org>
8665
8666         * modules/c-strcasestr: New file.
8667         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
8668
8669 2005-10-11  Bruno Haible  <bruno@clisp.org>
8670
8671         * modules/c-strcase: New file.
8672         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
8673
8674 2005-10-11  Bruno Haible  <bruno@clisp.org>
8675
8676         * lib/strcasecmp.c: Include limits.h.
8677         (strcasecmp): Avoid integer overflow on exotic platforms.
8678         * lib/strncasecmp.c: Include limits.h.
8679         (strncasecmp): Avoid integer overflow on exotic platforms.
8680         Reported by Paul Eggert.
8681
8682 2005-10-11  Bruno Haible  <bruno@clisp.org>
8683
8684         * lib/c-strcasestr.h: New file, from GNU gettext.
8685         * lib/c-strcasestr.c: New file, from GNU gettext.
8686
8687 2005-10-11  Bruno Haible  <bruno@clisp.org>
8688
8689         * lib/c-strcase.h: New file, from GNU gettext.
8690         * lib/c-strcasecmp.c: New file, from GNU gettext.
8691         * lib/c-strncasecmp.c: New file, from GNU gettext.
8692
8693 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
8694
8695         * modules/mempcpy (License): GPL -> LGPL.
8696         * modules/strchrnul (License): Likewise.
8697         * modules/sysexits (License): Likewise.
8698
8699 2005-10-08  Simon Josefsson  <jas@extundo.com>
8700
8701         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
8702
8703 2005-10-07  Simon Josefsson  <jas@extundo.com>
8704
8705         * m4/memxor.m4: Remove gl_C_RESTRICT call.
8706
8707 2005-10-06  Simon Josefsson  <jas@extundo.com>
8708
8709         * tests/test-hmac-md5.c: New file.
8710
8711         * modules/hmac-md5-tests: New file.
8712
8713         * modules/hmac-md5: New file.
8714
8715 2005-10-06  Simon Josefsson  <jas@extundo.com>
8716
8717         * m4/hmac-md5.m4: New file.
8718
8719         * m4/memxor.m4: Require gl_C_RESTRICT.
8720
8721 2005-10-06  Simon Josefsson  <jas@extundo.com>
8722
8723         * lib/memxor.c (memxor): Avoid casts and warnings.
8724
8725 2005-10-06  Simon Josefsson  <jas@extundo.com>
8726
8727         * lib/hmac-md5.c: New file.
8728
8729         * lib/hmac.h: New file.
8730
8731 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
8732
8733         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
8734         promotes to int, not unsigned int, to catch the AIX 5.3
8735         compiler bug.
8736
8737 2005-10-05  Simon Josefsson  <jas@extundo.com>
8738
8739         * modules/memxor: New file.
8740
8741         * modules/iconv (Files): Move config.rpath to havelib, it is used
8742         there.
8743
8744         * modules/havelib (Files): Add config.rpath.
8745
8746 2005-10-05  Simon Josefsson  <jas@extundo.com>
8747
8748         * m4/memxor.m4: New file.
8749
8750 2005-10-05  Simon Josefsson  <jas@extundo.com>
8751
8752         * lib/memxor.c (memxor): Fix compiler error.
8753
8754         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
8755         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
8756
8757         * lib/memxor.h, lib/memxor.c: New files.
8758
8759         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
8760         we assume all systems have it, suggested by Jim Meyering
8761         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
8762         any systems lack sys/socket.h; mingw32 is known to lack it, but we
8763         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
8764         same reasons.
8765
8766 2005-10-05  Simon Josefsson  <jas@extundo.com>
8767
8768         * config/srclist.txt: Add glibc bug 1423 for md5.h.
8769
8770 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
8771
8772         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
8773         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
8774         needed, since the source code now assumes these .h files.
8775
8776 2005-10-05  Derek Price  <derek@ximbiot.com>
8777
8778         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
8779
8780 2005-10-05  Bruno Haible  <bruno@clisp.org>
8781
8782         * modules/stdint (License): Change to LGPL.
8783
8784 2005-10-04  Simon Josefsson  <jas@extundo.com>
8785
8786         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
8787         D. Baushke" <mdb@gnu.org>.
8788
8789 2005-10-04  Bruno Haible  <bruno@clisp.org>
8790
8791         * lib/verify.h (verify_true): Provide alternative definition for C++.
8792
8793 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
8794
8795         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
8796         (SSIZE_MAX): New macro, if not already defined.
8797         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
8798         than 2 GiB.
8799
8800 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8801
8802         Sync from coreutils.
8803         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
8804         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
8805         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
8806         ULLONG_MAX doesn't work with 2.7.2.1.
8807
8808 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8809
8810         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
8811         From Ben Pfaff.
8812
8813         * modules/exclude (Depends-on): Depend on verify.
8814         * modules/strtoimax (Depends-on): Likewise.
8815         * modules/utimecmp (Depends-on): Likewise.
8816
8817 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8818
8819         * lib/exclude.c: Include verify.h.
8820         (verify): Remove.  All callers changed to use verify.h's version.
8821         * lib/strtoimax.c: Likewise.
8822         * lib/utimecmp.c: Likewis.e
8823
8824         Sync from coreutils.
8825         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
8826         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
8827         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
8828         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
8829         bother returning ENOSYS if settimeofday or stime fails; just let
8830         them return whatever errno they want to return.
8831         * lib/utimens.c: Include unistd.h, for dup2.
8832         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
8833         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
8834
8835 2005-10-02  Jim Meyering  <jim@meyering.net>
8836
8837         Sync from coreutils.
8838         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
8839         from glibc-2.2.5 that fails for read-only files.
8840
8841 2005-10-02  Jim Meyering  <jim@meyering.net>
8842
8843         Sync from coreutils.
8844         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
8845         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
8846         `#if HAVE_CONFIG_H'.
8847         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
8848         Remove AT_FDCWD test.
8849         Do not consume the fd unless successful.
8850         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
8851         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
8852         block, so that we don't even try to compile it if settimeofday is
8853         available.  This works around a compilation failure on OSF1 V5.1,
8854         due to stime requiring a `long int*' while tv_sec is `int'.
8855
8856 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
8857
8858         Sync from coreutils.
8859         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
8860         against `yes', rather than just testing for nonempty.
8861
8862 2005-10-01  Simon Josefsson  <jas@extundo.com>
8863
8864         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
8865         and Darwin.
8866
8867         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
8868         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
8869         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
8870         freeaddrinfo and gai_strerror are declared by the POSIX headers.
8871         Check if struct addrinfo is declared.
8872
8873 2005-10-01  Simon Josefsson  <jas@extundo.com>
8874
8875         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
8876         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
8877         AI_* and EAI_* definitions.  Protect function declarations.
8878
8879 2005-10-01  Jim Meyering  <jim@meyering.net>
8880
8881         Sync from coreutils.
8882
8883         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
8884         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
8885         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
8886         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8887         in the inet and nsl libraries.  Required on Solaris 5.7.
8888
8889 2005-10-01  Jim Meyering  <jim@meyering.net>
8890
8891         Sync from coreutils.
8892         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8893         in the inet and nsl libraries.  Required on Solaris 5.7.
8894
8895 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
8896
8897         * lib/getdelim.c (getdelim): Remove unused variables.
8898
8899 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
8900
8901         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
8902         so that the code works even with ancient cpp.  Portability problem
8903         with GCC 2.7.2.1 reported by Thomas M.Ott.
8904
8905 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
8906
8907         * modules/regex (Depends-on): Add strcase.
8908
8909         * modules/gethostname (Licence): Change from GPL to LGPL, since
8910         gethostname.c is a trivial implementation of a standard library
8911         function.
8912         * modules/poll (License): Change from GPL to LGPL, since it's
8913         derived from LGPL code.
8914
8915 2005-09-27  Jim Meyering  <jim@meyering.net>
8916
8917         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
8918         HAVE_CONFIG_H.
8919
8920         * lib/intprops.h (signed_type_or_expr__): Define.
8921         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
8922         for unsigned types.
8923
8924 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
8925
8926         * lib/verify.h (verify_expr): Remove, replacing with:
8927         (verify_true): New macro that returns true instead of void.
8928         (verify_type__): Remove.
8929         (verify): Use verify_true rather than verify_type__.
8930
8931 2005-09-26  Bruno Haible  <bruno@clisp.org>
8932
8933         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
8934         is necessary.
8935         (lib_SOURCES): Remove mbchar.c.
8936         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
8937         (Files): Add m4/mbrtowc.m4.
8938         * modules/mbiter: Likewise.
8939         * modules/mbuiter: Likewise.
8940
8941 2005-09-26  Bruno Haible  <bruno@clisp.org>
8942
8943         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
8944         compile mbchar.c if they are not both present.
8945         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
8946         * m4/mbiter.m4 (gl_MBITER): Likewise.
8947         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
8948         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
8949         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
8950
8951 2005-09-25  Jim Meyering  <jim@meyering.net>
8952
8953         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
8954         also uses socklen_t.
8955
8956 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
8957
8958         * lib/utimens.c (ENOSYS): Define if not already defined.
8959         (futimens): Support having a null PATH if the file descriptor
8960         is nonnegative.
8961
8962         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
8963         Remove.
8964         (__attribute): Define to empty unless GCC 3.1 or later.
8965         This works around a core dump on OpenBSD 3.4, which has GCC
8966         2.95.3, which dumps core when given __attribute__(()).  It also
8967         simplifies other tests, since we really don't want to bother with
8968         worrying about which ancient version of GCC supported what.
8969         Original problem reported by Yoann Vandoorselaere, with part of
8970         the fix suggested by Derek Price.
8971
8972 2005-09-24  Jim Meyering  <jim@meyering.net>
8973
8974         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
8975         so we can once again use a positive bitfield width of 1 -- now we
8976         don't have to explain why we were using a bitfield width of 2.
8977
8978 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8979
8980         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
8981         and similarly for the other external symbols.  Problem reported
8982         by James Gallager.
8983
8984         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
8985         bug reported by Jim Meyering.
8986
8987         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
8988         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
8989         not needed, since socklen is a prerequisite module.
8990
8991 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8992
8993         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
8994         Problem reported by Eric Blake.
8995         (getaddrinfo): Initialize se so that it's not garbage.
8996         Redo internal storage allocation so that it doesn't make unportable
8997         assumptions about alignment.
8998         Fix a memory leak.
8999
9000         * lib/utimens.c (futimens): Use futimesat if available.
9001         Prefer it to futimes since it doesn't have the futimes bug.
9002
9003         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
9004         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
9005         Instead, declare a function that returns a pointer to an array,
9006         and use verify_type__ to declare the size of the array.
9007         Problem and germ of a solution reported by Bruno Haible.
9008         (verify_type__): Use 2, not 1, for bitfield size, to avoid
9009         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
9010
9011 2005-09-23  Jim Meyering  <jim@meyering.net>
9012
9013         Sync from coreutils.
9014         Correct build failure (socklen_t not defined) on at least
9015         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
9016         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
9017
9018 2005-09-23  Jim Meyering  <jim@meyering.net>
9019
9020         * modules/getaddrinfo (Depends-on): Add socklen.
9021
9022 2005-09-23  Bruno Haible  <bruno@clisp.org>
9023
9024         * tests/test-verify.c: New file.
9025
9026 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9027
9028         Sync from coreutils.
9029
9030         * modules/argmatch (Depends-on): Add verify.
9031         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
9032         unistd-safer.
9033         * modules/save-cwd (Depends-on): Likewise.
9034
9035         * modules/openat (Files): Add lib/openat-die.c.
9036         (Depends-on): Remove error, exitfail.
9037         Add dirname.
9038
9039         * modules/verify: New file.
9040         * MODULES.html.sh (Diagnostics <assert.h>): New section,
9041         with "verify" module.
9042
9043 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9044
9045         Sync from coreutils.
9046
9047         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
9048         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
9049         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
9050         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
9051         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
9052         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
9053         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
9054         Don't bother checking for string.h, stdlib.h, unistd.h.
9055         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
9056         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
9057         module's job.
9058         * m4/jm-macros.m4 (gl_MACROS): Likewise.
9059         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
9060
9061         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
9062         (gl_GETDATE): Use it.
9063
9064         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
9065
9066 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9067
9068         Sync from coreutils.
9069
9070         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
9071         stat-time.h.
9072         * lib/argmatch.h: Include verify.h
9073         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
9074         (ARGMATCH_ASSERT): Remove; unused.
9075         * lib/canonicalize.c: Assume STDC_HEADERS.
9076         * lib/exclude.c: Include "strcase.h".
9077         * lib/regex_internal.h [!defined _LIBC]: Likewise.
9078         * lib/getusershell.c: Include stdio--.h rather than stdio.h
9079         and stdio-safer.h.
9080         (getusershell): Call fopen, not fopen_safer.
9081         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
9082         Do not include unistd-safer.h.
9083         (save_cwd): Don't call fd_safer; no longer needed
9084         now that we include fcntl--.h.
9085
9086         * lib/getdate.y (relative_time): New type.
9087         (RELATIVE_TIME_0): New constant.
9088         (parser_control): Use relative_time instead of doing it ourselves.
9089         (%union): Add new relative_time rel member.
9090         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
9091         Now typeless.
9092         (relunit, relunit_snumber): Now of type rel.
9093         (zone, rel, relunit, get_date): Adjust to above changes.
9094
9095         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
9096         Do not include unistd-safer.h.
9097         (getloadavg): Don't call fd_safer; no longer needed
9098         now that we include fcntl--.h.
9099
9100         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
9101         (make_dir_parents): Treat ENOSYS like EEXIST.
9102
9103         Improve quality of diagnostics on restore_cwd failure.
9104         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
9105         (make_dir_parents): Last arg is now int * (for errno), not bool *.
9106         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
9107         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
9108         each time through the loop.  Do not diagnose restore_cwd failure;
9109         that is the caller's job (and perhaps the caller does not care).
9110
9111         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
9112         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
9113         If the file already exists but is not a directory, don't bother
9114         to try to make its parents.
9115         Close potential file descriptor leak if we can't chdir("/") (!).
9116         Don't always return true if chdir($PWD) fails; return true only
9117         if the requested action was done successfully (except for the
9118         chdir($PWD)).
9119         Don't log final directory unless we actually made it.
9120         Refactor to avoid duplicate code to fix up permissions.
9121         Don't attempt to fix up parent permissions if chdir($PWD) fails.
9122
9123         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
9124         to make it a bit faster and (I hope) clearer.
9125         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
9126         Fix bug in formats like %2N.
9127
9128         * lib/verify.h: New file.
9129
9130 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9131
9132         Sync from coreutils.
9133         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
9134
9135 2005-09-22  Jim Meyering  <jim@meyering.net>
9136
9137         Sync from coreutils.
9138
9139         * m4/lstat.m4 (gl_FUNC_LSTAT):
9140         Use AC_LIBSOURCES to require lstat.c and lstat.h.
9141         Remove obsolete comment.
9142         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
9143         * m4/xstrtod.m4: Likewise.
9144
9145         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
9146
9147 2005-09-22  Jim Meyering  <jim@meyering.net>
9148
9149         Sync from coreutils.
9150
9151         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
9152
9153         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
9154         the .tm_year member, since otherwise gcc-4.0 would now warn about
9155         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
9156
9157         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
9158         order to avoid an unsuppressible warning from gcc on 64-bit systems.
9159
9160         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
9161         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
9162         when run in a time zone for which daylight savings time is in effect
9163         for the starting date.
9164
9165         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
9166         stop us from restricting permissions of just-created absolute-named
9167         directories.
9168         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
9169         to restore initial working directory.
9170         * lib/mkdir-p.c (make_dir_parents): New parameter:
9171         different_working_dir, to tell caller if/when we change the working
9172         directory and are unable to return to the initial one.
9173         * lib/mkdir-p.h (make_dir_parents): Update prototype.
9174         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
9175         `return false'.  This fixes a bug introduced on 2004-07-30.
9176
9177         * lib/openat.c (fdopendir): Be sure to close the supplied
9178         file descriptor before returning.  This makes our replacement
9179         implementation a little closer to Solaris's, where fdopendir
9180         ties the file descriptor to the returned DIR* pointer.
9181         * lib/openat.c (unlinkat): New function.
9182         * lib/openat.h (unlinkat): Add prototype.
9183         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
9184         (openat_restore_fail): Rename from openat_restore_die.
9185         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
9186
9187         Provide an alternative to exiting immediately upon save_cwd or
9188         restore_cwd failure.  Now, an application can arrange e.g.,
9189         to perform a longjump in that case.
9190         * lib/openat.c: Include dirname.h.
9191         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
9192         (rpl_openat, fdopendir, fstatat): Call openat_save_die
9193         and openat_restore_die rather than calling error directly.
9194         Don't include "error.h" or "exitfail.h"; they're no longer needed.
9195
9196         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
9197         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
9198         define.
9199
9200         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
9201         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
9202                             int utc, int nanoseconds);
9203         Background:
9204         date should not have to allocate a megabyte of virtual memory to
9205         handle a format argument like +%1048575T.  When implemented with
9206         strftime, it must allocate such a buffer, use strftime to fill it
9207         in, print it, then free it.
9208         With fprintftime, it simply prints everything and exits.
9209         With no need for memory allocation, that's one fewer way to fail.
9210         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
9211         optional field width, not before, so we accept %9:z, not %:9z.
9212         (my_strftime): Be sure to use L_('x') for literals.
9213
9214         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
9215         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
9216         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
9217         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
9218         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
9219         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
9220         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
9221         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
9222         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
9223         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
9224         * lib/xgethostname.c, lib/xreadlink.c:
9225         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
9226
9227         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
9228         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
9229         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
9230         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
9231         and don't include <sys/file.h>).
9232
9233 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
9234
9235         Sync from coreutils.
9236
9237         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
9238         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
9239         [!LDAV_DONE]: Avoid unused variable warning.
9240
9241 2005-09-21  Bruno Haible  <bruno@clisp.org>
9242
9243         * lib/unicodeio.h (unicode_to_mb): New declaration.
9244
9245 2005-09-20  Derek Price  <derek@ximbiot.com>
9246
9247         * lib/getaddrinfo.c: Don't include <netdb.h> included from
9248         getaddrinfo.h.
9249
9250 2005-09-20  Bruno Haible  <bruno@clisp.org>
9251
9252         * gnulib-tool: Remove trailing slashes from the values specified for
9253         --source-base, --m4-base, --tests-base, --aux-dir.
9254         Suggested by Simon Josefsson <jas@extundo.com>.
9255
9256 2005-09-20  Bruno Haible  <bruno@clisp.org>
9257
9258         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
9259         func_modules_to_filelist, func_import, func_create_testdir): Make all
9260         sorting results locale-independent, so that gnulib-cache.m4 doesn't
9261         change when gnulib-tool is invoked in a different locale.
9262
9263 2005-09-19  Simon Josefsson  <jas@extundo.com>
9264
9265         * m4/socklen.m4: Fix typo.
9266
9267 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9268
9269         Use a consistent style for including <config.h>.
9270         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
9271         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
9272         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
9273         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
9274         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
9275         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
9276         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
9277         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
9278         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
9279         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
9280         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
9281         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
9282         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
9283         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
9284         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
9285         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
9286         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
9287         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
9288         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
9289         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
9290         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
9291         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
9292         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
9293         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
9294         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
9295         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
9296         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
9297         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
9298         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
9299         lib/xstrtoumax.c, lib/yesno.c:
9300         Standardize inclusion of config.h.
9301         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
9302         lib/inttostr.h:  Removed inclusion of config.h from header files.
9303         * lib/inttostr.c:  Adjusted in-tree users.
9304         * lib/timespec.h: Remove superfluous warning to include config.h.
9305         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
9306         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
9307         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
9308         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
9309         config.h with HAVE_CONFIG_H.
9310
9311 2005-09-19  Jim Meyering  <jim@meyering.net>
9312
9313         * modules/pathmax (License): Change to LGPL.
9314
9315 2005-09-19  Derek Price  <derek@ximbiot.com>
9316
9317         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
9318
9319 2005-09-19  Bruno Haible  <bruno@clisp.org>
9320
9321         * gnulib-tool (import): Provide default for --tests-base.
9322
9323 2005-09-19  Bruno Haible  <bruno@clisp.org>
9324
9325         * doc/quote.texi: New file, extracted from gnulib.texi.
9326         * doc/ctime.texi: New file, extracted from gnulib.texi.
9327         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
9328         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
9329         * doc/gnulib.texi: Include them.
9330
9331 2005-09-18  Bruno Haible  <bruno@clisp.org>
9332
9333         Portability fix.
9334         * gnulib-tool (func_readlink): New function.
9335         (func_ln_if_changed): Use it.
9336
9337 2005-09-18  Bruno Haible  <bruno@clisp.org>
9338
9339         * gnulib-tool: Support --with-tests also with --import.
9340         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
9341         (func_import): Use variables $testsbase and $inctests. Emit a
9342         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
9343         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
9344         SUBDIRS += $testsdir.
9345         (func_create_testdir): Update.
9346
9347 2005-09-18  Bruno Haible  <bruno@clisp.org>
9348
9349         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
9350         instead of $dry_run.
9351         (func_cp_if_changed, func_mv_if_changed): Remove functions.
9352         (func_ln_if_changed): Don't handle dry-run here.
9353         (func_import): In dry-run mode, detect more precisely which actions
9354         would be performed, and don't use "...ing" verbs.
9355
9356 2005-09-18  Bruno Haible  <bruno@clisp.org>
9357
9358         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
9359         (func_import): Use join on two temporary files instead of three nested
9360         loops, in order to determine which files are new or old.
9361
9362 2005-09-18  Bruno Haible  <bruno@clisp.org>
9363
9364         * gnulib-tool (func_import): Comment out code that spits out the
9365         new files with --dry-run.
9366
9367 2005-09-18  Bruno Haible  <bruno@clisp.org>
9368
9369         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
9370
9371 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9372
9373         * lib/stat-time.h: New file.
9374         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
9375         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
9376         in a different way.
9377         (timespec_cmp): New function.
9378         * lib/utimecmp.c: Include stat-time.h.
9379         (SYSCALL_RESOLUTION): Depend on whether various struct stat
9380         members exist, not on the obsolescent ST_MTIM_NSEC.
9381         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
9382
9383 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9384
9385         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
9386
9387 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9388
9389         * MODULES.html.sh (File system functions): Add stat-time.
9390         * modules/stat-time: New file.
9391         * modules/timespec (Files): Remove m4/st_mtim.m4; this
9392         is now done in a different way, by the stat-time module.
9393         * modules/utimecmp (Depends-on): Add stat-time.
9394
9395 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
9396
9397         * m4/st_mtim.m4: Remove.  Superseded by...
9398         * m4/stat-time.m4: New file.
9399         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
9400         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
9401
9402 2005-09-15  Derek Price  <derek@ximbiot.com>
9403
9404         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
9405
9406 2005-09-15  Derek Price  <derek@ximbiot.com>
9407
9408         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
9409         * lib/regex_internal.c: Ditto, using this...
9410         (__GNUC_PREREQ): ...new macro.
9411         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
9412         using...
9413         (__GNUC_PREREQ): ...this new macro.
9414
9415         * lib/strstr.h: Include string.h. Define strstr as a macro here.
9416
9417 2005-09-15  Derek Price  <derek@ximbiot.com>
9418             Paul Eggert  <eggert@cs.ucla.edu>
9419
9420         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
9421         changes, consolidating in...
9422         * lib/regex_internal.h: ...this file.
9423
9424 2005-09-13  Jim Meyering  <jim@meyering.net>
9425
9426         * lib/canon-host.c: Filter through gnu indent and reword comments
9427         slightly.
9428         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
9429
9430 2005-09-13  Derek Price  <derek@ximbiot.com>
9431
9432         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
9433         failure.
9434         Reported by Jim Meyering  <jim@meyering.net>.
9435
9436 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9437
9438         * lib/base64.c: Typo.
9439         (base64_encode): Put b64str in initialized data section.
9440
9441 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
9442
9443         Merge glibc and coreutils changes into gnulib, plus a few
9444         extra fixes.
9445         * lib/md5.c: Use #error rather than a string.
9446         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
9447         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
9448         (__attribute__): Define to empty for non recent-GCC.
9449         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
9450         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
9451         Renamed from their non-__ counterparts, with new macros replacing
9452         them if not _LIBC.  Add __THROW attribute.
9453         (rol): Remove.
9454         (struct md5_ctx): Align buffer if using GCC.
9455         * lib/sha1.h (struct sha1_ctx): Likewise.
9456         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
9457         The old name was backwards.
9458         (NOTSWAP): Remove; not used.
9459         (rol): New macro, moved here from md5.h.
9460         (sha1_process_block): Remove a FIXME that doesn't make sense.
9461
9462 2005-09-12  Derek Price  <derek@ximbiot.com>
9463
9464         Return usable errors from canon-host.
9465         * lib/canon-host.h: New file.
9466         * lib/canon-host.c (canon_host): Wrap...
9467         (canon_host_r): ...this new function, which now relies exclusively on
9468         getaddrinfo.
9469         (ch_strerror): New function.
9470         (last_cherror): New global.
9471         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
9472         interface.
9473         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
9474         void *.
9475         (freeaddrinfo): Free ai->ai_canonname when set.
9476
9477 2005-09-12  Derek Price  <derek@ximbiot.com>
9478
9479         Make canon-host require getaddrinfo.
9480         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
9481         AC_LIBSOURCE canon-host.h.  Call...
9482         (gl_PREREQ_CANON_HOST): ...this new function, which requires
9483         gl_GETADDRINFO.
9484         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
9485
9486 2005-09-12  Derek Price  <derek@ximbiot.com>
9487
9488         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
9489         LGPL.
9490         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
9491
9492 2005-09-12  Derek Price  <derek@ximbiot.com>
9493
9494         * lib/gai_strerror.c: Include config.h when available.  Include
9495         getaddrinfo.h before other headers to test interface.
9496         Reported by Larry Jones <lawrence.jones@ugs.com>.
9497
9498 2005-09-12  Derek Price  <derek@ximbiot.com>
9499             Paul Eggert  <eggert@cs.ucla.edu>
9500
9501         * modules/glob (Files): Add glob-libc.h.
9502
9503 2005-09-12  Derek Price  <derek@ximbiot.com>
9504             Paul Eggert  <eggert@cs.ucla.edu>
9505
9506         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
9507         glob_.h, glob-libc.h.
9508         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
9509
9510 2005-09-12  Derek Price  <derek@ximbiot.com>
9511             Paul Eggert  <eggert@cs.ucla.edu>
9512
9513         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
9514         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
9515         protecting things that should be done only in gnulib contexts.
9516         * lib/glob_.h: New file, containing only the glob things needed for
9517         gnulib.
9518         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
9519         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
9520         (glob, globfree, glob_pattern_p): Now defined simply in terms of
9521         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
9522         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
9523         and to respect the namespace rules better.
9524
9525 2005-09-08  Simon Josefsson  <jas@extundo.com>
9526
9527         * modules/socklen: New file.
9528
9529 2005-09-08  Simon Josefsson  <jas@extundo.com>
9530
9531         * m4/socklen.m4: New file.
9532
9533 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9534
9535         * modules/utimens (Files): Add m4/utimbuf.m4, since
9536         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
9537         Reported by Sergey Poznyakoff.
9538
9539 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9540
9541         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
9542         definitions, since that's the preferred style in glibc.
9543         Fix a minor spacing issue, and update copyright notice to match
9544         glibc's.
9545
9546 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9547
9548         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
9549
9550 2005-09-06  Simon Josefsson  <jas@extundo.com>
9551
9552         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
9553         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
9554
9555 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9556
9557         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
9558         warning.
9559
9560 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9561
9562         * config/srclist.txt: Add glibc bug 1302.
9563
9564 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
9565
9566         Change bitset word type from unsigned int to unsigned long int,
9567         as this has better performance on typical 64-bit hosts.
9568         Port bitset code to hosts with unusual word sizes.
9569         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
9570         (build_collating_symbol):
9571         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
9572         argument is a bitset.  This is merely a style issue, but it makes
9573         it clearer that an entire array is expected.
9574         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
9575         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
9576         Port to the case where bitset_word is not the same as unsigned int.
9577         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
9578         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
9579         Likewise.
9580         * lib/regexec.c (check_dst_limits_calc_pos_1,
9581         check_subexp_matching_top):
9582         (build_trtable, group_nodes_into_DFAstates):
9583         Likewise.
9584         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
9585         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
9586         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
9587         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
9588         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
9589         * lib/regcomp.c (optimize_subexps, lower_subexp):
9590         Work even if bitset_word has holes in its bitwise representation.
9591         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
9592         * lib/regexec.c (check_dst_limits_calc_pos_1,
9593         check_subexp_matching_top):
9594         Likewise.
9595         * lib/regex_internal.c (re_string_reconstruct):
9596         Don't assume UCHAR_MAX == 255.
9597         * lib/regex_internal.h (bitset_set_all): Likewise.
9598         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
9599         All uses changed.
9600         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
9601         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
9602         All uses changed.
9603         (BITSET_WORD_MAX): New macro.
9604         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
9605         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
9606         (bitset_empty, bitset_copy):
9607         Prefer sizeof (bitset) to multiplying it out ourselves.
9608         (bitset_not_merge): Remove; unused.
9609         (bitset_contain): Return bool, not unsigned int with one bit on.
9610         All callers changed.
9611         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
9612         alignment than re_node_set; do this by defining a new internal
9613         type struct dests_alloc and using it to allocate memory.
9614
9615 2005-09-05  Bruno Haible  <bruno@clisp.org>
9616
9617         * gnulib-tool (func_import): Fix comparison in handling of symbolic
9618         links.
9619
9620 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
9621
9622         * modules/size_max (Makefile.am): Add size_max.h
9623
9624 2005-09-04  Derek Price  <derek@ximbiot.com>
9625
9626         * gnulib-tool (func_import): Fix reversed $symbolic logic.
9627
9628 2005-09-03  Simon Josefsson  <jas@extundo.com>
9629
9630         * gnulib-tool: Fix typo.
9631
9632 2005-09-03  Simon Josefsson  <jas@extundo.com>
9633
9634         * config/srclist.txt: Add glibc bug 1293.
9635
9636 2005-09-03  Derek Price  <derek@ximbiot.com>
9637
9638         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
9639         From Larry Jones <lawrence.jones@ugs.com>.
9640
9641 2005-09-02  Simon Josefsson  <jas@extundo.com>
9642
9643         * modules/socklen: New file.
9644
9645 2005-09-02  Simon Josefsson  <jas@extundo.com>
9646
9647         * modules/havelib: New module.
9648
9649         * modules/gettext, modules/iconv, modules/lock, modules/readline:
9650         Use havelib.
9651
9652 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
9653
9654         Check for arithmetic overflow when calculating sizes, to prevent
9655         some buffer-overflow issues.  These patches are conservative, in the
9656         sense that when I couldn't determine whether an overflow was possible,
9657         I inserted a run-time check.
9658         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
9659         macros.
9660         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
9661         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
9662         (re_xnrealloc, re_x2nrealloc): New inline functions.
9663         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
9664         parse_bracket_exp):
9665         (build_equiv_class, build_charclass): Check for arithmetic overflow
9666         in size expression calculations.
9667         * lib/regex_internal.c (re_string_realloc_buffers):
9668         (build_wcs_upper_buffer, re_node_set_add_intersect):
9669         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
9670         (re_dfa_add_node, register_state): Likewise.
9671         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
9672         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
9673         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
9674         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
9675
9676 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
9677
9678         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
9679         m4/ulonglong.m4.  Problem reported by Martin Lambers.
9680
9681 2005-09-02  Bruno Haible  <bruno@clisp.org>
9682
9683         Support for lib vs. lib64 distinction on biarch platforms.
9684         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
9685         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
9686         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
9687
9688 2005-09-02  Bruno Haible  <bruno@clisp.org>
9689
9690         * gnulib-tool (import): In the other first-use case, provide defaults
9691         as well.
9692
9693 2005-09-02  Bruno Haible  <bruno@clisp.org>
9694
9695         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
9696         patches not yet found in the latest gettext release.
9697
9698 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9699
9700         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
9701         to avoid a collision with bits/local_lim.h in glibc.
9702         All uses changed.  Problem reported by Dmitry V. Levin in
9703         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
9704
9705         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
9706         bugs in int versus size_t comparisons.
9707         (re_string_context_at): Fix bug where the code assumed that
9708         Idx is signed.
9709
9710         Use bool where appropriate.
9711         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
9712         All callers changed.
9713         (calc_eclosure_iter): Likewise, for ROOT arg.
9714         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
9715         (build_charclass_op): Likewise, for NON_MATCH arg.
9716         * lib/regex_internal.c (re_string_allocate, re_string_construct):
9717         (re_string_construct_common): Likewise, for ICASE arg.
9718         * lib/regexec.c (re_search_2_stub, re_search_stub):
9719         Likewise, for RET_LEN arg.
9720         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
9721         (set_regs): Likewise, for FL_BACKTRACK arg.
9722         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
9723         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
9724         (calc_eclosure_iter, parse_bracket_exp):
9725         Use bool for internal variables that are booleans.
9726         * lib/regexec.c (re_search_internal, check_matching,
9727         proceed_next_node):
9728         (set_regs, build_sifted_states, sift_states_bkref):
9729         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
9730         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
9731         (find_collation_sequence_value):
9732         Likewise.
9733         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
9734         (re_node_set_compare):
9735         Return bool, not int. All callers changed.
9736         * lib/regexec.c (check_halt_node_context, check_dst_limits):
9737         (build_trtable, check_node_accept): Likewise.
9738         * lib/regex_internal.h: Include stdbool.h.
9739
9740         Fix bugs uncovered when converting to bool.
9741         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
9742         failure instead of charging ahead blindly.
9743         * lib/regex_internal.c (register_state): Likewise.
9744         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
9745         for freeing internal storage.
9746         (group_nodes_into_DFA_states): Use unsigned int, not int, for
9747         bitset pieces used as boolean, to avoid undefined behavior
9748         on hosts that do int overflow checking.
9749
9750 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9751
9752         * config/srclist.txt: Add glibc bugs 1285-1287.
9753
9754 2005-09-01  Jim Meyering  <jim@meyering.net>
9755
9756         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
9757         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
9758         Require gl_STAT_MACROS, too.
9759
9760 2005-09-01  Bruno Haible  <bruno@clisp.org>
9761
9762         * gnulib-tool (import): In the first-use case, provide defaults.
9763
9764 2005-09-01  Bruno Haible  <bruno@clisp.org>
9765
9766         * gnulib-tool (func_import): Remove the .tmp files.
9767
9768 2005-09-01  Bruno Haible  <bruno@clisp.org>
9769
9770         * gnulib-tool (func_import): Fix handling of symbolic links.
9771
9772 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9773
9774         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
9775         old glibc regex code mishandles strings longer than 2**31 bytes.
9776         This patch fixes this when the regex code is used in gnulib
9777         (i.e., outside glibc).
9778
9779         This patch should not affect the use of the regex code inside
9780         glibc.  No doubt this problem also needs to be handled for glibc
9781         as well, but the result will be an incompatible change to the
9782         glibc ABI, and the old ABI will have to be supported too.  That
9783         can be the the subject for another patch.
9784
9785         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
9786         governing whether the rest of this patch is active.  By default,
9787         the macro is disabled and the patch has no effect.
9788         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
9789         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
9790         (struct re_pattern_buffer, re_search, re_search_2, re_match):
9791         (re_match_2, re_set_registers): Use the new types.
9792         * lib/regex_internal.h (Idx, re_hashval_t): New types.
9793         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
9794         New macros.
9795         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
9796         (re_string_context_at, bin_tree_t, re_dfastate_t):
9797         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
9798         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
9799         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
9800         (re_string_char_size_at, re_string_wchar_at):
9801         (re_string_elem_size_at):
9802         Use the new types and macros to port to 64-bit hosts.
9803         Use unsigned types for internal values, so that the code
9804         mostly works even for arrays larger than SSIZE_MAX.
9805         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
9806         (search_duplicated_node, calc_eclosure_iter, fetch_number):
9807         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
9808         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
9809         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
9810         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
9811         (calc_inveclosure, parse_dup_op, build_range_exp):
9812         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
9813         (fetch_number, create_token_tree, mark_opt_subexp):
9814         Likewise.
9815         * lib/regex_internal.c (re_string_construct_common,
9816         create_ci_newstate):
9817         (create_cd_newstate, re_string_allocate, re_string_construct):
9818         (re_string_realloc_buffers, build_wcs_upper_buffer):
9819         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
9820         (re_string_reconstruct, re_string_peek_byte_case):
9821         (re_string_fetch_byte_case, re_string_context_at):
9822         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
9823         (re_node_set_init_copy, re_node_set_add_intersect):
9824         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
9825         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
9826         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
9827         (re_acquire_state, re_acquire_state_context, register_state):
9828         Likewise.
9829         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
9830         search_cur_bkref_entry):
9831         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
9832         (re_search_internal, re_search_2_stub, re_search_stub)
9833         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
9834         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
9835         (update_cur_sifted_state, check_dst_limits):
9836         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
9837         (check_subexp_limits, sift_states_bkref, merge_state_array):
9838         (check_subexp_matching_top, get_subexp, get_subexp_sub):
9839         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
9840         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
9841         (expand_bkref_cache, check_node_accept_bytes):
9842         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
9843         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
9844         (acquire_init_state_context, check_halt_node_context):
9845         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
9846         (sift_states_backward, clean_state_log_if_needed):
9847         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
9848         (find_recover_state, transit_state_sb, transit_state_mb):
9849         (transit_state_bkref, build_trtable, match_ctx_clean):
9850         Likewise.
9851         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
9852         to work around an assumption that REG_MISSING is negative.
9853
9854         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
9855         (seek_collating_symbol_entry) [defined _LIBC]:
9856         (lookup_collation_sequence_value) [defined _LIBC]:
9857         (build_range_exp, build_collating_symbol) [defined _LIBC]:
9858         Use prototypes rather than old-style function definitions.
9859         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
9860         (transit_state_sb) [0]:
9861         (find_collation_sequence_value) [defined _LIBC]: Likewise.
9862
9863         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
9864         rm_eo.
9865
9866         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
9867         (optimize_subexps, lower_subexp):
9868         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
9869         since the signed shift might overflow.  Use 1u<<31 instead.
9870         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
9871         Likewise.
9872         * lib/regexec.c (check_dst_limits_calc_pos_1,
9873         check_subexp_matching_top): Likewise.
9874
9875         * lib/regcomp.c (optimize_subexps, lower_subexp):
9876         Use CHAR_BIT rather than 8, for clarity.
9877         * lib/regexec.c (check_dst_limits_calc_pos_1):
9878         (check_subexp_matching_top): Likewise.
9879         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
9880         have to worry about portability issues when shifting it left.
9881         Remove no-longer-needed test for table_size > 0.
9882         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
9883         in a word, as the resulting behavior is undefined.
9884         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
9885         in one case, a <= should have been an <, and in another case the
9886         whole test was missing.
9887         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
9888         the standard name CHAR_BIT.
9889         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
9890         this is not true on one's complement and signed-magnitude hosts.
9891
9892         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
9893         next_last_offset.
9894         (struct re_dfa_t): Remove unused member states_alloc.
9895         * lib/regcomp.c (init_dfa): Don't initialize unused members.
9896
9897 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9898
9899         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
9900         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
9901         and large-file glibc and in 32-bit large-file Solaris.
9902
9903 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9904
9905         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
9906         lengths fit in regoff_t; this isn't true if regoff_t is the same
9907         width as size_t.
9908         * lib/regex.c (re_search_internal): 5th arg is LAST_START
9909         (= START + RANGE) instead of RANGE.  This avoids overflow
9910         problems when regoff_t is the same width as size_t.
9911         All callers changed.
9912         (re_search_2_stub): Check for overflow when adding the
9913         sizes of the two strings.
9914         (re_search_stub): Check for overflow when adding START
9915         to RANGE; if it occurs, substitute the extreme value.
9916
9917 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9918
9919         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
9920
9921 2005-08-31  Jim Meyering  <jim@meyering.net>
9922
9923         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
9924         a pointer-to-const.
9925         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
9926         (register_state): Likewise.
9927         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
9928         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
9929         (group_nodes_into_DFAstates): Likewise.
9930
9931 2005-08-31  Jim Meyering  <jim@meyering.net>
9932
9933         * check-module: Add a FIXME comment.
9934
9935 2005-08-31  Eric Blake  <ebb9@byu.net>
9936
9937         * modules/unistd-safer (Files): Add unistd--.h.
9938         * modules/stdio-safer (Files): Add stdio--.h.
9939
9940 2005-08-31  Derek Price  <derek@ximbiot.com>
9941
9942         * lib/getdelim.c (getdelim): Return EOF on EOF.
9943         Reported by Larry Jones <lawrence.jones@ugs.com>.
9944
9945 2005-08-31  Bruno Haible  <bruno@clisp.org>
9946
9947         Avoid unnecessary diffs in the generated lib/Makefile.am.
9948         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
9949         the generated files.
9950         (func_import): Don't set cmd.
9951
9952 2005-08-31  Bruno Haible  <bruno@clisp.org>
9953
9954         * lib/strstr.c: Include <stddef.h>, for NULL.
9955         * lib/strcasestr.c: Likewise.
9956         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
9957
9958 2005-08-31  Bruno Haible  <bruno@clisp.org>
9959
9960         * gnulib-tool: New option --macro-prefix.
9961         (func_import): Use macro_prefix.
9962         (import): Handle option --macro-prefix.
9963
9964 2005-08-31  Bruno Haible  <bruno@clisp.org>
9965
9966         * gnulib-tool (import): Rename most ac_* variables to cached_*.
9967         Also use new variables cached_lgpl, cached_libtool.
9968
9969 2005-08-31  Bruno Haible  <bruno@clisp.org>
9970
9971         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
9972         always instantiating them.
9973
9974 2005-08-31  Bruno Haible  <bruno@clisp.org>
9975
9976         * gnulib-tool (func_import): Read the previous cached settings
9977         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
9978         earlier added by gnulib but are now dropped. Warn when a gnulib file
9979         overwrites a non-gnulib file.
9980
9981 2005-08-31  Bruno Haible  <bruno@clisp.org>
9982
9983         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
9984         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
9985         projects that don't keep autogenerated files in CVS. Put into
9986         actioncmd only the specified modules, not the transitive closure.
9987
9988 2005-08-31  Bruno Haible  <bruno@clisp.org>
9989
9990         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
9991         Create directories that shall be filled.
9992         (import): Don't look for gl_* macros in configure.ac. Recurse across
9993         all directories containing a gnulib-cache.m4 files, if meaningful.
9994
9995 2005-08-31  Bruno Haible  <bruno@clisp.org>
9996
9997         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
9998         (import): Set seen_libtool when we see gl_LIBTOOL.
9999
10000 2005-08-31  Bruno Haible  <bruno@clisp.org>
10001
10002         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
10003         declaration macro definitions from generated gnulib.m4.
10004
10005 2005-08-30  "Oskar Liljeblad"  <oskar@osk.mine.nu>
10006
10007         * lib/iconvme.h: Add prototype for iconv_alloc.
10008
10009 2005-08-29  Simon Josefsson  <jas@extundo.com>
10010
10011         * lib/iconvme.c: Fix errno.
10012
10013 2005-08-29  Bruno Haible  <bruno@clisp.org>
10014
10015         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
10016         that it works when the directory contains spaces.
10017
10018 2005-08-29  Bruno Haible  <bruno@clisp.org>
10019
10020         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
10021
10022 2005-08-29  Bruno Haible  <bruno@clisp.org>
10023
10024         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
10025         Emit more advice.
10026
10027 2005-08-29  Bruno Haible  <bruno@clisp.org>
10028         and Stepan Kasal  <kasal@ucw.cz>
10029
10030         * check-module: If more parameters are given, check each of them
10031         separately; add more exceptions, as noted by Jim Meyering.
10032         (check_module): New procedure.
10033         (%exempt_header): Now contains all exceptions.
10034
10035 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
10036
10037         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
10038
10039 2005-08-29  "Oskar Liljeblad"  <oskar@osk.mine.nu>
10040
10041         * lib/iconvme.c: Split iconv_string into iconv_alloc.
10042
10043 2005-08-28  Bruno Haible  <bruno@clisp.org>
10044
10045         * m4/gnulib-tool.m4: New file.
10046
10047 2005-08-27  Jim Meyering  <jim@meyering.net>
10048
10049         * modules/unistd-safer (Files): Add pipe-safer.c.
10050         * modules/fcntl-safer (Files): Add creat-safer.c.
10051
10052 2005-08-27  Jim Meyering  <jim@meyering.net>
10053
10054         * m4/stdlib-safer.m4: New file.  From coreutils.
10055         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
10056         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
10057         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
10058         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
10059         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
10060
10061 2005-08-27  Jim Meyering  <jim@meyering.net>
10062
10063         * lib/fopen-safer.c: Merge minor changes from coreutils.
10064         * lib/dup-safer.c: Likewise.
10065         * lib/fd-safer.c: Likewise.
10066
10067         Merge from coreutils.
10068         * lib/stdio--.h: New file.
10069         * lib/stdlib--.h: New file.
10070         * lib/mkstemp-safer.c: New file.
10071
10072         GNU tar needs these.
10073         * lib/pipe-safer.c: New file.
10074         * lib/creat-safer.c: New file.
10075         * lib/fcntl--.h (creat): Define to creat_safer.
10076         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
10077         * lib/unistd--.h (pipe): Define to pipe_safer.
10078         * lib/unistd-safer.h: Declare pipe_safer.
10079
10080 2005-08-26  Simon Josefsson  <jas@extundo.com>
10081
10082         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
10083         Haible <bruno@clisp.org>.
10084
10085 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
10086
10087         * lib/regex_internal.h: Remove all references to
10088         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
10089         or better.
10090         (bitset_not, bitset_merge, bitset_not_merge):
10091         (bitset_mask, re_string_allocate, re_string_construct):
10092         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
10093         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
10094         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
10095         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
10096         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10097         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10098         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
10099         (re_acquire_state_context):
10100         Remove unnecessary forward decls.
10101         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
10102         Put __attribute at function definition,
10103         now that the function decl has been removed.
10104         * lib/regex_internal.c (re_string_peek_byte_case):
10105         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
10106         Likewise.
10107
10108 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
10109
10110         * m4/regex.m4: Add AC_PREREQ(2.50).
10111         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
10112
10113 2005-08-25  Simon Josefsson  <jas@extundo.com>
10114
10115         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
10116         __fsetlocking.
10117
10118 2005-08-25  Simon Josefsson  <jas@extundo.com>
10119
10120         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
10121         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
10122         GLIBC specific code.
10123
10124 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10125
10126         Make regex safe for g++.  This fixes one real bug (an "err"
10127         that should have been "*err").  g++ problem reported by
10128         Sam Steingold.
10129         * lib/regex_internal.h (re_calloc): New macro, consistent with
10130         re_malloc etc.  All callers of calloc changed to use re_calloc.
10131         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
10132         not int.  All callers changed.
10133         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
10134         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
10135         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
10136         (find_recover_state): Change "err" to "*err"; this fixes what
10137         appears to be a real bug.
10138         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
10139         versus int.
10140
10141 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10142
10143         * modules/regex (Depends-on): Add malloc, since the code
10144         assumes that !malloc(0) means failure.
10145
10146 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10147
10148         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
10149
10150         alloca modernization/simplification for regex.
10151         * lib/regex.c: Remove portability cruft for alloca.  This no longer
10152         needs to be at the start of the file, and can be moved into
10153         regex_internal.h and simplified.
10154         * lib/regex_internal.h: Include <alloca.h>.
10155         (__libc_use_alloca) [!defined _LIBC]: New macro.
10156         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
10157         now works outside glibc.
10158
10159 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10160
10161         * config/srclist.txt: Add glibc bugs 1241, 1245.
10162
10163 2005-08-25  Jim Meyering  <jim@meyering.net>
10164
10165         * lib/open-safer.c: Include <config.h>.
10166         Otherwise, we'd lose LARGEFILE support in any file using
10167         e.g. "fcntl--.h"
10168
10169 2005-08-25  Bruno Haible  <bruno@clisp.org>
10170
10171         * m4/minmax.m4: Require autoconf 2.52.
10172         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
10173         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
10174         alternatives of translit over the alphabet.
10175         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
10176
10177 2005-08-24  Simon Josefsson  <jas@extundo.com>
10178
10179         * tests/test-getpass.c: New file.
10180
10181 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10182
10183         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
10184         for GNU regex features.
10185
10186 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10187
10188         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
10189         * lib/regex.h (regerror): Likewise.
10190
10191         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
10192         requires this.  (The code never needed it.)
10193
10194         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
10195         All uses of recently-renamed identifiers changed to use the new,
10196         POSIX-compliant names.  The code will build and run just fine
10197         without these changes, but it's better to eat our own dog food
10198         and use the standard-conforming names.
10199
10200         * lib/regex.h: Fix a multitude of POSIX name space violations.
10201         These changes have an effect only for programs that define
10202         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
10203         do not change anything for programs compiled in the normal way.
10204         Also, there is no effect on the ABI.
10205
10206         (_REGEX_SOURCE): New macro.
10207         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
10208         defined and _GNU_SOURCE is not; this fixes a name space violation.
10209
10210         Rename the following macros to obey POSIX requirements.
10211         The old names are still visible as macros if _REGEX_SOURCE is defined.
10212         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
10213         RE_BACKSLASH_ESCAPE_IN_LISTS.
10214         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
10215         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
10216         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
10217         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
10218         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
10219         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
10220         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
10221         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
10222         (REG_INTERVALS): renamed from RE_INTERVALS.
10223         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
10224         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
10225         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
10226         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
10227         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
10228         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
10229         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
10230         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
10231         RE_UNMATCHED_RIGHT_PAREN_ORD.
10232         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
10233         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
10234         (REG_DEBUG): renamed from RE_DEBUG.
10235         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
10236         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
10237         unusual, since we can't clash with the POSIX REG_ICASE.
10238         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
10239         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
10240         (REG_NO_SUB): renamed from RE_NO_SUB.
10241         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
10242         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
10243         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
10244         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
10245         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
10246         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
10247         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
10248         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
10249         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
10250         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
10251         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
10252         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
10253         RE_SYNTAX_POSIX_MINIMAL_BASIC.
10254         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
10255         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
10256         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
10257         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
10258         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
10259         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
10260         (REG_FIXED): Renamed from REGS_FIXED.
10261         (REG_NREGS): Renamed from RE_NREGS.
10262
10263         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
10264         of other REG_* macros, since POSIX says the user is allowed to
10265         #undef these macros selectively.
10266
10267         (reg_errcode_t): Update comment stating what other tables need
10268         to be consistent.
10269
10270         Rename the following enum values to obey POSIX requirements.
10271         The old names are still visible as macros.
10272         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
10273         is not defined, since GNU is supposed to be a superset of POSIX as
10274         much as possible, and since we want reg_errcode_t to be a signed
10275         type for implementation consistency.
10276         (_REG_NOERROR): Renamed from REG_NOERROR.
10277         (_REG_NOMATCH): Renamed from REG_NOMATCH.
10278         (_REG_BADPAT): Renamed from REG_BADPAT.
10279         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
10280         (_REG_ECTYPE): Renamed from REG_ECTYPE.
10281         (_REG_EESCAPE): Renamed from REG_EESCAPE.
10282         (_REG_ESUBREG): Renamed from REG_ESUBREG.
10283         (_REG_EBRACK): Renamed from REG_EBRACK.
10284         (_REG_EPAREN): Renamed from REG_EPAREN.
10285         (_REG_EBRACE): Renamed from REG_EBRACE.
10286         (_REG_BADBR): Renamed from REG_BADBR.
10287         (_REG_ERANGE): Renamed from REG_ERANGE.
10288         (_REG_ESPACE): Renamed from REG_ESPACE.
10289         (_REG_BADRPT): Renamed from REG_BADRPT.
10290         (_REG_EEND): Renamed from REG_EEND.
10291         (_REG_ESIZE): Renamed from REG_ESIZE.
10292         (_REG_ERPAREN): Renamed from REG_ERPAREN.
10293         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
10294         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
10295         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
10296         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
10297
10298         (_REG_RE_NAME, _REG_RM_NAME): New macros.
10299         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
10300         changed.  But support the old name if the new one is not defined
10301         and if _REGEX_SOURCE.
10302
10303         Change the following member names in struct re_pattern_buffer.
10304         The old names are still supported if !_REGEX_SOURCE.
10305         The new names are always supported, regardless of _REGEX_SOURCE.
10306         (re_buffer): Renamed from buffer.
10307         (re_allocated): Renamed from allocated.
10308         (re_used): Renamed from used.
10309         (re_syntax): Renamed from syntax.
10310         (re_fastmap): Renamed from fastmap.
10311         (re_translate): Renamed from translate.
10312         (re_can_be_null): Renamed from can_be_null.
10313         (re_regs_allocated): Renamed from regs_allocated.
10314         (re_fastmap_accurate): Renamed from fastmap_accurate.
10315         (re_no_sub): Renamed from no_sub.
10316         (re_not_bol): Renamed from not_bol.
10317         (re_not_eol): Renamed from not_eol.
10318         (re_newline_anchor): Renamed from newline_anchor.
10319
10320         Change the following member names in struct re_registers.
10321         The old names are still supported if !_REGEX_SOURCE.
10322         The new names are always supported, regardless of _REGEX_SOURCE.
10323         (rm_num_regs): Renamed from num_regs.
10324         (rm_start): Renamed from start.
10325         (rm_end): Renamed from end.
10326
10327         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
10328         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
10329         Prepend __ to parameter names.
10330
10331         Undo yesterday's changes.
10332
10333 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10334
10335         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
10336         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
10337         lib/regex.c.
10338
10339 2005-08-24  Jim Meyering  <jim@meyering.net>
10340
10341         Sync from coreutils.
10342         * m4/fcntl-safer.m4: New file.
10343
10344         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
10345         and object files for this module.
10346
10347 2005-08-24  Jim Meyering  <jim@meyering.net>
10348
10349         Sync from coreutils.
10350         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
10351
10352 2005-08-24  Jim Meyering  <jim@meyering.net>
10353
10354         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
10355         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
10356
10357 2005-08-24  Jim Meyering  <jim@meyering.net>
10358
10359         * modules/fcntl-safer: New module.
10360         * modules/fts (Depends-on): Add fcntl-safer.
10361         * MODULES.html.sh (File descriptor based Input/Output):
10362         Add fcntl-safer.
10363
10364 2005-08-24  Bruno Haible  <bruno@clisp.org>
10365
10366         Support for unit test modules.
10367         * modules/README: Mention tests modules.
10368         * modules/TEMPLATE-TESTS: New file.
10369         * gnulib-tool: New options --extract-tests-module, --with-tests and
10370         --tests-base (unused for the moment).
10371         (testsbase, inctests): New variables.
10372         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
10373         (func_verify_module): Exclude TEMPLATE-TESTS.
10374         (func_verify_nontests_module, func_verify_tests_module): New functions.
10375         (func_get_dependencies): Add implicit dependency for tests modules.
10376         (func_get_tests_module): New function.
10377         (func_modules_transitive_closure): When --with-tests was specified,
10378         include the unit tests as well, unless explicitly avoided.
10379         (func_emit_lib_Makefile_am): Ignore the tests modules here.
10380         (func_emit_tests_Makefile_am): New function.
10381         (func_create_testdir): When --with-tests was specified, emit a
10382         tests/ directory.
10383         * MODULES.html.sh (Future developments): Update.
10384
10385 2005-08-24  Bruno Haible  <bruno@clisp.org>
10386
10387         * modules/tls-tests: New file.
10388         * tests/test-tls.c: New file, from GNU gettext.
10389
10390 2005-08-24  Bruno Haible  <bruno@clisp.org>
10391
10392         * modules/lock-tests: New file.
10393         * tests/test-lock.c: New file, from GNU gettext.
10394
10395 2005-08-24  Bruno Haible  <bruno@clisp.org>
10396
10397         * lib/lock.h: Add multiple inclusion guard.
10398         * lib/tls.h: Add multiple inclusion guard.
10399
10400 2005-08-24  Bruno Haible  <bruno@clisp.org>
10401
10402         * gnulib-tool: Add support for the --aux-dir option to
10403         --create-testdir, --create-megatestdir, --test, --megatest.
10404         (func_create_testdir, func_create_megatestdir): Optionally emit a
10405         AC_CONFIG_AUX_DIR directive.
10406         (create-testdir, create-megatestdir, test, megatest): Provide a
10407         default value for $auxdir.
10408
10409 2005-08-24  Bruno Haible  <bruno@clisp.org>
10410
10411         * gnulib-tool (import): Use compound statement instead of subshell
10412         where possible.
10413
10414 2005-08-24  Bruno Haible  <bruno@clisp.org>
10415
10416         * gnulib-tool (import): Change --aux-dir default to "build-aux".
10417
10418 2005-08-24  Bruno Haible  <bruno@clisp.org>
10419
10420         * gnulib-tool (func_version): Update.
10421
10422 2005-08-24  Bruno Haible  <bruno@clisp.org>
10423
10424         * gnulib-tool (func_import, func_create_testdir,
10425         func_create_megatestdir): Quote all autoconf macro arguments.
10426
10427 2005-08-24  Bruno Haible  <bruno@clisp.org>
10428
10429         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
10430         option --force, because --force causes the aclocal.m4 of each
10431         subdirectory to be newer than the corresponding config.h.in.
10432
10433 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10434
10435         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
10436         All contents moved to gl_REGEX.
10437         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
10438         assume that it does.
10439
10440 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10441
10442         * lib/regex.h (REG_NOSYS)
10443         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
10444         Define, since POSIX requires it as of 2001.
10445         (_REG_ENOSYS)
10446         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
10447         New private symbol, used to keep the enum signed in all cases.
10448         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
10449         Youngman in
10450         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
10451
10452         * lib/regex_internal.c (re_string_skip_chars, register_state):
10453         (calc_state_hash):
10454         Remove forward decls; no longer needed now that we use prototypes.
10455         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
10456         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
10457         (clean_state_log_if_needed): Likewise.
10458
10459 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10460
10461         * config/srclist.txt: Add glibc bugs 1231-1233.
10462
10463 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10464
10465         Fix problems reported by Sam Steingold in
10466         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
10467         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
10468         assumed that reg_errcode_t is a signed type, which is not
10469         necessarily true if _XOPEN_SOURCE is not defined.
10470         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
10471         since some compilers warn about it otherwise.
10472
10473 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10474
10475         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
10476         (init_word_char, create_initial_state, duplicate_node_closure):
10477         (fetch_token, peek_token_bracket, build_range_exp):
10478         (build_collating_symbol): Remove forward decls; no longer needed
10479         now that we use prototypes.
10480
10481         * lib/regcomp.c:
10482         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
10483         (re_compile_fastmap_iter, regcomp, regerror, regfree):
10484         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
10485         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
10486         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
10487         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
10488         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
10489         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
10490         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
10491         (build_range_exp, build_collating_symbol, parse_bracket_exp):
10492         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
10493         (build_charclass, build_charclass_op, fetch_number, create_tree):
10494         (create_token_tree, mark_opt_subexp, duplicate_tree):
10495         Use prototypes rather than old-style definitions.
10496
10497         * lib/regex_internal.c:
10498         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
10499         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
10500         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
10501         (re_string_reconstruct, re_string_peek_byte_case):
10502         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
10503         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
10504         (re_node_set_init_copy, re_node_set_add_intersect):
10505         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10506         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10507         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
10508         (re_acquire_state, re_acquire_state_context, register_state):
10509         (create_ci_newstate, create_cd_newstate, free_state):
10510         Likewise.
10511         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
10512         re_search_2):
10513         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
10514         (re_search_internal, prune_impossible_nodes):
10515         (acquire_init_state_context, check_matching, static):
10516         (check_halt_node_context, check_halt_state_context, proceed_next_node):
10517         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
10518         (update_regs, sift_states_backward, build_sifted_states):
10519         (clean_state_log_if_needed, merge_state_array):
10520         (update_cur_sifted_state, add_epsilon_src_nodes):
10521         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
10522         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
10523         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
10524         (find_recover_state, check_subexp_matching_top, transit_state_mb):
10525         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
10526         (check_arrival, check_arrival_add_next_nodes):
10527         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
10528         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
10529         (check_node_accept_bytes, check_node_accept, extend_buffers):
10530         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
10531         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
10532         (sift_ctx_init):
10533         Likewise.
10534
10535         * lib/regex_internal.h:
10536         (re_string_allocate, re_string_construct, re_string_reconstruct):
10537         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
10538         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
10539         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
10540         (re_string_context_at, re_string_peek_byte_case):
10541         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
10542         is defined, since we now use prototypes always.
10543
10544         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
10545         C89 or better.  All uses removed.
10546
10547 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10548
10549         * config/srclist.txt: Add glibc bugs 1220-1227.
10550
10551 2005-08-20  Jim Meyering  <jim@meyering.net>
10552
10553         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
10554         of unused local, dfa.
10555
10556 2005-08-20  Bruno Haible  <bruno@clisp.org>
10557
10558         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
10559
10560 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10561
10562         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
10563         (re_node_set_insert_last, re_dfa_add_node):
10564         Rename local variables to avoid GCC shadowing warnings.
10565
10566 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10567
10568         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
10569         [defined lint]: Suppress bogus uninitialized-variable warnings.
10570
10571         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
10572         and let the caller return REG_ESPACE if out of space.  This
10573         removes an uninitialied-variable warning with GCC 4.0.1, and also
10574         avoids taking the address of a local variable.  All callers
10575         changed.
10576
10577 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10578
10579         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
10580         $LIBCSRC/posix/regexec.c.
10581         Add glibc bug 1217 for regcomp.c.
10582
10583 2005-08-19  Jim Meyering  <jim@meyering.net>
10584
10585         * lib/regexec.c (proceed_next_node): Redo local variables to
10586         avoid GCC shadowing warnings.
10587
10588 2005-08-18  Bruno Haible  <bruno@clisp.org>
10589
10590         * lib/strstr.c (strstr): Fix return value in multibyte case.
10591         * lib/strcasestr.c (strcasestr): Likewise.
10592
10593 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
10594
10595         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
10596
10597 2005-08-17  Jim Meyering  <jim@meyering.net>
10598
10599         Make the %s format (seconds since the epoch) work for a negative
10600         number and when used with a zero-padded field width, e.g. %015s.
10601
10602         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
10603         label so that it precedes the code to set `digits'.  Otherwise,
10604         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
10605         print `00-22'.  Now, it prints `-0022', as it should.
10606
10607 2005-08-17  Bruno Haible  <bruno@clisp.org>
10608
10609         * modules/strstr (Files): Add m4/mbrtowc.m4.
10610         (Depends-on): Add mbuiter.
10611
10612 2005-08-17  Bruno Haible  <bruno@clisp.org>
10613
10614         * modules/strcasestr: New file.
10615         * MODULES.html.sh (String handling, based on ANSI C 89): Add
10616         strcasestr.
10617
10618 2005-08-17  Bruno Haible  <bruno@clisp.org>
10619
10620         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
10621
10622 2005-08-17  Bruno Haible  <bruno@clisp.org>
10623
10624         * modules/mbuiter: New file.
10625         * MODULES.html.sh (Extended multibyte and wide character utilities):
10626         Add mbuiter.
10627
10628 2005-08-17  Bruno Haible  <bruno@clisp.org>
10629
10630         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
10631         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
10632
10633 2005-08-17  Bruno Haible  <bruno@clisp.org>
10634
10635         * m4/strcasestr.m4: New file.
10636
10637 2005-08-17  Bruno Haible  <bruno@clisp.org>
10638
10639         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
10640         * lib/strstr.c: Completely rewritten, with multibyte locale support.
10641
10642 2005-08-17  Bruno Haible  <bruno@clisp.org>
10643
10644         * lib/strcasestr.h: New file.
10645         * lib/strcasestr.c: New file.
10646
10647 2005-08-17  Bruno Haible  <bruno@clisp.org>
10648
10649         * lib/strcasecmp.c: Use mbuiter.h.
10650
10651 2005-08-17  Bruno Haible  <bruno@clisp.org>
10652
10653         * lib/mbuiter.h: New file.
10654
10655 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
10656
10657         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
10658         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
10659         and gl_GETOPT are both invoked via different paths (as happens
10660         with GNU tar CVS because it uses both argp and getopt), the former
10661         wins.
10662
10663 2005-08-16  Bruno Haible  <bruno@clisp.org>
10664
10665         * modules/tls: New file.
10666         * MODULES.html.sh (Multithreading): Add tls.
10667
10668 2005-08-16  Bruno Haible  <bruno@clisp.org>
10669
10670         * modules/strnlen1: New file.
10671         * MODULES.html.sh (String handling): Add strnlen1.
10672
10673 2005-08-16  Bruno Haible  <bruno@clisp.org>
10674
10675         * modules/strcase (Files): Add m4/mbrtowc.m4.
10676         (Depends-on): Add strnlen1, mbchar.
10677
10678 2005-08-16  Bruno Haible  <bruno@clisp.org>
10679
10680         * modules/mbiter: New file.
10681         * MODULES.html.sh (Extended multibyte and wide character utilities):
10682         Add mbiter.
10683
10684 2005-08-16  Bruno Haible  <bruno@clisp.org>
10685
10686         * modules/mbfile: New file.
10687         * MODULES.html.sh (Extended multibyte and wide character utilities):
10688         Add mbfile.
10689
10690 2005-08-16  Bruno Haible  <bruno@clisp.org>
10691
10692         * modules/mbchar: New file.
10693         * MODULES.html.sh (Extended multibyte and wide character utilities):
10694         New section.
10695
10696 2005-08-16  Bruno Haible  <bruno@clisp.org>
10697
10698         * m4/tls.m4: New file, from GNU gettext.
10699
10700 2005-08-16  Bruno Haible  <bruno@clisp.org>
10701
10702         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
10703         always.
10704         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
10705
10706 2005-08-16  Bruno Haible  <bruno@clisp.org>
10707
10708         * m4/mbiter.m4: New file.
10709
10710 2005-08-16  Bruno Haible  <bruno@clisp.org>
10711
10712         * m4/mbfile.m4: New file.
10713
10714 2005-08-16  Bruno Haible  <bruno@clisp.org>
10715
10716         * m4/mbchar.m4: New file.
10717
10718 2005-08-16  Bruno Haible  <bruno@clisp.org>
10719
10720         * lib/tls.h: New file, from GNU gettext.
10721         * lib/tls.c: New file, from GNU gettext.
10722
10723 2005-08-16  Bruno Haible  <bruno@clisp.org>
10724
10725         * lib/strnlen1.h: New file.
10726         * lib/strnlen1.c: New file.
10727
10728 2005-08-16  Bruno Haible  <bruno@clisp.org>
10729
10730         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
10731         (mbi_init): Update.
10732         (mbi_avail, mbi_advance): Let the iteration end before the terminating
10733         NUL byte, not after it.
10734
10735 2005-08-16  Bruno Haible  <bruno@clisp.org>
10736
10737         * lib/strcase.h (strcasecmp): Add note in comments.
10738         * lib/strncasecmp.c: Use code from strcasecmp.c.
10739         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
10740         (strcasecmp): Work correctly in multibyte locales.
10741
10742 2005-08-16  Bruno Haible  <bruno@clisp.org>
10743
10744         * lib/mbiter.h: New file.
10745
10746 2005-08-16  Bruno Haible  <bruno@clisp.org>
10747
10748         * lib/mbfile.h: New file.
10749
10750 2005-08-16  Bruno Haible  <bruno@clisp.org>
10751
10752         * lib/mbchar.h: New file.
10753         * lib/mbchar.c: New file.
10754
10755 2005-08-16  Bruno Haible  <bruno@clisp.org>
10756
10757         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
10758         the valid ones. Makes the comparison operations transitive:
10759         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
10760         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
10761
10762 2005-08-15  Simon Josefsson  <jas@extundo.com>
10763
10764         * modules/ssize_t (License): Change to 'unlimited'.
10765
10766         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
10767
10768 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10769
10770         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
10771         Add comments for each pending glibc patch.
10772
10773 2005-08-15  Bruno Haible  <bruno@clisp.org>
10774
10775         * lib/regex.h (__restrict_arr): Don't define to __restrict if
10776         __cplusplus is defined.
10777
10778 2005-08-14  Jim Meyering  <jim@meyering.net>
10779
10780         Sync from coreutils.
10781
10782         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
10783         Use the hash-table-based cycle-detection code not just when
10784         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
10785         Reported by James Youngman in
10786         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
10787         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
10788         FTS_TIGHT_CYCLE_CHECK.
10789         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
10790         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
10791         once again.
10792         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
10793         * lib/fts.c (fd_safer): Remove decl.
10794         Include fcntl--.h rather than unistd-safer.h
10795         (fts_safe_changedir): Don't call fd_safer; no longer needed
10796         now that we include fcntl--.h.
10797
10798 2005-08-12  Simon Josefsson  <jas@extundo.com>
10799
10800         * modules/getndelim2: Use ssize_t module.
10801         * modules/getnline: Likewise.
10802         * modules/safe-read: Likewise.
10803         * modules/xreadlink: Likewise.
10804
10805         * modules/ssize_t: New file.
10806
10807 2005-08-12  Simon Josefsson  <jas@extundo.com>
10808
10809         * m4/readline.m4: Look for termcap, curses or ncurses if required.
10810
10811 2005-08-12  Simon Josefsson  <jas@extundo.com>
10812
10813         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10814         ssize_t.
10815
10816 2005-08-12  Simon Josefsson  <jas@extundo.com>
10817
10818         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
10819         readline, getdelim and check_version.
10820         (Support for systems lacking ISO C 99: Sizes of integer types):
10821         Add size_max.
10822
10823 2005-08-12  Bruno Haible  <bruno@clisp.org>
10824
10825         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
10826
10827 2005-08-11  Simon Josefsson  <jas@extundo.com>
10828
10829         * modules/readline: New file.
10830
10831         * modules/strnlen (Files): Add strnlen.h.
10832
10833 2005-08-11  Simon Josefsson  <jas@extundo.com>
10834
10835         * m4/readline.m4: New file.
10836
10837 2005-08-11  Simon Josefsson  <jas@extundo.com>
10838
10839         * lib/readline.h, readline.c: New file.
10840
10841 2005-08-11  Simon Josefsson  <jas@extundo.com>
10842
10843         * doc/gnulib.texi (Initial import, Finishing touches): Mention
10844         gl_AVOID.
10845
10846 2005-08-11  Bruno Haible  <bruno@clisp.org>
10847
10848         * lib/strnlen.h (strnlen): Change parameter name to match comment.
10849
10850 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
10851
10852         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
10853
10854 2005-08-10  Simon Josefsson  <jas@extundo.com>
10855
10856         * tests/test-iconvme.c: New file.
10857
10858 2005-08-10  Simon Josefsson  <jas@extundo.com>
10859
10860         * m4/strnlen.m4: New file.
10861
10862         * m4/strndup.m4: Don't check for strnlen declaration, done in
10863         strnlen.m4.
10864
10865 2005-08-10  Simon Josefsson  <jas@extundo.com>
10866
10867         * lib/strndup.c: Use strnlen.h.
10868
10869         * lib/strnlen.h: New file.
10870
10871 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10872
10873         * README: Typos.
10874
10875 2005-08-02  Simon Josefsson  <jas@extundo.com>
10876
10877         * modules/readline: New file.
10878
10879 2005-08-02  Simon Josefsson  <jas@extundo.com>
10880
10881         * modules/getdelim: New file.
10882
10883         * modules/getline: Rewrite, don't use getndelim2.
10884
10885 2005-08-02  Simon Josefsson  <jas@extundo.com>
10886
10887         * m4/getline.m4: Separate out getdelim stuff into separate module.
10888
10889         * m4/getdelim.m4: New file.
10890
10891 2005-08-02  Simon Josefsson  <jas@extundo.com>
10892
10893         * lib/getline.h, getline.c: Rewrite.
10894
10895         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
10896
10897 2005-07-31  Bruno Haible  <bruno@clisp.org>
10898
10899         * lib/lock.h (gl_lock_initializer): New macro.
10900         (gl_lock_define_initialized): Use it.
10901         (gl_rwlock_initializer): New macro.
10902         (gl_rwlock_define_initialized): Use it.
10903         (gl_recursive_lock_initializer): New macro.
10904         (gl_recursive_lock_define_initialized): Use it.
10905
10906 2005-07-30  Karl Berry  <karl@gnu.org>
10907
10908         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
10909         Report from Ben Pfaff, regarding getopt.
10910
10911 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
10912
10913         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
10914         normal way.
10915         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
10916         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
10917         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
10918         (gl_GETOPT): Use the new macros.  Most of the implementation
10919         is moved to the new macros.  This is for programs like Emacs
10920         that don't want all the functionality of gl_GETOPT.
10921
10922 2005-07-26  Bruno Haible  <bruno@clisp.org>
10923
10924         * m4/lock.m4: Update from GNU gettext.
10925
10926 2005-07-26  Bruno Haible  <bruno@clisp.org>
10927
10928         * lib/lock.h: Update from GNU gettext.
10929         * lib/lock.c: Update from GNU gettext.
10930
10931 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
10932
10933         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
10934         obsolescent AC_TRY_RUN.  Include the default includes files, for
10935         'exit'.
10936
10937 2005-07-24  Bruno Haible  <bruno@clisp.org>
10938
10939         * modules/visibility: New file.
10940         * MODULES.html.sh (Misc): Add visibility.
10941
10942 2005-07-24  Bruno Haible  <bruno@clisp.org>
10943
10944         * m4/visibility.m4: New file.
10945
10946 2005-07-24  Bruno Haible  <bruno@clisp.org>
10947
10948         * doc/visibility.texi: New file.
10949
10950 2005-07-22  Bruno Haible  <bruno@clisp.org>
10951
10952         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
10953         $(ALLOCA_H), redundant through BUILT_SOURCES.
10954         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
10955         redundant through BUILT_SOURCES.
10956         * modules/byteswap (Makefile.am): Remove explicit dependency on
10957         $(BYTESWAP_H), redundant through BUILT_SOURCES.
10958         * modules/fnmatch (Makefile.am): Remove explicit dependency on
10959         $(FNMATCH_H), redundant through BUILT_SOURCES.
10960         * modules/getopt (Makefile.am): Remove explicit dependency on
10961         $(GETOPT_H), redundant through BUILT_SOURCES.
10962         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
10963         redundant through BUILT_SOURCES.
10964         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
10965         redundant through BUILT_SOURCES.
10966         * modules/stdbool (Makefile.am): Remove explicit dependency on
10967         $(STDBOOL_H), redundant through BUILT_SOURCES.
10968         * modules/stdint (Makefile.am): Remove explicit dependency on
10969         $(STDINT_H), redundant through BUILT_SOURCES.
10970         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
10971         Remove explicit dependency on $(SYSEXITS_H).
10972         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
10973
10974 2005-07-18  Simon Josefsson  <jas@extundo.com>
10975
10976         * lib/check-version.c (check_version): Accept identical versions too.
10977
10978 2005-07-18  Bruno Haible  <bruno@clisp.org>
10979
10980         * modules/lock: New file.
10981         * MODULES.html.sh (Multithreading): New section.
10982
10983 2005-07-18  Bruno Haible  <bruno@clisp.org>
10984
10985         * m4/lock.m4: New file, from GNU gettext.
10986
10987 2005-07-18  Bruno Haible  <bruno@clisp.org>
10988
10989         * lib/lock.h: New file, from GNU gettext.
10990         * lib/lock.c: New file, from GNU gettext.
10991
10992 2005-07-18  Bruno Haible  <bruno@clisp.org>
10993
10994         * lib/lock.h (gl_once_t): New type.
10995         (gl_once_define, gl_once): New macros.
10996         * lib/lock.c (fresh_once): New variable.
10997         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
10998         functions.
10999
11000 2005-07-16  Simon Josefsson  <jas@extundo.com>
11001
11002         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
11003         workaround, suggested by Bruno.
11004
11005 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11006
11007         * modules/xalloc (Depends-on): Add xalloc-die.
11008         * modules/xvasprintf (Depends-on): Add xalloc-die.
11009
11010 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11011
11012         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
11013         with a minor change.
11014
11015 2005-07-15  Bruno Haible  <bruno@clisp.org>
11016
11017         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
11018         When using lib/poll.c, define poll as rpl_poll.
11019
11020 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
11021
11022         * modules/argp (Depends-on): Remove unlocked-io.
11023
11024 2005-07-14  Derek Price  <derek@ximbiot.com>
11025
11026         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
11027         for glob symlink bug.
11028
11029 2005-07-14  Bruno Haible  <bruno@clisp.org>
11030
11031         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
11032         Instead, test for *_unlocked function declarations directly.
11033
11034 2005-07-11  Simon Josefsson  <jas@extundo.com>
11035
11036         * modules/size_max: New file.
11037
11038         * modules/xsize: Depend on size_max module for size_max.m4.
11039
11040 2005-07-11  Simon Josefsson  <jas@extundo.com>
11041
11042         * lib/size_max.h: New file.
11043
11044 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
11045
11046         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
11047         copyright symbol and the year.
11048         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
11049         (version_etc_va): Use parameterized copyright notice.
11050         Reword to conform to the current GNU coding standards.
11051
11052 2005-07-11  Karl Berry  <karl@gnu.org>
11053
11054         * doc/gnulib.texi (Quoting): new node.
11055         (Initial import): more info, from Patrice.
11056
11057 2005-07-11  Bruno Haible  <bruno@clisp.org>
11058
11059         * gnulib-tool (func_usage): Document option --avoid.
11060         (Command line options): Handle --avoid.
11061         (func_acceptable): New function.
11062         (func_modules_transitive_closure): Use it.
11063
11064 2005-07-11  Bruno Haible  <bruno@clisp.org>
11065
11066         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
11067         Reported by Jim Meyering.
11068
11069 2005-07-10  Bruno Haible  <bruno@clisp.org>
11070
11071         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
11072         Needed when size_t is smaller than 'unsigned int'.
11073         Reported by Paul Eggert.
11074
11075 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11076
11077         * modules/argp (Depends-on): Add unlocked-io
11078
11079 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11080
11081         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
11082         block of defines.
11083
11084 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
11085
11086         * config/srclist.txt: Comment out regcomp.c, since we have a porting
11087         fix now.
11088
11089 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
11090         and Paul Eggert  <eggert@cs.ucla.edu>
11091
11092         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
11093         in wint_t, not wchar_t.  Remove now-unnecessary cast.
11094
11095 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11096
11097         * modules/regex (Files): Add lib/regex_internal.c,
11098         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
11099         (Depends-on): Add extensions.
11100         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
11101
11102 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11103
11104         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
11105         pathconf.
11106         * m4/same.m4 (gl_SAME): Likewise.
11107         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
11108
11109         * m4/regex.m4: Adjust to new libc regex implementation.
11110         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
11111         all the .c and .h parts of (the new) regex.
11112         Quote the m4 stuff better.
11113         Check for RE_ICASE bug of old gnulib.
11114         Check for REG_STARTEND of recent libc.
11115         Rename local variables from jm_* to gl_*.
11116         Quote operand of "test -f".
11117         Say "recent enough" version of libc, not "version 2".
11118         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
11119         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
11120         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
11121         Remove check for btowc, isascii.
11122         Require AM_LANGINFO_CODESET.
11123
11124 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11125
11126         * lib/regex.c, regex.h: Sync from libc.
11127         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
11128         * lib/regexec.c:
11129         New files, synced from libc, except that regex_internal.h
11130         currently has a small porting fix.
11131
11132 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11133
11134         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
11135         regex_internal.c, regexec.c.
11136         Add regex_internal.h too, but as a comment, since the libc version
11137         is currently broken in gnulib mode.
11138
11139 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
11140
11141         Support programs like Emacs that use gnulib but not gettext.
11142         * MODULES.html.sh (Internationalization functions): Add gettext-h.
11143         * modules/gettext-h: New file.
11144         * modules/gettext (Files): Remove lib/gettext.h.
11145         (Depends-on): Add gettext-h.
11146         (Makefile.am): Remove lib_SOURCES.
11147         * modules/argmatch, modules/c-stack, modules/closeout:
11148         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
11149         * modules/execute, modules/file-type, modules/getaddrinfo:
11150         * modules/getopt, modules/human, modules/javacomp:
11151         * modules/javaexec, modules/mkdir-p, modules/obstack:
11152         * modules/openat, modules/pagealign_alloc, modules/pipe:
11153         * modules/quotearg, modules/regex, modules/rpmatch:
11154         * modules/unicodeio, modules/userspec, modules/version-etc:
11155         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
11156         * modules/xsetenv:
11157         Depend on gettext-h, not gettext.
11158
11159 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
11160
11161         * gnulib-tool (func_import): Add support for 'public domain' license.
11162         * modules/alloca, modules/atexit, modules/memmove:
11163         Now public domain, not GPL.
11164         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
11165         * modules/realloc, modules/strerror, modules/strtod:
11166         Now LGPL, not GPL.
11167
11168 2005-07-05  Bruno Haible  <bruno@clisp.org>
11169
11170         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
11171         autoconf CVS. Needed for mingw.
11172
11173 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11174
11175         Remove the dependency of the strftime module on the tzset module.
11176         * modules/strftime (Depends-on): Remove dependency on tzset.
11177
11178 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11179
11180         Remove the dependency of the strftime module on the tzset module.
11181         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
11182         gl_FUNC_TZSET_CLOBBER.
11183
11184 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11185
11186         Remove the dependency of the strftime module on the tzset module.
11187         * lib/strftime.c (my_strftime)
11188         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
11189         Copy the input structure, to work around some of the bug with
11190         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
11191         Solaris releases, you should also use the tzset module, but we won't
11192         require it as a dependency any more since we don't want LGPLed code
11193         to depend on GPLed code.
11194
11195 2005-07-02  Jim Meyering  <jim@meyering.net>
11196
11197         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
11198         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
11199         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
11200         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
11201
11202 2005-07-02  Jim Meyering  <jim@meyering.net>
11203
11204         * lib/backupfile.c (backup_args): Change a `0' to NULL.
11205
11206 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11207
11208         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
11209         declares only 'struct timespec;' (!).
11210
11211 2005-07-01  Jim Meyering  <jim@meyering.net>
11212
11213         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
11214         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
11215         * lib/save-cwd.c, tempname.c:
11216         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11217         and don't include <sys/file.h>).
11218
11219 2005-06-29  Jim Meyering  <jim@meyering.net>
11220
11221         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
11222         type name.  Use the variable name instead.
11223         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
11224         Likewise.
11225
11226 2005-06-28  Simon Josefsson  <jas@extundo.com>
11227
11228         * modules/check-version (Files): Add check-version.m4.
11229
11230 2005-06-28  Simon Josefsson  <jas@extundo.com>
11231
11232         * m4/check-version.m4: New file, suggested by Jim Meyering
11233         <jim@meyering.net>.
11234
11235 2005-06-28  Simon Josefsson  <jas@extundo.com>
11236
11237         * lib/check-version.h, lib/check-version.c: New files.
11238
11239 2005-06-28  Simon Josefsson  <jas@extundo.com>
11240
11241         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
11242         collision with global variable.  Better indentation.  Don't
11243         increment buffer pointer beyond buffer end.  Based on comments
11244         from Paul Eggert <eggert@cs.ucla.edu>.
11245
11246         * lib/base64.h: Indent.
11247
11248 2005-06-28  Simon Josefsson  <jas@extundo.com>
11249
11250         * doc/gnulib.texi (Library version handling): New section.
11251
11252 2005-06-28  Jim Meyering  <jim@meyering.net>
11253
11254         * check-module (find_included_lib_files): Hard-code another
11255         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
11256         but modules/fts-lgpl (correctly) does not list those files.
11257
11258         * modules/canonicalize (Files): Add lib/pathmax.h.
11259
11260 2005-06-25  Simon Josefsson  <jas@extundo.com>
11261
11262         * modules/check-version: New file.
11263
11264 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
11265
11266         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
11267         initializer of struct addrinfo, as an indication that we don't
11268         care how many members the structure has.
11269
11270 2005-06-24  Derek Price  <derek@ximbiot.com>
11271         and Bruno Haible  <bruno@clisp.org>
11272
11273         Remove stat module & update lstat.
11274         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
11275         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
11276         * m4/stat.m4: Remove this file.
11277
11278 2005-06-24  Derek Price  <derek@ximbiot.com>
11279         and Bruno Haible  <bruno@clisp.org>
11280
11281         Remove stat module & update lstat.
11282         * lib/stat.c: Remove this file...
11283         (slash_aware_lstat): ...moving this content and its support...
11284         * lib/lstat.c (rpl_lstat): ...into here.
11285         * lib/lstat.h: New file.
11286
11287 2005-06-24  Derek Price  <derek@ximbiot.com>
11288         and Bruno Haible  <bruno@clisp.org>
11289
11290         Remove stat module & update lstat.
11291         * config/srclist.txt (libc sources): Remove stat.
11292
11293 2005-06-24  Derek Price  <derek@ximbiot.com>
11294         and Bruno Haible  <bruno@clisp.org>
11295
11296         Remove stat module & update lstat.
11297         * MODULES.html.sh (stat): Remove.
11298         * MODULES.html: Regenerated.
11299         * modules/lstat (Description): Correct function name.
11300         (Files): Add "lstat.h".
11301         (Depends-on): Remove stat, add xalloc, stat-macros.
11302         * modules/stat: Remove this file.
11303         (Include): Add "lstat.h", remove <sys/stat.h>.
11304
11305 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
11306
11307         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
11308         (ranged_convert): Don't save conversion in a temporary struct.
11309         This causes a warning with GCC 4.0.0, and anyway in the typical
11310         case it's not worth the extra 100 bytes or so of code.
11311         (ranged_convert, __mktime_internal): When calling a function via a
11312         pointer P, use P () rather than (*P) (), as we now assume C89 or
11313         better.
11314
11315 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
11316
11317         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
11318         "who -r" failed to give output.  Problem reported by Tim Waugh.
11319
11320         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
11321         (xcalloc): Use it to avoid needless tests.
11322         Problem reported by Jim Meyering.
11323
11324 2005-06-20  Derek Price  <derek@ximbiot.com>
11325
11326         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
11327         unnecessary for Autoconfs > 2.59c.
11328
11329 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11330
11331         * lib/argp.h (__option_is_short): Check upper limit of
11332         __key. Isprint() requires its argument to have the value
11333         of an unsigned char or EOF.
11334
11335 2005-06-16  Jim Meyering  <jim@meyering.net>
11336
11337         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
11338         when either N or S is zero.
11339
11340 2005-06-16  Derek Price  <derek@ximbiot.com>
11341
11342         * m4/bison.m4: Declare YACC & YFLAGS precious.
11343
11344 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
11345
11346         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
11347         multibyte string or pattern, fall back on unibyte matching.
11348         Problem reported by James Youngman.
11349
11350 2005-06-08  Bruno Haible  <bruno@clisp.org>
11351
11352         * modules/csharpcomp: New file.
11353         * MODULES.html.sh (C#): Add csharpcomp.
11354
11355 2005-06-08  Bruno Haible  <bruno@clisp.org>
11356
11357         * m4/csharpcomp.m4: New file, from GNU gettext.
11358
11359 2005-06-08  Bruno Haible  <bruno@clisp.org>
11360
11361         * lib/csharpcomp.h: New file, from GNU gettext.
11362         * lib/csharpcomp.c: New file, from GNU gettext.
11363         * lib/csharpcomp.sh.in: New file, from GNU gettext.
11364
11365 2005-06-08  Bruno Haible  <bruno@clisp.org>
11366
11367         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
11368         warning on mingw.
11369
11370 2005-06-07  Derek Price  <derek@ximbiot.com>
11371
11372         Sync from CVS.
11373         * lib/glob_.h: Indent nested #ifdef.
11374
11375 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11376
11377         Sync from coreutils.
11378         Use "file name" when talking about file names, instead of "filename"
11379         or "path", as per the GNU coding standards.
11380         * lib/mkdir-p.c: Renamed from makepath.c.
11381         (make_dir_parents): Renamed from make_path.  All callers changed.
11382         * lib/mkdir-p.h: Likewise.  All includers changed.
11383         * lib/filenamecat.c: Renamed from path-concat.c.
11384         (file_name_concat): Renamed from path_concat.  All callers changed.
11385         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
11386         * lib/filenamecat.h: Likewise.  All includers changed.
11387         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
11388         in comments or local variable names.
11389         * lib/basename.c: Likewise.
11390         * lib/canonicalize.c, canonicalize.h: Likewise.
11391         * lib/dirname.c, dirname.h: Likewise.
11392         * lib/euidaccess.c: Likewise.
11393         * lib/exclude.c: Likewise
11394         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
11395         * lib/fsusage.c, fsuage.h: Likewise.
11396         * lib/fts.c, fts_.h: Likewise.
11397         * lib/getcwd.c: Likewise.
11398         * lib/getloadavg.c: Likewise.
11399         * lib/mkstemp.c: Likewise.
11400         * lib/mountlist.c, mountlist.h: Likewise.
11401         * lib/openat.c, openat.h: Likewise.
11402         * lib/readlink-stub.c: Likewise.
11403         * lib/readutmp.c, readutmp.h: Likewise.
11404         * lib/rename.c: Likewise.
11405         * lib/rmdir.c: Likewise.
11406         * lib/same.c: Likewise.
11407         * lib/savedir.c: Likewise.
11408         * lib/stripslash.c: Likewise.
11409         * lib/tempname.c: Likewise.
11410         * lib/xreadlink.c: Likewise.
11411         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
11412         All uses changed.
11413         * lib/exclude.h: Likewise.
11414
11415         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
11416         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11417         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
11418         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11419         * lib/pathmax.h: Include <limits.h> unconditionally, since other
11420         files have been getting away with it for years (MORE/BSD 4.3
11421         is extinct now).
11422         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
11423         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11424
11425         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
11426         Define to 256, not 255, as per modern POSIX.
11427
11428 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11429
11430         Sync from coreutils.
11431         Use "file name" when talking about file names, instead of "filename"
11432         or "path", as per the GNU coding standards.
11433         * MODULES.html.sh: mkdir-p renamed from makepath.
11434         filenamecat renamed from path-concat.
11435         * modules/filenamecat: Renamed from modules/path-concat.
11436         (Files): filenamecat.h and filenamecat.c renamed from
11437         path-concat.h and path-concat.c.
11438         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
11439         (Include): filenamecat.h, not path-concat.h.
11440         * modules/mkdir-p: Renamed from modules/makepath.
11441         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
11442         makepath.c.
11443         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
11444         (Include): mkdir-p.h, not makepath.h.
11445
11446 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11447
11448         Sync from coreutils.
11449         * m4/mkdir-p.m4: Renamed from makepath.m4.
11450         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
11451         Rename files from makepath.c to mkdir-p.c, and from
11452         makepath.h to mkdir-p.h.
11453         * m4/filenamecat.m4: Renamed from path-concat.m4.
11454         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
11455         Rename files from path-concat.c to filenamecat.c,
11456         and from path-concat.h to filenamecat.h.
11457         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
11458         "file name" in local variables or comments.
11459         * m4/rename.m4: Likewise.
11460
11461 2005-06-01  Bruno Haible  <bruno@clisp.org>
11462
11463         * modules/csharpexec: New file.
11464         * MODULES.html.sh (C#): New section.
11465
11466 2005-06-01  Bruno Haible  <bruno@clisp.org>
11467
11468         * m4/csharp.m4: New file, from GNU gettext.
11469         * m4/csharpexec.m4: New file, from GNU gettext.
11470
11471 2005-06-01  Bruno Haible  <bruno@clisp.org>
11472
11473         * lib/csharpexec.h: New file, from GNU gettext.
11474         * lib/csharpexec.c: New file, from GNU gettext.
11475         * lib/csharpexec.sh.in: New file, from GNU gettext.
11476
11477 2005-05-31  Derek Price  <derek@ximbiot.com>
11478             Paul Eggert  <eggert@cs.ucla.edu>
11479
11480         Sync from cvs.
11481         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
11482
11483 2005-05-31  Derek Price  <derek@ximbiot.com>
11484             Paul Eggert  <eggert@cs.ucla.edu>
11485
11486         Sync from cvs.
11487         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
11488
11489 2005-05-29  Derek Price  <derek@ximbiot.com>
11490
11491         * config/srclist.txt (glob_.h, glob.c): Add these files.
11492
11493 2005-05-29  Derek Price  <derek@ximbiot.com>
11494
11495         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
11496         * modules/glob: New file.
11497         * modules/getlogin_r: Add link to POSIX spec in description.
11498
11499 2005-05-29  Derek Price  <derek@ximbiot.com>
11500             Paul Eggert  <eggert@cs.ucla.edu>
11501
11502         * m4/glob.m4: New file.
11503
11504 2005-05-29  Derek Price  <derek@ximbiot.com>
11505             Paul Eggert  <eggert@cs.ucla.edu>
11506
11507         * lib/glob_.h, lib/glob.c: New files.
11508
11509 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11510
11511         * modules/fts (Files): Remove m4/inttypes-pri.m4.
11512         * modules/fts-lgpl (Depends-on): Remove gettext.
11513
11514 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11515
11516         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
11517         and don't require gt_INTTYPES_PRI.
11518
11519 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11520
11521         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
11522
11523         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
11524         the configuration hassle isn't worth it.
11525         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
11526         (LONGEST_MODIFIER, PRIuMAX): Remove.
11527
11528 2005-05-27  Bruno Haible  <bruno@clisp.org>
11529
11530         * lib/getlogin_r.h: Remove second include of <stddef.h>.
11531
11532 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
11533
11534         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
11535         _POSIX_PTHREAD_SEMANTICS for Solaris.
11536
11537 2005-05-25  Derek Price  <derek@ximbiot.com>
11538
11539         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
11540
11541 2005-05-25  Derek Price  <derek@ximbiot.com>
11542             Paul Eggert  <eggert@cs.ucla.edu>
11543
11544         * modules/getlogin_r, m4/getlogin_r.m4: New files.
11545         * lib/getlogin_r.c, getlogin_r.h: New files.
11546
11547 2005-05-25  Bruno Haible  <bruno@clisp.org>
11548             Derek Price  <derek@ximbiot.com>
11549
11550         * lib/getlogin_r.h: Simplify API documentation.
11551
11552 2005-05-23  Derek Price  <derek@ximbiot.com>
11553
11554         * modules/minmax (Files): Add m4/minmax.m4.
11555         (configure.ac): Add gl_MINMAX.
11556
11557 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
11558
11559         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
11560         so that unistd-safer.h (GPL'ed code) need not be included.
11561
11562 2005-05-22  Bruno Haible  <bruno@clisp.org>
11563
11564         * m4/minmax.m4: New file.
11565         Based on a patch by Derek Price <derek@ximbiot.com>.
11566
11567 2005-05-22  Bruno Haible  <bruno@clisp.org>
11568
11569         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
11570         (INT64_MIN): Fix definition.
11571         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
11572
11573         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
11574         NEED_SIGNED_INT_TYPES.
11575
11576         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
11577         HAVE_SYSTEM_INTTYPES.
11578
11579 2005-05-22  Bruno Haible  <bruno@clisp.org>
11580
11581         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
11582         Also include <sys/param.h> if it defines MIN, MAX.
11583         Based on a patch by Derek Price <derek@ximbiot.com>.
11584
11585 2005-05-21  Jim Meyering  <jim@meyering.net>
11586
11587         * modules/fts (Files): Add m4/inttypes-pri.m4.
11588         (Depends-on): Add lstat and remove gettext.  Alphabetize.
11589
11590 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11591
11592         New fts module.
11593         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
11594         (setup_dir, free_dir): New functions.
11595         (enter_dir, leave_dir): Define trivial
11596         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
11597         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
11598         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
11599         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
11600         Move to fts-cycle.c.
11601         (fts_open): Use setup_dir.
11602         (fts_close): Use free_dir.
11603         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
11604         This adds a label and some gotos, but the alternatives were messier.
11605         Check for memory allocation failure when entering a dir.
11606         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
11607         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
11608         (FTS): New member fts_cycle, that is a union that contains the
11609         old active_dir_ht and cycle_state.  All uses changed to mention
11610         fts_cycle.ht and fts_cycle.state.
11611         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
11612         fts.c, with the following changes:
11613         (setup_dir, free_dir): New functions.
11614         (enter_dir): Now returns bool.  Return true if successful, false
11615         if memory exhausted.  All callers changed.
11616         Do not bother partly cleaning up on
11617         memory allocation failure; that is free_dir's job.
11618         However, free ad if hash_insert fails, to avoid memory leak.
11619         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
11620         fts->fts_options to see which union member to use.
11621
11622 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11623
11624         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
11625         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
11626
11627 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11628
11629         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
11630
11631 2005-05-20  Jim Meyering  <jim@meyering.net>
11632
11633         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
11634         Now a macro, to pacify GCC.
11635
11636 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
11637
11638         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
11639         of -1.
11640
11641 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
11642
11643         * lib/chown.c (rpl_chown): Return -1 on failure.
11644
11645 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
11646
11647         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
11648         Don't check for stddef.h.
11649         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
11650         don't use its results.
11651         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
11652         since we include them unconditionally.  Don't require
11653         AM_STDBOOL_H, since stdbool is a prerequisite.
11654         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
11655         since we assume C89 or better.
11656         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
11657         as we don't use their results.
11658         Don't check for fchdir, memmove, memset, strrchr, as we use
11659         them unconditionally.
11660         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
11661         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
11662
11663 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
11664
11665         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
11666         Include <stddef.h> unconditionally, since we assume C89 now.
11667         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
11668         * lib/fts.c: Include fts_.h first, to check interface.
11669         Do not include intprops.h; no longer needed.
11670         Include cycle-check.h and hash.h, since fts_.h no longer does.
11671         Remove unnecessary casts of closedir to void.
11672         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
11673         decide whether to decrement nlinks.
11674         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
11675         (FTS): Use struct hash_table * instead of Hash_table, so that
11676         we no longer need to include hash.h here.
11677
11678 2005-05-18  Jim Meyering  <jim@meyering.net>
11679
11680         * modules/dirfd (License): Change to LGPL.  Most of the code
11681         is already in the public domain.
11682
11683 2005-05-18  Jim Meyering  <jim@meyering.net>
11684
11685         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
11686         Reported by Yoann Vandoorselaere.
11687
11688 2005-05-17  Jim Meyering  <jim@meyering.net>
11689
11690         * m4/fts.m4: New file, from coreutils.
11691
11692 2005-05-17  Jim Meyering  <jim@meyering.net>
11693
11694         * lib/fts.c, lib/fts_.h: New files, from coreutils.
11695
11696 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11697
11698         Sync from coreutils.
11699         * m4/unlinkdir.m4: New file.
11700
11701 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11702
11703         Sync from coreutils.
11704         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
11705         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
11706         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
11707         White space changes only.
11708         * lib/makepath.c (make_path): Port to hosts where leading "//" is
11709         special.
11710         * lib/yesno.c: Include getline.h, not ctype.h.
11711         (yesno): Don't remove leading white space; POSIX doesn't allow it.
11712         Use getline to remove arbitrary restriction on response length.
11713
11714 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11715
11716         * config/srclist-update: Spell out "Street" in FSF postal
11717         mail address; this is the style the FSF seems to prefer.
11718
11719         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
11720         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
11721         this updates FSF postal mail address.
11722
11723         Sync from coreutils.
11724         * modules/unlinkdir: New file.
11725         * modules/yesno (Depends-on): Add getline.
11726         * MODULES.html.sh (File system functions): Add unlinkdir.
11727
11728 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
11729
11730         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
11731         lib/strsep.h:
11732         Change the initial comment to refer to GPL, not LGPL.
11733         gnulib-tool will change it to LGPL as needed.
11734
11735         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
11736         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
11737         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
11738         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
11739         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
11740         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
11741         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
11742         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
11743         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
11744         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
11745         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
11746         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
11747         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
11748         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
11749         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
11750         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
11751         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
11752         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
11753         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
11754         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
11755         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
11756         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
11757         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
11758         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
11759         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
11760         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
11761         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
11762         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
11763         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
11764         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
11765         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
11766         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
11767         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
11768         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
11769         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
11770         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
11771         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
11772         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
11773         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
11774         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
11775         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
11776         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
11777         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
11778         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
11779         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
11780         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
11781         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
11782         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
11783         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
11784         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
11785         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
11786         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
11787         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
11788         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
11789         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
11790         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
11791         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
11792         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
11793         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
11794         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
11795         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
11796         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
11797         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
11798         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
11799         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
11800         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
11801         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
11802         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
11803         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
11804         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
11805         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
11806         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
11807         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
11808         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
11809         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
11810         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
11811         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
11812         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
11813         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
11814         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
11815         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
11816         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
11817         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
11818         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
11819         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
11820         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
11821         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
11822         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
11823         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
11824         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
11825         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
11826         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
11827         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
11828         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
11829         lib/yesno.c, lib/yesno.h:
11830         Update FSF postal mail address.
11831
11832 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
11833
11834         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
11835         tests/test-memmem.c, tests/test-stpncpy.c:
11836         Update FSF postal mail address.
11837
11838 2005-05-13  Bruno Haible  <bruno@clisp.org>
11839
11840         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
11841         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
11842         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
11843         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
11844         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
11845         Add support for 64-bit integers in the MSVC compiler.
11846
11847 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11848
11849         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
11850
11851 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
11852
11853         * gnulib-tool (func_import): Sort and uniquify recommended includes.
11854
11855 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
11856
11857         * doc/getdate.texi (General date syntax): Don't say that date
11858         date --iso-8601=ns generates acceptable dates; it doesn't yet.
11859         Problem reported by Nic Ferrier.
11860
11861 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11862
11863         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
11864         specified in ai_socktype. Fix invalid ai_protocol
11865         check. ai_protocol is usually set to 0 or depending on
11866         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
11867         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
11868         ai_socktype / ai_protocol in the returned addrinfo structure.
11869
11870 2005-05-10  Simon Josefsson  <jas@extundo.com>
11871
11872         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
11873         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11874
11875 2005-05-10  Karl Berry  <karl@gnu.org>
11876
11877         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
11878         (from http://www.gnu.org/licenses).
11879         * doc/COPYING.LIB: also rename to COPYING.LESSER.
11880         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
11881         fdl.texi suffices.
11882
11883 2005-05-10  Karl Berry  <karl@gnu.org>
11884
11885         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
11886         (COPYING.DOC): remove.
11887
11888         * config/srclist-update: new FSF address.
11889
11890 2005-05-10  Derek Price  <derek@ximbiot.com>
11891
11892         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
11893         possible.
11894
11895 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11896             Bruno Haible  <bruno@clisp.org>
11897
11898         * modules/inet_ntop: New file.
11899         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11900         inet_ntop.
11901
11902 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11903             Bruno Haible  <bruno@clisp.org>
11904
11905         * m4/inet_ntop.m4: New file.
11906
11907 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11908             Bruno Haible  <bruno@clisp.org>
11909
11910         * lib/inet_ntop.h: New file.
11911         * lib/inet_ntop.c: New file, from glibc with modifications.
11912
11913 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
11914
11915         * modules/time_r (License): Change to LGPL.
11916         * modules/extensions (License): Change to LGPL.  Actually,
11917         the license is more permissive than that, but currently gnulib-tool
11918         doesn't know how to handle more-permissive licenses.
11919
11920         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
11921         Problem reported by Dave Love.
11922
11923 2005-05-08  Jim Meyering  <jim@meyering.net>
11924
11925         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
11926         blank.
11927
11928 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
11929
11930         * modules/argmatch (Depends-on): Add stdbool.
11931         * modules/backupfile (Depends-on): Likewise.
11932         * modules/chdir-long (Depends-on): Likewise.
11933         * modules/closeout (Depends-on): Likewise.
11934         * modules/cycle-check (Depends-on): Likewise.
11935         * modules/dirname (Depends-on): Likewise.
11936         * modules/fnmatch (Depends-on): Likewise.
11937         * modules/fsusage (Depends-on): Likewise.
11938         * modules/fwriteerror (Depends-on): Likewise.
11939         * modules/getcwd (Depends-on): Likewise.
11940         * modules/getloadavg (Depends-on): Likewise.
11941         * modules/hard-locale (Depends-on): Likewise.
11942         * modules/makepath (Depends-on): Likewise.
11943         * modules/mountlist (Depends-on): Likewise.
11944         * modules/nanosleep (Depends-on): Likewise.
11945         * modules/posixtm (Depends-on): Likewise.
11946         * modules/quotearg (Depends-on): Likewise.
11947         * modules/readtokens (Depends-on): Likewise.
11948         * modules/readtokens0 (Depends-on): Likewise.
11949         * modules/readutmp (Depends-on): Likewise.
11950         * modules/save-cwd (Depends-on): Likewise.
11951         * modules/strftime (Depends-on): Likewise.
11952         * modules/userspec (Depends-on): Likewise.
11953         * modules/utimecmp (Depends-on): Likewise.
11954         * modules/xgetcwd (Depends-on): Likewise.
11955         * modules/xnanosleep (Depends-on): Likewise.
11956         * modules/xstrtod (Depends-on): Likewise.
11957         * modules/yesno (Depends-on): Likewise.
11958
11959 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
11960
11961         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
11962         needless checks.
11963
11964 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11965
11966         Merge from coreutils.  Among other things,
11967         add bulletproofing for cases where stdin, stdout, or stderr are closed.
11968         * lib/fd-safer.c: New file.
11969         * lib/fcntl-safer.h, open-safer.c: Remove.
11970         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
11971         * lib/dup-safer.c: Include unistd-safer.h first.
11972         Don't include errno.h.
11973         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
11974         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
11975         * lib/file-type.c: Rely on file-type.h change.
11976         * lib/getloadavg.c: Include unistd-safer.h.
11977         (getloadavg): Use safer open.
11978         * lib/getusershell.c: Include "stdio-safer.h".
11979         (getusershell): Use safer fopen.
11980         * lib/long-options.c (long_options): Use NULL rather than 0.
11981         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
11982         'free'.
11983         * lib/modechange.c: Likewise.
11984         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
11985         (MODE_DONE): New constant.
11986         (struct mode_change): Remove 'next' member.
11987         (make_node_op_equals): New function; like the old one of the
11988         same name, except it allocates an array.
11989         (mode_compile, mode_create_from_ref): Use it.
11990         (mode_compile): Allocate result as an array, not a linked list.
11991         Parse octal string ourself, so that we catch mistakes like "+0".
11992         (mode_adjust): Arg is an array, not a linked list.
11993         * lib/modechange.c: Include stat-macros.h, xalloc.h.
11994         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
11995         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
11996         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
11997         Remove.  This is now stat-macros.h's job.
11998         (talloc): Remove.  All callers replaced by xalloc, so that
11999         our invokers don't have to worry about reporting memory failures.
12000         (make_node_op_equals): Remove.
12001         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12002         New constants.
12003         (struct mode_change): Moved here from modechange.h.
12004         (mode_append_entry): Remove.
12005         (mode_compile): Remove MASKED_OPS arg, since it encouraged
12006         apps to have incorrect behavior.  Use simpler algorithm for head
12007         and tail.  Don't futz with umask; that's now the job of mode_adjust.
12008         Detect more invalid usages rather than having somewhat-random behavior.
12009         Don't insert an "a=" action, as that leads to incorrect behavior.
12010         (mode_compile, mode_create_from_ref): Return NULL on error instead
12011         of an enum, since now there's only one way to have an error.  All
12012         callers changed.
12013         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
12014         at the correct time.  Simplify calculation of "+u" and its ilk.
12015         Don't mishandle "+X".
12016         (mode_free): Remove "register" and localize decls.
12017         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12018         (struct mode_change): Move to modechange.c; callers don't
12019         need to see this stuff.
12020         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
12021         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
12022         (mode_change, mode_adjust): Reflect the new signatures noted above.
12023         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
12024         that might redefine system include files.
12025         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
12026         (my_usleep): Use NULL rather than (void *) 0.
12027         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
12028         Use siginterrupt to specify that system calls should be interrupted.
12029         (rpl_nanosleep): Move initialization of suspended closer to call of
12030         my_usleep.
12031         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
12032         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
12033         (desirable_utmp_entry): New function.
12034         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
12035         using x2nrealloc, to simplify logic.
12036         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
12037         size calculation.  Do not assume utmp file is a regular file.
12038         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
12039         (READ_UTMP_CHECK_PIDS): New constant.
12040         * lib/save-cwd.c: Include unistd-safer.h.
12041         (save_cwd): Use fd_safer.
12042         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
12043         [!_LIBC] Include "stat-macros.h" instead.
12044         * lib/unistd-safer.h (fd_safer): New decl.
12045
12046 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12047
12048         * modules/getloadavg (Depends-on): Add unistd-safer.
12049         * modules/getusershell (Depends-on): Add stdio-safer.
12050         * modules/lstat (Depends-on): Remove xalloc.
12051         * modules/mkstemp (Depends-on): Add stat-macros.
12052         * modules/modechange (Depends-on): Remove xstrtol.
12053         Add stat-macros, xalloc.
12054         * modules/save-cwd (Depends-on): Add unistd-safer.
12055         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
12056         * modules/unistd-safer (Files): Add lib/fd-safer.c
12057         (Makefile.am): Remove lib_SOURCES.
12058
12059         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
12060         Remove fcntl-safer; unistd-safer supersedes it.
12061
12062 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12063
12064         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
12065         AC_HEADER_STAT.
12066         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
12067         (gl_PREREQ_CHOWN): Remove.
12068         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
12069         it.  Don't require AC_HEADER_STAT.
12070         (gl_PREREQ_LSTAT): Remove.
12071         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
12072         Don't require AC_HEADER_STAT.
12073         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
12074         (gl_PREREQ_RMDIR): Remove.
12075         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
12076         mention stat-macros.h or AC_HEADER_STAT, since we'll make
12077         the stat-macros module a prerequisite.
12078         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
12079         * m4/filemode.m4 (gl_FILEMODE): Likewise.
12080         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
12081         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
12082         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
12083         variable names.
12084         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
12085         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
12086         variable prefixes.
12087         * m4/fcntl-safer.m4: Remove.
12088         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
12089         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
12090         Invoke gl_PREREQ_FD_SAFER.
12091         (gl_PREREQ_FD_SAFER): New macro.
12092         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
12093         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
12094         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
12095         Remove duplicate call to AC_LIBOBJ(readutmp).
12096         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
12097
12098         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
12099         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
12100
12101 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12102
12103         * MODULES.html.sh (Misc): Add byteswap.
12104
12105 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12106
12107         * modules/getcwd (Depends-on): Add extensions.
12108         * modules/openat (Depends-on): Likewise.
12109
12110 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12111
12112         * modules/byteswap: New file.
12113
12114 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12115
12116         * m4/byteswap.m4: New file.
12117
12118 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12119
12120         * lib/byteswap_.h: New file.
12121
12122 2005-04-25  Karl Berry  <karl@gnu.org>
12123
12124         * m4/gettext.m4: Update from GNU gettext 0.14.4.
12125
12126 2005-04-25  Albert Chin  <china@thewrittenword.com>
12127
12128         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
12129         Toolkit C bug.
12130
12131 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
12132
12133         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
12134         (func_ln_if_changed) Remove forcibly for no error message
12135         in case file does not exist.
12136
12137 2005-04-19  Simon Josefsson  <jas@extundo.com>
12138
12139         * gnulib-tool (Options): Make --symlink mean --symbolic.
12140
12141 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
12142
12143         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
12144
12145 2005-04-16  Simon Josefsson  <jas@extundo.com>
12146
12147         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
12148
12149 2005-04-15  Simon Josefsson  <jas@extundo.com>
12150
12151         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
12152
12153 2005-04-15  Simon Josefsson  <jas@extundo.com>
12154
12155         * gnulib-tool: Rename --symlink to --symbolic.
12156
12157 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
12158
12159         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
12160         symbolic links to files instead of copying/moving.  Add --aux-dir,
12161         specifying directory relative --dir where auxiliary build tools
12162         are placed.
12163
12164 2005-04-14  Bruno Haible  <bruno@clisp.org>
12165
12166         * modules/allocsa (License): Change to LGPL.
12167         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
12168
12169 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
12170
12171         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
12172         that "UTC +1 second" continues to work.  Problem reported
12173         by Dmitry V. Levin.
12174         (relunit_snumber): New rule.
12175         (relunit): Use it.
12176
12177 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
12178
12179         * lib/getdate.y (universal_time_zone_table): New constant.
12180         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
12181         universal_time_zone_table.
12182         (lookup_zone): Prefer universal_time_zone_table to
12183         local_time_zone_table, so that "GMT" time stamps are allowed in
12184         London during the summer.  Problem reported by Ian Abbott.
12185
12186 2005-04-12  Jim Meyering  <jim@meyering.net>
12187
12188         * lib/human.c (humblock): Set *options even when returning due to
12189         xstrtoumax conversion failure.  Thanks to a used-uninitialized
12190         warning from gcc-4.
12191
12192 2005-04-09  Jim Meyering  <jim@meyering.net>
12193
12194         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
12195         -Wuninitialized: initialize tm0.tm_year.
12196
12197 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
12198
12199         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
12200         count, since there's no maximum.  All uses changed.
12201         Add member dsts_seen.
12202         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
12203         not being INT_MAX.
12204         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
12205         Use pc_rels_seen to decide whther a date is absolute.
12206
12207         * lib/getdate.y (number): Don't overwrite year.
12208         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
12209         check.
12210
12211 2005-04-02  Simon Josefsson  <jas@extundo.com>
12212
12213         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
12214         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
12215
12216 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
12217
12218         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
12219         where no absolute path name can be longer than PATH_MAX.
12220
12221 2005-03-27  Jim Meyering  <jim@meyering.net>
12222
12223         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
12224
12225 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
12226
12227         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
12228         "one's complement" -> "ones' complement" in comment, as per Knuth.
12229         "value of type" -> "type or expression" in comment.
12230         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
12231
12232 2005-03-26  Jim Meyering  <jim@meyering.net>
12233
12234         Comment nits.
12235         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
12236         Correct typos: s/or/of/.
12237
12238 2005-03-26  Jim Meyering  <jim@meyering.net>
12239
12240         * modules/check-include-files: Move to ../ and rename to...
12241         * check-module: ...this.
12242
12243 2005-03-25  Jim Meyering  <jim@meyering.net>
12244
12245         * modules/xvasprintf (Files): Add xalloc.h.
12246
12247 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
12248
12249         * modules/gettext (Files): config/config.rpath ->
12250         build-aux/config.rpath
12251         * modules/iconv (Files): Likewise.
12252         Problem reported by Oskar Liljeblad.
12253
12254 2005-03-23  Jim Meyering  <jim@meyering.net>
12255
12256         * modules/check-include-files: New script to check for
12257         missing dependencies, multiple includes, etc.
12258
12259         * modules/c-strtold (Depends-on): Add xalloc.
12260         * modules/c-strtod (Depends-on): Add xalloc.
12261         * modules/hash (Depends-on): Add xalloc.
12262         (Files): Remove lib/xalloc.h.
12263
12264         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
12265         * modules/userspec (Files): Add lib/inttostr.h.
12266
12267 2005-03-23  Jim Meyering  <jim@meyering.net>
12268
12269         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
12270
12271 2005-03-22  Jim Meyering  <jim@meyering.net>
12272
12273         * modules/stat-macros: New module.
12274         * modules/canonicalize, modules/euidaccess, modules/file-type,
12275         * modules/filemode, modules/lchown, modules/makepath,
12276         * modules/rmdir, modules/stat: Depend on new stat-macros module
12277         rather than listing lib/stat-macros.h manually.
12278         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
12279
12280 2005-03-22  Jim Meyering  <jim@meyering.net>
12281
12282         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
12283
12284 2005-03-22  Bruno Haible  <bruno@clisp.org>
12285
12286         * config/srclist.txt: Replace target directory 'config' with
12287         'build-aux'.
12288         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
12289         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
12290         ../build-aux/.
12291
12292 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
12293
12294         * modules/chdir-long (Depends-on): Add mempcpy.
12295
12296         * modules/acl, modules/backupfile, modules/c-strtod,
12297         modules/c-strtold, modules/canon-host, modules/canonicalize,
12298         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
12299         modules/exclude, modules/exitfail, modules/file-type,
12300         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
12301         modules/getdate, modules/getline, modules/getpagesize,
12302         modules/getpass, modules/getugroups, modules/group-member,
12303         modules/hard-locale, modules/hash, modules/human, modules/idcache,
12304         modules/inttostr, modules/long-options, modules/makepath,
12305         modules/md5, modules/memcasecmp, modules/memcoll,
12306         modules/modechange, modules/mountlist, modules/path-concat,
12307         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
12308         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
12309         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
12310         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
12311         modules/strftime, modules/strndup, modules/strverscmp,
12312         modules/timespec, modules/unlocked-io, modules/userspec,
12313         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
12314         modules/yesno:
12315         Remove lib_SOURCES line from Makefile.am section, as this is now
12316         done automatically by the corresponding Autoconf macro.
12317
12318 2005-03-21  Jim Meyering  <jim@meyering.net>
12319
12320         Changes imported from coreutils.
12321
12322         * lib/cycle-check.c: Don't include xalloc.h.
12323
12324         * lib/path-concat.c: Don't include assert.h.
12325         (path_concat): Remove assertion that would have triggered
12326         for ABASE starting with more than one slash.
12327         Reported by Andreas Schwab.
12328
12329         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
12330         properly when ABASE is an absolute file name.
12331         Correct the description of this function.
12332         Include <assert.h>.
12333         Add an assertion and a test driver.
12334         This fixes a bug introduced on 2004-07-02.
12335         Andreas Schwab reported the resulting failure of cp --parents:
12336         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
12337
12338 2005-03-21  Jim Meyering  <jim@meyering.net>
12339
12340         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
12341         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
12342
12343 2005-03-21  Jim Meyering  <jim@meyering.net>
12344         and  Paul Eggert  <eggert@cs.ucla.edu>
12345
12346         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
12347         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
12348         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
12349         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
12350         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
12351         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
12352         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
12353         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
12354         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
12355         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
12356         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
12357         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
12358         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
12359         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
12360         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
12361         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
12362         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
12363         for these modules.
12364
12365 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
12366
12367         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
12368         (which shouldn't happen), generate nothing instead of returning 0
12369         immediately, so that nstrftime (NULL, ...) doesn't return 0.
12370
12371 2005-03-16  Bruno Haible  <bruno@clisp.org>
12372
12373         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
12374         HAVE_LONGLONG_64BIT.
12375
12376 2005-03-16  Bruno Haible  <bruno@clisp.org>
12377
12378         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
12379         HAVE_LONGLONG_64BIT.
12380
12381 2005-03-16  Bruno Haible  <bruno@clisp.org>
12382
12383         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
12384         HAVE_LONGLONG_64BIT.
12385
12386 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
12387
12388         * lib/strftime.c (my_strftime): Prepend space to format so that we can
12389         reliably distinguish strftime failure from empty output on POSIX
12390         hosts.
12391
12392 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
12393
12394         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
12395         (iconv_string): Don't guess a size-zero buffer, as that might cause
12396         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
12397         result would be 'too large', where 'too large' is (heuristically)
12398         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
12399         overflow concerns.  This will prevent some unwanted malloc failures
12400         when the inputs are very large.
12401
12402 2005-03-15  Karl Berry  <karl@gnu.org>
12403
12404         * config/srclist.txt (config.rpath): from gettext.
12405         * config/config.rpath: update.
12406
12407 2005-03-15  Bruno Haible  <bruno@clisp.org>
12408
12409         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
12410         to 'negate'.
12411
12412         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
12413         variable.
12414
12415         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
12416         results.
12417
12418 2005-03-14  Simon Josefsson  <jas@extundo.com>
12419
12420         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
12421         <fx@gnu.org>.
12422
12423 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
12424
12425         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
12426         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
12427         intprops.h.
12428         * lib/strtol.c: Likewise.
12429
12430 2005-03-14  Jim Meyering  <jim@meyering.net>
12431
12432         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
12433         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
12434         to be nonzero so that we (and caller) can detect the difference
12435         between a valid zero-length expansion and an error return, even
12436         when the underlying strftime fails before writing anything into
12437         that location.
12438
12439 2005-03-14  Bruno Haible  <bruno@clisp.org>
12440
12441         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
12442         Update from GNU gettext 0.14.3.
12443
12444 2005-03-10  Jim Meyering  <jim@meyering.net>
12445
12446         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
12447
12448 2005-03-10  Jim Meyering  <jim@meyering.net>
12449
12450         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
12451         so that this module works on systems without fchdir.
12452
12453 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
12454
12455         Factor int-properties macros into a single file, except for
12456         glibc-related files.
12457         * lib/intprops.h: New file.
12458         * lib/getloadavg.c: Include it instead of limits.h.
12459         (INT_STRLEN_BOUND): Remove.
12460         * lib/human.c: Include intprops.h.
12461         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
12462         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
12463         302/1000.
12464         * lib/inttostr.h: Include intprops.h instead of limits.h.
12465         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
12466         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
12467         for consistency with intprops.h.
12468         (time_t_is_integer, twos_complement_arithmetic): Use them.
12469         * lib/sig2str.h: Include <signal.h>, intprops.h.
12470         (INT_STRLEN_BOUND): Remove.
12471         * lib/strftime.c (TYPE_SIGNED): Remove.
12472         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
12473         * lib/strtol.c: Adjust comments to match intprops.h.
12474         * lib/userspec.c: Include intprops.h.
12475         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
12476         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
12477         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
12478         instead of rolling our own expressions.
12479         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
12480
12481         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
12482         instead of int.
12483         (my_strftime): Do not mishandle years close to INT_MAX, by doing
12484         the right thing even if adding 1900 would overflow.  Similarly
12485         for tm_mon + 1 and tm_yday + 1.
12486         Make %Y always equivalent to %C%y, and similarly for %G and %g.
12487         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
12488         (DO_SIGNED_NUMBER): New macro.
12489         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
12490
12491 2005-03-07  Bruno Haible  <bruno@clisp.org>
12492
12493         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
12494
12495 2005-03-07  Bruno Haible  <bruno@clisp.org>
12496
12497         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
12498
12499 2005-03-04  Derek R. Price  <derek@ximbiot.com>
12500
12501         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
12502         (func_import): Only replace files via --import when they have actually
12503         changed.
12504
12505 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12506
12507         * m4/mmap-anon.m4: New file.
12508         * m4/pagealign_alloc.m4: New file.
12509
12510 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12511             Bruno Haible  <bruno@clisp.org>
12512
12513         * modules/pagealign_alloc: New file.
12514         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
12515
12516 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12517             Bruno Haible  <bruno@clisp.org>
12518
12519         * lib/pagealign_alloc.h: New file.
12520         * lib/pagealign_alloc.c: New file.
12521
12522 2005-03-03  Bruno Haible  <bruno@clisp.org>
12523
12524         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
12525         Use an all-permissive copyright notice, recommended by RMS.
12526
12527 2005-03-02  Bruno Haible  <bruno@clisp.org>
12528
12529         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
12530         of AIX, the replacement has to be done only after <string.h> is
12531         included, therefore not in config.h. stpncpy.h does the replacement,
12532         and stpncpy.c uses it.
12533
12534 2005-03-02  Bruno Haible  <bruno@clisp.org>
12535
12536         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
12537         stpncpy.c uses it.
12538
12539 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12540
12541         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
12542         The workaround isn't strictly needed for POSIX conformance, and
12543         it's too much of a pain to configure and maintain.  We'll ask
12544         people to fix their kernels instead.
12545         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
12546         (NANOSLEEP_BUG_WORKAROUND): Remove.
12547         (xnanosleep): Remove the workaround.
12548
12549 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12550
12551         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
12552         Reported by Derek Price.
12553         (Include): Add "timespec.h".
12554
12555         * modules/xnanosleep (Depends-on): Remove gethrxtime.
12556
12557 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12558
12559         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
12560         to detect nanosleep bug.
12561
12562 2005-03-01  Bruno Haible  <bruno@clisp.org>
12563
12564         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
12565
12566 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
12567
12568         * modules/gethrxtime: New file.
12569         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
12570         (Depends-on): Add gethrxtime.
12571         (configure.ac): Add gl_XNANOSLEEP.
12572         (Makefile.am): Remove lib_SOURCES line.
12573
12574 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
12575
12576         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
12577         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
12578
12579 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
12580
12581         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
12582         * lib/timespec.h (gettime): Return void, since it always
12583         succeeds now.  All uses changed.
12584         * lib/gettime.c (gettime) Likewise.
12585         [HAVE_NANOTIME]: Prefer nanotime.
12586         Assume gettimeofday succeeds, as POSIX requires.
12587         Assime time () succeeds, since other code already does.
12588         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
12589         (timespec_subtract): Remove.
12590         (NANOSLEEP_BUG_WORKAROUND): New constant.
12591         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
12592         things considerably.  Use it only on GNU/Linux hosts, since the
12593         workaround shouldn't be needed elsewhere.
12594
12595 2005-02-24  Bruno Haible  <bruno@clisp.org>
12596
12597         * modules/gettext (Files): Add m4/glibc2.m4.
12598
12599 2005-02-24  Bruno Haible  <bruno@clisp.org>
12600
12601         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
12602         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
12603         * m4/progtest.m4:
12604         Update from GNU gettext 0.14.2.
12605         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
12606
12607 2005-02-24  Bruno Haible  <bruno@clisp.org>
12608
12609         * lib/localcharset.c: Update from GNU gettext 0.14.2.
12610         * lib/config.charset: Update from GNU gettext 0.14.2.
12611
12612 2005-02-24  Bruno Haible  <bruno@clisp.org>
12613
12614         * lib/gettext.h: Update from GNU gettext 0.14.2.
12615
12616 2005-02-23  Simon Josefsson  <jas@extundo.com>
12617
12618         * m4/iconvme.m4: New file.
12619
12620 2005-02-23  Jim Meyering  <jim@meyering.net>
12621
12622         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
12623         change.
12624         Thanks to Bruno Haible for catching it.
12625
12626 2005-02-22  Simon Josefsson  <jas@extundo.com>
12627
12628         * modules/iconvme: New file.
12629
12630         * MODULES.html.sh: Add iconvme.
12631
12632 2005-02-22  Simon Josefsson  <jas@extundo.com>
12633
12634         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
12635
12636 2005-02-22  Simon Josefsson  <jas@extundo.com>
12637
12638         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
12639
12640 2005-02-22  Jim Meyering  <jim@meyering.net>
12641
12642         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
12643         s/ifndef/ifdef/.
12644
12645 2005-02-20  Neil Conway  <neilc@samurai.com>
12646
12647         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
12648         returned by OSX/Darwin if the specified buffer is not large
12649         enough for the hostname.
12650
12651 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12652
12653         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
12654         pass it to _help, otherwise the latter coredumps trying to
12655         dereference state.root_argp.
12656
12657 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12658
12659         * modules/chdir-long (Depends-on): Add memrchr.
12660         * modules/memrchr (Files): Add lib/memrchr.h.
12661         (Include): "memrchr.h".
12662
12663 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12664
12665         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
12666
12667 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12668
12669         * lib/memrchr.h: New file.
12670         * lib/chdir-long.c: Include it.
12671         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
12672         Don't bother including stddef.h.
12673
12674 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
12675
12676         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
12677         inclusion.
12678         Include <sys/types.h>, for dev_t.
12679         (ME_DUMMY, ME_REMOTE): Move from here....
12680         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
12681         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
12682         Dmitry V. Levin.
12683         Include mountlist.h first, to test the interface.
12684
12685 2005-01-29  Bruno Haible  <bruno@clisp.org>
12686
12687         * lib/progname.c (program_name): Initialize.
12688         Needed when linking statically on MacOS X.
12689
12690 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
12691
12692         Sync from coreutils.
12693         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
12694         (Depends-on): Add c-strtod.
12695         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
12696
12697 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
12698
12699         Sync from coreutils.
12700         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
12701
12702         Remove files that are specific to coreutils.
12703         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
12704
12705 2005-01-28  Bruno Haible  <bruno@clisp.org>
12706
12707         * modules/javacomp: New file.
12708         * MODULES.html.sh (Java): Add javacomp.
12709
12710 2005-01-28  Bruno Haible  <bruno@clisp.org>
12711
12712         * m4/javacomp.m4: New file, from GNU gettext.
12713
12714 2005-01-28  Bruno Haible  <bruno@clisp.org>
12715
12716         * lib/javacomp.sh.in: New file, from GNU gettext.
12717         * lib/javacomp.h: New file, from GNU gettext.
12718         * lib/javacomp.c: New file, from GNU gettext.
12719
12720 2005-01-26  Simon Josefsson  <jas@extundo.com>
12721
12722         * lib/gai_strerror.c: Use GPL in header.
12723
12724 2005-01-26  Bruno Haible  <bruno@clisp.org>
12725
12726         * modules/javaexec: New file.
12727         * MODULES.html.sh (Java): Add javaexec.
12728
12729 2005-01-26  Bruno Haible  <bruno@clisp.org>
12730
12731         * m4/javaexec.m4: New file, from GNU gettext.
12732
12733 2005-01-26  Bruno Haible  <bruno@clisp.org>
12734
12735         * lib/javaexec.sh.in: New file, from GNU gettext.
12736         * lib/javaexec.h: New file, from GNU gettext.
12737         * lib/javaexec.c: New file, from GNU gettext.
12738
12739 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12740
12741         * modules/lchown (Depends-on): Remove lchown.h
12742
12743 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12744
12745         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
12746         must be defined if the header file was not found, in order
12747         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
12748
12749 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12750
12751         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
12752         initializers for struct pentry_state.
12753         (__argp_error): Check return value of __asprintf
12754         (__argp_failure): Translate error message
12755
12756         * lib/argp-parse.c: Removed braces around the expansion of N_()
12757
12758 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12759
12760         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
12761         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
12762         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
12763         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
12764         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
12765         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
12766         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
12767         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
12768         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
12769         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
12770         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
12771         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
12772         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
12773         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
12774         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
12775         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
12776         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
12777         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
12778         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
12779         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
12780         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
12781         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
12782         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
12783         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
12784         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
12785         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
12786         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
12787         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
12788         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
12789         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
12790         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
12791         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
12792         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
12793         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
12794         xstrtol.m4, xstrtoumax.m4, yesno.m4:
12795         Use an all-permissive copyright notice, recommended by RMS.
12796
12797 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
12798
12799         * modules/chdir-long (Depends-on): Remove mempcpy.
12800
12801 2005-01-21  Jim Meyering  <jim@meyering.net>
12802
12803         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
12804         same value as for Solaris 9.
12805
12806         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
12807         component length.  This included changing the parameter to be
12808         of type `char *' rather than `char const *'.
12809         * lib/chdir-long.h (chdir_long): Update prototype.
12810
12811         * lib/openat.c (fdopendir, fstatat): New functions.
12812         * lib/openat.h: Include headers required for use of DIR and struct
12813         stat.
12814         [AT_SYMLINK_NOFOLLOW]: Define.
12815         (fdopendir, fstatat): Add prototypes.
12816
12817 2005-01-21  Bruno Haible  <bruno@clisp.org>
12818
12819         * modules/classpath: New file.
12820         * MODULES.html.sh (Java): Add classpath.
12821
12822 2005-01-21  Bruno Haible  <bruno@clisp.org>
12823
12824         * lib/classpath.h: New file, from GNU gettext.
12825         * lib/classpath.c: New file, from GNU gettext.
12826
12827 2005-01-20  Simon Josefsson  <jas@extundo.com>
12828
12829         * modules/version-etc-fsf: New file.
12830
12831 2005-01-20  Simon Josefsson  <jas@extundo.com>
12832
12833         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
12834         * lib/version-etc.c: Remove version_etc_copyright.
12835         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
12836         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
12837
12838 2005-01-20  Simon Josefsson  <jas@extundo.com>
12839
12840         * lib/base64.h (isbase64): Add.
12841
12842         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
12843         using a unsigned prototype, don't inline.
12844         (base64_decode): Use it.
12845
12846 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12847
12848         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
12849         it.
12850
12851 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12852
12853         * lib/save-cwd.c (save_cwd): Remove code to support the case
12854         where fchdir is missing or flaky.
12855
12856 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12857
12858         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
12859
12860 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
12861
12862         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
12863         AC_LIBSOURCES now does this.
12864         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
12865         with new ullong_max module.
12866
12867 2005-01-19  Bruno Haible  <bruno@clisp.org>
12868
12869         * modules/sh-quote: New file.
12870         * MODULES.html.sh (Executing programs): Add sh-quote.
12871
12872 2005-01-19  Bruno Haible  <bruno@clisp.org>
12873
12874         * lib/sh-quote.h: New file, from GNU gettext.
12875         * lib/sh-quote.c: New file, from GNU gettext.
12876
12877 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12878
12879         Merge from coreutils.
12880         * m4/ullong_max.m4: New file.
12881         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
12882         (gl_MACROS): Assume localeconv exists.
12883
12884 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12885
12886         Merge changes from coreutils, as described below in several
12887         changelogs dated today.
12888
12889         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
12890         (O_DIRECTORY): Remove; not needed here, since "." must be
12891         a directory.  All uses removed.
12892         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
12893         universal on Suns, and we also need to test for IRIX.
12894         Revamp code to use 'if' rather than '#if'.
12895         Avoid unnecessary comparison of cwd->desc to 0.
12896
12897         * lib/utimens.c (futimens): Robustify the previous patch, by checking
12898         for known valid error numbers rather than observed invalid ones.
12899
12900 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12901
12902         * modules/ullong_max: New file.
12903
12904         * modules/chdir-long, modules/openat: New files.
12905         * modules/save-cwd (Depends-on): Depend on chdir-long.
12906         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
12907
12908 2005-01-18  Jim Meyering  <jim@meyering.net>
12909
12910         Merge from coreutils.
12911         * m4/chdir-long.m4, m4/openat.m4: New files.
12912         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
12913         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
12914         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
12915         is sane and DOES follow symlinks.  Besides, testing 20 different
12916         systems found no broken chown implementations.
12917         Prompted by a change in rsync's copy of this macro.
12918         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
12919
12920         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
12921
12922         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
12923         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
12924         NULL-means-set-to-current-time semantics.
12925         Remove temporary file immediately, rather than waiting
12926         for configure's at-exit trap code to do it.
12927
12928 2005-01-18  Jim Meyering  <jim@meyering.net>
12929
12930         * lib/version-etc.c (version_etc_copyright): Update copyright date.
12931
12932         * lib/utimens.c (futimens): Account for the fact that futimes
12933         can also fail with errno == ENOSYS or errno == ENOENT.
12934         Patch from Dmitry V. Levin.
12935
12936         Change the name of the robust chdir function from chdir to chdir_long.
12937         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
12938         (restore_cwd): Use chdir_long, not chdir.
12939         * lib/chdir-long.c: Renamed from chdir.c.
12940         * lib/chdir-long.h: Renamed from chdir.h.
12941         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
12942         Hurd.
12943
12944 2005-01-18  Bruno Haible  <bruno@clisp.org>
12945
12946         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
12947         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
12948         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
12949         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
12950         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
12951         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
12952         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
12953         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
12954         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
12955         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
12956         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
12957         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
12958         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
12959         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
12960         Use an all-permissive copyright notice, recommended by RMS.
12961
12962 2005-01-18  Bob Proulx  <bob@proulx.com>
12963
12964         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
12965         simplify offsetof() macro construct to avoid compile failure with
12966         native HP-UX 11.0 ANSI C compiler.
12967
12968 2005-01-17  Bruno Haible  <bruno@clisp.org>
12969
12970         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
12971         redundant because stpncpy.m4 takes care of it.
12972
12973 2005-01-17  Bruno Haible  <bruno@clisp.org>
12974
12975         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
12976
12977 2005-01-17  Bruno Haible  <bruno@clisp.org>
12978
12979         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
12980         used.
12981
12982 2005-01-17  Bruno Haible  <bruno@clisp.org>
12983
12984         * lib/fwriteerror.h (fwriteerror): Change specification to include
12985         fclose.
12986         * lib/fwriteerror.c: Include <stdbool.h>.
12987         (fwriteerror): At the end, close the file stream. Record whether
12988         stdout was already closed.
12989
12990 2005-01-17  Bruno Haible  <bruno@clisp.org>
12991
12992         * lib/execute.c (environ): Declare if needed.
12993         * lib/pipe.c (environ): Likewise.
12994         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
12995
12996 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12997
12998         * modules/argp: Depend on vsnprintf
12999
13000 2005-01-10  Jim Meyering  <jim@meyering.net>
13001
13002         * modules/closeout (Depends-on): Add atexit.
13003
13004 2005-01-06  Bruno Haible  <bruno@clisp.org>
13005
13006         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
13007
13008 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13009
13010         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
13011         definitions to be after all include files, to avoid collisions.
13012         Problem reported by Bob Proulx.
13013
13014 2005-01-04  Jim Meyering  <jim@meyering.net>
13015
13016         Changes imported from coreutils.
13017         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
13018         as the mkstemp template, use a temporary directory and an
13019         8.3-friendly template to avoid trouble on systems like DJGPP.
13020         Reported by Juan M. Guerrero via Stepan Kasal.
13021         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
13022         close. Remove the temporary directory right away, rather than waiting
13023         for configure's at-exit trap code to do it.
13024         Suggestion from Stepan Kasal.
13025
13026 2005-01-01  Simon Josefsson  <jas@extundo.com>
13027
13028         * gnulib-tool: Print #include directives when --import'ing.
13029
13030 2004-12-28  Simon Josefsson  <jas@extundo.com>
13031
13032         * tests/test-base64.c: Include required header files.  Remove
13033         unused variables.
13034
13035 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13036
13037         * modules/error (Depends-on): Remove gettext.
13038
13039 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13040
13041         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
13042         not needed.  This removes a dependency on the gettext module.
13043         [defined _LIBC]: Do not include <libintl.h>; not needed.
13044
13045 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13046
13047         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
13048         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
13049
13050 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13051
13052         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
13053         HAVE_DECL_STRTOLD.
13054
13055 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13056
13057         * modules/getdate (Depends-on): Remove alloca-opt.
13058
13059 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13060
13061         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
13062
13063 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13064
13065         * lib/argp-parse.c: Include <stddef.h>.
13066         (alignof, alignto): New macros.
13067         (parser_init): Don't assume that void * is aligned sufficiently
13068         for struct option.
13069
13070         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
13071         need to extend the stack.
13072         (YYINITDEPTH): New macro, so that the initial stack isn't overly
13073         large.
13074
13075 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13076
13077         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
13078
13079 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
13080
13081         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
13082         (2004-10-24) change.  Apparently this was a false alarm.
13083
13084         * modules/getdate: Depend on alloca-opt, not alloca.
13085
13086 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
13087
13088         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
13089         Remove now-obsolete comment about AIX.
13090         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
13091         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
13092         (YYMAXDEPTH): New macro.
13093
13094 2004-12-18  Simon Josefsson  <jas@extundo.com>
13095
13096         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
13097
13098 2004-12-18  Bruno Haible  <bruno@clisp.org>
13099
13100         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
13101
13102 2004-12-18  Bruno Haible  <bruno@clisp.org>
13103
13104         * lib/fatal-signal.c (fatal_signals): Make non-const.
13105         (init_fatal_signals): New function.
13106         (uninstall_handlers, install_handlers): Ignore signals that were set to
13107         SIG_IGN.
13108         (at_fatal_signal): Call init_fatal_signals.
13109         (init_fatal_signal_set): Likewise. Ignore signals that were set to
13110         SIG_IGN.
13111         Reported by Paul Eggert.
13112
13113 2004-12-18  Bruno Haible  <bruno@clisp.org>
13114
13115         * doc/alloca.texi: New file.
13116         * doc/alloca-opt.texi: New file.
13117
13118 2004-12-17  Jim Meyering  <jim@meyering.net>
13119
13120         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
13121         Otherwise, install-sh could exit with improper exit status when
13122         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
13123
13124 2004-12-16  Simon Josefsson  <jas@extundo.com>
13125
13126         * tests/test-base64.c: Add license.
13127
13128 2004-12-15  Stepan Kasal  <address@hidden>
13129
13130         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
13131
13132 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
13133
13134         * modules/getcwd (Files): Add m4/d-ino.m4.
13135         Suggested by Mark D. Baushke.
13136
13137 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
13138
13139         * lib/getdate.y (textint): New member "negative".
13140         (time_zone_hhmm): New function.
13141         Expect 14 shift-reduce conflicts, not 13.
13142         (o_colon_minutes): New rule.
13143         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
13144         (yylex): Set the "negative" member of signed numbers.
13145
13146 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
13147
13148         * doc/getdate.texi (Time of day items, Time zone items):
13149         Describe new formats +00:00, UTC+00:00.
13150
13151 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13152
13153         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
13154         spurious "-l"s.  Problem reported by Stepan Kasal.
13155
13156 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
13157
13158         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
13159         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
13160
13161 2004-12-04  Simon Josefsson  <jas@extundo.com>
13162
13163         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
13164         Vandoorselaere <yoann@prelude-ids.org>.
13165
13166 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13167
13168         Changes imported from coreutils.
13169         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
13170         exist.
13171         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
13172
13173 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13174
13175         Changes imported from coreutils.
13176         * lib/hard-locale.c: Assume <locale.h> exists.
13177         Include "strdup.h".
13178         (GLIBC_VERSION): New macro.
13179         (hard_locale): Assume setlocale exists.
13180         Rewrite to avoid #ifdef.
13181         Use strdup rather than malloc + strcpy.
13182         * lib/human.c: Assume <locale.h> exists.
13183         (human_readable): Assume localeconv exists.
13184
13185 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13186
13187         * modules/hard-locale (Depends-on): Add strdup.
13188
13189 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
13190
13191         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
13192         convert T2, not T.  (Imported from libc.)
13193
13194 2004-11-30  Simon Josefsson  <jas@extundo.com>
13195
13196         * modules/restrict (License): Change to LGPL.
13197
13198 2004-11-30  Simon Josefsson  <jas@extundo.com>
13199
13200         * m4/restrict.m4: Add copyright and copying conditions.
13201
13202 2004-11-30  Simon Josefsson  <jas@extundo.com>
13203
13204         * m4/base64.m4: New file.
13205
13206 2004-11-30  Simon Josefsson  <jas@extundo.com>
13207
13208         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
13209         base64.
13210
13211         * tests/test-base64.c: New file.
13212
13213         * modules/base64: New file.
13214
13215 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
13216
13217         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
13218         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
13219
13220         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
13221
13222 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
13223
13224         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
13225         (__getcwd.c): Don't restore errno; glibc doesn't.
13226         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
13227         first, falling back to our code only if its results look suspicious.
13228         Ensure that the resulting buffer is only as large as necessary.
13229
13230         * lib/readutmp.c: Include readutmp.h first.
13231         Include <errno.h>, since readutmp.h no longer does that.
13232         * lib/readutmp.h: Don't include <errno.h>,
13233         <sys/param.h>, <time.h>; not needed to establish interface.
13234         (errno): Remove decl.
13235         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
13236         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
13237         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
13238
13239 2004-11-28  Simon Josefsson  <jas@extundo.com>
13240
13241         * lib/base64.h, base64.c: New file.
13242
13243 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
13244
13245         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
13246
13247 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
13248
13249         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
13250         (Depends-on): Remove pathmax, same.  Add mempcpy.
13251         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
13252         (Makefile.am): Append getcwd.h to lib_SOURCES.
13253         (Include): Add getcwd.h.
13254         (Maintainer): Change from Jim Meyering to "all, glibc",
13255         since getdate now uses intended-for-glibc code.
13256         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
13257         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
13258
13259 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13260
13261         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
13262         HP's ANSI C compiler.
13263         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
13264         Declaring int functions causes warnings on some modern systems and
13265         shouldn't be needed to compile on ancient ones.
13266         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
13267         defined.
13268
13269         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
13270         with the following changes.
13271         (__set_errno): Parenthesize properly.
13272         Include <stdbool.h>.
13273         (MIN, MAX, MATCHING_INO): New macros.
13274         (__getcwd): Define with prototype, not K&R form.
13275         Use heuristics to allocate default buffer on stack if possible.
13276         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
13277         behavior, and to avoid the PATH_MAX limit when computing
13278         ../../../../...
13279         Use MATCHING_INO to compare inode number to file.
13280         Check for arithmetic overflow in size calculations.
13281         Fix bug in reallocation of dot array that caused getcwd to fail
13282         on directories nested deeper than 75.
13283         Be more careful about saving errno on error.
13284         Do not use realloc; use only free+malloc, as this is a bit
13285         more flexible and avoids a needless copy operation.
13286         Do not inspect st_dev and st_ino for symbolic links; POSIX
13287         doesn't specify the latter.
13288         Check for closedir errors.
13289         Avoid needless casts.
13290         Use "#ifdef weak_alias" around weak_alias, to be like other
13291         glibc code.
13292         The following changes to getcwd.c have effect only when used in
13293         gnulib; they have no effect inside glibc proper.
13294         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
13295         as alloca isn't used.
13296         (alloca, __alloca): Likewise.
13297         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
13298         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
13299         unconditionally, as gnulib assumes C89 or better.
13300         Do not include <sys/param.h>.
13301         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
13302         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
13303         better.
13304         (NULL) [!defined NULL]: Remove; we assume C89 or better.
13305         Include <dirent.h> in a way that is compatible with modern Autoconf.
13306         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
13307         New macros, if not already defined.
13308         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
13309         Use "_LIBC", not "defined _LIBC", for consistency.
13310         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
13311         a mempcpy module.
13312         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
13313         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
13314         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
13315         credit only to Jim Meyering and adjust the copyright dates.
13316         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
13317         <stdlib.h>, <unistd.h>, "pathmax.h".
13318         Instead, include "xgetcwd.h" (first) and "getcwd.h".
13319         (INITIAL_BUFFER_SIZE): Remove.
13320         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
13321
13322 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13323
13324         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
13325         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
13326         Use the _ONCE methods, for efficiency.
13327         Check for fcntl.h.  In test program, include <errno.h>
13328         and <fcntl.h> if available.  Remove old K&R cruft from
13329         test program.  Check for common errors in GNU/Linux,
13330         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
13331         don't do AC_LIBOBJ, as that's getcwd.m4's job.
13332         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
13333         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
13334         name accordingly.
13335         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
13336         accommodate new getcwd.c.
13337         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
13338         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
13339         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
13340         that's all we need now.
13341
13342 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13343
13344         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
13345         argp-parse.c depends on getopt internals, that means we should
13346         always use our getopt, to be on the safe side.
13347         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
13348         order not to spoil the result of an eventual previous invocation
13349         of gl_GETOPT_SUBSTITUTE.
13350
13351 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13352
13353         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
13354         redefinition warnings. To avoid them, include the defines
13355         in `#if !defined __need_getopt ... #endif'. The only place
13356         where __getopt_argv_const is used is in definitions
13357         of getopt_long and getopt_long_only below, which are as well
13358         protected by `#ifndef __need_getopt'.
13359         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
13360         __need_getopt after including <stdio.h> and <unistd.h> These
13361         headers might have defined it.
13362
13363 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
13364
13365         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
13366
13367 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
13368
13369         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
13370         (futimens): New function, which uses futimes if available.
13371         (futimens, utimens): Support timespec==NULL, with same semantics
13372         as utime and utimens.
13373         * lib/utimens.h (futimens): New decl.
13374
13375 2004-11-23  Jim Meyering  <jim@meyering.net>
13376
13377         * lib/getopt_.h: Remove trailing blanks.
13378
13379 2004-11-23  Jim Meyering  <jim@meyering.net>
13380
13381         * lib/__fpending.c: Add comment.
13382
13383 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
13384
13385         * modules/canonicalize (Depends-on): Add xreadlink.
13386         Problem reported by James Youngman.
13387
13388 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
13389
13390         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
13391         New macros.
13392         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
13393         optopt): Use them instead of invoking ## directly; otherwise, the
13394         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
13395
13396 2004-11-19  Bruno Haible  <bruno@clisp.org>
13397
13398         * lib/strtok_r.c: Move comments from here...
13399         * lib/strtok_r.h: ... to here.
13400
13401 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
13402
13403         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
13404         implementations that mishandle size_t overflow.
13405
13406 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
13407
13408         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
13409         might fail.  Problem reported by Yoann Vandoorselaere.
13410         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
13411         implementations that mishandle size_t overflow.
13412
13413 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13414
13415         * modules/canon-host (Depends-on): Add strdup.
13416
13417 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13418
13419         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
13420
13421 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13422
13423         * lib/canon-host.c: Include "strdup.h".
13424         (canon_host): Use getaddrinfo if available, so that IPv6 works.
13425         Use strdup instead of malloc/strcpy to duplicate strings.
13426
13427         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
13428         (human_space_before_unit): New constant.
13429         * lib/human.c (human_readable): Support it.
13430
13431         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
13432         (xgetcwd): Set errno correctly when failing.
13433         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
13434         the failure is actually due to a PATH_MAX problem.
13435
13436         Further getopt changes to make it more likely that glibc will
13437         buy the changes back.
13438         * lib/getopt.c (POSIXLY_CORRECT): New constant.
13439         (getopt): Use it, so to preserve glibc semantic
13440         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
13441         when compiling for libc.
13442         * lib/getopt_.h (__getopt_argv_const): Bring it back.
13443         (getopt_long, getopt_long_only): Use it.
13444
13445         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
13446         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
13447         (getopt): Argv is now char * const *, as per standard.
13448         (_getopt_internal_r, _getopt_internal): Argv is now char **,
13449         not char *__getopt_argv_const *.
13450         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
13451         _getopt_long_only_r): Likewise.
13452         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
13453         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
13454         _getopt_long_r, _getopt_long_only_r): Likewise.
13455         * lib/getopt_.h (__getopt_argv_const): Remove.
13456         (getopt): Argv is now char * const *, as per standard.
13457
13458         * lib/getdate.y (tORDINAL): New token.
13459         (day, relunit): Allow it for relative times.
13460         (relative_time_table): Use tORDINAL for ordinals.
13461
13462 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13463
13464         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
13465         Document that "second" isn't allowed as an ordinal number.
13466
13467 2004-11-16  Jim Meyering  <jim@meyering.net>
13468
13469         * modules/closeout (Depends-on): Add fpending.
13470
13471 2004-11-15  Jim Meyering  <jim@meyering.net>
13472
13473         * lib/closeout.c: Include "__fpending.h" once again.
13474         Include <stdbool.h>.
13475         (close_stdout): Don't fail just because stdout was closed initially,
13476         since some programs don't write to stdout in the normal course of
13477         operation (other than --version and --help), and we don't want this
13478         function to make e.g. `touch file >&-' fail.
13479         But do fail if it was closed and someone has tried to write to it.
13480         E.g., `printf foo >&-' must fail.
13481
13482 2004-11-13  Jim Meyering  <jim@meyering.net>
13483
13484         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
13485
13486 2004-11-12  Simon Josefsson  <jas@extundo.com>
13487
13488         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
13489         small doc fix is still pending.
13490
13491 2004-11-11  Simon Josefsson  <jas@extundo.com>
13492
13493         * modules/strtok_r: New file.
13494
13495         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13496         strtok_r.
13497
13498 2004-11-11  Simon Josefsson  <jas@extundo.com>
13499
13500         * m4/strtok_r.m4: New file.
13501
13502         * m4/getopt.m4: Replace opterr.
13503
13504 2004-11-11  Simon Josefsson  <jas@extundo.com>
13505
13506         * lib/strtok_r.h, strtok_r.c: New file.
13507
13508 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
13509
13510         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
13511         of replacing opterr, getopt, etc.  This should handle the
13512         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
13513
13514 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
13515
13516         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
13517         we can stop lying to compilers about the constness of argv when we
13518         are compiled outside glibc.
13519         (getopt, getopt_long, getopt_long_only): Use it.
13520         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
13521         _getopt_internal, getopt): Likewise.
13522         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
13523         _getopt_long_only_r): Likewise.
13524         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
13525         _getopt_long_r, _getopt_long_only_r): Likewise.
13526
13527         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
13528         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
13529         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
13530         the other external symbols.
13531         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
13532         declaration, since the above renaming now works around collisions.
13533
13534 2004-11-11  Jim Meyering  <jim@meyering.net>
13535
13536         * lib/linebreak.c: Remove trailing blanks.
13537         * lib/alloca_.h: Likewise.
13538         * lib/acosl.c: Likewise.
13539         * lib/euidaccess.c: Likewise.
13540         * lib/allocsa.h: Likewise.
13541
13542 2004-11-10  Simon Josefsson  <jas@extundo.com>
13543
13544         * m4/getaddrinfo.m4: New file.
13545
13546 2004-11-10  Simon Josefsson  <jas@extundo.com>
13547
13548         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
13549
13550 2004-11-10  Simon Josefsson  <jas@extundo.com>
13551
13552         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13553         getaddrinfo.
13554
13555         * modules/getaddrinfo: New file.
13556
13557 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13558
13559         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
13560
13561 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13562
13563         * lib/mktime.c (SHR): New macro, which is a portable
13564         substitute for >> that should work even on Crays.
13565         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
13566         Problem reported by Mark D. Baushke in
13567         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
13568         * lib/getdate.y (SHR): Likewise.
13569         (tm_diff): Use it.
13570         * lib/strftime.c (SHR): Likewise.
13571         (tm_diff): Use it.
13572         * lib/quotearg.c (struct quoting_options): Use unsigned int for
13573         quote_these_too, so that right shifts are well defined.  All uses
13574         changed.
13575
13576 2004-11-10  Jim Meyering  <jim@meyering.net>
13577
13578         Ensure that no close failure goes unreported.
13579         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
13580         return early when it seems there's nothing to flush.
13581         Don't include __fpending.h.
13582
13583 2004-11-10  Jim Meyering  <jim@meyering.net>
13584
13585         * modules/closeout (Depends-on): Remove fpending.
13586
13587 2004-11-10  Jim Meyering  <jim@meyering.net>
13588
13589         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
13590
13591 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
13592
13593         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
13594         gl_FUNC_STRFTIME.
13595         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
13596         and AC_REQUIRE when possible, to avoid duplicate checks.
13597         Check for <wchar.h>.
13598
13599 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
13600
13601         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
13602
13603 2004-11-09  Bruno Haible  <bruno@clisp.org>
13604
13605         * m4/sockpfaf.m4: New file.
13606
13607 2004-11-05  Bruno Haible  <bruno@clisp.org>
13608
13609         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
13610         Reported by Mark D. Baushke <mdb@cvshome.org>.
13611
13612 2004-11-04  Bruno Haible  <bruno@clisp.org>
13613
13614         2004-09-11  Bruno Haible  <bruno@clisp.org>
13615                 * allocsa.valgrind: New file.
13616         2004-02-06  Bruno Haible  <bruno@clisp.org>
13617                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
13618                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
13619                 Reported by Christopher Seip <chris.seip@hp.com>.
13620
13621 2004-11-04  Bruno Haible  <bruno@clisp.org>
13622
13623         * modules/allocsa (Files): Add lib/allocsa.valgrind.
13624         (Makefile.am): Distribute it.
13625
13626 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
13627
13628         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
13629         with errno == ERANGE if the buffer is too small.
13630         Problem reported by Mark D. Baushke.
13631
13632 2004-11-03  Albert Chin  <china@thewrittenword.com>
13633             Paul Eggert  <eggert@cs.ucla.edu>
13634
13635         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
13636         equivalent, substitute $ac_type for equivalent type rather than
13637         blindly using uint32_t *always* which won't work if uint32_t is not
13638         available.  Define _UINT32_T to work around typedef of uint32_t if
13639         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
13640         2.5.1.
13641
13642 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13643
13644         * m4/jm-macros.m4: Sync from coreutils.
13645         (gl_MACROS): Check for mbrlen, for pathchk.
13646         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
13647
13648 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13649
13650         * lib/xreadlink.c (MAXSIZE): New macro.
13651         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
13652         size does not exceed MAXSIZE.  Avoid cast.
13653         As suggested by Mark D. Baushke in
13654         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
13655         if readlink fails with buffer size just under MAXSIZE, try again
13656         with MAXSIZE.
13657
13658 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13659
13660         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
13661
13662 2004-11-02  Derek R. Price  <derek@ximbiot.com>
13663         and  Paul Eggert  <eggert@cs.ucla.edu>
13664
13665         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
13666         (get_date): Overparenthesize to avoid GCC warning.
13667
13668 2004-11-02  Bruno Haible  <bruno@clisp.org>
13669
13670         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
13671         returns void.
13672
13673 2004-11-02  Bruno Haible  <bruno@clisp.org>
13674
13675         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
13676         function returns void.
13677
13678 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
13679
13680         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
13681         fflush_unlocked, flockfile, funlockfile, funlockfile,
13682         fputs_unlocked, putc_unlocked.
13683
13684 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
13685
13686         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
13687         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
13688         already declared.
13689
13690 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13691
13692         * modules/getdate (Files): Add doc/getdate.texi.
13693         (Depends-on): Add setenv, xalloc.
13694
13695 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13696
13697         * lib/getdate.y: Add support for TZ="foo" within a date string.
13698         Fix some bugs near time_t boundaries.  Reject dates with
13699         out-of-range components, e.g., "Sept 31".
13700         Include <stdlib.h>, "setenv.h", "xalloc.h".
13701         (ISDIGIT_LOCALE): Remove; unused.
13702         Note that the TZ and time functions used here are not reentrant.
13703         (mktime_ok, get_tz): New functions.
13704         (TZBUFSIZE): New constant.
13705         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
13706         This requires that we sometimes generate our own TZ="XXX..." setting.
13707
13708 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13709
13710         * doc/getdate.texi: New file, from coreutils with modifications for
13711         the new TZ parsing.
13712
13713 2004-10-27  Derek R. Price  <derek@ximbiot.com>
13714
13715         * lib/mktime.c (not_equal_tm): Remove redundant check.
13716
13717 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
13718
13719         * modules/regex (lib_SOURCES): Add regex.c.
13720         Reported by James Youngman in
13721         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
13722
13723 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
13724
13725         * lib/getdate.y: Use Bison 1.875 features, and some minor
13726         code cleanups.  This change does not affect semantics.
13727         Don't include <stdlib.h>; no longer needed.
13728         Don't include unlocked-io.h; only the "#if TEST" code uses
13729         stdio, and performance isn't crucial there.
13730         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
13731         Bison 1.875 features as described below.
13732         All uses of "PC." replaced by "pc->".
13733         (YYSTYPE): Add a forward declaration.
13734         (yylex, yyerror): Use full prototypes in forward decls.
13735         Use "%pure-parser" rather than obsolescent "%pure_parser".
13736         Use %parse-param and %lex-param instead of obsolescent
13737         YYPARSE_PARAM and YYLEX_PARAM.
13738         (meridian_table, month_and_day_table, time_units_table,
13739         relative_time_table, time_zone_table, military_table,
13740         lookup_zone, lookup_word, get_date):
13741         Use NULL instead of 0 where appropriate.
13742         (to_hour): Avoid abort (), to avoid a dependency on
13743         stdlib.h.
13744         (yyerror, yylex): Now accepts parser_control * arg.
13745         (main) [TEST]: Use '\0' rather than 0 for char.
13746
13747 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
13748
13749         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
13750
13751 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
13752
13753         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
13754         It's now the caller's responsibility to handle the case where
13755         !HAVE_GETPAGESIZE && !defined getpagesize.
13756
13757         * lib/mktime.c (leapyear): Arg is long int, not int.
13758
13759 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
13760
13761         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
13762
13763 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
13764
13765         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
13766         missing.  Problem reported by James Youngman.
13767
13768 2004-10-16  Simon Josefsson  <jas@extundo.com>
13769
13770         * gnulib-tool: Fix comments.  Fix parse problem.
13771         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
13772
13773 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
13774
13775         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
13776         implementation of getopt_long.  Problem reported by Alexander Taler in:
13777         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
13778
13779 2004-10-15  Bruno Haible  <bruno@clisp.org>
13780
13781         * gnulib-tool: Untabify. Initialize supplied_libname.
13782         (func_usage): More homogenous output.
13783         (func_modules_transitive_closure, func_modules_to_filelist,
13784         func_emit_lib_Makefile_am): New functions.
13785         (func_import): New function, extracted from big case statement. Use
13786         func_get_license, func_modules_transitive_closure,
13787         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
13788         opt_lgpl. Don't use test -a, as it's not portable.
13789         (func_create_testdir): Use func_modules_transitive_closure,
13790         func_modules_to_filelist, func_emit_lib_Makefile_am.
13791
13792 2004-10-15  Bruno Haible  <bruno@clisp.org>
13793
13794         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
13795
13796 2004-10-15  Bruno Haible  <bruno@clisp.org>
13797
13798         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
13799         the portions belonging to each module.
13800         Suggested by Derek Robert Price <derek@ximbiot.com>.
13801
13802 2004-10-12  Simon Josefsson  <jas@extundo.com>
13803
13804         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
13805         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
13806         to real functions.
13807
13808 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13809
13810         * modules/vsnprintf: New file.
13811
13812 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13813
13814         * m4/vsnprintf.m4: New file.
13815
13816 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13817
13818         * lib/vsnprintf.h: New file.
13819         * lib/vsnprintf.c: New file.
13820
13821 2004-10-11  Bruno Haible  <bruno@clisp.org>
13822
13823         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
13824         vsnprintf.
13825
13826 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
13827
13828         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
13829
13830 2004-10-07  Bruno Haible  <bruno@clisp.org>
13831
13832         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
13833         fits into the provided buffer.
13834
13835 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
13836
13837         * lib/diacrit.c, diacrit.h: Add GPL notice.
13838
13839         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
13840         notice.
13841         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
13842         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
13843         This avoids a potential constant-folding bug.
13844
13845 2004-10-05  Bruno Haible  <bruno@clisp.org>
13846
13847         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
13848         for the declaration of strsep.
13849
13850 2004-10-05  Bruno Haible  <bruno@clisp.org>
13851
13852         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
13853
13854 2004-10-04  Simon Josefsson  <jas@extundo.com>
13855
13856         * modules/memmem: New file.
13857         * tests/test-memmem.c: New file.
13858         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
13859
13860 2004-10-04  Simon Josefsson  <jas@extundo.com>
13861
13862         * m4/memmem.m4: New file.
13863
13864 2004-10-04  Simon Josefsson  <jas@extundo.com>
13865
13866         * lib/memmem.h: New file.
13867         * lib/memmem.c: New file, taken from glibc.
13868
13869 2004-10-04  Simon Josefsson  <jas@extundo.com>
13870
13871         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
13872         '#ifdef USE_UNLOCKED_IO'.
13873
13874 2004-10-04  Simon Josefsson  <jas@extundo.com>
13875
13876         * config/srclist.txt: Add memmem from glibc.
13877
13878 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13879
13880         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
13881
13882         * modules/argmatch, modules/argp, modules/closeout, modules/error,
13883         modules/exclude, modules/getdate, modules/getline,
13884         modules/getndelim2, modules/getpass, modules/getpass-gnu,
13885         modules/getusershell, modules/linebuffer, modules/md5,
13886         modules/mountlist, modules/posixtm, modules/readtokens,
13887         modules/readutmp, modules/regex, modules/sha1,
13888         modules/version-etc, modules/yesno:
13889         Remove dependency on unlocked-io.
13890
13891 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13892
13893         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
13894
13895         * m4/unlocked-io.m4: Add copyright notice.
13896         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
13897
13898 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13899
13900         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
13901         * lib/xmalloc.c (xmemdup): Likewise.
13902         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
13903         XFREE): Remove these long-obsolescent macros.
13904         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
13905         * lib/xstrdup.c: Remove.
13906
13907         * lib/regex.c (re_comp): Cast gettext return value to char *,
13908         Problem reported by Martin Neitzel via Mark D. Baushke.
13909
13910 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13911
13912         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
13913         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
13914         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
13915         regex.c, sha1.c, version-etc.c, yesno.c:
13916         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
13917         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
13918         the includer's responsibility.
13919
13920         Sync from coreutils.
13921
13922         * lib/modechange.c (mode_compile): Don't decrement a pointer that
13923         points to the start of a string, as the C Standard says the
13924         resulting behavior is undefined.
13925
13926         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
13927         simple -> simple_backups, numbered_existing ->
13928         numbered_existing_backups, numbered -> numbered_backups
13929         to avoid shadowing problems.  All uses changed.
13930         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
13931         * lib/backupfile.c (check_extension, numbered_backup):
13932         Rename locals to avoid shadowing 'basename'.
13933         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
13934         once.
13935
13936         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
13937         * lib/.cvsignore: Add getopt.h.
13938
13939 2004-10-04  Bruno Haible  <bruno@clisp.org>
13940
13941         * modules/README: New file.
13942         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
13943         not a module.
13944
13945 2004-10-02  Jim Meyering  <jim@meyering.net>
13946
13947         * lib/dirfd.h, getpagesize.h: Add copyright notice.
13948
13949 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13950
13951         * modules/strsep: New file.
13952
13953 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13954
13955         * m4/strsep.m4: New file.
13956
13957 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13958
13959         * lib/strsep.h: New file.
13960         * lib/strsep.c: New file.
13961
13962 2004-10-01  Simon Josefsson  <jas@extundo.com>
13963
13964         * lib/snprintf.c (snprintf): Handle size==0.
13965
13966 2004-10-01  Simon Josefsson  <jas@extundo.com>
13967             Bruno Haible  <bruno@clisp.org>
13968
13969         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
13970         (snprintf): Declare 'args'.
13971
13972 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
13973
13974         * lib/snprintf.c: Remove comments as to why each header is needed.
13975
13976 2004-10-01  Bruno Haible  <bruno@clisp.org>
13977
13978         * MODULES.html.sh: Add strsep.
13979
13980 2004-09-30  Simon Josefsson  <jas@extundo.com>
13981
13982         * modules/snprintf: New file.
13983
13984 2004-09-30  Simon Josefsson  <jas@extundo.com>
13985
13986         * m4/snprintf.m4: New file.
13987
13988 2004-09-30  Simon Josefsson  <jas@extundo.com>
13989
13990         * lib/snprintf.h, lib/snprintf.c: New files.
13991
13992 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13993
13994         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
13995         (hol_entry_help): Never translate an empty string.
13996         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
13997         * lib/argp.h (OPTION_NO_TRANS): New option.
13998
13999 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14000
14001         * modules/argp (Maintainer): Replace Simon Josefsson
14002         by Sergey Poznyakoff.
14003
14004 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14005
14006         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
14007         changes merged back into glibc.
14008
14009 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14010
14011         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
14012
14013 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
14014
14015         * lib/xvasprintf.c: Include xalloc.h.
14016         (xvasprintf): Use xalloc_die, not xmalloc_die.
14017
14018 2004-09-29  Bruno Haible  <bruno@clisp.org>
14019
14020         * modules/alloca-opt: New file, derived from modules/alloca.
14021         * modules/allocsa: Depend on alloca-opt instead of alloca.
14022         * modules/setenv: Likewise.
14023         * modules/vasnprintf: Likewise.
14024         * MODULES.html.sh: Add alloca-opt.
14025
14026 2004-09-28  Simon Josefsson  <jas@extundo.com>
14027
14028         * gnulib-tool: New parameter --lgpl, to asseert that modules are
14029         LGPL, and to replace license template from GPL to LGPL.
14030
14031 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14032
14033         * modules/dummy: Change license to LGPL.
14034
14035 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14036
14037         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
14038
14039 2004-09-24  Simon Josefsson  <jas@extundo.com>
14040
14041         * modules/minmax (License): Change from GPL to LGPL.
14042
14043 2004-09-23  Simon Josefsson  <jas@extundo.com>
14044
14045         * gnulib-tool (--import): Typo.
14046
14047 2004-09-23  Simon Josefsson  <jas@extundo.com>
14048
14049         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
14050
14051 2004-09-22  Bruno Haible  <bruno@clisp.org>
14052
14053         * modules/*: Add 'License' field.
14054         * gnulib-tool: Accept --extract-license option.
14055         (func_get_license): New function.
14056
14057 2004-09-21  Bruno Haible  <bruno@clisp.org>
14058
14059         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
14060         Reported by Simon Josefsson.
14061
14062 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14063
14064         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
14065         gl_AC_TYPE_LONG_LONG.
14066
14067 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14068
14069         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
14070
14071 2004-09-18  Simon Josefsson  <jas@extundo.com>
14072         and  Paul Eggert  <eggert@cs.ucla.edu>
14073
14074         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
14075         calls with autoreconf.  Define GL_LIB.
14076
14077 2004-09-14  Karl Berry  <karl@gnu.org>
14078
14079         * config/srclist.txt: unsync setenv.c, sigh.
14080
14081 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
14082
14083         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
14084         Problem reported by Bruno Haible in:
14085         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
14086
14087 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
14088
14089         * config/srclist.txt: Comment out argp-pvh.c.
14090
14091 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
14092
14093         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
14094         in case some system header has #define'd it.  Problem reported by
14095         Soeren D. Schulze in
14096         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
14097
14098 2004-09-09  Karl Berry  <karl@gnu.org>
14099
14100         * regex.[ch]: delete from the root.  These were supposed to be
14101                 synced with emacs cvs, but this has not happened for about
14102                 a year, and anyway nothing else uses emacs regex.[ch].
14103                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
14104                 lib/regex[.ch] is untouched.
14105
14106 2004-09-09  Bruno Haible  <bruno@clisp.org>
14107
14108         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
14109
14110 2004-09-09  Bruno Haible  <bruno@clisp.org>
14111
14112         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
14113         modifications.
14114         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
14115
14116 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
14117
14118         * modules/xvasprintf: New file.
14119         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
14120
14121 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
14122
14123         * lib/xvasprintf.h: New file.
14124         * lib/xvasprintf.c: New file.
14125         * lib/xasprintf.c: New file.
14126
14127 2004-09-08  Bruno Haible  <bruno@clisp.org>
14128
14129         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
14130
14131 2004-09-08  Bruno Haible  <bruno@clisp.org>
14132
14133         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
14134         length is > INT_MAX.
14135         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
14136         more.
14137
14138 2004-09-08  Bruno Haible  <bruno@clisp.org>
14139
14140         * lib/stdint_.h: New file, taken from GNU clisp.
14141
14142 2004-09-08  Bruno Haible  <bruno@clisp.org>
14143             Oskar Liljeblad  <oskar@osk.mine.nu>
14144
14145         * modules/stdint: New file.
14146         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
14147
14148 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14149
14150         Import from coreutils.
14151         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
14152         strings on unbounded length.  alloca's performance benefits aren't
14153         that important here.
14154         (V_STRDUP): Remove.
14155         (parse_with_separator): New function, with most of the internals
14156         of the old parse_user_spec.  Allow user to omit both user and group,
14157         for compatibility with FreeBSD.
14158         Clone only the user name, not the entire spec.
14159         Do not set *uid, *gid unless entirely successful.
14160         Avoid memory leak in some failing cases.
14161         Fix regression for USER.GROUP reported by Dmitry V. Levin in
14162         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
14163         (parse_user_spec): Rewrite to use parse_with_separator.
14164
14165 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14166
14167         * modules/userspec: Don't depend on alloca.
14168
14169 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14170
14171         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
14172
14173 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
14174
14175         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
14176         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
14177         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
14178
14179 2004-08-16  Simon Josefsson  <jas@extundo.com>
14180
14181         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
14182         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
14183         Add --dry-run for --import.
14184         Let user provided command line parameters override configure.ac
14185         settings.
14186
14187 2004-08-12  Simon Josefsson  <jas@extundo.com>
14188
14189         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
14190         as discussed with Paul Eggert in threads rooted at
14191         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
14192         and
14193         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
14194         Before, the test was empty, and relied on ELIDE_CODE in source
14195         code.)
14196         (gl_PREREQ_GETOPT): New macro.
14197         (gl_GETOPT): Use them.
14198
14199 2004-08-12  Simon Josefsson  <jas@extundo.com>
14200
14201         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
14202         * lib/getopt_.h: Renamed from getopt.h.
14203
14204 2004-08-12  Simon Josefsson  <jas@extundo.com>
14205
14206         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
14207         Change default library name from libfoo to libgnu.
14208         Now, if you have a configure.ac that says:
14209                 gl_SOURCE_BASE(gl)
14210                 gl_M4_BASE(gl/m4)
14211                 gl_MODULES(error getopt etcetera)
14212                 gl_INIT
14213         you can import all you need by running:
14214                 ../gnulib/gnulib-tool --import
14215
14216         * modules/getopt (Files): Rename getopt.h to getopt_.h.
14217         (Makefile.am): Rewrite, use logic from argz.
14218         (Include): Use <getopt.h> instead of "getopt.h".
14219
14220 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14221
14222         * modules/argp (Files): Add m4/unlocked-io.m4.
14223         (Depends-on): Add extensions.
14224
14225 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14226
14227         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
14228         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
14229         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
14230         Check for program_invocation_name, program_invocation_short_name,
14231         flockfile, funlockfile, features.h, _getopt_long_only_r.
14232
14233 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14234
14235         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
14236         its complicated substitute.
14237         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
14238         and program_invocation_name.
14239         (__argp_basename) [!_LIBC]: Remove; the only use was
14240         replaced by its body.
14241         (__argp_short_program_name): Change condition from
14242         !defined __argp_short_program_name to
14243         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
14244         to match argp-namefrob.h.
14245         (__argp_failure): Don't assume strerror_r returns char *.
14246         * lib/argp-parse.c (N_): Define unconditionally.
14247         (argp_default_options): Fill out initializers with 0 to avoid
14248         gcc warnings.
14249
14250 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14251
14252         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
14253         getopt1.c.
14254
14255 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14256
14257         Merge from coreutils.
14258
14259         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
14260
14261         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
14262         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
14263
14264 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14265
14266         Merge from coreutils.
14267
14268         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
14269         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
14270         for Reliant Unix 5.43.
14271
14272         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
14273         (union fooround): Use uintmax_t, not long int.
14274         The rest is a merge from libc:
14275         [defined _LIBC]: Include <shlib-compat.h>.
14276         (_obstack) [defined _LIBC]: Remove after 2.3.4.
14277
14278         * lib/settime.c (settime): Recode to avoid warning with
14279         Sun Forte C 6U2.
14280
14281         * lib/strverscmp.c: Convert to UTF-8.
14282
14283 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14284
14285         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
14286         m4/uintmax_t.m4.
14287
14288 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14289
14290         * modules/xalloc-die: New file.
14291         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
14292
14293         * modules/md5 (Files): Add m4/uint32_t.m4.
14294         * modules/sha1: Renamed from modules/sha.
14295         (Files):
14296         Rename lib/sha.h to lib/sha1.h.
14297         Rename lib/sha.c to lib/sha1.c.
14298         Rename m4/sha.m4 to m4/sha1.m4.
14299         (lib_SOURCES): Likewise.
14300         (configure.ac): Rename gl_SHA to gl_SHA1.
14301         (Include): sha.h -> sha1.h.
14302
14303 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14304
14305         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
14306         * m4/sha1.m4: Renamed from sha.m4.
14307         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
14308
14309 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14310
14311         * lib/obstack.h (obstack_empty_p):
14312         Don't assume that chunk->contents is suitably aligned.
14313         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
14314         Likewise. Problem reported by Benno in
14315         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
14316
14317         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
14318         readable.  This could be improved further but it'd take some work.
14319
14320 2004-08-08  Simon Josefsson  <jas@extundo.com>
14321
14322         * modules/xgethostname (Depends-on): Remove exit and error (not
14323         used).
14324
14325         * modules/getpass-gnu: Add getpass.h.
14326         (Depends-on): Add stdbool.
14327         * modules/getpass: Add getpass.h.
14328
14329 2004-08-08  Simon Josefsson  <jas@extundo.com>
14330
14331         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
14332         Check getpass declaration.
14333
14334 2004-08-08  Simon Josefsson  <jas@extundo.com>
14335
14336         * lib/xgethostname.c: Don't include error.h (not used).
14337
14338         * lib/getpass.h: Add.
14339         * lib/getpass.c: Include getpass.h first.
14340
14341 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
14342
14343         * lib/xalloc-die.c: New file.
14344         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
14345         All uses removed.
14346         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
14347         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
14348         xalloc-die.c.
14349         (_, N_, xalloc_die): Move to xalloc-die.c.
14350         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
14351         so that we needn't mess with xalloc_msg_memory_exhausted.
14352
14353         * lib/sha1.h: Renamed from sha.h.
14354         (SHA1_H): Renamed from _SHA_H.
14355         (sha1_ctx): Renamed from sha_ctx.
14356         (sha1_init_ctx): Renamed from sha_init_ctx.
14357         (sha1_process_block): Renamed from sha_process_block.
14358         (sha1_process_bytes): Renamed from sha_process_bytes.
14359         (sha1_finish_ctx): Renamed from sha_finish_ctx.
14360         (sha1_read_ctx): Renamed from sha_read_ctx.
14361         (sha1_stream): Renamed from sha_stream.
14362         (sha1_buffer): Renamed from sha_buffer.
14363         * lib/sha1.c: Likewise; renamed from sha.c.
14364         Do not include <sys/types.h>.
14365         Include <stddef.h> rather than <stdlib.h>.
14366
14367 2004-08-08  Bruno Haible  <bruno@clisp.org>
14368
14369         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
14370         FILESYSTEM_PREFIX_LEN.
14371         * lib/progreloc.c: Likewise.
14372         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
14373
14374 2004-08-06  Simon Josefsson  <jas@extundo.com>
14375
14376         * modules/progname (Depends-on): Don't depend on stdbool.
14377
14378 2004-08-06  Simon Josefsson  <jas@extundo.com>
14379
14380         * modules/getsubopt: New file.
14381         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14382         getsubopt.
14383
14384 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14385
14386         More merge from coreutils.
14387
14388         * m4/utimens.m4, m4/utimecmp.m4: New files.
14389         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
14390         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
14391         prereq.m4, sha.m4: Import changes from coreutils.
14392
14393 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14394
14395         More merge from coreutils.
14396         * modules/raise, modules/readtokens0, modules/utimens:
14397         * modules/utimecmp, module/xnanosleep: New files.
14398         * modules/strftime: Add lib/strftime.h.
14399         Change include from <time.h> to "strftime.h".
14400         * modules/yesno: Add lib/yesno.h.
14401         * modules/backupfile: Remove lib/addext.c.
14402         * modules/euidaccess: Add stat-macros.h.
14403         * modules/canonicalize, modules/euidaccess,
14404         modules/filemode, modules/lchown, modules/makepath,
14405         modules/rmdir, modules/stat: Likewise.
14406
14407 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14408
14409         Merge from tar.
14410         * lib/argp-help.c (make_hol, hol_append): Don't assume that
14411         SIZE_MAX is a valid preprocessor constant.
14412         (__argp_basename): Change from "#ifndef _LIBC"
14413         to "#ifndef __argp_short_program_name", so that
14414         we don't compile these functions for tar.
14415
14416         More merges from coreutils.
14417         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
14418         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
14419         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
14420         * lib/addext.c: Remove; no longer needed.
14421         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
14422         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
14423         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
14424         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
14425         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
14426         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
14427         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
14428         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
14429         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
14430         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14431         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
14432         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
14433         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
14434         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
14435         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
14436         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
14437         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
14438         Import changes from coreutils.
14439
14440 2004-08-05  Simon Josefsson  <jas@extundo.com>
14441
14442         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
14443
14444 2004-08-05  Simon Josefsson  <jas@extundo.com>
14445
14446         * m4/getsubopt.m4: New file.
14447
14448 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14449
14450         Merge from coreutils.
14451
14452         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
14453         * m4/getcwd-path-max.m4: New files.
14454
14455         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
14456         FILESYSTEM_PREFIX_LEN ->
14457         FILE_SYSTEM_PREFIX_LEN.
14458         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
14459         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
14460         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
14461         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
14462
14463         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
14464         prerequisite modules now handle the DOS stuff.
14465         Don't check for unistd.h.
14466
14467 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14468
14469         Merge from coreutils.
14470
14471         * lib/.gdb-history: Remove; this doesn't belong here.
14472
14473         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
14474         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
14475         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
14476         * lib/getcwd.c: New files.
14477
14478         * lib/dirname.h: Include <stdbool.h>.
14479         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
14480         for consistency with POSIX terminology.  All uses changed.
14481         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
14482         (strip_trailing_slashes): Use bool for booleans.
14483         * lib/stripslash.c (strip_trailing_slashes): Likewise.
14484
14485         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
14486         sometimes returns a positive errno value even when it succeeds.
14487         (print_errno_message) [!LIBC]: Fall back on strerror if
14488         __strerror_r fails.
14489
14490         * lib/path-concat.c (mempcpy): Don't define if a system header defines
14491         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
14492         (longest_relative_suffix): New function.
14493         (path_concat): Use it.  Assume first argument is not NULL.
14494         Port to DOS.  Omit redundant separators.
14495         Report an error instead of returning NULL.
14496         Use mempcpy instead of memcpy.
14497         (xpath_concat): Remove: not declared or used.
14498
14499         * lib/same.h: Include <stdbool.h>
14500         (same_name): Return bool, not int.
14501         * lib/same.c (same_name): Likewise.
14502         (errno): Don't declare; we assume C89 or better now.
14503
14504         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
14505         if not already defined.
14506
14507         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
14508         * lib/dup-safer.c (errno): Likewise.
14509
14510 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14511
14512         Merge from coreutils.
14513         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
14514         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
14515         * modules/path-concat: Don't depend on strdup.
14516
14517 2004-08-03  Simon Josefsson  <jas@extundo.com>
14518
14519         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
14520         * lib/progname.h: Don't include stdbool.h.
14521
14522 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14523
14524         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
14525         * MODULES.html.sh (func_all_modules): Remove fatal.
14526
14527 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14528
14529         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
14530
14531 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14532
14533         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
14534         working.
14535
14536 2004-08-02  Simon Josefsson  <jas@extundo.com>
14537
14538         * lib/getsubopt.h: New file, with comments from Bruno Haible.
14539         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
14540         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
14541
14542 2004-08-01  Simon Josefsson  <jas@extundo.com>
14543
14544         * lib/xgetdomainname.c: Include stdlib.h, for free().
14545
14546 2004-07-19  Bruno Haible  <bruno@clisp.org>
14547
14548         * MODULES.html.sh (func_all_modules): Add dummy.
14549
14550 2004-07-16  Simon Josefsson  <jas@extundo.com>
14551
14552         * modules/dummy: New file.
14553
14554 2004-07-16  Simon Josefsson  <jas@extundo.com>
14555
14556         * lib/dummy.c: New file.
14557
14558 2004-07-16  Bruno Haible  <bruno@clisp.org>
14559
14560         * lib/backupfile.h: Add extern "C" for C++.
14561         * lib/closeout.h: Likewise.
14562         * lib/copy-file.h: Likewise.
14563         * lib/findprog.h: Likewise.
14564         * lib/full-write.h: Likewise.
14565         * lib/pathname.h: Likewise.
14566         * lib/progname.h: Likewise.
14567         * lib/stpcpy.h: Likewise.
14568         * lib/stpncpy.h: Likewise.
14569         * lib/strcase.h: Likewise.
14570         * lib/strstr.h: Likewise.
14571         * lib/xalloc.h: Likewise.
14572
14573         * lib/mbswidth.h: Add extern "C" for C++.
14574         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
14575
14576 2004-07-13  Robert Millan  <robertmh@gnu.org>
14577
14578         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
14579
14580 2004-07-09  Simon Josefsson  <jas@extundo.com>
14581
14582         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
14583         failed without this.)
14584
14585 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14586
14587         * modules/chown (Files): Add lib/fchown-stub.c, since
14588         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
14589
14590 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14591
14592         * lib/fchown-stub.c: New file.
14593
14594 2004-06-24  Jim Meyering  <jim@meyering.net>
14595
14596         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
14597
14598 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14599
14600         * modules/argz: Omit "#include".
14601
14602         * MODULES.html.sh (func_all_modules): Add calloc, to match
14603         2004-06-01 addition of calloc module.
14604
14605 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14606
14607         * m4/argz.m4: New file, which is autoupdated from libtool.
14608
14609 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14610
14611         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
14612         libtool.
14613
14614 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14615
14616         * config/srclist-update: Don't insist on "USA." before the
14617         close-comment, as libtool omits the period and puts the */ on a
14618         separate line.
14619         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
14620         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
14621
14622 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
14623
14624         * modules/argz: New file.
14625         * MODULES.html.sh (func_all_modules): Add argz.
14626
14627 2004-06-12  Jim Meyering  <jim@meyering.net>
14628         and  Paul Eggert  <eggert@cs.ucla.edu>
14629
14630         * modules/hash (Files): Add lib/xalloc.h.
14631         * modules/pipe (Depends-on): Add wait-process.
14632         * modules/stat (Depends-on): Add xalloc.
14633         * modules/userspec (Files): Add lib/userspec.h.
14634         * modules/xstrto
14635
14636         Upgrade from gettext-0.13.
14637         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
14638         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
14639         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
14640
14641 2004-06-10  Jim Meyering  <jim@meyering.net>
14642
14643         * lib/calloc.c: New file.
14644
14645 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
14646
14647         * lib/getdate.y (yylex): Allow space between sign and number.
14648         Problem reported by Dan Jacobson.
14649
14650 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
14651
14652         Merge from coreutils CVS.
14653
14654         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
14655         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
14656         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
14657         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
14658         xstrtol.m4: Fix copyright date and/or serial number.
14659
14660         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
14661         See if we need an fchown replacement.
14662         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
14663         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
14664         and use the replacement function if we detect either defect.
14665
14666         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
14667         gl_UTIMECMP.
14668
14669 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
14670         and  Jim Meyering  <jim@meyering.net>
14671
14672         Merge from coreutils CVS.
14673
14674         * lib/stat-macros.h: New file, with contents from file-type.h
14675         and coreutils' system.h.
14676         * lib/file-type.c: Include "stat-macros.h".
14677         * lib/file-type.h (file_type): Move all macro definitions to new file,
14678         stat-macros.h.
14679
14680         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
14681         Wrap old code with this conditional.
14682         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
14683         function that does not dereference symlinks.
14684         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
14685
14686         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
14687         dependency problems.
14688         (xreadlink): Accept new arg SIZE, for efficiency.
14689         All decls and uses changed.
14690         * lib/xreadlink.h: Include <stddef.h>, for size_t.
14691
14692         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
14693         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
14694
14695         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
14696         sysexits.h.
14697
14698 2004-06-01  Jim Meyering  <jim@meyering.net>
14699
14700         * m4/calloc.m4: New file.
14701
14702 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
14703
14704         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
14705         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
14706         Also, fix a typo in a diagnostic.
14707
14708 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
14709
14710         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
14711         or AC_FUNC_REALLOC.
14712
14713 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
14714
14715         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
14716         macros to be defined.
14717         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
14718         the allocator returns NULL because the requested size is zero.
14719
14720 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14721
14722         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
14723         var.  Add comment explaining why libc still defines it.  This
14724         merges the following patch from glibc:
14725         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
14726
14727 2004-05-20  Andreas Schwab  <schwab@suse.de>
14728
14729         * m4/free.m4: Replace free if it not known to work, not the other
14730         way round.
14731
14732 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14733
14734         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
14735         present in glibc since revision 1.1 of this file.
14736         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
14737         obstack_alignment_mask, obstack_alloc, obstack_base,
14738         obstack_blank, obstack_blank_fast, obstack_chunk_size,
14739         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
14740         obstack_grow0, obstack_init, obstack_int_grow,
14741         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
14742         obstack_next_free, obstack_object_size, obstack_ptr_grow,
14743         obstack_ptr_grow_fast, obstack_room): Remove declarations of
14744         nonexistent functions.
14745
14746 2004-05-18  Karl Berry  <karl@gnu.org>
14747
14748         * config/srclist.txt: break link for vasnprintf.c.
14749
14750 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
14751
14752         Port obstack to the AS/400, where pointers are 16 bytes wide and
14753         you cannot cast an integer to a valid pointer.  This patch is
14754         currently waiting to be integrated into glibc; see
14755         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
14756
14757         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
14758         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
14759         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
14760         (struct obstack): temp member is now a union of a pointer and
14761         an integer, instead of an integer.  All integer uses changed.
14762         This does not affect the physical layout of struct obstack,
14763         except on hosts (like the AS/400) where the size or alignment of
14764         void * is greater than that of ptrdiff_t.
14765         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
14766         __STDC__)]: Store temporary in pointer member of union, not
14767         integer member.
14768         * lib/obstack.c: Include <stddef.h>, for offsetof.
14769         (struct fooalign): Remove; it doesn't need a name.
14770         (union fooround): Change double to long double, and add void *.
14771         (DEFAULT_ALIGNMENT): Use offsetof to compute.
14772         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
14773         not a macro.  Hence the values are always int; so remove all
14774         casts-to-int in uses.
14775
14776 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
14777
14778         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
14779         we can get this patch merged into glibc.
14780
14781 2004-05-17  Derek R. Price  <derek@ximbiot.com>
14782             Paul Eggert  <eggert@cs.ucla.edu>
14783
14784         * m4/argp: Depend on alloca.
14785
14786 2004-05-17  Derek R. Price  <derek@ximbiot.com>
14787             Paul Eggert  <eggert@cs.ucla.edu>
14788
14789         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
14790         freecoding.
14791
14792 2004-05-17  Bruno Haible  <bruno@clisp.org>
14793
14794         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
14795         precision that consists of a '.' followed by an empty digit string.
14796         Patch by Tor Lillqvist <tml@iki.fi>.
14797
14798 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
14799
14800         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
14801         for backward compatibility with older code.  We need our own
14802         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
14803         it under some other name, and our alloca.h will define it.
14804
14805 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
14806             Derek Price  <derek@ximbiot.com>
14807
14808         * lib/alloca.c: Include <alloca.h>, to get our interface.
14809         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
14810         include <alloca.h> first.  Use C89 prototype for alloca; this
14811         requires including <stddef.h> for size_t.  Use extern "C" if C++.
14812         Use #elif for simplicity, since we can assume C89 now.
14813         Don't try to source the system alloca.h since it will not be found
14814         and to prevent recursively including its replacement.
14815         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
14816         * lib/regex.c: Likewise.
14817
14818 2004-05-16  Derek Price  <derek@ximbiot.com>
14819             Paul Eggert  <eggert@cs.ucla.edu>
14820
14821         getline cleanup.  This changes the getndelim2 API: both order of
14822         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
14823         no delimiter).
14824
14825         * lib/getline.c: Don't include stddef.h or stdio.h, since our
14826         interface does that.
14827         (getline): Always use getdelim, so that we don't have two
14828         copies of this code.
14829         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
14830         if available.
14831         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
14832         (GETNDELIM2_MAXIMUM): New macro.
14833         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
14834         instead of the old practice of delim2==0.  All callers changed.
14835         Return -1 on overflow, instead of returning junk.
14836         Do not set *linesize unless allocation succeeds.
14837         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
14838         that we include sys/types.h.
14839         * lib/getnline.h: Likewise.
14840         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
14841         (getndelim2): Reorder arguments.
14842         * lib/getnline.c (getnline, getndelim):
14843         Don't discard the NMAX argument.
14844         (getnline): Invoke getndelim, to avoid code duplication.
14845         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
14846         of (size_t) -1 by callers of the getnline family.
14847
14848 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14849
14850         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
14851         Check for gettimeofday.
14852         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
14853         Check for settimeofday, stime.
14854
14855 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14856
14857         * lib/nanosleep.c (suspended): Change its type from int to
14858         sig_atomic_t volatile.
14859         (first_call): Make it private to rpl_nanosleep, and have it
14860         be zero initially as that's a bit faster.
14861         (my_usleep): Round up fractional times instead of truncating them,
14862         as this is the usual meaning for 'sleep'.
14863
14864         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
14865         doesn't work.
14866         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
14867         (ENOSYS): Define if not defined.
14868         (settime): Fall back on stime if it exists and settimeofday fails.
14869         But don't bother with fallbacks if a method fails with errno == EPERM.
14870
14871 2004-05-11  Jim Meyering  <jim@meyering.net>
14872
14873         Prior to this change, the save_cwd caller required read access to the
14874         current directory on most systems (ones with the fchdir function).
14875
14876         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
14877         fails, try write-only, and finally, resort to using xgetcwd.
14878
14879 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14880
14881         * lib/obstack.c, obstack.h: Import changes from libc.
14882
14883 2004-04-28  Bruno Haible  <bruno@clisp.org>
14884
14885         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
14886         also implicitly appends .exe to executables.
14887         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
14888         accepts Windows pathnames.
14889         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14890         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14891         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14892         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14893         Reported by Derek Robert Price <derek@ximbiot.com>.
14894
14895 2004-04-21  Karl Berry  <karl@gnu.org>
14896
14897         * config/srclist.txt (localcharset.c): break sync.
14898
14899 2004-04-20  Paul Eggert  <eggert@twinsun.com>
14900
14901         * m4/host-os.m4: Add a copyright notice.
14902
14903 2004-04-20  Jim Meyering  <jim@meyering.net>
14904
14905         Change UTILS_ to gl_ in AC_DEFINE'd names.
14906         Change utils_- and jm_-prefixed variables, too.
14907         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
14908         UTILS_FUNC_MKDIR_TRAILING_SLASH.
14909         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
14910
14911         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
14912         Don't emit trailing blanks.
14913         Also rename jm_-prefixed variables to have gl_ prefix.
14914
14915         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
14916         Also rename jm_-prefixed variables to have gl_ prefix.
14917
14918         * m4/jm-macros.m4: Reflect the renamings.
14919         * m4/prereq.m4: Likewise.
14920
14921 2004-04-20  Jim Meyering  <jim@meyering.net>
14922
14923         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
14924         memory.
14925
14926 2004-04-20  Jim Meyering  <jim@meyering.net>
14927             Bruno Haible  <bruno@clisp.org>
14928
14929         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
14930         memory when realloc fails.
14931
14932 2004-04-19  Jim Meyering  <jim@meyering.net>
14933
14934         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
14935         now that readutmp.c may call `free (0)'.
14936
14937 2004-04-19  Bruno Haible  <bruno@clisp.org>
14938
14939         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
14940         * m4/inttypes_h.m4: Likewise.
14941         * m4/stdint_h.m4: Likewise.
14942         * m4/intmax_t.m4: Likewise.
14943         * m4/uintmax_t.m4: Likewise.
14944
14945 2004-04-18  Jim Meyering  <jim@meyering.net>
14946
14947         * m4/prereq.m4: Don't forbid jm_ prefix.
14948
14949         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
14950         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
14951         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
14952         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
14953         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
14954         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
14955         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
14956         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
14957         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
14958         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
14959         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
14960         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
14961         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
14962         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
14963         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
14964         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
14965         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
14966         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
14967         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
14968
14969 2004-04-18  Jim Meyering  <jim@meyering.net>
14970
14971         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
14972         failure, don't leak memory and do call END_UTMP_ENT.
14973
14974 2004-04-16  Jim Meyering  <jim@meyering.net>
14975
14976         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
14977         coreutils' stat program.
14978         (gl_PREREQ): Don't require jm_PREREQ_STAT.
14979
14980 2004-04-11  Paul Eggert  <eggert@twinsun.com>
14981
14982         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
14983         C89.
14984         (CHAR_BIT): Remove, since we assume C89.
14985         Include <stdint.h> if available, as per current Autoconf CVS advice.
14986
14987 2004-03-31  Jim Meyering  <jim@meyering.net>
14988
14989         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
14990         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
14991         * m4/xalloc.m4: Likewise.
14992
14993 2004-03-30  Paul Eggert  <eggert@twinsun.com>
14994
14995         Merge from coreutils.
14996
14997         * m4/inttostr.m4: New file.
14998         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
14999         Require AM_STDBOOL_H and gl_TIMESPEC instead.
15000         Require gl_CLOCK_TIME.
15001         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
15002
15003 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15004
15005         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
15006         not bool, to be more consistent with Unix conventions.
15007         Suggested by Bruno Haible.
15008
15009         Merge from coreutils.
15010
15011         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
15012         * lib/umaxtostr.c: New files.
15013
15014         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
15015         the usual <time.h> dance.
15016         (get_date): Change signature to support fractional time stamps.
15017         All callers changed.
15018         * lib/getdate.y: Include "getdate.h" first, as we can now
15019         assume C89 and don't need to worry about 'const'.
15020         Similarly, include "unlocked-io.h" near start, not in middle.
15021         Include <limits.h>.
15022         (textint.value): Use long int rather than int.
15023         (textint.digits): Use size_t rather than int.
15024         (BILLION, LOG10_BILLION): New constants.
15025         (parser_control): New member rel_ns.  Members day_ordinal,
15026         time_zone, month, day, hour, minutes, rel_year, rel_month,
15027         rel_day, rel_hour, rel_minutes, rel_seconds
15028         are now long int, not int.  Member seconds is now struct timespec,
15029         not int.  New member timespec_seen.  Members dates_seen, days_seen,
15030         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
15031         not int.
15032         (%union.intval): Now long int, not int.
15033         New member timespec.
15034         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
15035         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
15036         (spec): Now is a timespec or an item list.
15037         (timespec, items): New nonterminals.
15038         (time, rel, relunit, number, get_date):
15039         Add support for fractional seconds.
15040         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
15041         (gmtime, localtime, mktime): Remove decls; not needed with C89.
15042         (to_hour): First arg is now long int, not int.
15043         (to_year): Returns long int, not int.
15044         Don't treat year -70 like 70.
15045         (tm_diff): Returns long int, not int.
15046         (lookup_word): Use bool instead of int when appropriate.
15047         (yylex): Use size_t for count, not int.
15048         Detect overflow when parsing large integer constants.
15049         Add support for fractions.
15050         (get_date): Make pointers 'const' if possible.
15051         Use more-portable code to detect integer overflow.
15052         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
15053         Don't use ctime; it's not reliable if the year has >4 digits.
15054
15055         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
15056         This is for compatibility with BSD.
15057
15058         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
15059         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
15060         From coreutils' system.h.
15061
15062         * lib/userspec.c: Don't include "posixver.h".
15063         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
15064         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
15065         compatible extension.  Simplify code by removing a boolean int
15066         that was always nonzero if a string was nonnull.
15067
15068 2004-03-30  Jim Meyering  <jim@meyering.net>
15069
15070         Merge from coreutils.
15071
15072         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
15073         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
15074         on some systems one must include <grp.h> before it.
15075         Reported by Christian Krackowizer.
15076
15077 2004-03-30  Jim Meyering  <jim@meyering.net>
15078
15079         Merge from coreutils.
15080
15081         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
15082
15083         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
15084         an empty input stream.
15085
15086         * lib/readtokens.c: Include <stdbool.h>.
15087         (readtoken): Use `size_t' rather than int/long.
15088         All callers adjusted.
15089         Use `bool' rather than `int' where appropriate.
15090         Use memset rather than an explicit loop.
15091         Use x2nrealloc rather than xrealloc.
15092         Allow the use of `\0' as a delimiter.
15093         (readtokens): Likewise.
15094         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
15095
15096 2004-03-30  Jim Meyering  <jim@meyering.net>
15097
15098         * m4/realloc.m4: Remove file, since now it does no more than
15099         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
15100         the `configure.ac' section of module/realloc.
15101         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
15102
15103 2004-03-30  Bruno Haible  <bruno@clisp.org>
15104
15105         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
15106         nonnull.
15107
15108 2004-03-29  Paul Eggert  <eggert@twinsun.com>
15109
15110         Merge changes to getloadavg.c from coreutils and Emacs.
15111
15112         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
15113         Define to an expression, not to the empty string.
15114         Include cloexec.h and xalloc.h.
15115         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
15116         Use set_cloexec_flag rather than rolling our own.
15117         * lib/cloexec.c, lib/cloexec.h: New files.
15118
15119 2004-03-29  Paul Eggert  <eggert@twinsun.com>
15120
15121         * m4/cloexec.m4: New file.
15122
15123 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15124
15125         * lib/getopt.h: Sync with libc CVS.
15126
15127 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15128             Bruno Haible  <bruno@clisp.org>
15129
15130         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
15131         mbswidth.
15132
15133 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15134             Bruno Haible  <bruno@clisp.org>
15135
15136         * lib/mbswidth.h: Include <wchar.h> only if
15137         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
15138         <wchar.h>.
15139         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
15140
15141 2004-03-09  Paul Eggert  <eggert@twinsun.com>
15142
15143         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
15144         Sync with libc CVS.
15145         * lib/getopt_int.h: New file, also synced from libc.
15146
15147 2004-03-09  Paul Eggert  <eggert@twinsun.com>
15148
15149         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
15150         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
15151         Bring back getopt.c, getopt.h, getopt1.c.
15152
15153 2004-03-07  Paul Eggert  <eggert@twinsun.com>
15154
15155         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
15156         All uses changed.  Check for sa_sigaction member; this fixes
15157         a bug first reported by Jason Andrade in
15158         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
15159
15160 2004-03-07  Paul Eggert  <eggert@twinsun.com>
15161
15162         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
15163         '#if' expressions.  Unlike the code it replaces, it does not
15164         depend on (defined _SC_PAGESIZE).  However, it does depend on
15165         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
15166         first reported by Jason Andrade in
15167         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
15168
15169 2004-02-25  Simon Josefsson  <jas@extundo.com>
15170
15171         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
15172
15173 2004-02-25  Simon Josefsson  <jas@extundo.com>
15174
15175         * lib/strdup.h: New file.
15176         * lib/strdup.c: Include it.
15177         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
15178         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
15179
15180 2004-02-23  Karl Berry  <karl@gnu.org>
15181
15182         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
15183         (from fencepost.gnu.org:/gd/gnuorg).
15184
15185 2004-02-23  Karl Berry  <karl@gnu.org>
15186
15187         * config/srclistvars.sh (GNUORG) [karl]: redefine.
15188         * config/srclist.txt: add maintain/standards documents.
15189
15190 2004-02-18  Bruno Haible  <bruno@clisp.org>
15191
15192         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
15193         Reported by Derek Robert Price <derek@ximbiot.com>.
15194
15195 2004-02-16  Karl Berry  <karl@gnu.org>
15196
15197         * config/mkinstalldirs, install-sh: update from automake.
15198
15199 2004-02-06  Karl Berry  <karl@gnu.org>
15200
15201         * m4/po.m4: update from gettext 0.14.1.
15202
15203 2004-02-06  Karl Berry  <karl@gnu.org>
15204
15205         * lib/config.charset: update from gettext 0.14.1.
15206
15207 2004-02-05  Paul Eggert  <eggert@twinsun.com>
15208
15209         Add comments and code, prompted by suggestions from Bruno Haible
15210         for sh-quote.
15211         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
15212         describing the enum quoting_style values.
15213         * lib/quotearg.c (quotearg_alloc): New function.
15214         (quotearg_buffer_restyled): Treat lone { and } as special.
15215         Treat = as special.  Work around bug with older shells
15216         that "see" a '\' that is really the 2nd byte of a multibyte char.
15217         Quote empty string with shell_quoting_style.
15218
15219 2004-02-03  Bruno Haible  <bruno@clisp.org>
15220
15221         * m4/pipe.m4: New file, from GNU gettext.
15222
15223 2004-02-03  Bruno Haible  <bruno@clisp.org>
15224
15225         * lib/pipe.h: New file, from GNU gettext.
15226         * lib/pipe.c: New file, from GNU gettext.
15227
15228 2004-01-27  Bruno Haible  <bruno@clisp.org>
15229
15230         * m4/execute.m4: New file, from GNU gettext.
15231
15232 2004-01-27  Bruno Haible  <bruno@clisp.org>
15233
15234         * lib/execute.h: New file, from GNU gettext.
15235         * lib/execute.c: New file, from GNU gettext.
15236         * lib/w32spawn.h: New file, from GNU gettext.
15237
15238 2004-01-24  Paul Eggert  <eggert@twinsun.com>
15239
15240         Merge from diffutils.
15241
15242         * lib/file-type.c (file_type): Add typed memory objects.
15243         * lib/file-type.h (S_TYPEISTMO): New macro.
15244
15245         * lib/c-stack.h (c_stack_action): Remove argv argument.
15246         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
15247         (die): Don't calculate message unless segv_action returns.
15248         (get_stack_location, min_address_from_argv, max_address_from_argv,
15249         volatile stack_base, volatile_stack_size): Remove.
15250         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
15251         that every segmentation violation is a stack overflow.  (Ouch!)
15252         See Debian bug 136249 (still outstanding) for more info about why
15253         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
15254
15255 2004-01-24  Paul Eggert  <eggert@twinsun.com>
15256
15257         Exit-status fix from coreutils.
15258
15259         Use exit_failure consistently in place of EXIT_FAILURE,
15260         so that program exit statuses are consistent on failure.
15261
15262         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
15263         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
15264         * lib/argmatch.h: Comment fix to match the above.
15265         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
15266         Now a macro referring to exit_failure, instead of a separate
15267         variable.  Include "exitfail.h" to get it.
15268         * lib/xstrtol.h: Include "exitfail.h".
15269         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
15270
15271         * lib/long-options.c (parse_long_options): Use prototype
15272         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
15273         for clarity.
15274
15275 2004-01-21  Jim Meyering  <jim@meyering.net>
15276
15277         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
15278         so as not to conflict with a different-sized __mktime_internal
15279         function in GNU libc.
15280         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
15281         Problem building statically-linked `ls' reported by Michael Brunnbauer.
15282
15283 2004-01-20  Karl Berry  <karl@gnu.org>
15284
15285         * config/config.guess: update from config.
15286
15287         * config/srclistvars.sh: GNUWWWLICENSES for karl.
15288
15289 2004-01-20  Bruno Haible  <bruno@clisp.org>
15290
15291         Safer stack allocation.
15292         * lib/setenv.c: Include allocsa.h.
15293         (alloca): Remove fallback definition.
15294         (freea): Remove macro.
15295         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
15296         instead of freea.
15297
15298 2004-01-20  Bruno Haible  <bruno@clisp.org>
15299
15300         * m4/eealloc.m4: New file, from GNU gettext.
15301
15302 2004-01-20  Bruno Haible  <bruno@clisp.org>
15303
15304         * m4/allocsa.m4: New file, from GNU gettext.
15305
15306 2004-01-20  Bruno Haible  <bruno@clisp.org>
15307
15308         * lib/xallocsa.h: New file, from GNU gettext.
15309         * lib/xallocsa.c: New file, from GNU gettext.
15310
15311 2004-01-20  Bruno Haible  <bruno@clisp.org>
15312
15313         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
15314
15315 2004-01-20  Bruno Haible  <bruno@clisp.org>
15316
15317         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
15318         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
15319         specially.
15320
15321 2004-01-20  Bruno Haible  <bruno@clisp.org>
15322
15323         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
15324         patch.
15325
15326 2004-01-20  Bruno Haible  <bruno@clisp.org>
15327
15328         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
15329
15330 2004-01-20  Bruno Haible  <bruno@clisp.org>
15331
15332         * lib/eealloc.h: New file.
15333
15334 2004-01-20  Bruno Haible  <bruno@clisp.org>
15335
15336         * lib/binary-io.h: Avoid warnings on Cygwin.
15337
15338 2004-01-20  Bruno Haible  <bruno@clisp.org>
15339
15340         * lib/allocsa.h: New file, from GNU gettext.
15341         * lib/allocsa.c: New file, from GNU gettext.
15342
15343 2004-01-18  Karl Berry  <karl@gnu.org>
15344
15345         * doc/gpl.texi, doc/lgpl.texi: new files.
15346
15347 2004-01-18  Karl Berry  <karl@gnu.org>
15348
15349         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
15350         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
15351
15352 2004-01-15  Paul Eggert  <eggert@twinsun.com>
15353
15354         Merge from coreutils.
15355
15356         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
15357         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
15358         (gl_DEFAULT_POSIX2_VERSION): Move
15359         the documentation from 'configure' into 'config.hin',
15360         so that 'configure --help' isn't burdened by it and
15361         we don't have to worry about its formatting there.
15362         Reword the documentation so that it's more succinct
15363         and can be run together into a single paragraph.
15364         * m4/same.m4 (gl_SAME): Check for pathconf.
15365
15366 2004-01-15  Paul Eggert  <eggert@twinsun.com>
15367
15368         Merge from coreutils.
15369
15370         * lib/posixver.c: Include posixver.h.
15371
15372         * lib/same.c: Include <stdbool.h>, <limits.h>.
15373         (_POSIX_NAME_MAX): Define if not defined.
15374         (MIN): New macro.
15375         (same_name): If file names are silently truncated, report
15376         that the file names are the same if they are the same after
15377         the silent truncation.
15378
15379         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
15380         conversion function.
15381         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
15382         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
15383         longer needed.
15384
15385 2004-01-15  Jim Meyering  <jim@meyering.net>
15386
15387         Merge from coreutils.
15388
15389         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
15390         if no library is required.
15391         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
15392         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
15393         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
15394         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
15395         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
15396         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
15397         value, $ac_cv_search_crypt, if it's "none required".
15398         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
15399         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
15400         not gl_FUNC_GETLOADAVG.
15401         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
15402         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
15403
15404 2004-01-15  Jim Meyering  <jim@meyering.net>
15405
15406         Merge from coreutils.
15407
15408         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
15409         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
15410         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
15411
15412         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
15413         optional configure-time default.
15414
15415         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15416
15417         * lib/xreadlink.c (xreadlink): Correct outdated comment.
15418
15419 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
15420
15421         Merge from coreutils.
15422
15423         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
15424         value, $ac_cv_search_nanosleep, if it's "none required".
15425
15426 2004-01-14  Paul Eggert  <eggert@twinsun.com>
15427
15428         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
15429         with like-named macro in fnmatch.c.
15430         (EXT): Use an internal constant instead.
15431
15432         Merge fnmatch patches from glibc.
15433         * lib/fnmatch.c (mbsinit): Remove define.
15434         Add libc_hidden_ver (__fnmatch, fnmatch).
15435         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
15436         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
15437
15438 2004-01-14  Karl Berry  <karl@gnu.org>
15439
15440         * config/install-sh: update from automake.
15441
15442 2004-01-13  Karl Berry  <karl@gnu.org>
15443
15444         * config/install-sh: update from automake.
15445
15446 2004-01-09  Karl Berry  <karl@gnu.org>
15447
15448         * config/install-sh: update from automake.
15449
15450 2004-01-05  Karl Berry  <karl@gnu.org>
15451
15452         * config/config.{sub,guess}: update from config.
15453
15454 2003-12-31  Karl Berry  <karl@gnu.org>
15455
15456         * config/depcomp: update from automake.
15457
15458 2003-12-14  Karl Berry  <karl@gnu.org>
15459
15460         * lib/config.charset: update from gettext-runtime.
15461
15462 2003-12-03  Paul Eggert  <eggert@twinsun.com>
15463
15464         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
15465         Bug reported by Alfred M. Szmidt.
15466
15467 2003-12-03  Bruno Haible  <bruno@clisp.org>
15468
15469         * m4/gettext.m4: Upgrade from gettext-0.13.
15470         * m4/po.m4: Upgrade from gettext-0.13.
15471         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
15472         * m4/intmax.m4: New file, from gettext-0.13.
15473         * m4/printf-posix.m4: New file, from gettext-0.13.
15474
15475 2003-11-29  Karl Berry  <karl@gnu.org>
15476
15477         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
15478
15479 2003-11-25  Paul Eggert  <eggert@twinsun.com>
15480             Bruno Haible  <bruno@clisp.org>
15481
15482         * lib/printf-parse.h: Don't include sys/types.h.
15483         (ARG_NONE): New macro.
15484         (char_directive): Change type of *arg_index fields to size_t.
15485         * lib/printf-parse.c: Don't include sys/types.h.
15486         (SSIZE_MAX): Remove macro.
15487         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
15488         Remove unnecessary overflow check.
15489         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
15490         fields.
15491
15492 2003-11-25  Bruno Haible  <bruno@clisp.org>
15493
15494         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
15495
15496 2003-11-25  Bruno Haible  <bruno@clisp.org>
15497
15498         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
15499         gt_TYPE_SSIZE_T.
15500
15501 2003-11-24  Paul Eggert  <eggert@twinsun.com>
15502
15503         * modules/alloca: Remove dependency on xalloc.
15504
15505 2003-11-24  Paul Eggert  <eggert@twinsun.com>
15506
15507         * lib/alloca.c: Remove dependency on xalloc module.
15508         (xalloc_die): Remove.
15509         (memory_full) [!defined emacs]: New macro.
15510         [!defined emacs]: Don't include xalloc.h.
15511         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
15512         address arithmetic overflows.  Change datatypes a bit to avoid
15513         unnecessary casts.
15514
15515 2003-11-22  Jim Meyering  <jim@meyering.net>
15516
15517         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
15518         s/size/size_t/.
15519
15520 2003-11-21  Karl Berry  <karl@gnu.org>
15521
15522         * config/config.{sub,guess}: update from config.
15523
15524 2003-11-18  Karl Berry  <karl@gnu.org>
15525
15526         * config/config.{sub,guess}: update from config.
15527
15528         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
15529
15530 2003-11-17  Paul Eggert  <eggert@twinsun.com>
15531
15532         * README: Mention that S+T cannot overflow if S is the size of
15533         an existing object and T is sufficiently small.
15534
15535 2003-11-17  Jim Meyering  <jim@meyering.net>
15536
15537         On systems without utime and without a utimes function capable of
15538         dealing with a NULL struct utimbuf* argument, this utime replacement
15539         could -- in unusual circumstances -- leak a file descriptor.
15540         * lib/utime.c: Include <unistd.h> and <errno.h>.
15541         (utime_null): Be sure to close `fd' and to preserve errno.
15542         Reported by Geoff Collyer via Arnold Robbins.
15543
15544 2003-11-17  Bruno Haible  <bruno@clisp.org>
15545
15546         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
15547         (Depends-on): Add xsize.
15548
15549 2003-11-17  Bruno Haible  <bruno@clisp.org>
15550
15551         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
15552
15553 2003-11-17  Bruno Haible  <bruno@clisp.org>
15554
15555         * lib/vasnprintf.c (alloca): Remove fallback definition.
15556         (freea): Remove definition.
15557         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
15558         Reported by Paul Eggert.
15559
15560 2003-11-16  Paul Eggert  <eggert@twinsun.com>
15561             Bruno Haible  <bruno@clisp.org>
15562
15563         Protect against address arithmetic overflow.
15564         * lib/printf-args.h: Include stddef.h.
15565         (arguments): Change type of field 'count' to size_t.
15566         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
15567         'unsigned int' where appropriate.
15568         * lib/printf-parse.h: Include sys/types.h.
15569         (char_directive): Change type of *arg_index fields to ssize_t.
15570         (char_directives): Change type of fields 'count', max_*_length to
15571         size_t.
15572         * lib/printf-parse.c: Include sys/types.h and xsize.h.
15573         (SSIZE_MAX): Define fallback value.
15574         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
15575         instead of 'int' where appropriate. Check a_allocated, d_allocated
15576         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
15577         * lib/vasnprintf.c: Include xsize.h.
15578         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
15579         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
15580         overflow. Avoid wraparound when converting a width or precision from
15581         decimal to binary.
15582
15583 2003-11-16  Bruno Haible  <bruno@clisp.org>
15584
15585         Update from GNU gettext.
15586         * lib/printf-parse.c: Generalize to it can be compiled for wide
15587         strings.
15588         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
15589         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
15590         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
15591         SNPRINTF): New macros.
15592         Don't include <alloca.h> if the file is used inside libintl.
15593         (local_wcslen): New function, for Solaris 2.5.1.
15594         (VASNPRINTF): Use it instead of wcslen.
15595
15596 2003-11-16  Bruno Haible  <bruno@clisp.org>
15597
15598         * lib/xsize.h (xmax): New function.
15599         (xsum, xsum3, xsum4): Declare as "pure" functions.
15600
15601 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15602
15603         * modules/xalloc (Files): Undo latest change, since xalloc.h
15604         no longer needs SIZE_MAX or PTRDIFF_MAX.
15605
15606 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15607
15608         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
15609         gl_PTRDIFF_MAX.
15610
15611 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15612
15613         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
15614         "return", to pacify some unknown compiler.  Problem reported
15615         by Joerg Schilling.
15616
15617 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15618
15619         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
15620         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
15621         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
15622         heuristic is just as accurate as far as we know, and it removes a
15623         dependency on size_max.m4 and ptrdiff_max.m4.
15624
15625 2003-11-11  Bruno Haible  <bruno@clisp.org>
15626
15627         * modules/xsize (Files): Add m4/size_max.m4.
15628         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
15629
15630 2003-11-11  Bruno Haible  <bruno@clisp.org>
15631
15632         * m4/size_max.m4: New file.
15633         * m4/ptrdiff_max.m4: New file.
15634         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
15635         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
15636         (gl_XALLOC): Invoke it.
15637
15638 2003-11-11  Bruno Haible  <bruno@clisp.org>
15639
15640         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
15641         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
15642         defined.
15643
15644 2003-11-10  Paul Eggert  <eggert@twinsun.com>
15645
15646         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
15647         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
15648         rejected some allocations of exactly SIZE_MAX - 2 bytes.
15649         From Bruno Haible.
15650         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
15651         not (size_t) -1, since it's defined here.
15652
15653 2003-11-09  Karl Berry  <karl@gnu.org>
15654
15655         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
15656
15657 2003-11-06  Paul Eggert  <eggert@twinsun.com>
15658
15659         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
15660         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
15661         Reject sizes of exactly SIZE_MAX bytes.
15662         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
15663         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
15664
15665 2003-11-05  Bruno Haible  <bruno@clisp.org>
15666
15667         * lib/xsize.h: Include limits.h, to avoid a possible collision with
15668         SIZE_MAX defined in <limits.h> on Solaris.
15669
15670 2003-11-04  Jim Meyering  <jim@meyering.net>
15671
15672         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
15673         variable names, rather than @VAR@.
15674         * modules/poll: Likewise.
15675
15676 2003-11-04  Bruno Haible  <bruno@clisp.org>
15677
15678         * modules/xsize: New file.
15679         * modules/linebreak: Depend on xsize.
15680         * MODULES.html.sh (func_all_modules): Add xsize.
15681
15682 2003-11-04  Bruno Haible  <bruno@clisp.org>
15683
15684         * m4/xsize.m4: New file.
15685
15686 2003-11-04  Bruno Haible  <bruno@clisp.org>
15687
15688         * lib/xsize.h: New file.
15689         * lib/linebreak.c: Include xsize.h.
15690         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
15691         argument for overflow.
15692         Suggested by Paul Eggert.
15693
15694 2003-11-03  Karl Berry  <karl@gnu.org>
15695
15696         * config/config.{guess,sub}: update from config.
15697
15698 2003-11-03  Jim Meyering  <jim@meyering.net>
15699
15700         * modules/userspec (lib_SOURCES): Add userspec.h.
15701         (Include): Add "userspec.h".
15702         Improve description.
15703
15704 2003-11-03  Jim Meyering  <jim@meyering.net>
15705
15706         * lib/userspec.c: Include "userspec.h".
15707         * lib/userspec.h: New file.
15708
15709 2003-11-03  Bruno Haible  <bruno@clisp.org>
15710
15711         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
15712
15713 2003-11-03  Bruno Haible  <bruno@clisp.org>
15714
15715         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
15716         available, to avoid (extremely rare) race condition.
15717         Suggested by Paul Eggert.
15718
15719 2003-11-02  Karl Berry  <karl@gnu.org>
15720
15721         * config/srclist.txt (vasprintf.c): sync broken, sigh.
15722
15723 2003-10-31  Paul Eggert  <eggert@twinsun.com>
15724
15725         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
15726         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
15727         (read_filesystem_list): Set and use me_type_malloced.
15728         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
15729         whatever the type happens to be), for brevity and consistency.
15730         Check for size calculation overflow on Alphas running OSF/1.
15731
15732 2003-10-31  Jim Meyering  <jim@meyering.net>
15733
15734         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
15735
15736         * lib/linebuffer.c: Include <string.h> for declaration of memset.
15737
15738 2003-10-30  Paul Eggert  <eggert@twinsun.com>
15739             Bruno Haible  <bruno@clisp.org>
15740
15741         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
15742         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
15743
15744 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15745
15746         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
15747         netbsd*-gnu*.  Suggested by Robert Millan.
15748
15749 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15750
15751         * modules/group-member: Depend on stdbool.
15752
15753 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15754
15755         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
15756
15757 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15758
15759         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
15760         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
15761         after the 'gnu' in these cases.  This fixes some bugs in the
15762         previous change, and is based on suggestions by Robert Millan.
15763
15764 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15765
15766         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
15767         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
15768         no longer needed.
15769         * lib/quotearg.c (quotearg_n_options): Use it.
15770         * lib/group-member.c: Include <stdbool.h>.
15771         (free_group_info): Arg is now const *; don't free arg.
15772         (get_group_info): Now returns bool and accepts struct group_info *,
15773         rather than returning a malloc'ed struct group_info *.
15774         All uses changed.  Check for overflow in internal size calculation.
15775
15776         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
15777         rather than xmalloc/xrealloc.
15778         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
15779         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
15780         conformance bug: the old code used a pointer after freeing the
15781         storage that it addressed.
15782         * lib/hash.c (hash_initialize): Simplify the code by using
15783         xalloc_oversized rather than doing it by hand.
15784         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
15785         the buffer preserved.  Use free and xmalloc instead.
15786         * lib/quotearg.c (quotearg_n_options): Likewise.
15787         Use a simpler test for size overflow.  Don't use xalloc_oversized
15788         because unsigned int might be wider than size_t (!); this suggests
15789         that we should switch from unsigned int to size_t for slot numbers.
15790
15791 2003-10-28  Paul Eggert  <eggert@twinsun.com>
15792
15793         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
15794         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
15795         NetBSD kernels.  Requested by Richard Stallman.
15796
15797 2003-10-27  Paul Eggert  <eggert@twinsun.com>
15798
15799         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
15800         to allocate the returned structure.  Do not allocate a subarray,
15801         as x2nrealloc will do that.
15802         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
15803         instead of xnrealloc.
15804         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
15805
15806 2003-10-27  Bruno Haible  <bruno@clisp.org>
15807
15808         * lib/stdbool_.h: Better support for BeOS.
15809
15810 2003-10-26  Paul Eggert  <eggert@twinsun.com>
15811
15812         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
15813         now uses inline.
15814
15815 2003-10-26  Paul Eggert  <eggert@twinsun.com>
15816
15817         * lib/xalloc.h (xalloc_oversized): New static inline function, for
15818         callers that want to do their own size-overflow checking.  Include
15819         <stdbool.h>, since xalloc_oversized returns bool.
15820         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
15821         to use xalloc_oversized.
15822
15823         Add two functions x2realloc, x2nrealloc, for programs that grow
15824         arrays dynamically by doubling their sizes.
15825         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
15826         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
15827         New functions.
15828
15829         Port to C99 semantics for 'inline' of external functions.
15830         Bug reported by Bruno Haible.
15831         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
15832         with the old contents of xnmalloc.
15833         (xnmalloc, xmalloc): Use it.
15834         (xnrealloc_inline): New static inline function,
15835         with the old contents of xnrealloc.
15836         (xnrealloc, xrealloc): Use it.
15837
15838         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
15839         that.
15840
15841 2003-10-26  Karl Berry  <karl@gnu.org>
15842
15843         * config/srclist.txt (COPYING.DOC): no longer available from
15844         /gd/gnuorg; don't know where the ultimate source is.
15845
15846 2003-10-25  Paul Eggert  <eggert@twinsun.com>
15847
15848         Fix several address-calculation bugs in the hash modules,
15849         plus some minor code cleanup.
15850
15851         * lib/hash.h: Include <stdbool.h>, for bool.
15852         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
15853         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
15854         hash_get_n_entries, hash_get_max_bucket_length,
15855         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
15856         hash_rehash): Use size_t rather than unsigned.
15857         * lib/hash.c (struct hash_table, hash_get_n_buckets,
15858         hash_get_n_buckets_used, hash_get_n_entries,
15859         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
15860         hash_get_entries, hash_do_for_each, hash_string, is_prime,
15861         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
15862         Likewise.
15863         (SIZE_MAX): Define if not defined.
15864         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
15865         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
15866         hash_print):
15867         Use const * when possible.
15868         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
15869         (check_tuning): Fix bug: if tuning parameters were very close to
15870         0 or 1, rounding errors could have caused subscript violations.
15871         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
15872         (hash_initialize): Add 'fail:' label
15873         to free table and return NULL, and use it to simplify code.
15874         Use calloc rather than clearing the storage ourself.
15875         (hash_initialize, hash_rehash): Check for arithmetic overflow in
15876         buffer size calculations.
15877         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
15878         Include <stddef.h>, for size_t.
15879         * lib/hash-pjw.c (hash_pjw): Likewise.
15880         Switch to method described by Bruno Haible.
15881         Include <limits.h>, for CHAR_BIT.
15882         (SIZE_BITS): New macro.
15883
15884 2003-10-23  Paul Eggert  <eggert@twinsun.com>
15885
15886         * m4/getline.m4 (AM_FUNC_GETLINE):
15887         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
15888         hosts.  Problem reported by Derek Robert Price in
15889         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
15890         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
15891         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
15892
15893 2003-10-21  Paul Eggert  <eggert@twinsun.com>
15894
15895         * lib/getndelim2.c (getndelim2): When size calculation overflows,
15896         ceiling the allocation at NMAX bytes rather than silently
15897         discarding input bytes before NMAX is reached.  This makes
15898         a difference only if NMAX exceeds SIZE_MAX / 2.
15899
15900         * lib/obstack.c: Merge from glibc.
15901         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
15902         Add libc_hidden_def (_obstack_newchunk).
15903         (_obstack_free) [! defined _LIBC]: Remove.
15904         [defined _LIBC]: Make a strong alias from obstack_free, rather than
15905         a clone of the function body.
15906         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
15907         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
15908
15909         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
15910         glibc.
15911         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
15912         arg to memcpy.
15913
15914         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
15915         (obstack_ptr_grow_fast, obstack_int_grow_fast):
15916         Don't use lvalue casts, as GCC plans to remove support for them
15917         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
15918         was also present in the non-GCC version, indicating that this
15919         code had always been buggy and had never been widely used.
15920         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
15921         Use the fast variant of each macro, rather than copying the
15922         definiens of the fast variant; that way, we'll be more likely to
15923         catch future bugs in the fast variants.
15924
15925 2003-10-20  Bruno Haible  <bruno@clisp.org>
15926
15927         * modules/wait-process: New file.
15928         * MODULES.html.sh (func_all_modules): Add wait-process.
15929
15930 2003-10-20  Bruno Haible  <bruno@clisp.org>
15931
15932         * m4/wait-process.m4: New file.
15933
15934 2003-10-20  Bruno Haible  <bruno@clisp.org>
15935
15936         * lib/wait-process.h: New file, from GNU gettext.
15937         * lib/wait-process.c: New file, from GNU gettext.
15938
15939 2003-10-19  Jim Meyering  <jim@meyering.net>
15940
15941         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
15942         HPUX 10.20.
15943
15944 2003-10-18  Karl Berry  <karl@gnu.org>
15945
15946         * config/config.guess: update from config.
15947
15948 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15949
15950         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
15951         (getgroups): First arg is int, not size_t.
15952         Don't let 'free' mangle errno.
15953
15954 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15955
15956         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
15957
15958 2003-10-16  Karl Berry  <karl@gnu.org>
15959
15960         * config/config.{guess,sub}: update from config.
15961
15962 2003-10-16  Jim Meyering  <jim@meyering.net>
15963
15964         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
15965         memcpy.
15966
15967 2003-10-15  Paul Eggert  <eggert@twinsun.com>
15968
15969         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
15970         (SIZE_MAX): Remove.
15971         (new_exclude, add_exclude_file): Initial size no longer needs to
15972         be a power of 2.
15973         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
15974         our own address arithmetic overflow checking.
15975
15976         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
15977         (fnmatch): Do not alloca more than 2000 wide characters;
15978         instead, use malloc for large buffers.
15979         Check for address arithmetic overflow, and return -1
15980         with errno set to ENOMEM in that case.
15981         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
15982         (NEW_PATTERN): Do not alloca more than 8000 bytes;
15983         instead, return -1.  Check for address arithmetic overflow.
15984
15985 2003-10-14  Paul Eggert  <eggert@twinsun.com>
15986
15987         Handle invalid suffixes and overflow independently, so that
15988         callers can treat them independently as needed.  Fix some bugs in
15989         suffix handling, e.g., "100k@" was not diagnosed as an invalid
15990         suffix for a human-readable blocksize.  The major caller-visible
15991         change is the addition of a new
15992         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
15993         that both overflow and suffix chars were found.
15994
15995         * lib/human.c (humblock): Don't check separately for invalid suffix
15996         char; that is xstrtoumax's job (now that its bug is fixed).
15997         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
15998         INTMAX_MAX]: New macros.
15999         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
16000         TYPE_MAXIMUM): New macros.
16001         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
16002         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
16003         if overflow occurs, as it's what __strtol does and it's more useful
16004         in practice.
16005         (__xstrtol): If __strtol reports some error other than ERANGE,
16006         reflect it to the caller as LONGINT_INVALID.  If it reports
16007         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
16008         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
16009         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
16010         value.
16011         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
16012         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
16013         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
16014         [defined UINTMAX_MAX]: New macros.
16015
16016 2003-10-14  Bruno Haible  <bruno@clisp.org>
16017
16018         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
16019
16020 2003-10-14  Bruno Haible  <bruno@clisp.org>
16021
16022         * m4/sig_atomic_t: New file, from GNU gettext.
16023         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
16024
16025 2003-10-14  Bruno Haible  <bruno@clisp.org>
16026
16027         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
16028         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
16029         Also use volatile where needed.
16030
16031 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16032
16033         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
16034         Change maintainer from Bruno Haible to 'all'.
16035
16036 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16037
16038         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
16039
16040 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16041
16042         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
16043         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
16044         and define in terms of the other primitives.
16045         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
16046         (SIZE_MAX): Define if not already defined.
16047         (array_size_overflow): New function.
16048         (xalloc_die): Abort instead of exiting if 'error' returns.
16049         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
16050         (xmalloc, xrealloc): Use them.
16051         (xcalloc): Check for address arithmetic overflow.
16052         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
16053         a bit faster than strcpy.
16054
16055 2003-10-10  Simon Josefsson  <jas@extundo.com>
16056
16057         * modules/argp (Depends-on): Add restrict and strcase.
16058
16059 2003-10-10  Simon Josefsson  <jas@extundo.com>
16060
16061         * m4/argp.m4: Add AC_C_INLINE.
16062
16063 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16064
16065         Merge getpass from libc, plus a few fixes.
16066
16067         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
16068         Include <stdbool.h>.
16069         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
16070         __fsetlocking to empty.
16071         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
16072         do include <bits/libc-lock.h>.
16073         Do not include <fcntl.h>; not needed.
16074         [_LIBC]: Include <wchar.h>.
16075         (NOTCANCEL_MODE): New macro.
16076         (flockfile, funlockfile) [_LIBC]: New macros.
16077         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
16078         [!_LIBC]: New macros.
16079         (call_fclose): New function.
16080         (getpass): Use it.  Save tty stream separately; this simplifies the
16081         code and makes it more reliable if stdin happens to equal stdout.
16082         Invoke __fsetlocking on tty.
16083         Handle thread cancellation if needed.
16084         Namespace cleanup (use __tcgetattr, __getline).
16085         Use bool for Booleans.
16086         [USE_IN_LIBIO]: Handle wide streams.
16087         [!_LIBC]: Unconditionally do the fseek, since we don't know what
16088         stream might go where.
16089
16090         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
16091         doesn't have to include <stdio.h> before us.
16092         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
16093         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
16094         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
16095         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
16096         if not declared, so that we can use getpass.c code from libc without
16097         rewriting it.
16098         (flockfile, ftrylockfile, funlockfile): New macros.
16099
16100 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16101
16102         * modules/getpass: Depend on stdbool.
16103
16104 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16105
16106         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
16107
16108 2003-10-07  Karl Berry  <karl@gnu.org>
16109
16110         * config/config.{guess,sub}: update from config.
16111
16112 2003-10-06  Jim Meyering  <jim@meyering.net>
16113             Bruno Haible  <bruno@clisp.org>
16114
16115         This lets translators provide better translations for the
16116         "Written by ..." part of --version output.
16117         * lib/version-etc.h: Include stdarg.h.
16118         (version_etc_copyright): Declare as readonly.
16119         (version_etc): Make this function variadic with a NULL-terminated list
16120         of author name strings.
16121         (version_etc_va): New declaration.
16122         * lib/version-etc.c: Include stdarg.h, stdlib.h.
16123         (version_etc_copyright): Declare as readonly.
16124         (version_etc_va): New function. Provide a different translatable string
16125         for each possible number of authors < 10. Abbreviate when there are 10
16126         authors or more.
16127         (version_etc): Make this function variadic. Call version_etc_va.
16128         Suggestion from Gary V. Vaughan.
16129
16130         * lib/long-options.h (parse_long_options): Change prototype: the
16131         authors string is moved to the end and becomes variadic.
16132         * lib/long-options.c: Include stdarg.h.
16133         (parse_long_options): Make this function variadic, too.
16134         Call version_etc_va, not version_etc.
16135
16136 2003-10-06  Bruno Haible  <bruno@clisp.org>
16137
16138         * modules/version-etc-2: Remove file.
16139         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
16140
16141 2003-10-06  Bruno Haible  <bruno@clisp.org>
16142
16143         * modules/fatal-signal: New file.
16144         * MODULES.html.sh (func_all_modules): Add fatal-signal.
16145
16146 2003-10-06  Bruno Haible  <bruno@clisp.org>
16147
16148         * m4/fatal-signal.m4: New file.
16149         * m4/signalblocking.m4: New file, from GNU gettext.
16150
16151 2003-10-06  Bruno Haible  <bruno@clisp.org>
16152
16153         * lib/version-etc-2.h: Remove file.
16154         * lib/version-etc-2.c: Remove file.
16155
16156 2003-10-06  Bruno Haible  <bruno@clisp.org>
16157
16158         * lib/fatal-signal.h: New file, from GNU gettext.
16159         * lib/fatal-signal.c: New file, from GNU gettext.
16160
16161 2003-10-05  Paul Eggert  <eggert@twinsun.com>
16162
16163         * README: Rework advice for preventing empty .o files.
16164         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
16165         not <sys/types.h>.
16166
16167 2003-10-04  Karl Berry  <karl@gnu.org>
16168
16169         * lib/argp*: update from libc.
16170
16171 2003-10-04  Karl Berry  <karl@gnu.org>
16172
16173         * config/config.{guess,sub}: update from config.
16174
16175 2003-10-02  Bruno Haible  <bruno@clisp.org>
16176
16177         * modules/lchown (Include): Add lchown.h.
16178         * modules/time_r (Include): Use "..." syntax.
16179         * modules/xgetdomainname (Include): Add xgetdomainname.h.
16180
16181 2003-10-01  Simon Josefsson  <jas@extundo.com>
16182
16183         * MODULES.html.sh (func_all_modules): Move gethostname from section
16184         'based on' to section 'lacking' POSIX:2001.
16185
16186 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
16187
16188         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
16189         to output mode on the same stream.
16190
16191 2003-09-29  Paul Eggert  <eggert@twinsun.com>
16192
16193         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
16194         Fix arg typo in previous patch.
16195
16196 2003-09-28  Jim Meyering  <jim@meyering.net>
16197
16198         * lib/error.c: Correct cpp indentation.
16199
16200 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16201
16202         * modules/free: New file.
16203
16204 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16205
16206         * m4/free.m4: New file.
16207
16208 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16209
16210         * lib/minmax.h (MIN, MAX)
16211         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
16212         Omit the special code that used __typeof__, since we worry that
16213         it could be more trouble than it's worth.  See:
16214         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
16215         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
16216
16217         * lib/free.c: New file.
16218
16219 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
16220
16221         Trivial fixes to Makefile.am parts of module listings.
16222         * modules/strstr: Append strstr.h to lib_SOURCES.
16223         * modules/strcase: Likewise, for strcase.h.
16224
16225 2003-09-27  Karl Berry  <karl@gnu.org>
16226
16227         * config/mkinstalldirs: update from automake.
16228
16229 2003-09-26  Paul Eggert  <eggert@twinsun.com>
16230
16231         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
16232         (error_tail): Do not loop, reallocating temporary buffer, since
16233         the output cannot contain more wide characters than the input
16234         contains bytes, the size must be big enough already.  This avoids
16235         one potential size overflow calculation.  Check for size overflow
16236         when calculating temporary buffer size.  Free temporary buffer
16237         when done, if it was allocated with malloc; this plugs a memory
16238         leak.  Remove casts from void * to pointers, that are no longer
16239         needed now that we're assuming C89 or better.
16240
16241         Merge error changes from glibc.
16242
16243         * lib/error.c, error.h: Update copyright notice header to match glibc.
16244         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
16245         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
16246         Disable cancellation while printing error.
16247         * lib/error.h: Prepend __ to parameter names.
16248
16249 2003-09-26  Jim Meyering  <jim@meyering.net>
16250
16251         * lib/error.c (error_tail): Move some declarations
16252         into inner scope where the local variables are used.
16253
16254 2003-09-26  Bruno Haible  <bruno@clisp.org>
16255
16256         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
16257         stpncpy().
16258         Don't define stpncpy through config.h; it's now done through stpncpy.h.
16259
16260 2003-09-26  Bruno Haible  <bruno@clisp.org>
16261
16262         * lib/stpncpy.h (gnu_stpncpy): New declaration.
16263         (stpncpy): Define as alias for gnu_stpncpy.
16264         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
16265
16266 2003-09-25  Simon Josefsson  <jas@extundo.com>
16267
16268         * lib/xgetdomainname.h: New file.
16269         * lib/xgetdomainname.c: New file.
16270
16271 2003-09-25  Simon Josefsson  <jas@extundo.com>
16272             Bruno Haible  <bruno@clisp.org>
16273
16274         * modules/getdomainname: New file.
16275         * modules/xgetdomainname: New file.
16276         * MODULES.html.sh (func_all_modules): Add getdomainname,
16277         xgetdomainname.
16278
16279 2003-09-25  Simon Josefsson  <jas@extundo.com>
16280             Bruno Haible  <bruno@clisp.org>
16281
16282         * m4/getdomainname.m4: New file.
16283
16284 2003-09-25  Simon Josefsson  <jas@extundo.com>
16285             Bruno Haible  <bruno@clisp.org>
16286
16287         * lib/getdomainname.h: New file.
16288         * lib/getdomainname.c: New file.
16289
16290 2003-09-25  Karl Berry  <karl@gnu.org>
16291
16292         * lib/argp-fmtstream.c, argp-help.c: update from libc.
16293
16294 2003-09-25  Karl Berry  <karl@gnu.org>
16295
16296         * config/install-sh: update from automake.
16297
16298 2003-09-25  Bruno Haible  <bruno@clisp.org>
16299
16300         * modules/version-etc-2: New file, from modules/version-etc with
16301         modifications.
16302         * MODULES.html.sh (func_all_modules): Add version-etc-2.
16303
16304 2003-09-25  Bruno Haible  <bruno@clisp.org>
16305
16306         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
16307         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
16308
16309 2003-09-24  Simon Josefsson  <jas@extundo.com>
16310
16311         * modules/xgethostname: Add xgethostname.h.
16312
16313 2003-09-24  Paul Eggert  <eggert@twinsun.com>
16314
16315         * lib/linebuffer.c (freebuffer): Don't free the argument, just
16316         the buffer associated with the argument.  Bug reported by
16317         Simon Josefsson.
16318
16319 2003-09-24  Paul Eggert  <eggert@twinsun.com>
16320
16321         * README: Document assumptions that 'int' is at least 32 bits
16322         wide, that integer arithmetic is 2's complement without overflow,
16323         that there are no holes in integer values, that adding sizes of
16324         two nonoverlapping objects can't overflow, and that all-bits-zero
16325         yields scalar zero.  Fix spelling and capitalization typos.
16326
16327 2003-09-19  Karl Berry  <karl@gnu.org>
16328
16329         * lib/argp.h: update from libc.
16330
16331 2003-09-17  Paul Eggert  <eggert@twinsun.com>
16332
16333         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
16334         to avoid spurious warnings like "AC_RUN_IFELSE was called before
16335         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
16336
16337 2003-09-17  Paul Eggert  <eggert@twinsun.com>
16338
16339         * gnulib-tool: Use "test -h", not "test -L", for portability
16340         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
16341         (tags_regexp): Remove, since \| doesn't conform to POSIX.
16342         (sed_extract_prog): Issue s commands one-by-one, rather than
16343         using \| in one s command.
16344
16345 2003-09-16  Paul Eggert  <eggert@twinsun.com>
16346
16347         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
16348         input error, instead of returning NULL the next time we are called
16349         (and therefore losing track of errno).
16350
16351 2003-09-16  Bruno Haible  <bruno@clisp.org>
16352
16353         * gnulib-tool (func_create_testdir): Warn about duplicated
16354         dependencies.
16355
16356 2003-09-15  Paul Eggert  <eggert@twinsun.com>
16357
16358         * modules/argmatch, modules/fatal, modules/obstack,
16359         modules/xalloc, modules/xgethostname: Sort dependencies by
16360         importance, not alphabetically.
16361
16362 2003-09-15  Paul Eggert  <eggert@twinsun.com>
16363
16364         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
16365         fails, so that the caller gets the proper errno.
16366
16367         * lib/readutmp.c (read_utmp): Likewise.
16368         Check for fstat error.  Close stream and free storage
16369         when failing.
16370
16371 2003-09-14  Karl Berry  <karl@gnu.org>
16372
16373         * config/srclist.txt (strdup.c): disable for c89 changes.
16374
16375 2003-09-14  Jim Meyering  <jim@meyering.net>
16376
16377         * lib/getloadavg.c: Correct cpp indentation.
16378         * lib/strdup.c: Likewise.
16379         * lib/vasnprintf.c: Likewise.
16380
16381 2003-09-14  Bruno Haible  <bruno@clisp.org>
16382
16383         * modules/fwriteerror: New file.
16384         * MODULES.html.sh (func_all_modules): Add fwriteerror.
16385
16386 2003-09-14  Bruno Haible  <bruno@clisp.org>
16387
16388         * lib/fwriteerror.h: New file.
16389         * lib/fwriteerror.c: New file.
16390
16391 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16392
16393         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
16394         modules/xgethostname, modules/xalloc: Depend on exit.
16395
16396 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16397
16398         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
16399
16400         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
16401         and AC_MINIX, too, so that their extensions are available.
16402
16403         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
16404         This macro has been superseded by gl_BACKUPFILE.
16405
16406         More patches to assume C89 or better.
16407
16408         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
16409
16410         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
16411         unconditionally.
16412         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
16413         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
16414         Include <string.h>, <stdlib.h> unconditionally.
16415         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
16416         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
16417         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
16418         headers or for string.h.
16419         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
16420         or strtoul.
16421
16422         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
16423         headers.
16424         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
16425         * m4/userspec.m4 (gl_USERSPEC): Likewise.
16426         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
16427         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
16428         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
16429         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
16430         memcpy, memset.
16431         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
16432         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
16433         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
16434         strtol.
16435         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
16436         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
16437         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
16438         strtoul.
16439
16440 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16441
16442         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
16443         * lib/obstack.c [!defined _LIBC]: Likewise.
16444         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
16445         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
16446         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
16447
16448         More changes to assume C89 or better.
16449
16450         * lib/error.c (error_tail): Assume vprintf.
16451
16452         * lib/argmatch.c (getenv): Remove decl.
16453         * lib/progreloc.c (get_full_program_name): Define via prototype.
16454         * lib/setenv.c (clearenv): Likewise.
16455         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
16456         needed.
16457         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
16458         (malloc, memcpy): Remove decls.
16459         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
16460         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
16461         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
16462         (memcpy): Remove macro.
16463         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
16464         (__P): Remove.  All uses removed.
16465         (PTR): Remove.  All uses changed to void *.
16466         (CHAR_BIT, NULL): Remove.
16467         (spaces, zeros, memset_space, memset_zero)
16468         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
16469         Remove.
16470         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
16471         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
16472         Define with prototype.
16473         Remove now-unnecessary prototype decl.
16474         (extra_args_spec): Assume ANSI C.  All uses changed.
16475         (extra_args_spec_iso): Remove.
16476         (my_strftime, emacs_strftimeu): Define via prototype.
16477         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
16478         unconditionally.
16479         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
16480         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
16481         (strtoul, strtol): Remove decls.
16482         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
16483         LONG_MAX): Remove.
16484         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
16485         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
16486         (LOCALE_PARAM_PROTO): New macro.
16487         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
16488         (INTERNAL (strtol), strtol): Define with a prototype.
16489         (PARAMS): Remove.  All uses removed.
16490         * lib/tempname.c: Include <string.h> unconditionally.
16491         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
16492         * lib/xgethostname.c (main): Define with a prototype.
16493         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
16494         Include <stdlib.h> unconditionally.
16495         (calloc, malloc, realloc, free): Remove decls.
16496         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
16497         Include <stdlib.h> unconditionally.  Sort include file names.
16498         (strtod): Remove.
16499         (xstrtod): Define with a prototype.
16500         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
16501         (strtol, strtoul): Remove decls.
16502
16503 2003-09-11  Paul Eggert  <eggert@twinsun.com>
16504
16505         More patches to assume C89 or better.
16506         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
16507         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
16508         string.h, memchr, STDC_HEADERS.
16509
16510 2003-09-11  Paul Eggert  <eggert@twinsun.com>
16511
16512         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
16513         Include <stdlib.h>, <string.h> unconditionally.
16514         Remove now-unnecessary cast to char *.
16515         * lib/strnlen.c: Include <string.h> unconditionally.
16516         * lib/yesno.c (yesno): Define with a prototype.
16517
16518 2003-09-11  Bruno Haible  <bruno@clisp.org>
16519
16520         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
16521
16522 2003-09-10  Jim Meyering  <jim@meyering.net>
16523
16524         * lib/error.c: Correct indentation of cpp directives.
16525
16526 2003-09-10  Bruno Haible  <bruno@clisp.org>
16527
16528         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
16529         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
16530         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
16531         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
16532         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
16533         <stdlib.h> and <string.h> checks.
16534         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
16535         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
16536
16537 2003-09-10  Bruno Haible  <bruno@clisp.org>
16538
16539         * lib/strcspn.c: Include <string.h> unconditionally.
16540         * lib/strpbrk.c: Include <string.h> unconditionally.
16541         * lib/strstr.c: Include <string.h> unconditionally.
16542         * lib/unicodeio.c: Include <string.h> unconditionally.
16543         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
16544         * lib/unsetenv.c: Likewise.
16545         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
16546         * lib/yesno.c: Include <stdlib.h> unconditionally.
16547         (rpmatch): Add prototype.
16548
16549 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16550
16551         More patches to assume C89 or better.
16552         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
16553         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
16554         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
16555         or for string.h.
16556         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
16557         stdlib.h.
16558         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
16559         C headers.
16560         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
16561         string.h.
16562         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
16563         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
16564         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
16565         or for string.h.
16566         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
16567         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
16568         C headers.
16569         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
16570         memcpy.
16571         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
16572         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
16573         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
16574         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
16575         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
16576         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
16577         string.h, free.
16578         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
16579         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
16580         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
16581         C headers, or for string.h.
16582         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
16583         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
16584         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
16585         headers, memory.h, stdlib.h, string.h, strings.h.
16586         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
16587         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
16588         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
16589         strchr.
16590         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
16591         headers, memory.h, string.h.
16592         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
16593         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
16594         free.
16595         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
16596         headers.
16597         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
16598         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
16599         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
16600         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
16601         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
16602
16603 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16604
16605         More K&R removal.
16606
16607         * lib/acosl.c (main): Use a prototype.
16608         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
16609         tanl.c: Likewise.
16610
16611         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
16612
16613         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
16614         (getopt, etopt_long, getopt_long_only, _getopt_internal)
16615         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
16616         with a prototype.
16617         * lib/getopt.c (const): Remove macro.
16618         Include <string.h> unconditionally.
16619         (my_index): Remove; all uses changed to strchr.
16620         (strlen): Remove decl.
16621         (exchange): Remove forward decl; no longer needed.
16622         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
16623         Define with prototype.
16624         * lib/getopt1.c (const): Remove macro.
16625         (getopt_long, getopt_long_only, main): Define with prototype.
16626
16627         * lib/getugroups.c: Include <string.h> unconditionally.
16628
16629         * lib/getusershell.c: Include <stdlib.h> unconditionally.
16630         (getusershell, setusershell, endusershell, readname, main):
16631         Define with prototypes.
16632
16633         * lib/group-member.c: Include group-member.h first.
16634         Include <stdlib.h> unconditionally.
16635
16636         * lib/hard-locale.c: Include hard-locale.h first.
16637         Include <stdlib.h>, <string.h> unconditionally.
16638
16639         * lib/hash.c (free, malloc): Remove decls.
16640         Include <stdlib.h> unconditionally.
16641
16642         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
16643         (getenv): Do not declare.
16644
16645         * lib/idcache.c: Include <string.h> unconditionally.
16646
16647         * lib/long-options.c: Include long-options.h first, to test interface.
16648         Include <stdlib.h> unconditionally.
16649
16650         * lib/makepath.c: Include makepath.h first, to test interface.
16651         Include <stdlib.h> and <string.h> unconditionally.
16652
16653         * lib/linebuffer.c: Include <stdlib.h>.
16654         (free): Remove decl.
16655
16656         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
16657         stddef.h. rpl_malloc returns void *, not char *.
16658         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
16659         prototype.
16660
16661         * lib/md5.h: Include <limits.h> unconditionally.
16662         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
16663         (__P): Remove; all uses removed.
16664         * lib/md5.c: Include "md5.h" first.
16665         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
16666         md5_buffer, md5_process_bytes, md5_process_block):
16667         Define with prototypes.
16668         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
16669         * lib/sha.c: Include "sha.h" first.
16670         Include <stdlib.h>, <string.h> unconditionally.
16671
16672         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
16673         * lib/memcmp.c (__ptr_t): Likewise.
16674         * lib/memrchr.c (__ptr_t): Likewise.
16675         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
16676         Include <string.h> unconditionally.
16677         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
16678         * lib/memchr.c: Include <stdlib.h> unconditionally.
16679         * lib/memchr.c (LONG_MAX): Remove.
16680         * lib/memrchr.c (LONG_MAX): Likewise.
16681         * lib/memchr.c (__memchr): Define via a prototype.
16682         * lib/memrchr.c (__memrchr): Likewise.
16683         * lib/memcmp.c (__P): Remove, and remove all uses.
16684         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
16685         Remove forward decls; no longer needed.
16686         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
16687         Use types required by C89 in prototype.
16688
16689         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
16690         * lib/savedir.c: Likewise.
16691         * lib/mkdir.c (free): Remove decl.
16692         * lib/rmdir.c (rmdir): Define with a prototype.
16693         * lib/savedir.c: Include savedir.h first, to test interface.
16694
16695         * lib/mktime.c (STDC_HEADERS): Remove.
16696         Include <stdlib.h>, <string.h> unconditionally.
16697
16698         * lib/modechange.c: Include <stdlib.h> unconditionally.
16699         (malloc): Remove decl.
16700
16701         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
16702         (free): Remove decl.
16703
16704         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
16705         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
16706         (This type really should be intptr_t, but that's a C99ism.)
16707         (_obstack_memcpy): Remove: all uses changed to memcpy.
16708         Include <string.h> unconditionally.
16709         (struct obstack): Assume __STDC__ for types of members
16710         chunkfun, freefun, extra_arg.
16711         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
16712         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
16713         obstack_begin, obstack_specify_allocation,
16714         obstack_specify_allocation_with_arg, obstack_chunkfun,
16715         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
16716         Remove unprototyped decls and the macros that use them.
16717         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
16718         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
16719         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
16720         (defined __STDC__ && __STDC__)]:
16721         Remove nonprototyped code.
16722         Include <stdlib.h> unconditionally.
16723         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
16724         _obstack_allocated_p, _obstack_free, obstack_free,
16725         _obstack_memory_used, print_and_abort):
16726         Define using prototypes.
16727         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
16728         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
16729         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
16730         obstack_next_free, obstack_object_size, obstack_room) [0]:
16731         Remove unused, unprototyped code.
16732
16733         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
16734
16735         * lib/physmem.c (physmem_total, physmem_available, main): Define
16736         with prototypes.
16737
16738         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
16739         (main): Define with a prototype.
16740
16741         * lib/posixver.c (getenv): Remove decl.
16742
16743         * lib/putenv.c (malloc): Returns void *, not char *.
16744         Include <string.h> unconditionally.
16745         (strchr, memcpy, NULL): Do not define.
16746
16747         * lib/readtokens.c: Include readtokens.h first, to test interface.
16748         Include <stdlib.h>, <string.h> unconditionally.
16749         (init_tokenbuffer): Define with a prototype.
16750
16751         * lib/regex.c (PARAMS): Remove.  All uses removed.
16752         All uses of _RE_ARGS removed, too.
16753         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
16754         unconditionally.
16755         (bzero): Assume memset exists.
16756         (memcmp, memcpy, NULL): Remove.
16757         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
16758         char, or assignments to local vars of type signed char.
16759         (init_syntax_once, PREFIX(extract_number_and_incr),
16760         PREFIX(print_partial_compiled_pattern),
16761         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
16762         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
16763         PREFIX(regex_grow_registers), PREFIX(regex_compile),
16764         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
16765         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
16766         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
16767         wcs_compile_range, byte_compile_range, truncate_wchar,
16768         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
16769         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
16770         count_mbs_length, wcs_re_match_2_internal,
16771         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
16772         PREFIX(alt_match_null_string_p),
16773         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
16774         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
16775         regfree, PREFIX(extract_number)): Define with prototype.  Remove
16776         now-unnecessary declaration, if any.
16777         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
16778         regcomp, regexec):
16779         Remove now-unnecessary casts among pointer types.
16780         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
16781
16782         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
16783         (free): Remove decl.
16784
16785         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
16786
16787         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
16788         (free): Remove decl.
16789
16790         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
16791         * lib/xgetcwd.c: Likewise.
16792
16793         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
16794         (free): Remove decl.
16795
16796         * lib/strchrnul.c (strchrnul): Define with a prototype.
16797         Fix bug: c_in was not converted to char before searching.
16798
16799         The following changes are not K&R related:
16800
16801         * lib/group-member.h: Include <sys/types.h>, so that this file is
16802         self-contained.
16803         * lib/makepath.h: Likewise.
16804
16805         * lib/getusershell.c (readname, default_index, line_size, readname):
16806         Use size_t, not int, for sizes.
16807         (readname): If the size overflows, report an error instead of
16808         looping forever.
16809
16810 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16811
16812         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
16813         libc.
16814
16815 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16816
16817         * README: New section: portability guidelines.
16818
16819 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
16820
16821         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
16822         C89 spec.
16823
16824 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
16825
16826         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
16827
16828 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16829
16830         Assume C89 or better; remove K&R cruft.
16831         A few of these changes were first proposed by Derek Robert Price
16832         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
16833
16834         * lib/addext.c: Include <string.h> unconditionally.
16835         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
16836         Don't declare getenv or malloc.
16837
16838         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
16839         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
16840         (NULL): Remove.
16841         (find_stack_direction, alloca): Use prototypes.
16842
16843         * lib/atexit.c (atexit): Define using a prototype.
16844
16845         * lib/basename.c, dirname.c, stripslash.c:
16846         Include <string.h> unconditionally.
16847
16848         * lib/bcopy.c: Include <stddef.h>.
16849         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
16850
16851         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
16852
16853         * lib/error.h (error, error_at_line, error_print_progname)
16854         [! (defined (__STDC__) && __STDC__)]: Remove decls.
16855         * lib/error.c: Include error.h first, to check interface.
16856         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16857         (VA_START): Remove; all uses changeed to va_start.
16858         (exit, strerror): Remove decls.
16859         (error_print_progname): Prototype uncondionally.
16860         Don't include <errno.h>; no longer needed.
16861         (private_strerror): Remove.
16862         (error_tail): Always define.
16863         (error, error_at_line): Assume C89 or better; always use prototypes.
16864         * lib/fatal.c: Include "fatal.h" first, to test interface.
16865         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16866         (VA_START): Remove; all uses changed to va_start.
16867         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
16868         this case.
16869         (exit): Remove decl.
16870         (fatal): Prototype unconditionally.  Assume va_start works.
16871         Abort at end, to pacify gcc.
16872
16873         * lib/euidaccess.c (main): Define with a prototype.
16874
16875         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
16876
16877         * lib/exitfail.c: Include <stdlib.h> unconditionally.
16878
16879         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
16880         prototypes.
16881         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
16882         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
16883         (getenv): Remove decl.
16884         (fnmatch): Define using a prototype.
16885         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
16886         (FCT): Define using a prototype.
16887
16888         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
16889
16890         * lib/gethostname.c: Include <stddef.h>.
16891         (gethostname): Define with prototype.  Length is size_t, not int.
16892
16893 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16894
16895         Assume C89 or better; remove K&R cruft.
16896         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
16897         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
16898         string.h, getenv, malloc.
16899         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
16900         headers.
16901         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
16902         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
16903         do not check for strerror.
16904         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
16905         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
16906         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
16907         do not check for doprnt or vprintf.
16908         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
16909         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
16910
16911 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16912
16913         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
16914         getversion.c should have been removed then, but was accidentally
16915         preserved.
16916
16917         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
16918         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
16919
16920 2003-09-08  Karl Berry  <karl@gnu.org>
16921
16922         * config/config.sub, config.guess, srclistvars.sh: update from savannah
16923                 config, forget about prep.
16924
16925         * config/depcomp, missing: update from automake.
16926
16927 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16928
16929         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
16930         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16931
16932 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16933
16934         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
16935         copy_tm_result.  Bug reported by Simon Josefsson in
16936         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16937
16938 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16939
16940         * m4/time_r.m4: New file.
16941         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
16942         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
16943         is. Check for timegm declaration.
16944         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
16945         Do not check for gmtime_r.
16946         Replace mktime if __mktime_internal does not exist and if mktime
16947         hasn't been replaced already.
16948
16949 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16950
16951         * lib/time_r.c, lib/time_r.h: New files.
16952
16953         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
16954         __localtime_r.
16955         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
16956         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
16957
16958         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
16959         __gmtime_r.
16960         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
16961         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
16962         Include <time_r.h>.
16963
16964         * lib/timegm.c: Switch to glibc implementation, with the following
16965         changes:
16966         [defined HAVE_CONFIG_H]: Include <config.h>.
16967         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
16968         (__mktime_internal) [!defined _LIBC]: New decl.
16969         (__gmtime_r) [!defined _LIBC]: New macro and function.
16970         (timegm): Use a prototype, since gnulib assumes C89.
16971         Do not bother declaring tmp to be const, as it's not really usefu.
16972         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
16973         (timegm): Declare only if HAVE_DECL_TIMEGM.
16974
16975 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16976
16977         * MODULES.html.sh (func_all_modules): Add time_r.
16978         * modules/time_r: New file.
16979         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
16980         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
16981
16982 2003-09-03  Paul Eggert  <eggert@twinsun.com>
16983
16984         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
16985         Bug reported by Lute Kamstra in
16986         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
16987
16988         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
16989         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
16990         course with correspondingly smaller numbers for tomorrow and
16991         yesterday.  From Tadayoshi Funaba.  Originally installed into
16992         sh-utils on 1999-08-07, but the patch got lost (I guess during the
16993         coreutils merge?).
16994
16995 2003-08-31  Simon Josefsson  <jas@extundo.com>
16996
16997         * modules/timegm: New file.
16998         * MODULES.html.sh (func_all_modules): Add timegm.
16999
17000 2003-08-31  Simon Josefsson  <jas@extundo.com>
17001
17002         * m4/timegm.m4: New file.
17003
17004 2003-08-31  Simon Josefsson  <jas@extundo.com>
17005
17006         * lib/timegm.h: New file.
17007         * lib/timegm.c: New file.  Based on
17008         wget-1.8.2/src/http.c:mktime_from_utc.
17009
17010 2003-08-31  Karl Berry  <karl@gnu.org>
17011
17012         * lib/argp.h: update from libc.
17013
17014 2003-08-28  Bruno Haible  <bruno@clisp.org>
17015
17016         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
17017         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
17018         followed by '#define fnmatch fnmatch_posix' gives an error.
17019
17020 2003-08-28  Bruno Haible  <bruno@clisp.org>
17021
17022         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
17023         warning on QNX, which defines O_BINARY to 000000.
17024
17025 2003-08-27  Jim Meyering  <jim@meyering.net>
17026
17027         * m4/mkstemp.m4: Require that the system mkstemp be able to create
17028         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
17029         would fail after 32.  Reported by Danny Levinson.  Details here:
17030         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
17031
17032 2003-08-24  Bruno Haible  <bruno@clisp.org>
17033
17034         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
17035         MSVC7 <stdio.h> is included later.
17036
17037 2003-08-22  Simon Josefsson  <jas@extundo.com>
17038
17039         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
17040
17041 2003-08-20  Karl Berry  <karl@gnu.org>
17042
17043         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
17044
17045 2003-08-20  Bruno Haible  <bruno@clisp.org>
17046
17047         * modules/progname: New file.
17048         * MODULES.html.sh (func_all_modules): Add progname.
17049
17050 2003-08-20  Bruno Haible  <bruno@clisp.org>
17051
17052         * lib/progname.h: New file, from GNU gettext.
17053         * lib/progname.c: New file, from GNU gettext.
17054         * lib/progreloc.c: New file, from GNU gettext.
17055
17056 2003-08-19  Jim Meyering  <jim@meyering.net>
17057
17058         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
17059         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
17060
17061 2003-08-19  Bruno Haible  <bruno@clisp.org>
17062
17063         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
17064         more.
17065
17066 2003-08-19  Bruno Haible  <bruno@clisp.org>
17067
17068         * lib/xstrdup.c: Assume <string.h> exists.
17069
17070 2003-08-18  Paul Eggert  <eggert@twinsun.com>
17071
17072         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
17073         in makefile rules.
17074
17075 2003-08-18  Jim Meyering  <jim@meyering.net>
17076
17077         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
17078         * m4/lib-ld.m4: Likewise.
17079
17080 2003-08-18  Jim Meyering  <jim@meyering.net>
17081
17082         * lib/setenv.h: Indent nested cpp directive.
17083         * lib/vasnprintf.c: Remove trailing blanks.
17084
17085 2003-08-17  Simon Josefsson  <jas@extundo.com>
17086
17087         * modules/xstrndup: New file.
17088         * MODULES.html.sh (func_all_modules): Add xstrndup.
17089
17090 2003-08-17  Simon Josefsson  <jas@extundo.com>
17091
17092         * modules/argp: Fix autoconf macro name. Add more dependencies.
17093
17094 2003-08-17  Simon Josefsson  <jas@extundo.com>
17095
17096         * m4/xstrndup.m4: New file.
17097
17098 2003-08-17  Simon Josefsson  <jas@extundo.com>
17099
17100         * m4/argp.m4: New file.
17101
17102 2003-08-17  Simon Josefsson  <jas@extundo.com>
17103             Bruno Haible  <bruno@clisp.org>
17104
17105         * lib/xstrndup.h: New file.
17106         * lib/xstrndup.c: New file.
17107
17108 2003-08-17  Bruno Haible  <bruno@clisp.org>
17109
17110         * modules/strndup (Files, Include): Add lib/strndup.h.
17111
17112 2003-08-17  Bruno Haible  <bruno@clisp.org>
17113
17114         * modules/euidaccess (Files): Add lib/euidaccess.h.
17115
17116 2003-08-17  Bruno Haible  <bruno@clisp.org>
17117
17118         * lib/strndup.h: New file.
17119
17120 2003-08-17  Bruno Haible  <bruno@clisp.org>
17121
17122         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
17123         like AC_GNU_SOURCE.
17124         * modules/extensions (configure.ac): Comment out the invocation of
17125         gl_USE_SYSTEM_EXTENSIONS.
17126
17127 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17128
17129         Merges from coreutils, etc.
17130         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
17131         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
17132         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
17133         fixing a typo.
17134         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
17135         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
17136
17137 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17138
17139         Document merge from coreutils.
17140         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
17141         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
17142         * modules/utime: Add m4/utimes-null.m4.
17143
17144 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17145
17146         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
17147         space, undoing this 2003-08-12 change:
17148         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
17149
17150 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17151
17152         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
17153         strtoul.c from libc, undoing this 2003-08-12 change:
17154         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
17155
17156 2003-08-16  Jim Meyering  <jim@meyering.net>
17157
17158         Merges from coreutils.
17159         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
17160         prefix.  Adjust cache variables similarly.  Create 500 rather than
17161         just 300 files, to exercise bug on Darwin6.5, too.
17162         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
17163         $missing_dir.
17164         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
17165         AM_SYS_POSIX_TERMIOS.
17166         Reported by mkc@mathdogs.com.
17167         Also change use of $am_cv_sys_posix_termios
17168         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
17169         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
17170         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
17171         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
17172         in /proc/mounts until it finds one with matching device number.  This
17173         is unnecessary when the FILE argument *is* a mount point.  No stat call
17174         is necessary in that case.  So, disable the statvfs-testing code on
17175         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
17176         as RedHat bug# 84846.
17177         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
17178         to 1MB, so as not to render systems with no stack size limit (e.g.,
17179         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
17180         Include <unistd.h>.  On some systems,
17181         it is required for the definition of _SC_PAGESIZE.
17182
17183 2003-08-16  Jim Meyering  <jim@meyering.net>
17184
17185         Merge from coreutils.
17186         * lib/xstrtoimax.c: #else #if -> #elif.
17187         * lib/xstrtoumax.c: Likewise.
17188
17189 2003-08-16  Jim Meyering  <jim@meyering.net>
17190
17191         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
17192         * m4/utimes.m4: Removed.
17193         * m4/utimes-null.m4: Renamed from utimes.m4.
17194
17195         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
17196         to 1MB, so as not to render systems with no stack size limit (e.g.,
17197         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
17198         Include <unistd.h>.  On some systems,
17199         it is required for the definition of _SC_PAGESIZE.
17200
17201 2003-08-16  Jim Meyering  <jim@meyering.net>
17202         and Paul Eggert  <eggert@cs.ucla.edu>
17203
17204         Merges from coreutils, etc.
17205
17206         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
17207         using the latest version from cvs.  This avoids problems with #line
17208         directives using a vendor (Sun) compiler.
17209         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
17210         Don't set GETGROUPS_LIB here; now it's
17211         done via getgroups.m4's wrapper function.
17212         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
17213         rather than just in sh-util/configure.in, so that the
17214         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
17215         same.
17216         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
17217         AC_FUNC_GETLOADAVG where to find getloadavg.c.
17218         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
17219         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
17220         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
17221         Remove code that is now done by the newly-required macros.
17222         Append $(EXEEXT) to DF_PROG.
17223         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
17224         Do not invoke or require the following here,
17225         since prereq.m4 or some gnulib .m4 now does this for us:
17226         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
17227         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
17228         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
17229         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
17230         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
17231         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
17232         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
17233         AC_FUNC_OBSTACK.
17234         Do not replace the following functions, as this is now the job
17235         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
17236         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
17237         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
17238         atexit getpass, strdup, getpagesize.
17239         Replace 'raise'.
17240         Do not check for the following functions, as this is now the job
17241         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
17242         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
17243         setregid.
17244         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
17245         Check for sys/sysctl.h.
17246         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
17247         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
17248         of checking for ssize_t ourselves.
17249
17250         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
17251         Require every macro that gnulib/modules/* suggests for us.
17252         (jm_PREREQ_ADDEXT): New macro.
17253         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
17254         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
17255
17256         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
17257         (gl_PHYSMEM): Use it.
17258         Also check for `table' function.
17259         Check for new headers and functions.
17260         Add check for sys/sysmp.h.
17261         With suggestions from Kaveh Ghazi.
17262         Ignore headers that are present but cannot be compiled.  This
17263         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
17264         C 5.4.
17265
17266 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17267
17268         Document merge from coreutils.
17269         * modules/userspec: Depend on posixver.
17270         * modules/strftime: Depend on tzset.
17271
17272 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17273
17274         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
17275         rather than tab, after '#' in shell-script copyright notices.
17276         Suggested by Bruno Haible.
17277
17278 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17279
17280         * config/srclist-update: Use three spaces, rather than tab, after '#'
17281         in shell-script copyright notices.  Suggested by Bruno Haible.
17282         Remove unnecessary parenthesization in regular expression.
17283
17284 2003-08-15  Jim Meyering  <jim@meyering.net>
17285
17286         Merge from coreutils.
17287         * lib/xgethostname.c: Include <stdlib.h>.
17288         (xghostname): Don't exit for anything other than memory-related
17289         failure; just return NULL.
17290         * lib/userspec.c: Include "posixver.h".
17291         (parse_user_spec): Accept `.' as a separator only
17292         in pre-POSIX-200112 mode.
17293         * lib/strtoimax.c: Use #elif rather than #else #if.
17294         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
17295         Remove function, now that we can rely on a working tzset function.
17296         [!_LIBC]: Ensure that the required autoconf test has been run.
17297         [!defined _NL_CURRENT && HAVE_STRFTIME]:
17298         Use underlying_strftime for %r.
17299         * lib/sha.c: Merge in some clean-up and optimization changes from
17300         glibc.
17301         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
17302         Ensure that it is a multiple of 64.
17303         Rearrange loop exit tests so as to avoid performing an
17304         additional fread after encountering an error or EOF.
17305         * lib/realloc.c: Update copyright date.
17306
17307 2003-08-15  Jim Meyering  <jim@meyering.net>
17308         and Paul Eggert  <eggert@twinsun.com>
17309
17310         Merge from coreutils.
17311         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
17312         member but strut utmpx does not.  Needed for AIX 4.3.3.
17313         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
17314
17315 2003-08-15  Jim Meyering  <jim@meyering.net>
17316         and Paul Eggert  <eggert@cs.ucla.edu>
17317
17318         Merges from coreutils, etc.
17319         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
17320         Require gl_FUNC_TZSET_CLOBBER.
17321         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
17322         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
17323         members.
17324
17325 2003-08-14  Paul Eggert  <eggert@twinsun.com>
17326
17327         Help the merge from coreutils.
17328         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
17329         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
17330         * m4/tzset.m4: Use it too.
17331
17332 2003-08-14  Paul Eggert  <eggert@twinsun.com>
17333
17334         * modules/tzset: New file.
17335
17336 2003-08-14  Jim Meyering  <jim@meyering.net>
17337
17338         Merges from coreutils.
17339         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
17340         variable names, rather than @FNMATCH_H@.
17341         * modules/alloca: Likewise for $(ALLOCA_H).
17342
17343         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
17344         the three copies of the literal target, `fnmatch.h'.
17345         * modules/alloca (alloca.h): Likewise.
17346
17347 2003-08-14  Jim Meyering  <jim@meyering.net>
17348
17349         Merge from coreutils.
17350         * m4/tzset.m4: New file.
17351         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
17352         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
17353         otherwise, AIX 5.1 systems would end up using the latter.
17354         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
17355         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
17356         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
17357         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
17358
17359 2003-08-14  Jim Meyering  <jim@meyering.net>
17360
17361         Merge from coreutils.
17362         * lib/obstack.h: Whitespace changes.
17363         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
17364         and xcalloc return values.
17365         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
17366         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
17367         hang on OSF/1 5.1 for DIR on both local and remote file systems.
17368         Reported by (and fix confirmed by) Nelson H. F. Beebe.
17369         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
17370         error from mntctl.
17371         Use mntctl's return value to drive the entry-processing loop, since
17372         we can't rely on the value of the vmt_length member in the last
17373         entry.  On some systems doing so could result in exhausting
17374         virtual memory.  Based in part on a patch from Mike Jetzer.
17375
17376 2003-08-14  Jim Meyering  <jim@meyering.net>
17377         and Paul Eggert  <eggert@twinsun.com>
17378
17379         Merges from coreutils, plus other fixes.
17380         * lib/physmem.c: Merge in portability changes from gcc/libiberty
17381         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
17382         for credits and details.  Thanks to Kaveh Ghazi for helping
17383         to keep these files in sync.
17384         (ARRAY_SIZE): Define it.
17385         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
17386         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
17387         (memcasecmp): Don't assume size_t fits in unsigned int.
17388         Remove casts and duplicate code.
17389         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
17390         (memcpy): Remove definition.
17391         Merge in some clean-up and optimization changes from glibc.
17392         [BLOCKSIZE]: Move definition to top of file.
17393         Ensure that it is a multiple of 64.
17394         Rearrange loop exit tests so as to avoid performing an
17395         additional fread after encountering an error or EOF.
17396         * lib/md5.h (md5_uintptr): Define.
17397         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
17398         return to the initial working directory.  Preserve errno
17399         for caller.
17400         * lib/idcache.c: Include "xalloc.h".
17401         (xmalloc, xrealloc): Remove decls.
17402         (getuser): Remove casts no longer required in C89.
17403         * lib/human.c: Include stdio.h, for sprintf.
17404         * lib/group-member.c: Include "xalloc.h".
17405         (xmalloc, xrealloc): Remove decls.
17406         (get_group_info): Remove casts no longer required in C89.
17407         * lib/getusershell.c (readname): Remove casts no longer required in
17408         C89.
17409         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
17410         * lib/getline.c: Whitespace fix, from coreutils.
17411
17412 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17413
17414         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
17415         Check for isascii.
17416
17417         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
17418         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
17419         Undo previous (whitespace-only) change.
17420
17421 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17422
17423         * lib/exclude.c: Include <ctype.h>
17424         (IN_CTYPE_DOMAIN): New macro.
17425         (is_space): New fn.
17426         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
17427         and empty lines.
17428
17429         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
17430         Undo previous (whitespace-only) change.
17431
17432 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17433
17434         * config/srclist-update: Change update back to the old behavior,
17435         leaving whitespace alone.  Use one 'sed' command rather than a
17436         pipeline.
17437         (fixlicense): Now a variable, not a function.
17438         (remove_trailing_blanks): Remove.
17439         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
17440         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
17441         Undo previous (whitespace-only) change.
17442
17443 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17444
17445         Merge from coreutils.
17446         * modules/euidaccess: Add lib_SOURCES, include for new
17447         file euidaccess.h
17448
17449 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17450
17451         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
17452         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
17453         Normalize leading white space and remove trailing white space.
17454
17455         Merge from coreutils
17456         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
17457
17458         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
17459         0.12.1.  These files are now being upgraded automatically by
17460         ../config/srclist-update.
17461
17462 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17463
17464         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
17465         Normalize leading white space and remove trailing white space.
17466         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
17467         notice, as per ../config/srclist-update.
17468
17469         Merge from coreutils.
17470         * lib/euidaccess.h: New file.
17471         * lib/euidaccess.c: Include it.
17472         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
17473         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
17474         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
17475
17476 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17477
17478         * config/srclist-update: Add copyright notice.
17479         (remove_id_lines, remove_trailing_blanks): New constants.
17480         (fixfile): Use them to normalize spacing a bit in copied files.
17481         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
17482         Normalize leading white space and remove trailing white space.
17483
17484         * config/texinfo.tex: Sync with texinfo.
17485
17486         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
17487         strtoul.c from libc, to merge coreutils whitespace changes.
17488
17489         * config/srclist.txt: Get the following m4 files from gettext:
17490         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
17491         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
17492         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
17493         wint_t.m4.
17494
17495 2003-08-12  Karl Berry  <karl@gnu.org>
17496
17497         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
17498         been made.
17499
17500 2003-08-11  Paul Eggert  <eggert@twinsun.com>
17501
17502         * modules/gnu-source, m4/gnu-source.m4:
17503         Remove; we're assuming Autoconf 2.54 or later now.
17504         Suggested by Bruno Haible.
17505         * MODULES.html.sh (func_all_modules): Remove gnu-source.
17506
17507 2003-08-11  Bruno Haible  <bruno@clisp.org>
17508
17509         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
17510
17511 2003-08-11  Bruno Haible  <bruno@clisp.org>
17512
17513         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
17514         (vasnprintf): Use it instead of wcslen.
17515
17516 2003-08-11  Bruno Haible  <bruno@clisp.org>
17517
17518         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
17519         value to ensure that _Bool promotes to int. Use #define for _Bool when
17520         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
17521
17522 2003-08-10  Karl Berry  <karl@gnu.org>
17523
17524         * lib/regex.h: update from libc (whitespace fix).
17525
17526 2003-08-09  Paul Eggert  <eggert@twinsun.com>
17527
17528         Merge some files from coreutils.  These changes were
17529         originally made by Jim Meyering.
17530         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
17531         many older Unixes require this.
17532         * lib/alloca.c (alloca): Remove cast to argument of free;
17533         no longer needed in C89.
17534         * lib/alloca_.h, regex.h: Fix white space to match
17535         what GNU indent does.
17536
17537 2003-08-09  Paul Eggert  <eggert@twinsun.com>
17538
17539         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
17540         apparently Emacs's Unicode mode got confused before my 2003-08-05
17541         checkin.
17542
17543 2003-08-08  Paul Eggert  <eggert@twinsun.com>
17544
17545         * m4/extensions.m4: New file.
17546         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
17547         Require gl_USE_SYSTEM_EXTENSIONS.
17548         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
17549         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
17550
17551 2003-08-08  Paul Eggert  <eggert@twinsun.com>
17552
17553         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
17554         * modules/extensions, modules/gnu-source: New files.
17555         * modules/timespec, modules/unlocked-io: Depend on extensions.
17556
17557 2003-08-07  Paul Eggert  <eggert@twinsun.com>
17558
17559         * modules/restrict: New file.
17560         * MODULES.html.sh (func_all_modules): Add restrict.
17561         * modules/regex: Depend on restrict.
17562
17563 2003-08-07  Paul Eggert  <eggert@twinsun.com>
17564
17565         * m4/restrict.m4: New file.
17566         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
17567
17568 2003-08-07  Bruno Haible  <bruno@clisp.org>
17569
17570         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
17571         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
17572
17573 2003-08-07  Bruno Haible  <bruno@clisp.org>
17574
17575         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
17576         makes the module 'getndelim2' compatible with the module 'getline'.
17577
17578 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17579
17580         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
17581         byte with "\201" to avoid glitches when editing that source file
17582         with multi-gnome-terminal.
17583
17584 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17585
17586         * lib/bumpalloc.h: Remove.
17587
17588 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17589
17590         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
17591         * modules/bumpalloc: Remove.
17592
17593 2003-08-04  Paul Eggert  <eggert@twinsun.com>
17594
17595         * lib/getloadavg.c: Change copyright notice and spacing to conform to
17596         GNU coding style.
17597
17598         Merge from coreutils.
17599         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
17600         1. From glibc.
17601         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
17602         from Karl Berry, implemented by Jim Meyering.
17603         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
17604         from Dmitry V. Levin.
17605         Remove anachronistic cast of xrealloc.
17606         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
17607         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
17608         type. Otherwise, it wouldn't compile with at least /bin/cc on
17609         ymp-cray-unicos9.0.2.X.
17610         Combine two mostly-identical uses of alloca into one.
17611         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
17612
17613 2003-08-04  Dave Love  <d.love@dl.ac.uk>
17614
17615         [From Emacs.]
17616
17617         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
17618         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
17619         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
17620         obsolete NLIST_NAME_UNION.
17621         [__GNU__]: Undef BSD and FSCALE.
17622         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
17623
17624 2003-08-03  Paul Eggert  <eggert@twinsun.com>
17625
17626         * lib/stdbool_.h (_Bool): Make it signed char, instead of
17627         an enum type, so that it's guaranteed to promote to int.  See:
17628         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
17629
17630 2003-08-03  Karl Berry  <karl@gnu.org>
17631
17632         * config/depcomp: update from automake.
17633
17634 2003-07-31  Paul Eggert  <eggert@twinsun.com>
17635
17636         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
17637         (strerror): Don't assume that a printable int fits in 14 bytes.
17638
17639 2003-07-31  Bruno Haible  <bruno@clisp.org>
17640
17641         * modules/getpass-gnu: New file.
17642         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
17643
17644 2003-07-31  Bruno Haible  <bruno@clisp.org>
17645
17646         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
17647
17648 2003-07-24  Karl Berry  <karl@gnu.org>
17649
17650         * config/missing: update from automake.
17651
17652 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
17653             Bruno Haible  <bruno@clisp.org>
17654
17655         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
17656         * lib/getline.c (getline, getdelim): Likewise.
17657         Remove _GNU_SOURCE define; now it's defined in config.h through
17658         m4/getline.m4.
17659
17660 2003-07-23  Karl Berry  <karl@gnu.org>
17661
17662         * config/config.sub: update from prep.
17663
17664 2003-07-22  Paul Eggert  <eggert@twinsun.com>
17665
17666         * modules/xalloc (Depends-on): Add exitfail.
17667         * modules/xmemcoll: Likewise.
17668
17669 2003-07-22  Paul Eggert  <eggert@twinsun.com>
17670
17671         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
17672         over-parenthesization in macros.
17673
17674         Sync with coreutils.
17675
17676         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
17677         required by C99.
17678
17679         Use `exit_failure' for xalloc and xmemcoll instead of their own
17680         private exit-failure variables.
17681         * lib/xalloc.h (xalloc_exit_failure): Remove.
17682         * lib/xmalloc.c: Likewise.  Include exitfail.h.
17683         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
17684         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
17685         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
17686         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
17687
17688 2003-07-20  Jim Meyering  <jim@meyering.net>
17689
17690         * modules/closeout (Depends-on): Add exitfail.
17691         Suggestion from Bruno Haible.
17692
17693 2003-07-19  Karl Berry  <karl@gnu.org>
17694
17695         * config/config.sub: update from prep.
17696
17697 2003-07-18  Paul Eggert  <eggert@twinsun.com>
17698
17699         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
17700         Remove.
17701         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
17702         to test that it can stand by itself.  Include "exitfail.h".
17703         Clients should set exit_failure instead.
17704         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
17705
17706 2003-07-18  Bruno Haible  <bruno@clisp.org>
17707
17708         * modules/getndelim2: New file.
17709         * modules/getline: Share files with module getndelim2.
17710         * modules/getnline: Depend on getndelim2 instead of sharing files with
17711         it. Add getnline.c to lib_SOURCES.
17712         * MODULES.html.sh (func_all_modules): Add getndelim2.
17713
17714 2003-07-18  Bruno Haible  <bruno@clisp.org>
17715
17716         * m4/getndelim2.m4: New file.
17717         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
17718         invoke gl_PREREQ_GETNDELIM2.
17719         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
17720         gl_PREREQ_GETNDELIM2.
17721         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
17722         gl_GETNDELIM2.
17723
17724 2003-07-18  Bruno Haible  <bruno@clisp.org>
17725
17726         * lib/getndelim2.h: New file.
17727         * lib/getndelim2.c: Make into a module of its own. Include config.h,
17728         getndelim2.h.
17729         (getndelim2): Make non-static. Change return type to ssize_t.
17730         * lib/getline.h: Change argument names.
17731         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
17732         * lib/getnline.c: Include getndelim2.h.
17733
17734 2003-07-18  Andreas Schwab  <schwab@suse.de>
17735
17736         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
17737
17738 2003-07-17  Karl Berry  <karl@gnu.org>
17739
17740         * config/config.sub: update from prep.
17741
17742 2003-07-17  Bruno Haible  <bruno@clisp.org>
17743
17744         * modules/getnline: New file.
17745         * modules/getline: Add lib/getndelim2.c to source file list.
17746         * MODULES.html.sh (func_all_modules): Add getnline.
17747
17748 2003-07-17  Bruno Haible  <bruno@clisp.org>
17749
17750         * m4/getnline.m4: New file.
17751
17752 2003-07-17  Bruno Haible  <bruno@clisp.org>
17753
17754         * m4/Makefile.am.in: Remove file.
17755         * m4/Makefile.am: Remove file.
17756         * m4/Makefile.in: Remove file.
17757
17758 2003-07-17  Bruno Haible  <bruno@clisp.org>
17759
17760         * lib/getnline.h: New file.
17761         * lib/getnline.c: New file.
17762         * lib/getndelim2.c: New file, extracted from getline.c.
17763         (getndelim2): Renamed from getdelim2, with added nmax argument.
17764         * lib/getline.c: Include getndelim2.c.
17765         (getdelim2): Moved out to getndelim2.c.
17766         (getline, getdelim): Update.
17767
17768 2003-07-17  Bruno Haible  <bruno@clisp.org>
17769
17770         * lib/Makefile.am: Remove file.
17771         * lib/Makefile.in: Remove file.
17772
17773 2003-07-17  Bruno Haible  <bruno@clisp.org>
17774
17775         * configure.in: Remove file.
17776         * Makefile.in: Remove file.
17777
17778 2003-07-17  Bruno Haible  <bruno@clisp.org>
17779
17780         * MODULES.html.sh: Put the </BODY> right before </HTML>.
17781
17782 2003-07-16  Karl Berry  <karl@gnu.org>
17783
17784         * config/srclist-update: was running fixlicense twice, which caused
17785                 texinfo.tex to be nullified for some reason.  Simplify,
17786                 $gplsrc is no longer needed as far as I can see?
17787
17788 2003-07-16  Jim Meyering  <jim@meyering.net>
17789
17790         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
17791
17792 2003-07-15  Paul Eggert  <eggert@twinsun.com>
17793
17794         * config/srclist.txt: Get the following files from gettext-runtime/intl
17795         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
17796         ref-del.sin.  From Bruno Haible.
17797         * config/srclist-update (fixfile): Change grep pattern again, since the
17798         previous fix didn't work (there was another trailing $).  Use
17799         '[$]' to escape the $s.
17800
17801 2003-07-15  Karl Berry  <karl@gnu.org>
17802
17803         * lib/vasnprintf.c: update from gettext.
17804
17805 2003-07-15  Karl Berry  <karl@gnu.org>
17806
17807         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
17808         gets expanded when surrounded by '$'.
17809
17810 2003-07-15  Jim Meyering  <jim@meyering.net>
17811
17812         * modules/save-cwd: Don't depend on error.  From Derek Price.
17813
17814 2003-07-15  Jim Meyering  <jim@meyering.net>
17815
17816         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
17817
17818 2003-07-14  Simon Josefsson  <jas@extundo.com>
17819
17820         * modules/mempcpy: New file.
17821         * MODULES.html.sh (func_all_modules): Add mempcpy.
17822
17823 2003-07-14  Simon Josefsson  <jas@extundo.com>
17824
17825         * m4/mempcpy.m4: New file.
17826
17827 2003-07-14  Simon Josefsson  <jas@extundo.com>
17828
17829         * lib/mempcpy.h: New file.
17830         * lib/mempcpy.c: New file.
17831
17832 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17833
17834         * modules/getdate, modules/posixtm: Depend on mktime.
17835
17836 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17837
17838         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
17839         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
17840         unicodeio.c, unicodeio.h, unlocked-io.h:
17841         Switch from LGPL to GPL.
17842
17843 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17844
17845         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
17846         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
17847         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
17848         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
17849         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
17850         updated automatically by ../config/srclist-update.  This changes
17851         their license from LPGL to GPL.
17852
17853 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17854
17855         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
17856         assumed to refer to the root of the most recent stable gettext version.
17857         * config/srclistvars.sh: Add defaults for eggert.
17858         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
17859         Match "This program" as well as "The program".  This is needed
17860         for gettext.
17861
17862 2003-07-14  Jim Meyering  <jim@meyering.net>
17863
17864         Don't emit diagnostics.  Let callers do that.
17865         * lib/save-cwd.c: Don't include "error.h".
17866         (save_cwd): Don't call error.  Ensure that errno is valid
17867         when returning nonzero.
17868
17869         * lib/save-cwd.h (restore_cwd): Update prototype.
17870         * lib/save-cwd.c (restore_cwd): Remove two parameters.
17871         Simplify.  Don't call error upon failure.  Let callers do that.
17872         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
17873         when auditing is enabled.  But don't bother updating the #if.
17874
17875 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
17876
17877         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
17878         it breaks C++ compilation.
17879         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
17880
17881 2003-07-10  Simon Josefsson  <jas@extundo.com>
17882
17883         * modules/strchrnul (Makefile.am): Add strchrnul.h.
17884
17885 2003-07-10  Jim Meyering  <jim@meyering.net>
17886
17887         * m4/clock_time.m4: Remove trailing blank.
17888         * m4/intmax_t.m4: Likewise.
17889
17890 2003-07-10  Jim Meyering  <jim@meyering.net>
17891
17892         * lib/vasnprintf.c: Remove trailing blanks.
17893         Make cpp indentation consistent.
17894
17895 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17896
17897         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
17898         posixver.c, strftime.c, strnlen.c, strverscmp.c:
17899         Switch from LGPL to GPL.
17900
17901 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17902
17903         * config/srclist.txt: Sort sublists.  Add
17904         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
17905         that differ from gnulib for one reason or another; we'd like this list
17906         to be smaller but for now let's document what we have.
17907
17908 2003-07-08  Paul Eggert  <eggert@twinsun.com>
17909
17910         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
17911         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
17912         and sweeter "eval x=$x".
17913         * config/srclist.txt: Get lib/argp* from glibc.
17914
17915 2003-07-07  Paul Eggert  <eggert@twinsun.com>
17916
17917         * lib/mktime.c: Fix some boundary cases and remove need for floating
17918         point.
17919
17920         Issue a compile-time diagnostic if time_t is floating point, or if
17921         two's complement arithmetic is not in effect, or if arithmetic
17922         right shift does not propagate the sign.  These assumptions were
17923         all in the original code but they weren't checked.
17924
17925         (TIME_T_MIDPOINT, verify): New macros.
17926         (__isleap): Remove; it has integer overflow problems.
17927         (leapyear): New function, without those problems.
17928         (ydhms_tm_diff): Remove; splitting into two parts.
17929         (ydhms_diff): New function, containing the arithmetic part of
17930         the old ydhms_tm_diff function.  Issue a compile-time
17931         diagnostic if we are not using C99 integer division.
17932         Avoid casts when possible.
17933         (guess_time_tm): New function, containing the checking part of
17934         the old ydhms_tm_diff function.  Return the new value, rather than
17935         the difference between it and the old.  Accept a new argument T
17936         so that *T specifies the old value.  Check for overflow in the result.
17937
17938         (__mktime_internal): Use a time_t offset, not a long int offset.
17939         This undoes the 2003-06-04 change, which is no longer needed now
17940         that we have better overflow checking.
17941         (localtime_offset): Likewise.
17942
17943         (__mktime_internal): Avoid harmful overflow on hosts where time_t
17944         and long are 64-bit but int is only 32-bit.
17945         (ydhms_diff): Use long int to store year1 and yday1.
17946         Issue a compile-time diagnostic if long int is not wide enough.
17947
17948         (__mktime_internal): Use long int to store adjusted year and yday.
17949         Use plain C rather than preprocessor commands, if that doesn't
17950         affect efficiency.
17951         Check for overflow (and try to repair) after each probe
17952         rather than checking only at the very end.  This avoids some bugs
17953         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
17954         does not equal GMT offset at maximum time).
17955         Use integer to check for overflow rather than floating point; this
17956         is more portable to non-IEEE hosts, and is a tad faster.
17957         When we detect that we are oscillating between two values,
17958         don't check whether tm_isdst has the requested value, since
17959         we already know the answer.  When tm_isdst has the wrong value,
17960         use a different heuristic to find the right one, based on the
17961         extreme values actually observed in practice in tz2003a,
17962         rather than the (overly optimistic) "previous 3 calendar quarters".
17963
17964         (not_equal_tm, print_tm, check_result): Use "const T" rather than
17965         "T const" to accommodate glibc style.
17966         (check_result): Use less-confusing report format.  "long" -> "long int.
17967         (main): Likewise.
17968         Don't loop if the iteration overflows time_t.
17969         Allow a negative step in the iteration.
17970
17971 2003-07-06  Karl Berry  <karl@gnu.org>
17972
17973         * config/depcomp: update from automake.
17974         * config/config.sub: update from prep.
17975
17976 2003-07-03  Karl Berry  <karl@gnu.org>
17977
17978         * config/config.guess: update from prep.
17979
17980 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17981
17982         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
17983         xreadlink.c now includes it unconditionally.
17984
17985 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17986
17987         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
17988         having it depend on HAVE_SYS_TYPES_H.
17989
17990 2003-07-01  Bruno Haible  <bruno@clisp.org>
17991
17992         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
17993         <sys/types.h> should be sufficient.
17994         Reported by Paul Eggert.
17995
17996 2003-06-26  Karl Berry  <karl@gnu.org>
17997
17998         * config/depcomp: update from automake.
17999
18000 2003-06-26  Bruno Haible  <bruno@clisp.org>
18001
18002         * modules/human: Depend on module stdbool.
18003
18004 2003-06-25  Bruno Haible  <bruno@clisp.org>
18005
18006         * modules/readlink: New file.
18007         * modules/xreadlink: Depend on it.
18008         * MODULES.html.sh (func_all_modules): Add readlink.
18009
18010 2003-06-25  Bruno Haible  <bruno@clisp.org>
18011
18012         * m4/readlink.m4: New file.
18013
18014 2003-06-25  Bruno Haible  <bruno@clisp.org>
18015
18016         * lib/readlink.c: New file.
18017
18018 2003-06-22  Karl Berry  <karl@gnu.org>
18019
18020         * config/srclist.txt: update mkinstalldirs from automake.
18021         * config/mkinstalldirs: update.
18022
18023 2003-06-22  Bruno Haible  <bruno@clisp.org>
18024
18025         Portability to mingw32.
18026         * m4/ssize_t.m4: New file, from GNU gettext.
18027         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
18028         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
18029
18030 2003-06-22  Bruno Haible  <bruno@clisp.org>
18031
18032         * modules/safe-read: Add m4/ssize_t.m4.
18033         * modules/xreadlink: Add m4/ssize_t.m4.
18034
18035 2003-06-20  Bruno Haible  <bruno@clisp.org>
18036
18037         Assume C89, so PARAMS isn't needed.
18038         * lib/unicodeio.h (PARAMS): Remove.
18039         * lib/unicodeio.c: Don't use PARAMS.
18040
18041 2003-06-18  Karl Berry  <karl@gnu.org>
18042
18043         * config/config.{guess,sub}: update from prep.
18044
18045 2003-06-18  Jim Meyering  <jim@meyering.net>
18046
18047         Merge changes from coreutils.
18048         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
18049         Remove explicit declarations of xmalloc and realloc.
18050         Include xalloc.h.
18051         (read_utmp): Remove anachronistic cast of xmalloc.
18052
18053 2003-06-17  Paul Eggert  <eggert@twinsun.com>
18054
18055         Assume C89, so PARAMS isn't needed.
18056         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
18057         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
18058         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
18059         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
18060         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
18061         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
18062         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
18063         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
18064         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
18065         lib/xstrtod.h, lib/xstrtol.h: Likewise.
18066         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
18067         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
18068         no longer needed. Anyway, config.h should always be included before any
18069         other file.
18070
18071 2003-06-11  Simon Josefsson  <jas@extundo.com>
18072
18073         * modules/sysexits: New file.
18074         * MODULES.html.sh (func_all_modules): Add sysexits.
18075
18076 2003-06-11  Simon Josefsson  <jas@extundo.com>
18077
18078         * lib/sysexit_.h: New file.
18079
18080 2003-06-11  Derek Price  <derek@ximbiot.com>
18081
18082         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
18083         necessary.
18084
18085 2003-06-11  Bruno Haible  <bruno@clisp.org>
18086
18087         * m4/sysexits.m4: New file.
18088
18089 2003-06-10  Simon Josefsson  <jas@extundo.com>
18090
18091         * lib/argp.h: New file, from glibc.
18092         * lib/argp-ba.c: New file, from glibc.
18093         * lib/argp-eexst.c: New file, from glibc.
18094         * lib/argp-fmtstream.c: New file, from glibc.
18095         * lib/argp-fmtstream.h: New file, from glibc.
18096         * lib/argp-fs-xinl.c: New file, from glibc.
18097         * lib/argp-help.c: New file, from glibc.
18098         * lib/argp-namefrob.h: New file, from glibc.
18099         * lib/argp-parse.c: New file, from glibc.
18100         * lib/argp-pv.c: New file, from glibc.
18101         * lib/argp-pvh.c: New file, from glibc.
18102         * lib/argp-xinl.c: New file, from glibc.
18103
18104 2003-06-10  Simon Josefsson  <jas@extundo.com>
18105
18106         * modules/strchrnul: New file.
18107
18108 2003-06-10  Simon Josefsson  <jas@extundo.com>
18109
18110         * modules/argp: New file.
18111
18112 2003-06-10  Simon Josefsson  <jas@extundo.com>
18113
18114         * m4/strchrnul.m4: New file.
18115
18116 2003-06-10  Simon Josefsson  <jas@extundo.com>
18117
18118         * lib/strchrnul.h: New file.
18119         * lib/strchrnul.c: New file.
18120
18121 2003-06-10  Bruno Haible  <bruno@clisp.org>
18122
18123         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
18124
18125 2003-06-07  Karl Berry  <karl@gnu.org>
18126
18127         * config/config.{guess,sub}: update from prep.
18128
18129 2003-06-07  Jim Meyering  <jim@meyering.net>
18130
18131         * modules/strtod: Use $(...) notation, not @...@ for
18132         AC_REPLACE'd variables.
18133         * modules/localcharset: Likewise.
18134
18135 2003-06-07  Jim Meyering  <jim@meyering.net>
18136
18137         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
18138         in place of my name in the copyright comment.
18139         Remove definition and uses of __P.
18140
18141         From coreutils.
18142         * lib/stat.c: Don't declare xmalloc explicitly.
18143         Instead, include "xalloc.h".
18144         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
18145         xrealloc, and xcalloc return values.
18146         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
18147         Improve comment.
18148         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
18149
18150 2003-06-07  Bruno Haible  <bruno@clisp.org>
18151
18152         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
18153         avoid AC_CONFIG_LINKS.
18154         * modules/fnmatch (Makefile.am): Use explicit creation rule for
18155         fnmatch.h, to avoid AC_CONFIG_LINKS.
18156         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
18157
18158 2003-06-07  Bruno Haible  <bruno@clisp.org>
18159
18160         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
18161         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
18162         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
18163         directory.
18164         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
18165         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
18166         directory.
18167
18168 2003-06-06  Jim Meyering  <jim@meyering.net>
18169
18170         Merge from coreutils.
18171         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
18172         Consolidate declarations and initializations of *_base* locals.
18173
18174         Merge from coreutils.
18175         This avoids a core dump on systems without GNU putenv,
18176         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
18177         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
18178         (unsetenv): New static function, from GNU libc.
18179         (rpl_putenv): Use it.
18180
18181         * lib/modechange.c: Remove trailing blanks.
18182
18183         Merge from coreutils.
18184         * lib/fsusage.c: Remove declaration of statfs.
18185         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
18186
18187         * lib/posixtm.c: Include <stdbool.h> unconditionally.
18188
18189 2003-06-06  Jim Meyering  <jim@meyering.net>
18190
18191         * lib/stdbool_.h: Renamed from stdbool.h.in.
18192
18193 2003-06-06  Jim Meyering  <jim@meyering.net>
18194             Bruno Haible  <bruno@clisp.org>
18195
18196         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
18197         Adjust Makefile.am snippet not to redirect directly to target.
18198         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
18199
18200 2003-06-05  Paul Eggert  <eggert@twinsun.com>
18201
18202         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
18203         mismatch, look in future quarters as well as past.  This fixes a
18204         bug when processing fall-backwards gaps immediately after a long
18205         period of daylight-saving time.
18206
18207         * lib/mktime.c: Assume freestanding C89 or better.
18208         (HAVE_LIMITS_H): Remove.  Assume it's 1.
18209         (__P): Remove; not used.
18210         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
18211         (mktime, not_equal_tm, print_tm, check_result,
18212         main): Use prototypes.  Use const * where appropriate.
18213         (main): Fix typo in testing code that uncovered by above changes.
18214         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
18215
18216 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18217
18218         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
18219         locale.h, localeconv.  This merges changes from coreutils.
18220
18221         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
18222         It can be removed after the next Autoconf is released.
18223         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
18224         needed.
18225
18226 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18227
18228         * lib/mktime.c: Fix Debian bug 177940
18229         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
18230         (localtime_offset): Now long int, not time_t, because we want it
18231         to be guaranteed to be signed.  All uses changed.
18232         (__mktime_internal): If overflow would occur when adding offset,
18233         don't add it.
18234
18235         Merge 'human' changes from coreutils.  Rewrite to support
18236         locale-specific notations like thousands separators.
18237         * lib/human.c: Simplify authorship notice.
18238         Include human.h immediately after config.h.
18239         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
18240         <limits.h>: Do not include, since human.h does.
18241         (SIZE_MAX, UINTMAX_MAX): New macros.
18242         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
18243         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
18244         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
18245         (power_letter): Renamed from suffixes.
18246         (generate_suffix_backwards): Remove.
18247         (adjust_value): Now takes int style (because of human.h changes)
18248         and long double value (for greater precision on some platforms).
18249         (group_number): New function.
18250         (human_readable): Use it.  Use integer options, not enum.
18251         Put the options before the sizes in the arg list.
18252         Support all the new options.
18253         The old human_readable function has been removed;
18254         use inttostr.h instead.
18255         (human_readable, default_block_size, humblock):
18256         Use uintmax_t, not int, for block sizes.
18257         (human_readable_inexact, block_size_types): Remove.
18258         (block_size_opts): New constant.
18259         (human_options): Renamed from human_block_size, with new signature
18260         that allows block sizes up to UINTMAX_MAX.  All callers changed.
18261         * lib/human.h: Add copyright and authorship notice.
18262         Include <limits.h> and <stdbool.h> unconditionally.
18263         (PARAMS): Remove.  All uses removed.
18264         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
18265         (enum human_inexact_style): Remove tag; now a nameless enum.
18266         (human_floor, human_ceiling, human_round_to_even): Now have
18267         values 2, 0, 1 rather than -1, 1, 0.
18268         (human_group_digits, human_suppress_point_zero, human_autoscale,
18269         human_base_1024, human_SI, human_B): New constants.
18270         (human_readable_inexact, human_block_size): Remove.
18271         (human_readable): Size args are now uintmax_t, not int.
18272         (human_options): New decl.
18273
18274         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
18275         unnecessary now that we assume C89 or better.  This change
18276         imported from coreutils.
18277
18278         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
18279         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
18280         in the 2003-05-30 sync from glibc.
18281
18282         .h files should stand alone, but we shouldn't include <sys/types.h>
18283         if we can get away with just <stddef.h>.
18284
18285         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
18286         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
18287         rather than <sys/types.h>, as we merely need size_t.
18288         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
18289         to get size_t.
18290         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
18291         Include <stdio.h>, to get FILE.
18292         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
18293         memcasecmp.h has included <stddef.h> and all we need is size_t.
18294         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
18295         our interface, instead of including <sys/types.h>
18296
18297 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18298
18299         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
18300         now, as glibc mktime is buggy on non-glibc systems.
18301
18302 2003-06-03  Karl Berry  <karl@gnu.org>
18303
18304         * config/config.sub: update from prep.
18305
18306 2003-06-02  Paul Eggert  <eggert@twinsun.com>
18307
18308         [from coreutils]
18309         Fix some minor time-related bugs with POSIX time arguments.
18310         Some valid time stamps were being rejected (notably -1, and
18311         time stamps before 1900 on 64-bit hosts).  And some invalid
18312         time stamps were being accepted, e.g. September 31.
18313
18314         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
18315         that we can return (time_t) -1 successfully.
18316         * lib/posixtm.c: Likewise.
18317         [HAVE_STDBOOL_H]: Include <stdbool.h>.
18318         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
18319         (t): Remove static var.
18320         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
18321         of static var.  All uses changed.
18322         (year): Do not reject years before 1900; they can occur with
18323         64-bit time_t.
18324         (posix_time_parse): Do not check for out-of-range components;
18325         that is now the caller's responsibility, since our checks were
18326         only approximations.
18327         (posixtime): Use mktime to check for out-of-range components,
18328         since it knows them exactly.
18329         If mktime returns (time_t) -1, check whether an error actually occurred
18330         by invoking localtime on -1.
18331         (main) [TEST_POSIXTIME]: Check for input data errors, and report
18332         posixtime failures better.
18333         Improve the test data (in comments only).
18334
18335 2003-06-02  Karl Berry  <karl@gnu.org>
18336
18337         * config/mkinstalldirs (version): new variable.
18338         (--version): new option.
18339         (usage): improve message.
18340
18341 2003-05-30  Karl Berry  <karl@gnu.org>
18342
18343         * lib/mktime.c: update from libc.
18344
18345 2003-05-30  Bruno Haible  <bruno@clisp.org>
18346
18347         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
18348         * config/config.rpath: Upgrade to gettext-0.12.1.
18349
18350 2003-05-30  Bruno Haible  <bruno@clisp.org>
18351
18352         * m4/gettext.m4: Upgrade to gettext-0.12.1.
18353         * m4/nls.m4: New file, from gettext-0.12.1.
18354         * m4/po.m4: New file, from gettext-0.12.1.
18355         * m4/progtest.m4: Upgrade to gettext-0.12.1.
18356
18357 2003-05-30  Bruno Haible  <bruno@clisp.org>
18358
18359         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
18360         * lib/localcharset.h: Likewise.
18361         * lib/localcharset.c: Likewise.
18362
18363 2003-05-29  Karl Berry  <karl@gnu.org>
18364
18365         * config/config.rpath: update from gettext.
18366
18367 2003-05-28  Paul Eggert  <eggert@twinsun.com>
18368
18369         Assume the headers required for C89 freestanding compilers.
18370         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
18371         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
18372         * m4/human.m4 (gl_HUMAN): Likewise.
18373         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
18374         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
18375         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18376         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
18377         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18378         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
18379
18380 2003-05-28  Paul Eggert  <eggert@twinsun.com>
18381
18382         Assume the headers required for C89 freestanding compilers.
18383         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
18384         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
18385         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
18386         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
18387         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
18388         define, since <limits.h> is guaranteed to do that.
18389         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
18390         * lib/exclude.c: Include <stdbool.h> unconditionally.
18391         * lib/tempname.c: Include <stddef.h> unconditionally.
18392         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
18393         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
18394         <stddef.h> does that.
18395         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
18396         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
18397         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
18398         needed.
18399         * lib/xstrtol.c: Likewise.
18400         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
18401         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
18402
18403         * lib/addext.c (addext): Use assignment rather than cast, to avoid
18404         warnings on some platforms.
18405
18406         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
18407         arbitrarily.
18408
18409 2003-05-26  Jim Meyering  <jim@meyering.net>
18410
18411         Merge in a change from coreutils:
18412         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
18413         that is guaranteed to be `no'.  Use `no_such_member' to indicate
18414         that condition, rather than `-1' which is slightly misleading.
18415         Change the name of the cache variable to have the gl_ prefix.
18416         Prompted by a patch from Richard Dawe for DJGPP.
18417
18418 2003-05-24  Karl Berry  <karl@gnu.org>
18419
18420         * config/config.guess: update from prep.
18421
18422 2003-05-22  Karl Berry  <karl@gnu.org>
18423
18424         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
18425
18426 2003-05-20  Karl Berry  <karl@gnu.org>
18427
18428         * config/config.guess: update from prep.
18429
18430 2003-05-18  Karl Berry  <karl@gnu.org>
18431
18432         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
18433         might actually be set by the user.
18434
18435         * config/depcomp, install-sh, mdate-sh: update from automake.
18436
18437 2003-05-17  Bruno Haible  <bruno@clisp.org>
18438
18439         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
18440         invalid expansion for AC_EGREP_CPP.
18441         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
18442         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
18443         Suggested by Akim Demaille <akim@epita.fr> in
18444         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
18445
18446 2003-05-12  Jim Meyering  <jim@meyering.net>
18447
18448         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
18449         the space-padded-by-default conversion specifiers, %e, %k, %l.
18450
18451 2003-05-12  Bruno Haible  <bruno@clisp.org>
18452
18453         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
18454         the string is longer than 4 KB.
18455
18456 2003-05-11  Karl Berry  <karl@gnu.org>
18457
18458         * config/config.{guess,sub}: update from prep.
18459
18460 2003-05-09  Bruno Haible  <bruno@clisp.org>
18461
18462         * modules/error: Add m4/strerror_r.m4 to file list.
18463
18464 2003-05-03  Bruno Haible  <bruno@clisp.org>
18465
18466         Upgrade to Unicode-4.0.
18467         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
18468         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
18469         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
18470         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
18471         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
18472         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
18473         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
18474         Change width of U+E0100..U+E01EF from 1 to 0.
18475
18476 2003-04-25  Jim Meyering  <jim@meyering.net>
18477
18478         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
18479         of type size_t, not int.
18480
18481 2003-04-25  Bruno Haible  <bruno@clisp.org>
18482
18483         * lib/copy-file.c: Include <stddef.h>, for size_t.
18484
18485 2003-04-21  Paul Eggert  <eggert@twinsun.com>
18486
18487         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
18488         code which expansion is under static control.  Patch imported from
18489         Akim Demaille's patch to Bison; see
18490         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
18491
18492 2003-04-14  Bruno Haible  <bruno@clisp.org>
18493
18494         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
18495
18496 2003-04-11  Jim Meyering  <jim@meyering.net>
18497
18498         Merge changes from Coreutils.
18499
18500         2003-03-22  Jim Meyering  <jim@meyering.net>
18501
18502         * lib/strftime.c (widen): Cast alloca return value to proper type.
18503
18504         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
18505
18506         From GNU libc.
18507         * lib/strftime.c (my_strftime): Handle very large width
18508         specifications for numeric values correctly.  Improve checks for
18509         overflow.
18510
18511         2003-01-19  Jim Meyering  <jim@meyering.net>
18512
18513         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
18514         definitions.
18515         (nl_get_alt_digit) [! defined my_strftime]: Define.
18516         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
18517         _nl_get_alt_digit and _nl_get_walt_digit.
18518
18519         * lib/strftime.c (my_strftime): Merge in locale-related changes from
18520         libc. These changes have no effect outside of _LIBC.
18521
18522 2003-04-10  Bruno Haible  <bruno@clisp.org>
18523
18524         * modules/findprog: New file.
18525         * MODULES.html.sh (func_all_modules): Add it.
18526
18527 2003-04-10  Bruno Haible  <bruno@clisp.org>
18528
18529         * m4/findprog.m4: New file.
18530         * m4/eaccess.m4: New file.
18531
18532 2003-04-10  Bruno Haible  <bruno@clisp.org>
18533
18534         * lib/findprog.h: New file, from GNU gettext.
18535         * lib/findprog.c: New file, from GNU gettext.
18536
18537 2003-04-05  Jim Meyering  <jim@meyering.net>
18538
18539         Merge changes from Coreutils.
18540
18541         * lib/exclude.h (PARAMS): Remove definition and uses.
18542         * lib/exclude.c: Remove uses of `PARAMS'.
18543
18544         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
18545         Add test-cases for DOS filenames. Declare program_name.
18546         (main): Set up program_name.  Patch by Rich Dawe.
18547
18548         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18549         error from mntctl.
18550         Use mntctl's return value to drive the entry-processing loop, since
18551         we can't rely on the value of the vmt_length member in the last
18552         entry.  On some systems doing so could result in exhausting
18553         virtual memory.  Based in part on a patch from Mike Jetzer.
18554
18555 2003-04-04  Bruno Haible  <bruno@clisp.org>
18556
18557         * modules/linebreak: New file.
18558         * MODULES.html.sh (func_all_modules): Add it.
18559
18560 2003-04-04  Bruno Haible  <bruno@clisp.org>
18561
18562         * m4/linebreak.m4: New file.
18563
18564 2003-04-04  Bruno Haible  <bruno@clisp.org>
18565
18566         * lib/linebreak.h: New file, from GNU gettext.
18567         * lib/linebreak.c: New file, from GNU gettext with slight
18568         modifications.
18569         * lib/lbrkprop.h: New file, from GNU gettext.
18570
18571 2003-04-03  Bruno Haible  <bruno@clisp.org>
18572
18573         * modules/utf8-ucs4: New file.
18574         * modules/utf16-ucs4: New file.
18575         * modules/ucs4-utf8: New file.
18576         * modules/ucs4-utf16: New file.
18577         * MODULES.html.sh (func_all_modules): Add them.
18578
18579 2003-04-03  Bruno Haible  <bruno@clisp.org>
18580
18581         * m4/utf-ucs4.m4: New file.
18582         * m4/ucs4-utf.m4: New file.
18583
18584 2003-04-03  Bruno Haible  <bruno@clisp.org>
18585
18586         * lib/utf8-ucs4.h: New file, from GNU gettext.
18587         * lib/utf16-ucs4.h: New file, from GNU gettext.
18588         * lib/ucs4-utf8.h: New file, from GNU gettext.
18589         * lib/ucs4-utf16.h: New file, from GNU gettext.
18590
18591 2003-04-02  Bruno Haible  <bruno@clisp.org>
18592
18593         * modules/binary-io: New file.
18594         * MODULES.html.sh (func_all_modules): Add it.
18595
18596 2003-04-02  Bruno Haible  <bruno@clisp.org>
18597
18598         * lib/binary-io.h: New file, from GNU gettext.
18599
18600 2003-04-01  Bruno Haible  <bruno@clisp.org>
18601
18602         * modules/pathname: New file.
18603         * MODULES.html.sh (func_all_modules): Add it.
18604
18605 2003-04-01  Bruno Haible  <bruno@clisp.org>
18606
18607         * lib/pathname.h: New file, from GNU gettext.
18608         * lib/concatpath.c: New file, from GNU gettext.
18609
18610 2003-03-30  Bruno Haible  <bruno@clisp.org>
18611
18612         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
18613
18614 2003-03-30  Bruno Haible  <bruno@clisp.org>
18615
18616         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
18617         function chown() doesn't exist.
18618
18619 2003-03-28  Bruno Haible  <bruno@clisp.org>
18620
18621         * modules/copy-file: New file.
18622         * MODULES.html.sh (func_all_modules): Add it.
18623
18624 2003-03-28  Bruno Haible  <bruno@clisp.org>
18625
18626         * m4/copy-file.m4: New file.
18627
18628 2003-03-28  Bruno Haible  <bruno@clisp.org>
18629
18630         * lib/copy-file.h: New file, from GNU gettext.
18631         * lib/copy-file.c: New file, from GNU gettext.
18632
18633 2003-03-18  Jim Meyering  <jim@meyering.net>
18634
18635         * lib/quote.c (quote_n): Fix typo in comment.
18636
18637 2003-03-18  Bruno Haible  <bruno@clisp.org>
18638
18639         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
18640         checking.
18641         * m4/onceonly_2_57.m4: Likewise.
18642
18643 2003-03-17  Bruno Haible  <bruno@clisp.org>
18644
18645         * m4/onceonly.m4: Require autoconf 2.54 or newer.
18646         (m4_quote): Remove macro.
18647         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
18648
18649 2003-03-14  Jim Meyering  <jim@meyering.net>
18650
18651         Merge changes from Coreutils.
18652         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
18653         to be const, in order to avoid warnings.
18654         (obstack_room): Likewise.
18655         (obstack_empty_p): Likewise.
18656
18657 2003-03-14  Bruno Haible  <bruno@clisp.org>
18658
18659         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
18660         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
18661
18662 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18663
18664         Merge changes from Bison.
18665         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
18666         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
18667         when compiling Bison 1.875's `bitset bset = obstack_alloc
18668         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
18669         * lib/hash.c: Include <stdbool.h> unconditionally.
18670
18671 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18672
18673         * m4/onceonly.m4 (m4_quote): New macro.
18674         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
18675         Quote AC_FOREACH variable-expansions properly.
18676
18677 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18678
18679         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
18680
18681 2003-03-09  Paul Eggert  <eggert@twinsun.com>
18682
18683         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
18684         Reported by Bruce Becker; see:
18685         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
18686
18687 2003-03-03  Paul Eggert  <eggert@twinsun.com>
18688             Bruno Haible  <bruno@clisp.org>
18689
18690         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
18691         Reported by John Hughes, see
18692         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
18693
18694 2003-02-20  Bruno Haible  <bruno@clisp.org>
18695
18696         * MODULES.html.sh (func_all_modules): Add poll.
18697
18698 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18699
18700         * modules/poll: New file.
18701
18702 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18703
18704         * lib/poll_.h: New file.
18705         * lib/poll.c: New file.
18706
18707 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18708
18709         * m4/poll.m4: New file.
18710
18711 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18712
18713         * modules/mathl: New file.
18714
18715 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18716
18717         * lib/mathl.h: New file.
18718         * lib/acosl.c: New file.
18719         * lib/asinl.c: New file.
18720         * lib/atanl.c: New file.
18721         * lib/ceill.c: New file.
18722         * lib/cosl.c: New file.
18723         * lib/expl.c: New file.
18724         * lib/floorl.c: New file.
18725         * lib/frexpl.c: New file.
18726         * lib/ldexpl.c: New file.
18727         * lib/logl.c: New file.
18728         * lib/sincosl.c: New file.
18729         * lib/sinl.c: New file.
18730         * lib/sqrtl.c: New file.
18731         * lib/tanl.c: New file.
18732         * lib/trigl.c: New file.
18733         * lib/trigl.h: New file.
18734
18735 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18736
18737         * m4/mathl.m4: New file.
18738
18739 2003-02-18  Bruno Haible  <bruno@clisp.org>
18740
18741         * MODULES.html.sh (func_all_modules): Add mathl.
18742
18743 2003-02-17  Bruno Haible  <bruno@clisp.org>
18744
18745         * modules/mkdtemp: New module.
18746         * MODULES.html.sh (func_all_modules): Add it.
18747
18748 2003-02-17  Bruno Haible  <bruno@clisp.org>
18749
18750         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
18751
18752 2003-02-17  Bruno Haible  <bruno@clisp.org>
18753
18754         * lib/mkdtemp.h: New file, from GNU gettext.
18755         * lib/mkdtemp.c: New file, from GNU gettext.
18756
18757 2003-02-02  Jim Meyering  <jim@meyering.net>
18758
18759         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
18760         e.g. glibc-2.2.93.
18761
18762 2003-01-31  Bruno Haible  <bruno@clisp.org>
18763
18764         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
18765         'rpl_rename'.
18766         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
18767         'rpl_strnlen'.
18768         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
18769         'rpl_strtod'.
18770         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
18771         'rpl_utime'.
18772
18773 2003-01-31  Bruno Haible  <bruno@clisp.org>
18774
18775         * lib/rename.c: #undef rename before defining rpl_rename.
18776         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
18777
18778 2003-01-30  Bruno Haible  <bruno@clisp.org>
18779
18780         * modules/vasnprintf, modules/vasprintf: New modules.
18781         * MODULES.html.sh (func_all_modules): Add them.
18782
18783 2003-01-30  Bruno Haible  <bruno@clisp.org>
18784
18785         * m4/signed.m4: New file, from GNU gettext.
18786         * m4/longdouble.m4: New file, from GNU gettext.
18787         * m4/wchar_t.m4: New file, from GNU gettext.
18788         * m4/wint_t.m4: New file, from GNU gettext.
18789         * m4/vasnprintf.m4: New file.
18790         * m4/vasprintf.m4: New file.
18791
18792 2003-01-30  Bruno Haible  <bruno@clisp.org>
18793
18794         * lib/printf-args.h: New file, from GNU gettext.
18795         * lib/printf-args.c: New file, from GNU gettext.
18796         * lib/printf-parse.h: New file, from GNU gettext.
18797         * lib/printf-parse.c: New file, from GNU gettext.
18798         * lib/vasnprintf.h: New file, from GNU gettext.
18799         * lib/vasnprintf.c: New file, from GNU gettext.
18800         * lib/asnprintf.c: New file, from GNU gettext.
18801         * lib/vasprintf.h: New file, from GNU gettext with modifications.
18802         * lib/vasprintf.c: New file, from GNU gettext.
18803         * lib/asprintf.c: New file, from GNU gettext.
18804
18805 2003-01-29  Bruno Haible  <bruno@clisp.org>
18806
18807         * modules/stpncpy: New module.
18808         * MODULES.html.sh (func_all_modules): Add it.
18809
18810 2003-01-29  Bruno Haible  <bruno@clisp.org>
18811
18812         * m4/stpncpy.m4: New file.
18813
18814 2003-01-29  Bruno Haible  <bruno@clisp.org>
18815
18816         * lib/stpncpy.h: New file, from GNU gettext with modifications.
18817         * lib/stpncpy.c: New file, from GNU gettext with modifications.
18818
18819 2003-01-28  Bruno Haible  <bruno@clisp.org>
18820
18821         * modules/c-ctype: New module.
18822         * MODULES.html.sh (func_all_modules): Add it.
18823
18824 2003-01-28  Bruno Haible  <bruno@clisp.org>
18825
18826         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
18827         Paul Eggert.
18828         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
18829         Paul Eggert.
18830
18831 2003-01-27  Bruno Haible  <bruno@clisp.org>
18832
18833         * modules/xsetenv: New module.
18834         * MODULES.html.sh (func_all_modules): Add it.
18835
18836 2003-01-27  Bruno Haible  <bruno@clisp.org>
18837
18838         * lib/xsetenv.h: New file, from GNU gettext.
18839         * lib/xsetenv.c: New file, from GNU gettext.
18840
18841 2003-01-23  Jim Meyering  <jim@meyering.net>
18842
18843         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
18844         from working on systems without dirfd (at least Irix and OSF1/Tru64).
18845
18846 2003-01-23  Bruno Haible  <bruno@clisp.org>
18847
18848         * modules/minmax: New module.
18849         * MODULES.html.sh (func_all_modules): Add it.
18850
18851 2003-01-23  Bruno Haible  <bruno@clisp.org>
18852
18853         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
18854         Eggert.
18855
18856 2003-01-22  Bruno Haible  <bruno@clisp.org>
18857
18858         * modules/exit: New module.
18859         * MODULES.html.sh (func_all_modules): Add it.
18860
18861 2003-01-22  Bruno Haible  <bruno@clisp.org>
18862
18863         * lib/exit.h: New file, from GNU gettext.
18864
18865 2003-01-19  Bruno Haible  <bruno@clisp.org>
18866
18867         * gnulib-tool: Recognize option --extract-maintainer.
18868         (func_get_maintainer): New function.
18869         * modules/*: Add Maintainer entry.
18870
18871 2003-01-16  Jim Meyering  <jim@meyering.net>
18872
18873         * m4/regex.m4: The `regex' struct is both input and output.
18874         Initialize it before each use.  Patch by Tim Waugh.
18875
18876 2003-01-16  Bruno Haible  <bruno@clisp.org>
18877
18878         * MODULES.html.sh: Add a table of contents. Add the module name as
18879         leftmost column. Add hyperlinks.
18880
18881 2003-01-15  Bruno Haible  <bruno@clisp.org>
18882
18883         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
18884
18885 2003-01-15  Bruno Haible  <bruno@clisp.org>
18886
18887         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
18888         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
18889         suffix.
18890
18891 2003-01-15  Bruno Haible  <bruno@clisp.org>
18892
18893         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
18894
18895 2003-01-15  Bruno Haible  <bruno@clisp.org>
18896
18897         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
18898         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
18899
18900 2003-01-14  Jim Meyering  <jim@meyering.net>
18901
18902         * lib/same.c (same_name): Tweak a comment.
18903
18904 2003-01-14  Bruno Haible  <bruno@clisp.org>
18905
18906         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
18907         when a string comparison is sufficient.
18908
18909 2003-01-14  Bruno Haible  <bruno@clisp.org>
18910
18911         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
18912         'unsigned int'.
18913
18914 2003-01-14  Bruno Haible  <bruno@clisp.org>
18915
18916         * lib/hash-pjw.c: Add comment about low quality of this function.
18917
18918 2003-01-13  Bruno Haible  <bruno@clisp.org>
18919
18920         * modules/stpcpy: Distribute lib/stpcpy.h.
18921         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
18922
18923 2003-01-13  Bruno Haible  <bruno@clisp.org>
18924
18925         * modules/*: Add a description.
18926         * modules/strpbrk: Fix Makefile.am snippet.
18927         * modules/strtoimax: Fix dependencies.
18928         * modules/strtoumax: Likewise.
18929
18930 2003-01-13  Bruno Haible  <bruno@clisp.org>
18931
18932         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
18933         * modules/alloca (Makefile.am): All object files depend on alloca.h.
18934         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
18935
18936 2003-01-13  Bruno Haible  <bruno@clisp.org>
18937
18938         * gnulib-tool (func_create_testdir): Store config/* files in the main
18939         directory.
18940         * config.rpath: Move to ...
18941         * config/config.rpath: ... here.
18942         * modules/gettext: Contains config/config.rpath, not config.rpath.
18943         * modules/iconv: Likewise.
18944
18945 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18946
18947         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18948         to avoid collisions with libcurses and libreadline.
18949
18950         * m4/getstr.m4: Remove.
18951         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
18952
18953 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18954
18955         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18956         to avoid collisions with libcurses and libreadline.
18957
18958         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
18959         * lib/getstr.h, getstr.c: Remove.
18960         * lib/getline.c: Include "getline.h", to check interface.
18961         Move body of old getstr.c here: this defines MIN_CHUNK and
18962         declares getdelim2, which is renamed from getstr.
18963         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
18964
18965         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
18966         All uses changed.
18967         * lib/linebuffer.h: Likewise.
18968         (readline): Remove backward-compatibility macro.
18969
18970 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18971
18972         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18973         to avoid collisions with libcurses and libreadline.
18974         * getstr: Remove.
18975         * MODULES.html.sh: Remove getstr.
18976         * modules/getline: Depend on unlocked-io, not getstr.
18977
18978 2003-01-12  Jim Meyering  <jim@meyering.net>
18979
18980         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
18981
18982 2003-01-10  Bruno Haible  <bruno@clisp.org>
18983
18984         * modules/alloca: Change Makefile.am requirements. Simplify Include
18985         requirements. Add lib/alloca_.h to file list.
18986
18987 2003-01-10  Bruno Haible  <bruno@clisp.org>
18988
18989         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
18990
18991 2003-01-10  Bruno Haible  <bruno@clisp.org>
18992
18993         * lib/alloca_.h: New file.
18994         * lib/getdate.y: Unconditionally include alloca.h.
18995         * lib/makepath.c: Likewise.
18996         * lib/setenv.c: Likewise.
18997         * lib/userspec.c: Likewise.
18998
18999 2003-01-09  Karl Berry  <karl@gnu.org>
19000
19001         * MODULES.html.sh: include `dirname $0` in PATH, to find
19002         gnulib-tool.
19003
19004 2003-01-09  Bruno Haible  <bruno@clisp.org>
19005
19006         * modules/stdbool: Change configure.ac, Makefile.am requirements.
19007         Simplify Include requirements. Add lib/stdbool.h.in to file list.
19008
19009 2003-01-09  Bruno Haible  <bruno@clisp.org>
19010
19011         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
19012
19013 2003-01-09  Bruno Haible  <bruno@clisp.org>
19014
19015         * lib/stdbool.h.in: New file.
19016
19017 2003-01-09  Bruno Haible  <bruno@clisp.org>
19018
19019         * gnulib-tool (func_all_modules): Ignore files ending in ~.
19020         * MODULES.html.sh: Likewise.
19021
19022 2003-01-08  Jim Meyering  <jim@meyering.net>
19023
19024         * lib/full-write.c: Undefine and define-away `const' after inclusion
19025         of errno.h, not before.  Suggestion from Bruno Haible.
19026
19027 2003-01-08  Bruno Haible  <bruno@clisp.org>
19028
19029         * modules/full-read: Depend on full-write.
19030
19031 2003-01-08  Bruno Haible  <bruno@clisp.org>
19032
19033         * lib/safe-read.c: Include specification header first, to ensure its
19034         selfcontainedness.
19035         * lib/full-write.c: Likewise.
19036
19037 2003-01-07  Jim Meyering  <jim@meyering.net>
19038
19039         * lib/full-write.c: Rework so that it may serve to define full_read,
19040         too.
19041         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
19042
19043 2003-01-07  Bruno Haible  <bruno@clisp.org>
19044
19045         * lib/strtoimax.c: Include <stdint.h> as an alternative to
19046         <inttypes.h>.
19047         * lib/xstrtol.h: Likewise.
19048         * lib/xstrtoimax.c: Likewise.
19049         * lib/xstrtoumax.c: Likewise.
19050         * lib/human.h: Likewise.
19051
19052         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
19053         on systems that have <inttypes.h> but not <stdint.h>.
19054
19055 2003-01-07  Bruno Haible  <bruno@clisp.org>
19056
19057         * MODULES.html.sh: Add copyright notice.
19058         (missed_files): Omit CVS directory entries.
19059         (func_module): Make it work with sed-3.02.
19060         * MODULES.txt: Remove file.
19061
19062 2003-01-06  Jim Meyering  <jim@meyering.net>
19063
19064         * lib/version-etc.c: Update year in translatable copyright string.
19065
19066 2003-01-03  Karl Berry  <karl@gnu.org>
19067
19068         * config/config.{guess,sub}: update from prep.
19069
19070 2003-01-02  Karl Berry  <karl@gnu.org>
19071
19072         * doc/COPYING.DOC: belatedly updated to 1.2.
19073
19074 2003-01-01  Karl Berry  <karl@gnu.org>
19075
19076         * gnulib-tool (func_verify_module): report module name $module in
19077         error message, not $1.
19078         * gnulib-tool (create-testdir): don't complain if destdir couldn't
19079         be created, only if it doesn't exist.
19080         * gnulib-tool (last_checkin_date): don't expand the $Date here.
19081
19082 2002-12-31  Paul Eggert  <eggert@twinsun.com>
19083
19084         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
19085
19086 2002-12-31  Paul Eggert  <eggert@twinsun.com>
19087
19088         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
19089         memcmp if strcoll doesn't work.
19090
19091 2002-12-31  Bruno Haible  <bruno@clisp.org>
19092
19093         * lib/utime.c (utime_null): No need to call ftruncate if the file was
19094         nonempty.
19095
19096 2002-12-31  Bruno Haible  <bruno@clisp.org>
19097
19098         * lib/memcoll.c (STRCOLL): New macro.
19099         (memcoll): Use it.
19100
19101 2002-12-31  Bruno Haible  <bruno@clisp.org>
19102
19103         * lib/localcharset.h: New file.
19104         * lib/localcharset.c: Include it.
19105         * lib/unicodeio.c: Likewise.
19106
19107 2002-12-31  Bruno Haible  <bruno@clisp.org>
19108
19109         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
19110         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
19111
19112 2002-12-31  Bruno Haible  <bruno@clisp.org>
19113
19114         * lib/getline.h: Include <stddef.h>, for size_t.
19115
19116         * lib/unicodeio.h: Include <stddef.h>, for size_t.
19117         * lib/unicodeio.c: Don't include <stddef.h>.
19118
19119 2002-12-31  Bruno Haible  <bruno@clisp.org>
19120
19121         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
19122         HAVE_TM_ZONE.
19123
19124 2002-12-24  Karl Berry  <karl@gnu.org>
19125
19126         * config/config.guess: update from prep.
19127
19128 2002-12-24  Bruno Haible  <bruno@clisp.org>
19129
19130         General infrasructure.
19131         * m4/README: Rewritten.
19132         * m4/onceonly.m4: New file.
19133         * m4/onceonly_2_57.m4: New file.
19134
19135         Module atexit.
19136         * m4/atexit.m4: New file.
19137
19138         Module strtod.
19139         * m4/strtod.m4: New file.
19140
19141         Module strtol.
19142         * m4/strtol.m4: New file.
19143
19144         Module strtoul.
19145         * m4/strtoul.m4: New file.
19146
19147         Module memchr.
19148         * m4/memchr.m4: New file.
19149
19150         Module memcmp.
19151         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
19152         (jm_FUNC_MEMCMP): Invoke it.
19153
19154         Module memcpy.
19155         * m4/memcpy.m4: New file.
19156
19157         Module memmove.
19158         * m4/memmove.m4: New file.
19159
19160         Module memset.
19161         * m4/memset.m4: New file.
19162
19163         Module strcspn.
19164         * m4/strcspn.m4: New file.
19165
19166         Module strpbrk.
19167         * m4/strpbrk.m4: New file.
19168
19169         Module strstr.
19170         * m4/strstr.m4: New file.
19171
19172         Module strerror.
19173         * m4/strerror.m4: New file.
19174
19175         Module mktime.
19176         * m4/mktime.m4: Renamed from jm-mktime.m4.
19177         (gl_PREREQ_MKTIME): New macro.
19178         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
19179
19180         Module malloc.
19181         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
19182         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
19183         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
19184
19185         Module realloc.
19186         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
19187         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
19188         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
19189
19190         Module strftime.
19191         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
19192         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
19193         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
19194         gl_TM_GMTOFF.
19195         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
19196
19197         Module xalloc.
19198         * m4/xalloc.m4: New file.
19199
19200         Module alloca.
19201         * m4/alloca.m4: New file.
19202
19203         Module putenv.
19204         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
19205         (jm_FUNC_PUTENV): Invoke it.
19206
19207         Module setenv.
19208         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
19209         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
19210         when invoked twice.
19211         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
19212         gt_FUNC_SETENV.
19213
19214         Module memrchr.
19215         * m4/memrchr.m4: New file.
19216
19217         Module stpcpy.
19218         * m4/stpcpy.m4: New file.
19219
19220         Module strcase.
19221         * m4/strcase.m4: New file.
19222
19223         Module strdup.
19224         * m4/strdup.m4: New file.
19225
19226         Module strnlen.
19227         * m4/strnlen.m4: New file.
19228
19229         Module strndup.
19230         * m4/strndup.m4: New file.
19231
19232         Module xstrtod.
19233         * m4/xstrtod.m4: New file.
19234
19235         Module xstrtol.
19236         * m4/xstrtol.m4: New file.
19237
19238         Module getdate.
19239         * m4/getdate.m4: New file.
19240
19241         Module unlocked-io.
19242         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
19243         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
19244         * m4/jm-glibc-io.m4n: Remove file.
19245
19246         Module long-options.
19247         * m4/long-options.m4: New file.
19248
19249         Module md5.
19250         * m4/md5.m4: New file.
19251
19252         Module sha.
19253         * m4/sha.m4: New file.
19254
19255         Module getstr.
19256         * m4/getstr.m4: New file.
19257
19258         Module getline.
19259         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
19260         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
19261         <sys/types.h>, for size_t. Use the function name gnu_getline, not
19262         simply getline. Infoke gl_PREREQ_GETLINE.
19263
19264         Module obstack.
19265         * m4/obstack.m4: New file.
19266
19267         Module hash.
19268         * m4/hash.m4: New file.
19269
19270         Module readtokens.
19271         * m4/readtokens.m4: New file.
19272
19273         Module strverscmp.
19274         * m4/strverscmp.m4: New file.
19275
19276         Module stdbool.
19277         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
19278         OSF/1.
19279
19280         Module strtoll.
19281         * m4/strtoll.m4: New file.
19282
19283         Module strtoull.
19284         * m4/strtoull.m4: New file.
19285
19286         Module strtoimax.
19287         * m4/strtoimax.m4: New file.
19288
19289         Module strtoumax.
19290         * m4/strtoumax.m4: New file.
19291
19292         Module xstrtoimax.
19293         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
19294         jm_AC_PREREQ_XSTRTOIMAX.
19295         Moved the strtol prerequisites to strtol.m4.
19296         Moved the strtoll prerequisites to strtoll.m4.
19297         Moved the strtoimax prerequisites to strtoimax.m4.
19298
19299         Module xstrtoumax.
19300         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
19301         jm_AC_PREREQ_XSTRTOUMAX.
19302         Moved the strtoul prerequisites to strtoul.m4.
19303         Moved the strtoull prerequisites to strtoull.m4.
19304         Moved the strtoumax prerequisites to strtoumax.m4.
19305
19306         Module chown.
19307         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
19308         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
19309
19310         Module dup2.
19311         * m4/dup2.m4: New file.
19312
19313         Module ftruncate.
19314         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
19315         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
19316
19317         Module getgroups.
19318         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
19319         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
19320
19321         Module gettimeofday.
19322         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
19323         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
19324         gl_PREREQ_GETTIMEOFDAY.
19325
19326         Module mkdir.
19327         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
19328         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
19329
19330         Module mkstemp.
19331         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
19332         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
19333         jm_AC_TYPE_UINTMAX_T.
19334         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
19335
19336         Module stat.
19337         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
19338         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
19339
19340         Module lstat.
19341         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
19342         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
19343
19344         Module timespec.
19345         * m4/timespec.m4 (gl_TIMESPEC): New macro.
19346         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
19347         * m4/st_mtim.m4: Indentation.
19348
19349         Module nanosleep.
19350         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
19351         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
19352         gl_PREREQ_NANOSLEEP.
19353
19354         Module regex.
19355         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
19356         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
19357         (gl_REGEX): New macro.
19358
19359         Module rename.
19360         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
19361         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
19362
19363         Module rmdir.
19364         * m4/rmdir.m4: New file.
19365
19366         Module utime.
19367         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
19368         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
19369         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
19370
19371         Module dirname.
19372         * m4/dirname.m4: New file.
19373
19374         Module getopt.
19375         * m4/getopt.m4: New file.
19376
19377         Module unistd-safer.
19378         * m4/unistd-safer.m4: New file.
19379
19380         Module fnmatch.
19381         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
19382         declaration.
19383         (gl_PREREQ_FNMATCH_EXTRA): New macro.
19384         (gl_FUNC_FNMATCH_POSIX): New macro.
19385         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
19386         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
19387         simply fnmatch.
19388
19389         Module exclude.
19390         * m4/exclude.m4: New file.
19391
19392         Module human.
19393         * m4/human.m4: New file.
19394
19395         Module acl.
19396         * m4/acl.m4: Nop.
19397
19398         Module backupfile.
19399         * m4/backupfile.m4: New file.
19400         * m4/d-ino.m4: Indentation.
19401
19402         Module fsusage.
19403         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
19404         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
19405         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
19406
19407         Module dirfd.
19408         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
19409         requirements.
19410
19411         Module euidaccess.
19412         * m4/euidaccess.m4: New file.
19413
19414         Module file-type.
19415         * m4/file-type.m4: New file.
19416
19417         Module fileblocks.
19418         * m4/fileblocks.m4: New file.
19419
19420         Module filemode.
19421         * m4/filemode.m4: New file.
19422
19423         Module isdir.
19424         * m4/isdir.m4: New file.
19425
19426         Module lchown.
19427         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
19428         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
19429
19430         Module makepath.
19431         * m4/makepath.m4: New file.
19432
19433         Module modechange.
19434         * m4/modechange.m4: New file.
19435
19436         Module mountlist.
19437         * m4/mountlist.m4: New file.
19438         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
19439         Indentation.
19440
19441         Module path-concat.
19442         * m4/path-concat.m4: New file.
19443
19444         Module pathmax.
19445         * m4/pathmax.m4: New file.
19446
19447         Module same.
19448         * m4/same.m4: New file.
19449
19450         Module save-cwd.
19451         * m4/save-cwd.m4: New file.
19452
19453         Module savedir.
19454         * m4/savedir.m4: New file.
19455
19456         Module xgetcwd.
19457         * m4/xgetcwd.m4: New file.
19458         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
19459
19460         Module xreadlink.
19461         * m4/xreadlink.m4: New file.
19462
19463         Module safe-read.
19464         * m4/safe-read.m4: New file.
19465
19466         Module safe-write.
19467         * m4/safe-write.m4: New file.
19468
19469         Module closeout.
19470         * m4/closeout.m4: New file.
19471
19472         Module stdio-safer.
19473         * m4/stdio-safer.m4: New file.
19474
19475         Module getpass.
19476         * m4/getpass.m4: New file.
19477
19478         Module getugroups.
19479         * m4/getugroups.m4: New file.
19480
19481         Module group-member.
19482         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
19483         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
19484
19485         Module idcache.
19486         * m4/idcache.m4: New file.
19487
19488         Module userspec.
19489         * m4/userspec.m4: New file.
19490
19491         Module gettime.
19492         * m4/clock_time.m4: New file.
19493         * m4/gettime.m4: New file.
19494
19495         Module settime.
19496         * m4/settime.m4: New file.
19497
19498         Module posixtm.
19499         * m4/posixtm.m4: New file.
19500
19501         Module gethostname.
19502         * m4/gethostname.m4: New file.
19503
19504         Module canon-host.
19505         * m4/canon-host.m4: New file.
19506
19507         Module gettext.
19508         * m4/codeset.m4: New file, from gettext-0.11.5.
19509         * m4/gettext.m4: New file, from gettext-0.11.5.
19510         * m4/glibc21.m4: New file, from gettext-0.11.5.
19511         * m4/iconv.m4: New file, from gettext-0.11.5.
19512         * m4/intdiv0.m4: New file, from gettext-0.11.5.
19513         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
19514         * m4/inttypes.m4: New file, from gettext-0.11.5.
19515         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
19516         * m4/isc-posix.m4: New file, from gettext-0.11.5.
19517         * m4/lcmessage.m4: New file, from gettext-0.11.5.
19518         * m4/lib-ld.m4: New file, from gettext-0.11.5.
19519         * m4/lib-link.m4: New file, from gettext-0.11.5.
19520         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
19521         * m4/progtest.m4: New file, from gettext-0.11.5.
19522         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
19523         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
19524         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
19525
19526         Module localcharset.
19527         * m4/localcharset.m4: New file.
19528
19529         Module hard-locale.
19530         * m4/hard-locale.m4: New file.
19531
19532         Module mbswidth.
19533         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
19534         onceonly macros.
19535         * m4/mbrtowc.m4: Add comment.
19536
19537         Module memcasecmp.
19538         * m4/memcasecmp.m4: New file.
19539
19540         Module memcoll.
19541         * m4/memcoll.m4: New file.
19542
19543         Module unicodeio.
19544         * m4/unicodeio.m4: New file.
19545
19546         Module rpmatch.
19547         * m4/rpmatch.m4: New file.
19548
19549         Module yesno.
19550         * m4/yesno.m4: New file.
19551
19552         Module exitfail.
19553         * m4/exitfail.m4: New file.
19554
19555         Module c-stack.
19556         * m4/c-stack.m4 (gl_C_STACK): New macro.
19557         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
19558
19559         Module error.
19560         * m4/error.m4 (gl_ERROR): New macro.
19561         (jm_PREREQ_ERROR): Use onceonly macros.
19562
19563         Module fatal.
19564         * m4/fatal.m4: New file.
19565
19566         Module getloadavg.
19567         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
19568         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
19569
19570         Module getpagesize.
19571         * m4/getpagesize.m4: New file.
19572
19573         Module getusershell.
19574         * m4/getusershell.m4: New file.
19575
19576         Module physmem.
19577         * m4/physmem.m4: New file.
19578
19579         Module posixver.
19580         * m4/posixver.m4: New file.
19581
19582         Module quotearg.
19583         * m4/quotearg.m4: New file.
19584
19585         Module quote.
19586         * m4/quote.m4: New file.
19587
19588         Module readutmp.
19589         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
19590
19591         Module sig2str.
19592         * m4/sig2str.m4: New file.
19593
19594         Other.
19595         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
19596         ulonglong.m4.
19597         * m4/intmax_t.m4: New file.
19598         * m4/d-type.m4: Indentation.
19599         * m4/jm-macros.m4: Update.
19600         * m4/prereq.m4 (jm_PREREQ): Update.
19601         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
19602         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
19603         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
19604         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
19605         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
19606         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
19607         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
19608         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
19609         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
19610         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
19611         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
19612         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
19613         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
19614         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
19615         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
19616         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
19617         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
19618         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
19619         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
19620
19621 2002-12-24  Bruno Haible  <bruno@clisp.org>
19622
19623         * MODULES.txt: Update according to m4/ changes.
19624
19625         Module gettext.
19626         * config.rpath: New file, from gettext-0.11.5.
19627
19628         * modules/*: New module descriptions.
19629         * gnulib-tool: New file.
19630         * MODULES.html.sh: New file.
19631
19632 2002-12-21  Karl Berry  <karl@gnu.org>
19633
19634         * doc/fdl.texi: update to version 1.2.
19635
19636 2002-12-19  Karl Berry  <karl@gnu.org>
19637
19638         * config/config.guess: update from prep.
19639
19640 2002-12-18  Bruno Haible  <bruno@clisp.org>
19641
19642         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
19643         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
19644
19645 2002-12-17  Bruno Haible  <bruno@clisp.org>
19646
19647         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
19648         stdlib.h, string.h.
19649
19650 2002-12-17  Bruno Haible  <bruno@clisp.org>
19651
19652         * lib/canon-host.c (strdup): Remove unused declaration.
19653
19654         * lib/fsusage.c: Include full_read.h.
19655         (get_fs_usage): Use full_read instead of safe_read.
19656
19657         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
19658
19659 2002-12-12  Karl Berry  <karl@gnu.org>
19660
19661         * config/config.guess: update from prep.
19662
19663 2002-12-11  Bruno Haible  <bruno@clisp.org>
19664
19665         * m4/setenv.m4: New file, from gettext-0.11.5.
19666
19667 2002-12-11  Bruno Haible  <bruno@clisp.org>
19668
19669         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
19670         not unsetenv().
19671         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
19672         modifications:
19673
19674         2002-12-11  Bruno Haible  <bruno@clisp.org>
19675
19676                 * setenv.c (alloca): Fall back to malloc.
19677                 (freea): New macro.
19678                 (setenv): Use freea() to free memory allocated with alloca().
19679
19680         2002-11-13  Bruno Haible  <bruno@clisp.org>
19681
19682                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
19683                 function declarations.
19684                 * unsetenv.c (unsetenv): Likewise.
19685
19686         2002-03-04  Bruno Haible  <bruno@clisp.org>
19687
19688                 Portability to AIX 4.3.3.
19689                 * unsetenv.c: New file, extracted from setenv.c.
19690                 * setenv.c: Move the unsetenv() function to unsetenv.c.
19691
19692         2001-12-20  Bruno Haible  <bruno@clisp.org>
19693
19694                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
19695                 use malloc instead. For SunOS 4.
19696
19697         2001-12-11  Bruno Haible  <bruno@clisp.org>
19698
19699                 * setenv.c: Declare alloca.
19700                 (compar_fn_t): New typedef.
19701                 (KNOWN_VALUE, STORE_VALUE): Use it.
19702
19703         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
19704         setenv.h.
19705
19706 2002-12-10  Paul Eggert  <eggert@twinsun.com>
19707
19708         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
19709         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
19710         Choose values that are less likely to collide with system fnmatch
19711         options.
19712         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
19713         defined (e.g., a pure POSIX system).
19714         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
19715         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
19716
19717 2002-12-06  Paul Eggert  <eggert@twinsun.com>
19718
19719         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
19720         a pain in practice to deal with generated m4 files.  This change
19721         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
19722
19723         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
19724         and jm-glibc-io.m4, as they are no longer a special case.
19725         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
19726         kludge and the auto-generation stuff.  Check only whether the
19727         functions are declared, not whether they exist, since older hosts
19728         that don't declare the functions can't use the optimization anyway.
19729
19730 2002-12-06  Jim Meyering  <jim@meyering.net>
19731
19732         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
19733
19734         Merge in changes from libc's misc/error.c, in preparation
19735         for the merge of gnulib's changes back into libc.
19736
19737         * lib/error.c (_): Define only if not already defined.
19738         Move definition to follow all #include directives.
19739         Include unlocked-io.h only if !_LIBC.
19740         [_LIBC]: Include <libio/libioP.h>.
19741         [USE_IN_LIBIO]: Include <libio/iolibio.h>
19742         (fflush): Tweak definition to use INTUSE.
19743         (putc): Define.
19744
19745 2002-12-05  Paul Eggert  <eggert@twinsun.com>
19746
19747         * lib/alloca.c [defined emacs]: Include "lisp.h".
19748         (xalloc_die) [defined emacs]: New macro.
19749         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
19750         [! defined emacs]: Include <xalloc.h>.
19751         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
19752         (pointer): Typedef to POINTER_TYPE *.
19753         (malloc): Remove decl; we now always use xmalloc.
19754         (alloca): Use old-style definition, since Emacs needs this.
19755         Check for arithmetic overflow when computing combined size.
19756
19757 2002-12-04  Paul Eggert  <eggert@twinsun.com>
19758
19759         Do not generate unlocked-io.h automatically, since it's easier to
19760         maintain it by hand.
19761
19762         * lib/unlocked-io.h: New file, from GNU diffutils,
19763         but with proper copyright notice and attribution.
19764         * lib/gen-uio: Remove.
19765         * lib/Makefile.am: Add copyright notice.
19766         (libfetish_a_SOURCES): Add unlocked-io.h.
19767         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
19768         (DISTCLEANFILES, io_functions): Remove macros.
19769         (EXTRA_DIST): Remove gen_uio.
19770         (unlocked-io.h): Remove rule.
19771
19772 2002-12-04  Jim Meyering  <jim@meyering.net>
19773
19774         Reflect the fact that stat.c and lstat.c are no longer generated.
19775         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
19776         (DISTCLEANFILES): Likewise.
19777         (EXTRA_DIST): Likewise.
19778         (all_local): Don't depend on stat.c or lstat.c.
19779         (stat.c, lstat.c): Remove rules.
19780         (EXTRA_DIST): Remove xstat.in.
19781
19782         * lib/xstat.in: Remove file.  Contents moved into stat.c.
19783         * lib/stat.c: New file.  Contents mostly from xstat.in.
19784         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
19785         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
19786
19787         * lib/safe-read.c: Rework so that it may serve to define safe_write,
19788         too.
19789         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
19790
19791 2002-12-03  Jim Meyering  <jim@meyering.net>
19792
19793         * lib/safe-read.c, safe-write.c: Change variable names and comments,
19794         but not semantics, to minimize the differences between these two files.
19795         (safe_read): Change comment to mention SAFE_READ_ERROR.
19796
19797         * lib/safe-read.c (IS_EINTR): Define.
19798         (safe_read): Use IS_EINTR in place of in-function cpp directives.
19799
19800 2002-12-02  Jim Meyering  <jim@meyering.net>
19801
19802         * lib/safe-read.c (EINTR): Define.
19803         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
19804         (INT_MAX): Provide fallback.
19805         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
19806
19807         * lib/safe-read.h (SAFE_READ_ERROR): Define.
19808
19809 2002-12-02  Bruno Haible  <bruno@clisp.org>
19810
19811         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
19812         Define, taken from safe-read.c.
19813         (INT_MAX): Provide fallback.
19814         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
19815         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
19816
19817         * lib/safe-read.c (EINTR): Remove definition.
19818         (safe_read): Don't use EINTR if it is absent.
19819
19820 2002-12-01  Jim Meyering  <jim@meyering.net>
19821
19822         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
19823         zero.
19824         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
19825
19826 2002-11-27  Paul Eggert  <eggert@twinsun.com>
19827
19828         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
19829         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
19830         with `if (! (value < limit)) abort ();', for readability.
19831
19832 2002-11-26  Karl Berry  <karl@gnu.org>
19833
19834         * lib/strdup.c: copy from libc again, with jim's ok.
19835         * lib/.cppi-disable: re-add strdup.c
19836
19837 2002-11-25  Karl Berry  <karl@gnu.org>
19838
19839         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
19840         instead of "strtol.c".
19841
19842 2002-11-25  Karl Berry  <karl@gnu.org>
19843
19844         * config/install-sh: update from automake for variable quoting, $0 in
19845         error msgs, etc.
19846
19847         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
19848         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
19849         entry.
19850
19851 2002-11-25  Jim Meyering  <jim@meyering.net>
19852
19853         * lib/mktime.c: Sync from libc, now that it has the latest fix.
19854
19855 2002-11-24  Karl Berry  <karl@gnu.org>
19856
19857         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
19858         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
19859
19860 2002-11-24  Jim Meyering  <jim@meyering.net>
19861
19862         Update from coreutils:
19863
19864         * lib/mktime.c: Merge in changes from libc.
19865
19866         Avoid a link-time failure on some Linux systems.
19867         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
19868         (otherwise).
19869         (__mon_yday): Declare with the STATIC attribute.
19870         (__mktime_internal): Likewise.
19871         Based on a report from Greg Schafer.
19872
19873 2002-11-23  Jim Meyering  <jim@meyering.net>
19874
19875         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
19876         Use `unsigned', not `int', as type of index.
19877
19878         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
19879
19880         * lib/fsusage.c: Remove unneeded parentheses around operands of
19881         `defined'.
19882
19883 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19884
19885         * lib/quotearg.h: Allow multiple inclusion by surrounding with
19886         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
19887         so that we can be included first.
19888         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
19889         * lib/quotearg.c: Include quotearg.h immediately after config.h.
19890         No need to include stddef.h or sys/types.h any more.
19891         Surround local include files with "", not "<>".
19892         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
19893         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
19894         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
19895         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19896         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19897         (ISPRINT): Remove; no longer needed now that we assume C89.
19898
19899         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
19900         Preserve errno.
19901
19902         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
19903         quotearg_char): Use SIZE_MAX rather than
19904         (size_t) -1 when we are talking about "infinity".
19905
19906         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
19907
19908 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19909
19910         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
19911         hint that one should use `if (! x) abort ();' rather than `assert
19912         (x);', and anyway it's one less thing to worry about configuring.
19913         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
19914         hash_rehash, hash_insert): Use abort rather than assert.
19915
19916 2002-11-22  Bruno Haible  <bruno@clisp.org>
19917
19918         * lib/safe-read.h: Assume C89. Add comments.
19919         (safe_read): Change return type to size_t.
19920         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
19921         byte counts > SSIZE_MAX correctly.
19922         * lib/safe-write.h: New file.
19923         * lib/safe-write.c: New file.
19924         * lib/full-read.h: New file.
19925         * lib/full-read.c: New file.
19926         * lib/full-write.h: Assume C89. Add comments.
19927         * lib/full-write.c: Include safe-write.h.
19928         (full_write): Rewritten to use safe_write.
19929         Suggested by Jim Meyering and Paul Eggert.
19930
19931 2002-11-21  Jim Meyering  <jim@meyering.net>
19932
19933         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
19934
19935         Merge in changes from the coreutils.
19936
19937         2002-09-25  Paul Eggert  <eggert@twinsun.com>
19938         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
19939         <stdint.h>.
19940         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
19941         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
19942         int.  Work more efficiently if X is the same width as uintmax_t.
19943         Do not compare X to -1, to avoid bogus compiler warning.
19944         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
19945         Don't assume that f_frsize and f_bsize are the same type.
19946
19947         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
19948         warning on FreeBSD.
19949
19950         * lib/makepath.c (make_path): Restore umask *before* creating the final
19951         component.
19952         (make_path): Minor reformatting.
19953
19954         * lib/xmalloc.c: Adjust to work with new autoconf macros,
19955         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
19956         HAVE_MALLOC/HAVE_REALLOC.
19957
19958         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
19959         dummy ones.  At least on GNU/Linux systems, `auto' means something
19960         else.
19961         From Michael Stone.
19962
19963 2002-11-21  Bruno Haible  <bruno@clisp.org>
19964
19965         Remove case insensitive option matching.
19966         * lib/argmatch.h (argcasematch): Remove declaration.
19967         (ARGCASEMATCH): Remove macro.
19968         (__xargmatch_internal): Remove case_sensitive argument.
19969         (XARGMATCH): Update.
19970         (XARGCASEMATCH): Remove macro.
19971         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
19972         case_sensitive argument.
19973         (argcasematch): Remove function.
19974         (__xargmatch_internal): Remove case_sensitive argument.
19975         (main): Use XARGMATCH instead of XARGCASEMATCH.
19976
19977         * lib/xmalloc.c: Change compile-time error message. Add comment about
19978         required autoconf version.
19979
19980 2002-11-20  Paul Eggert  <eggert@twinsun.com>
19981
19982         Merge argmatch cleanups from Bison.  Assume C89.
19983
19984         * lib/argmatch.c: Include config.h here, not in argmatch.h.
19985         Include stdlib.h, for EXIT_FAILURE.
19986         Always include <string.h>, since we assume C89.
19987         (EXIT_FAILURE): Remove pre-C89 bug workaround.
19988         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
19989         Include <stddef.h> instead, since it's all we need for size_t.
19990         (PARAMS): Remove.  All uses removed.
19991         (ARRAY_CARDINALITY): Do not bother to #undef.
19992         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
19993         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
19994         Remove unnecessary parentheses.
19995         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
19996         Insert necessary parentheses.
19997         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
19998         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
19999
20000 2002-11-19  Bruno Haible  <bruno@clisp.org>
20001
20002         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
20003         * lib/mbswidth.h: Include <stddef.h>, for size_t.
20004
20005         * lib/mbswidth.h (PARAMS): Remove macro.
20006         (mbswidth, mbsnwidth): Use ANSI C function declarations.
20007         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
20008
20009         * lib/gcd.h (PARAMS): Remove macro.
20010         (gcd): Use ANSI C function declarations.
20011         * lib/gcd.c (gcd): Likewise.
20012
20013 2002-11-15  Bruno Haible  <bruno@clisp.org>
20014
20015         * lib/strcspn.c: Include <stddef.h>.
20016         (strcspn): Use ANSI C function declaration. Change return type to
20017         size_t. Use NULL.
20018         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
20019         (strpbrk): Use NULL.
20020         * lib/strpbrk.h (PARAMS): Remove macro.
20021         (strpbrk): Use ANSI C function declaration.
20022         * lib/strstr.c: Don't include <sys/types.h>.
20023         * lib/strstr.h (PARAMS): Remove macro.
20024         (strstr): Use ANSI C function declarations.
20025
20026 2002-11-14  Karl Berry  <karl@gnu.org>
20027
20028         * config/mkinstalldirs: `do' on separate line, instead of
20029         `for var; do'.
20030
20031 2002-11-06  Bruno Haible  <bruno@clisp.org>
20032
20033         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
20034         * lib/gcd.c (gcd): Likewise.
20035
20036 2002-11-05  Bruno Haible  <bruno@clisp.org>
20037
20038         * lib/gcd.h: New file, from gettext-0.11.5.
20039         * lib/gcd.c: New file, from gettext-0.11.5.
20040
20041 2002-11-05  Bruno Haible  <bruno@clisp.org>
20042
20043         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20044         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20045         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20046         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20047
20048         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
20049         <libintl.h>.
20050         * lib/makepath.c: Include gettext.h instead of <locale.h> and
20051         <libintl.h>.
20052
20053         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
20054         * lib/human.c: Include gettext.h instead of <libintl.h>.
20055         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
20056         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
20057         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
20058         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
20059         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
20060         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
20061         (textdomain): Remove definition.
20062         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
20063
20064         * lib/long-options.c: Remove include of <libintl.h> and definition of
20065         _.
20066         * lib/same.c: Remove include of <libintl.h> and definition of _.
20067
20068 2002-11-04  Owen Taylor  <otaylor@redhat.com>
20069
20070         * lib/config.charset: A few additions for Solaris.
20071
20072 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20073
20074         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
20075         * lib/localcharset.c (locale_charset): Declare as extern "C".
20076
20077 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20078
20079         * lib/config.charset: msdos in uk_UA uses CP1125.
20080
20081 2002-11-04  Bruno Haible  <bruno@clisp.org>
20082
20083         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
20084         * lib/strcase.h: New file, from GNU gettext-0.11.5.
20085         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
20086         * lib/strstr.h: New file, from GNU gettext-0.11.5.
20087         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
20088
20089 2002-11-04  Bruno Haible  <bruno@clisp.org>
20090
20091         * lib/localcharset.c (locale_charset): Don't return an empty string.
20092
20093 2002-11-04  Bruno Haible  <bruno@clisp.org>
20094
20095         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
20096         aliases.
20097
20098 2002-11-04  Bruno Haible  <bruno@clisp.org>
20099
20100         * lib/config.charset: Update for newest glibc. Add canonical names
20101         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
20102
20103 2002-11-04  Bruno Haible  <bruno@clisp.org>
20104
20105         * lib/config.charset: Add support for NetBSD.
20106
20107 2002-11-04  Bruno Haible  <bruno@clisp.org>
20108
20109         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
20110
20111 2002-11-01  Bruno Haible  <bruno@clisp.org>
20112
20113         * configure.in: Add AC_CONFIG_AUX_DIR call.
20114         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
20115         test/Makefile.
20116         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
20117
20118 2002-09-28  Karl Berry  <karl@gnu.org>
20119
20120         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
20121         installed automake until the next release, since changes have been
20122         made.
20123
20124 2002-09-25  Karl Berry  <karl@gnu.org>
20125
20126         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
20127         * lib/getopt*: copy from libc/posix.
20128         * lib/gettext.h: copy from gettext.
20129         * lib/.cppi-disable: add strdup.c, gettext.h.
20130
20131 2002-09-25  Karl Berry  <karl@gnu.org>
20132
20133         * config/srclist.txt: enable gettext.h check.
20134         * config/config.{guess,sub}: update from prep.
20135         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
20136                 from automake 1.6.3.
20137         See srclist*.
20138
20139 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
20140
20141         * regex.c (PATFETCH): Remove the translating fetch.
20142         (PATFETCH_RAW): Rename to PATFETCH.
20143         (set_image_of_range): New fun.
20144         (SET_RANGE_TABLE_WORK_AREA): Use it.
20145         (regex_compile): Don't translate the pattern chars so eagerly.
20146         Only do it when inserting an `exactn' bytecode or when handling
20147         a char-range.
20148         (mutually_exclusive_p): Avoid empty statement.
20149
20150 2002-07-06  Jim Meyering  <meyering@lucent.com>
20151
20152         * m4/README: Don't mention Makefile.am.in.
20153         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
20154
20155 2002-07-01  Jim Meyering  <meyering@lucent.com>
20156
20157         * lib/c-stack.c: Include sys/time.h.
20158         From Volker Borchert.
20159
20160 2002-06-26  Paul Eggert  <eggert@twinsun.com>
20161
20162         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
20163
20164 2002-06-26  Paul Eggert  <eggert@twinsun.com>
20165
20166         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
20167         New macro.  Use it uniformly instead of
20168         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
20169         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
20170         reported by Vin Shelton.
20171
20172 2002-06-22  Paul Eggert  <eggert@twinsun.com>
20173
20174         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
20175         Do not assume SA_SIGINFO behavior.
20176         Bug reported by Jim Meyering on NetBSD 1.5.2.
20177
20178 2002-06-22  Jim Meyering  <meyering@lucent.com>
20179
20180         * m4/c-stack.m4: New file, from diffutils-2.8.2.
20181         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
20182
20183         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
20184         now that configure.ac uses AC_GNU_SOURCE.
20185         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
20186         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
20187
20188         Update to latest tools.  Suggestions from Paul Eggert.
20189         * m4/stdbool.m4: New file, from diffutils-2.8.2.
20190         * m4/gnu-source.m4: Update from diffutils-2.8.2.
20191         * m4/fnmatch.m4: Likewise.
20192         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
20193         to AC_HEADER_STDBOOL
20194
20195 2002-06-22  Jim Meyering  <meyering@lucent.com>
20196
20197         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
20198         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
20199
20200 2002-06-22  Jim Meyering  <meyering@lucent.com>
20201
20202         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
20203
20204         * lib/exitfail.c, exitfail.h: Likewise.
20205         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
20206
20207         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
20208         of fnmatch.h.
20209         (EXTRA_DIST): Add fnmatch_loop.c.
20210         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
20211
20212         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
20213         * lib/fnmatch.c: Update from diffutils-2.8.2.
20214         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
20215         * lib/fnmatch.h: Remove file.
20216
20217 2002-06-21  Jim Meyering  <meyering@lucent.com>
20218
20219         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
20220         * m4/mbrtowc.m4: Likewise.
20221
20222         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
20223         * m4/mbswidth.m4: Reflect name change:
20224         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
20225         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
20226
20227         * m4/lib-link.m4: Update from gettext-0.11.2.
20228         * m4/gettext.m4: Likewise.
20229
20230         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
20231         From Alfred M. Szmidt.
20232
20233 2002-06-18  Paul Eggert  <eggert@twinsun.com>
20234
20235         * lib/file-type.h: Report an error if neither S_ISREG nor
20236         S_IFREG is defined, instead of using a test specific to glibc
20237         2.2.  This should be safe, since POSIX requires S_ISREG and
20238         Unix Version 7 had S_IFREG.  We don't need to check for
20239         <sys/types.h> since we don't use any symbols that it defines.
20240
20241 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
20242
20243         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
20244         $@-t, so that each temporary file name is unique and valid in the first
20245         8 characters, for operation under DOS.
20246
20247 2002-06-15  Paul Eggert  <eggert@twinsun.com>
20248
20249         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
20250
20251 2002-06-15  Jim Meyering  <meyering@lucent.com>
20252
20253         Work even with DJGPP 2.03, which lacks support for symlinks.
20254         From Richard Dawe.
20255         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
20256         is defined.
20257         * lib/lchown.c (S_ISLNK): Likewise.
20258
20259 2002-06-15  Jim Meyering  <meyering@lucent.com>
20260
20261         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
20262         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
20263         have been included before this file.
20264
20265 2002-06-14  Jim Meyering  <meyering@lucent.com>
20266
20267         * lib/file-type.h: Use the version from diffutils-2.8.2.
20268         * lib/file-type.c: Likewise.
20269
20270 2002-06-07  Jim Meyering  <meyering@lucent.com>
20271
20272         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
20273         They're needed at least for NetBSD 1.5.2.
20274         ($statxfs_includes): Include those same headers.
20275         ($statxfs_includes): Include sys/vfs.h if available.
20276         ($statxfs_includes): Likewise for sys/statvfs.h.
20277         Check for the following members in both structs statfs and statvfs:
20278         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
20279
20280 2002-06-01  Jim Meyering  <meyering@lucent.com>
20281
20282         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
20283         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
20284
20285 2002-05-28  Jim Meyering  <meyering@lucent.com>
20286
20287         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
20288         Reported by Volker Borchert.
20289
20290 2002-05-27  Jim Meyering  <meyering@lucent.com>
20291
20292         Fix a problem seen only on nonconforming systems whereby ls.c's
20293         use of localtime, and then of gettimeofday would cause trouble:
20294         the localtime call used to initialize rpl_gettimeofday's save
20295         mechanism would clobber ls's current local time information so
20296         that in any long listing the first file would always be listed
20297         with date 1970-01-01.  Analysis by Volker Borchert.
20298
20299         * lib/gettimeofday.c (localtime): Undefine.
20300         (rpl_localtime): New function.
20301
20302 2002-05-27  Jim Meyering  <meyering@lucent.com>
20303
20304         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
20305         localtime.
20306
20307         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
20308         use the replacement function; it wouldn't resolve at link time.
20309         Reported by Volker Borchert.
20310
20311 2002-05-22  Jim Meyering  <meyering@lucent.com>
20312
20313         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
20314         file-type.h.
20315         * lib/file-type.h: New file.
20316         * lib/file-type.c (file_type): New file/function.  Extracted from
20317         diffutils.
20318
20319 2002-04-30  Jim Meyering  <meyering@lucent.com>
20320
20321         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
20322
20323 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20324
20325         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
20326
20327 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20328
20329         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
20330         Do not check for alloca.h (no longer used) or stdbool.h (was never
20331         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
20332
20333 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20334
20335         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
20336
20337 2002-04-29  Jim Meyering  <meyering@lucent.com>
20338
20339         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
20340         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
20341         Use AC_FUNC_STRNLEN here instead.
20342
20343         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
20344         With autoconf-2.53a, it's part of AC_PROG_CC.
20345
20346 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20347
20348         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
20349         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
20350
20351 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20352
20353         * lib/sig2str.h, lib/sig2str.c: New files.
20354         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
20355
20356 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20357
20358         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
20359         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
20360         of 127, since 64 is the largest conceivable number for ancient
20361         nonstandard hosts.
20362         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
20363
20364 2002-04-28  Jim Meyering  <meyering@lucent.com>
20365
20366         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
20367
20368 2002-04-24  Jim Meyering  <meyering@lucent.com>
20369
20370         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
20371         (jm_PREREQ): Use it.
20372
20373         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
20374         mach/mach.h fcntl.h.
20375         Check for this function: setlocale.
20376
20377 2002-04-24  Jim Meyering  <meyering@lucent.com>
20378
20379         * lib/gettext.h: New file, from Gettext.
20380         * lib/Makefile.am (INCLUDES): Remove -I../intl.
20381         (libfetish_a_SOURCES): Add gettext.h.
20382
20383 2002-04-16  Jim Meyering  <meyering@lucent.com>
20384
20385         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
20386         ut_pid, ut_id, ut_exit.
20387
20388 2002-04-16  Jim Meyering  <meyering@lucent.com>
20389
20390         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
20391         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
20392         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
20393
20394 2002-04-12  Jim Meyering  <meyering@lucent.com>
20395
20396         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
20397         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
20398         existence of the getmntinfo function.  Needed for Darwin 5.3.
20399
20400         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
20401         This is necessary at least on Darwin 5.3.
20402
20403         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
20404         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
20405         strnlen.o in the library, and that makes some versions of ranlib
20406         object.
20407
20408 2002-04-12  Jim Meyering  <meyering@lucent.com>
20409
20410         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
20411
20412 2002-04-09  Jim Meyering  <meyering@lucent.com>
20413
20414         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
20415         to be more precise.  Rather than saying we're checking whether the
20416         function `works', say what we're testing.
20417         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
20418         Reported by Bruno Haible.
20419
20420 2002-03-10  Jim Meyering  <meyering@lucent.com>
20421
20422         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
20423         Suggestion from Santiago Vila.
20424
20425 2002-03-08  Jim Meyering  <meyering@lucent.com>
20426
20427         * lib/rename.c: Mention that this wrapper is needed also on
20428         mips-dec-ultrix4.4 systems.
20429
20430 2002-03-02  Jim Meyering  <meyering@lucent.com>
20431
20432         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
20433         not HAVE_CLOCK_SETTIME.
20434
20435 2002-02-27  Paul Eggert  <eggert@twinsun.com>
20436
20437         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
20438         Check for clock_settime.
20439
20440 2002-02-27  Paul Eggert  <eggert@twinsun.com>
20441
20442         * lib/nanosleep.h: Rename to....
20443         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
20444
20445         * lib/gettime.c: New file.
20446         * lib/settime.c: New file.
20447         * lib/stime.c: Remove.
20448
20449         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
20450         timespec.h.  Remove nanosleep.h.
20451
20452 2002-02-25  Paul Eggert  <eggert@twinsun.com>
20453
20454         * m4/acl.m4: New file.
20455         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
20456         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
20457
20458 2002-02-25  Paul Eggert  <eggert@twinsun.com>
20459
20460         * lib/acl.c, lib/acl.h: New files.
20461         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
20462
20463 2002-02-24  Jim Meyering  <meyering@lucent.com>
20464
20465         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
20466         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
20467         cause trouble.  Reported by Nelson Beebe.
20468
20469 2002-02-23  Paul Eggert  <eggert@twinsun.com>
20470
20471         * lib/path-concat.c (xpath_concat): Reorder code to pacify
20472         compilers that don't know that xalloc_die never returns.
20473
20474 2002-02-20  Jim Meyering  <meyering@lucent.com>
20475
20476         * lib/getdate.c: Regenerate using bison-1.33.
20477
20478 2002-02-17  Jim Meyering  <meyering@lucent.com>
20479
20480         * config/config.guess (main): Don't use `head -1'; it's no longer
20481         portable. Use `sed 1q' instead.
20482
20483 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
20484
20485         * m4/codeset.m4: Upgrade to gettext-0.11.
20486         * m4/gettext.m4: Upgrade to gettext-0.11.
20487         * m4/glibc21.m4: Upgrade to gettext-0.11.
20488         * m4/iconv.m4: Upgrade to gettext-0.11.
20489         * m4/isc-posix.m4: Upgrade to gettext-0.11.
20490         * m4/lcmessage.m4: Upgrade to gettext-0.11.
20491         * m4/lib-ld.m4: New file, from gettext-0.11.
20492         * m4/lib-link.m4: New file, from gettext-0.11.
20493         * m4/lib-prefix.m4: New file, from gettext-0.11.
20494         * m4/progtest.m4: Upgrade to gettext-0.11.
20495
20496 2002-02-15  Paul Eggert  <eggert@twinsun.com>
20497
20498         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
20499         (jm_PREREQ): Use it.
20500
20501 2002-02-15  Paul Eggert  <eggert@twinsun.com>
20502
20503         * lib/posixver.c, lib/posixver.h: New files.
20504         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
20505
20506 2002-02-02  Paul Eggert  <eggert@twinsun.com>
20507             Bruno Haible  <bruno@clisp.org>
20508
20509         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
20510         (fwrite_success_callback): New declaration.
20511         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
20512         print_unicode_char. Call failure callback instead of error.
20513         (fwrite_success_callback): New function.
20514         (exit_failure_callback): New function.
20515         (fallback_failure_callback): New function.
20516         (print_unicode_char): Call unicode_to_mb.
20517
20518 2002-01-26  Jim Meyering  <meyering@lucent.com>
20519
20520         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
20521         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
20522
20523 2002-01-26  Jim Meyering  <meyering@lucent.com>
20524
20525         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
20526
20527 2002-01-22  Paul Eggert  <eggert@twinsun.com>
20528
20529         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
20530
20531 2002-01-22  Jim Meyering  <meyering@lucent.com>
20532
20533         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
20534         Otherwise, some versions of automake would omit the rule that makes
20535         Makefile from Makefile.in.
20536
20537 2002-01-21  Paul Eggert  <eggert@twinsun.com>
20538
20539         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
20540         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
20541         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
20542         (memcoll): Set errno to zero if there is no error.
20543
20544         * lib/quotearg.c (quotearg_buffer_restyled):
20545         Fix bug with quoting buffers containing NUL when backslashing escapes.
20546         This bug was exposed by the other changes in this patch.
20547         (quotearg_n_options): New arg ARGSIZE.
20548         All callers changed.
20549         (quoting_options_from_style): New function.
20550         (quotearg_n_style): Use it.
20551         (quotearg_n_style_mem): New function.
20552
20553         * lib/quotearg.h (quotearg_n_style_mem): New function.
20554
20555 2002-01-19  Jim Meyering  <meyering@lucent.com>
20556
20557         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
20558         Remove useless quotes: DF_PROG="df".
20559         * m4/strnlen.m4: New file.
20560
20561 2002-01-16  Paul Eggert  <eggert@twinsun.com>
20562
20563         * lib/backupfile.c (ISDIGIT): Comment fix.
20564         * lib/getdate.y (ISDIGIT): Likewise.
20565         * lib/posixtm.c (ISDIGIT, year): Likewise.
20566         * lib/strverscmp.c (ISDIGIT): Likewise.
20567         * lib/userspec.c (ISDIGIT): Likewise.
20568
20569 2002-01-16  Jim Meyering  <meyering@lucent.com>
20570
20571         * lib/getdate.y: Add three semicolons, each just before a closing
20572         brace. Bison (as of version 1.31) no longer papers over that mistake.
20573
20574 2002-01-05  Jim Meyering  <meyering@lucent.com>
20575
20576         * lib/version-etc.c (version_etc_copyright): Update copyright year.
20577
20578 2001-12-19  Paul Eggert  <eggert@twinsun.com>
20579
20580         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
20581         not silently exit merely because the output buffer happens to
20582         have nothing pending.
20583
20584 2001-12-18  Paul Eggert  <eggert@twinsun.com>
20585
20586         See the big note in ../ChangeLog.
20587         * lib/human.c (suffixes): Prefer K to k for 1024.
20588         (generate_suffix_backwards): New function.
20589         (human_readable_inexact): Use it.
20590         * lib/xstrtol.c (__xstrtol): If there is no number but there
20591         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
20592         Accept 'K' as well as 'k'.
20593
20594 2001-12-15  Jim Meyering  <meyering@lucent.com>
20595
20596         * lib/regex.h (__restrict_arr): Update from libc.
20597
20598         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
20599         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
20600         (STREQ): Define.
20601
20602 2001-12-14  Jim Meyering  <meyering@lucent.com>
20603
20604         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
20605         Suggestion from Bruno Haible.
20606
20607 2001-12-10  Jim Meyering  <meyering@lucent.com>
20608
20609         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
20610         xrealloc, Instead, include "xalloc.h".
20611         (initbuffer): Don't cast xmalloc return value to char*.
20612         (readline): Reword comment.
20613         Don't cast xrealloc return value to char*
20614         Return NULL, not 0.
20615
20616 2001-12-09  Jim Meyering  <meyering@lucent.com>
20617
20618         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
20619         about `signed and unsigned type in conditional expression'.
20620         * lib/posixtm.c (posix_time_parse): Likewise.
20621
20622         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
20623
20624         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
20625         to avoid a pedantic warning.
20626
20627         * lib/getstr.c: Don't include assert.h.
20628         (getstr): Remove warning-evoking assertions.
20629         Return -1 if offset parameter is out of bounds.
20630         Change the type of a local from int to size_t.
20631
20632         * lib/strftime.c (my_strftime_localtime_r): Include this function
20633         definition in the `#if ! HAVE_TM_GMTOFF' block.
20634
20635         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
20636         Include xalloc.h instead.
20637
20638 2001-12-02  Jim Meyering  <meyering@lucent.com>
20639
20640         * lib/tempname.c: Don't declare getenv, thus reverting the change of
20641         2001-11-18.  It's no longer necessary, now that stdlib.h is always
20642         included.
20643
20644         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
20645         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
20646
20647 2001-11-30  Akim Demaille  <akim@epita.fr>
20648
20649         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
20650         before being defined.
20651
20652 2001-11-27  Paul Eggert  <eggert@twinsun.com>
20653
20654         * lib/quotearg.h (quotearg_n, quotearg_n_style):
20655         First arg is int, not unsigned.
20656         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20657         (SIZE_MAX, UINT_MAX): New macros.
20658         (quotearg_n_options): Abort if N is negative.
20659         Avoid overflow check on hosts where size_t is 64 bits and int
20660         is 32 bits, as overflow is impossible there.
20661         Fix off-by-one typo that caused unnecessary reallocation.
20662
20663 2001-11-27  Jim Meyering  <meyering@lucent.com>
20664
20665         * lib/tempname.c: Merge with version from libc.
20666         * lib/regex.c: Likewise.
20667
20668         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
20669         systems for which STDC_HEADERS is 0, it was not included, resulting in
20670         a warning about an integer-to-pointer conversion problem with getenv.
20671         Reported by Volker Borchert.
20672
20673 2001-11-26  Jim Meyering  <meyering@lucent.com>
20674
20675         * lib/gtod.h: Remove file.
20676         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
20677         * lib/gettimeofday.c: Don't include gtod.h.
20678         (GTOD_init): Remove function.
20679         (rpl_gettimeofday): Do its job here instead, rather than aborting.
20680         Suggestion from Volker Borchert.
20681
20682 2001-11-23  Jim Meyering  <meyering@lucent.com>
20683
20684         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
20685         it.
20686         * lib/hash.c (struct hash_table): Define it here instead.
20687
20688 2001-11-22  Jim Meyering  <meyering@lucent.com>
20689
20690         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
20691
20692 2001-11-20  Jim Meyering  <meyering@lucent.com>
20693
20694         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
20695         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
20696
20697 2001-11-19  Jim Meyering  <meyering@lucent.com>
20698
20699         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
20700         directory.  Use "conftestXXXXXX" as the template.
20701         Suggestion from Paul Eggert.
20702
20703         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
20704         immediately, so the test doesn't mistakenly hit the max-open-files
20705         limit.
20706
20707 2001-11-18  Paul Eggert  <eggert@twinsun.com>
20708
20709         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
20710         (TEMPORARIES): New macro.
20711         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
20712         removes an artificial limitation (e.g. HP-UX 10.20, where
20713         TMP_MAX is 17576).
20714
20715 2001-11-18  Jim Meyering  <meyering@lucent.com>
20716
20717         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
20718
20719 2001-11-18  Jim Meyering  <meyering@lucent.com>
20720
20721         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
20722         on SunOS 4.
20723
20724         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
20725         files will be created before anything else.
20726
20727 2001-11-17  Paul Eggert  <eggert@twinsun.com>
20728
20729         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
20730         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
20731
20732 2001-11-17  Jim Meyering  <meyering@lucent.com>
20733
20734         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
20735         Prompted by a report from Bob Proulx.
20736
20737         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
20738         Instead, require UTILS_FUNC_MKSTEMP.
20739
20740 2001-11-17  Jim Meyering  <meyering@lucent.com>
20741
20742         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
20743         Now, that's done as part of AC_FUNC_STRTOD.
20744
20745 2001-11-17  Jim Meyering  <meyering@lucent.com>
20746
20747         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
20748         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
20749         rather than group writable.  Patch by Juan F. Codagnone.
20750
20751         * lib/readtokens.c: Remove explicit declarations of xmalloc and
20752         xrealloc, Instead, include "xalloc.h".
20753
20754         * lib/mountlist.c: Include unlocked-io.h after all system headers.
20755         Remove explicit declarations of xmalloc, xrealloc,
20756         and xstrdup.  Instead, include "xalloc.h".
20757
20758         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
20759         unlocked-io.h.
20760         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
20761         Likewise.
20762         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
20763
20764         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
20765         Reported by Padraig Brady.
20766
20767         * lib/mkstemp.c: #undef mkstemp.
20768         Include config.h.
20769         (rpl_mkstemp): Rename from mkstemp.
20770         Protoize.
20771
20772 2001-11-16  Jim Meyering  <meyering@lucent.com>
20773
20774         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
20775         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
20776         determine the amount of total physical memory, use pstat_getstatic.
20777         HPUX-11 doesn't define _SC_PHYS_PAGES.
20778         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
20779         If sysconf couldn't be used to determine the amount of available
20780         physical memory, use both pstat_getstatic and pstat_getdynamic.
20781         Based on a patch from Bob Proulx.
20782
20783 2001-11-10  Jim Meyering  <meyering@lucent.com>
20784
20785         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
20786         (jm_PREREQ): Use it.
20787
20788 2001-11-09  Jim Meyering  <meyering@lucent.com>
20789
20790         * m4/jm-macros.m4: Require autoconf-2.52f.
20791         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
20792         Use these AC_-prefixed names, not the AM_-prefixed ones.
20793
20794         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
20795
20796 2001-11-05  Jim Meyering  <meyering@lucent.com>
20797
20798         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
20799
20800 2001-11-04  Jim Meyering  <meyering@lucent.com>
20801
20802         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
20803         $DEFS.
20804
20805 2001-11-03  Jim Meyering  <meyering@lucent.com>
20806
20807         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
20808         of AC_DEFUN.
20809
20810         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
20811         know the name of the variable in the macro definition.
20812
20813 2001-11-03  Jim Meyering  <meyering@lucent.com>
20814
20815         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
20816         in argmatch_to_argument call.
20817
20818         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
20819         argument.
20820
20821         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
20822         e.g., a fault due to an attempt to free a NULL pointer.
20823
20824 2001-11-01  Jim Meyering  <meyering@lucent.com>
20825
20826         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
20827         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
20828
20829 2001-11-01  Jim Meyering  <meyering@lucent.com>
20830
20831         * lib/dirfd.c, lib/dirfd.h: New files.
20832         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
20833
20834         * lib/hash.c (hash_print) [TESTING]: Clean up.
20835
20836 2001-10-22  Paul Eggert  <eggert@twinsun.com>
20837
20838         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
20839         to avoid a warning if -Wall.
20840
20841 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
20842
20843         * README: New file
20844         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
20845         (per RMS's instructions, this is now the canonical source)
20846         * lgpl/, gpl/: New directories.
20847
20848 2001-10-21  Paul Eggert  <eggert@twinsun.com>
20849
20850         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
20851
20852 2001-10-21  Jim Meyering  <meyering@lucent.com>
20853
20854         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
20855         this code would end up calling gettext even in packages built
20856         with --disable-nls.
20857         * lib/getopt.c (_): Likewise.
20858         * lib/regex.c (_): Likewise.
20859
20860 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20861
20862         * m4/error.m4 (jm_PREREQ_ERROR):
20863         Do not invoke AC_CHECK_FUNCS with strerror_r, as
20864         AC_FUNC_STRERROR_R does that.
20865         Check for strerror declaration.
20866
20867         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
20868         are supposed to have them these days.
20869         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
20870         Merge changes from latest Autoconf CVS.
20871         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
20872         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
20873         POSIX decided to standardize on the int flavor of strerror_r.
20874
20875 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20876
20877         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
20878         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
20879         Use strerror_r that is only a macro, even if it is not a function.
20880         (strerror): Check for HAVE_DECL_STRERROR before declaring.
20881         (private_strerror): Use prototypes, not old-style function definition.
20882         (print_errno_message): New function.
20883         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
20884         char*-flavored one.
20885         (error_tail, error, error_at_line): Use it.
20886
20887 2001-10-11  Jim Meyering  <meyering@lucent.com>
20888
20889         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
20890         and quote_n (1, ... to avoid clobbering a buffer.
20891
20892 2001-10-05  Jim Meyering  <meyering@lucent.com>
20893
20894         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
20895         hash-pjw.h.
20896         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
20897         * lib/hash-pjw.h: New file.
20898
20899 2001-09-30  Jim Meyering  <meyering@lucent.com>
20900
20901         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
20902         `struct fsstat' has the `f_fstypename' member.
20903         Use that to define FS_TYPE, which is now used to make
20904         the getfsstat link test tighter.
20905
20906 2001-09-30  Jim Meyering  <meyering@lucent.com>
20907
20908         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
20909         Include <sys/ucred.h>, for Apple Darwin.
20910         Include sys/mount.h and sys/fs_types.h only if available.
20911         (FS_TYPE): Define.
20912         (read_filesystem_list): Use FS_TYPE.
20913
20914 2001-09-29  Paul Eggert  <eggert@twinsun.com>
20915
20916         * lib/exclude.c (excluded_filename): 0 -> false, since it's
20917         a boolean context.
20918
20919 2001-09-29  Jim Meyering  <meyering@lucent.com>
20920
20921         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20922         [one-argument getmntent function]): Include stdio.h before mntent.h.
20923         SunOS 4.1.x needs it for the declaration of `FILE'.
20924         Patch by Volker Borchert.
20925
20926         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20927         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
20928         sys/fs_types.h, and make the link-test for getfsstat guard #include
20929         directives with appropriate #if HAVE_*_H tests so that we can
20930         detect getfsstat on Apple Darwin1.3.7 systems.
20931         Reported by Nelson Beebe.
20932         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
20933
20934 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20935
20936         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20937         #defines strtoimax.  Also treat the other strto* functions
20938         like strtoimax.
20939
20940         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
20941         Check for strtoul and strtoumax,
20942         as those declarations are made even in the signed case.
20943         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
20944         Likewise, for strtol and strtoimax.
20945
20946 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20947
20948         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20949         #defines strtoimax.  Also treat the other strto* functions
20950         like strtoimax.
20951
20952         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
20953         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
20954         (strtoimax, strtoumax): Do not declare if already defined as a macro.
20955
20956 2001-09-26  Jim Meyering  <meyering@lucent.com>
20957
20958         Most macros in unlocked-io.h had the wrong number of arguments.
20959         * lib/gen-uio: New script.
20960         (USE_UNLOCKED_IO): Define to 1 if not already defined.
20961         * lib/unlocked-io.hin: Remove file.
20962         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
20963         rather than trying to embed it here.
20964         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
20965         Reported by Padraig Brady.
20966
20967 2001-09-25  Volker Borchert  <bt@teknon.de>
20968
20969         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
20970         `result'.
20971
20972 2001-09-24  Jim Meyering  <meyering@lucent.com>
20973
20974         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
20975
20976 2001-09-23  Jim Meyering  <meyering@lucent.com>
20977
20978         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
20979         instead of the mere test for existence of mntent.h.  The latter
20980         would get a false-positive on AIX 3.4 systems.
20981         In the outer getmntent if-block, don't die if neither of the getmntent
20982         tests succeeds.  Instead, just fall through and continue with the
20983         remaining tests.
20984
20985 2001-09-23  Jim Meyering  <meyering@lucent.com>
20986
20987         * lib/mountlist.c: Remove useless parentheses in #if directives.
20988         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
20989         the deprecated MOUNTED symbol is no longer defined in mntent.h.
20990
20991 2001-09-22  Jim Meyering  <meyering@lucent.com>
20992
20993         * m4/gettext.m4: New file.  From gettext.
20994         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
20995         * m4/progtest.m4: Likewise
20996         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
20997         * m4/glibc21.m4: Likewise.
20998
20999         * m4/libintl.m4: Remove.  No longer used.
21000
21001 2001-09-22  Jim Meyering  <meyering@lucent.com>
21002
21003         * lib/localcharset.c: Update from latest gettext.
21004         * lib/config.charset: Likewise.
21005
21006 2001-09-20  Jim Meyering  <meyering@lucent.com>
21007
21008         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
21009         strtoimax.
21010         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
21011         strtoumax.
21012
21013 2001-09-20  Jim Meyering  <meyering@lucent.com>
21014
21015         * lib/xstrtol.c (strtoimax): Guard declaration with
21016         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
21017         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
21018         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
21019         (strtoumax): Likewise, for completeness (it wasn't necessary).
21020
21021 2001-09-17  Paul Eggert  <eggert@twinsun.com>
21022
21023         * lib/strtoimax.c (HAVE_LONG_LONG):
21024         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
21025         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
21026         to work around bug in IBM C compiler.
21027
21028 2001-09-17  Jim Meyering  <meyering@lucent.com>
21029
21030         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
21031         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
21032         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
21033         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
21034         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
21035         whenever the right hand side need not be expanded by the shell.
21036
21037 2001-09-16  Paul Eggert  <eggert@twinsun.com>
21038
21039         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
21040         library.  It's not correct, as some older glibcs are buggy.
21041         fnmatch wasn't fixed until glibc 2.2.
21042
21043         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
21044         special shell magic here.
21045
21046 2001-09-16  Jim Meyering  <meyering@lucent.com>
21047
21048         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
21049         * m4/jm-macros.m4: Require it.
21050
21051 2001-09-16  Jim Meyering  <meyering@lucent.com>
21052
21053         * lib/mkdir.c: New file.
21054
21055 2001-09-15  Jim Meyering  <meyering@lucent.com>
21056
21057         * m4/jm-macros.m4: Check for help2man.
21058
21059 2001-09-11  Jim Meyering  <meyering@lucent.com>
21060
21061         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
21062         The body, by Paul Eggert, was moved here from configure.in.
21063         * m4/jm-macros.m4: Require UTILS_HOST_OS.
21064
21065 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21066
21067         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
21068         (jm_PREREQ): Use it.
21069
21070 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21071
21072         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
21073         Use ssize_t, not int, to store result of readlink.
21074         Check for ssize_t overflow as well as size_t overflow,
21075         as POSIX says the result of readlink is implementation-defined
21076         when ssize_t overflows.
21077         Remove unnecessary cast to char*.
21078         Use free+malloc instead of realloc, as the storage doesn't need
21079         to be preserved and it's clearer and can be more efficient that way.
21080         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
21081         * lib/xreadlink.h (xreadlink): Update prototype.
21082
21083 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21084
21085         * lib/xgetcwd.c: Revert some of the previous change; intead,
21086         fix the HAVE_GETCWD_NULL code to behave more like the
21087         !HAVE_GETCWD_NULL code used to.
21088
21089         Include "xalloc.h".
21090         (xgetcwd): Do not return NULL when memory is exhausted; instead,
21091         invoke xalloc_die.
21092
21093 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21094
21095         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
21096         sys/param.h, as pathmax.h includes them.
21097
21098 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21099
21100         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
21101         (jm_PREREQ_XGETCWD): New macro.
21102
21103         * m4/getcwd.m4: New file.
21104
21105 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21106
21107         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
21108         like the HAVE_GETCWD_NULL code.
21109         Include pathmax.h if not HAVE_GETCWD.
21110         Do not include xalloc.h.
21111         (INITIAL_BUFFER_SIZE): New symbol.
21112         Do not use xmalloc / xrealloc, since the caller is responsible for
21113         handling errors.  Preserve errno around `free' during failure.
21114         Do not overrun buffer when using getwd.
21115
21116 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21117
21118         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
21119         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
21120         getcwd (NULL, 0).
21121
21122 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21123
21124         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
21125         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
21126         spotted by Jim Meyering.
21127
21128 2001-09-03  Jim Meyering  <meyering@lucent.com>
21129
21130         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
21131         failure.
21132
21133 2001-09-02  Jim Meyering  <meyering@lucent.com>
21134
21135         * lib/error.c: Update from GNU libc.
21136
21137 2001-09-01  Jim Meyering  <meyering@lucent.com>
21138
21139         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
21140         Used by df.
21141
21142 2001-09-01  Jim Meyering  <meyering@lucent.com>
21143
21144         * lib/xreadlink.c: New file.
21145         * lib/xreadlink.h: New file.
21146         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
21147         xreadlink.h.
21148
21149         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
21150         doesn't conflict with sparc Solaris 7's definition in
21151         /usr/include/sys/int_types.h.
21152
21153         * lib/exclude.c: Use `""', not `<>' to #include non-system header
21154         files.
21155         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
21156         and strncasecmp as r-values.  Unixware didn't have declarations.
21157
21158 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21159
21160         * lib/xstrtol.h: Add copyright notice.
21161         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
21162         LONGINT_INVALID_SUFFIX_CHAR.
21163
21164 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21165
21166         * lib/xstrtol.c (strtoimax): New decl.
21167
21168 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21169
21170         * lib/xgetcwd.c: Don't include pathmax.h.
21171         Include stdlib.h and unistd.h if available.
21172         Include xalloc.h.
21173         (xmalloc, xstrdup, free): Remove decls.
21174         (xgetcwd): Don't assume sizes fit in unsigned.
21175         Check for overflow when computing sizes.
21176         Simplify reallocation code.
21177
21178 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21179
21180         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
21181         a directory's st_size can have an arbitrary value, so the old
21182         usage could waste an arbitrary amount of memory.  All uses
21183         changed.
21184         * lib/savedir.h: Update prototype.
21185
21186 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21187
21188         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
21189
21190         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
21191         old strtoimax.c.
21192
21193         Also, make the following further changes to make this file's
21194         configuration more similar to that of strtol.c:
21195         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
21196         (strtoumax, uintmax_t, strtoull, strtol): Remove.
21197         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
21198         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
21199         changed to signed values.
21200
21201         And make the following changes as well:
21202         Fix copyright notice, as 1999 was missing.
21203         (verify): New macro.
21204         (strtoimax): Check sizes at compile-time, not run-time.
21205         Prefer strtol to strtoll if both work.
21206         (main): Remove; it was not that useful and was a pain to maintain.
21207
21208         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
21209
21210 2001-08-31  Jim Meyering  <meyering@lucent.com>
21211
21212         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
21213         Use an initial, malloc'd, buffer of length 128 rather than
21214         a statically allocated one of length 1024.
21215
21216 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21217
21218         Simplify code, partly by assuming autoconf 2.52 semantics.
21219
21220         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
21221
21222         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
21223         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
21224         All uses removed.
21225         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
21226         Move AC_REQUIRE to next-to-top level, to avoid confusion.
21227         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
21228         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
21229         jm_AC_HEADER_INTTYPES_H.
21230         * m4/jm-macros.m4 (jm_MACROS): Likewise.
21231
21232         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
21233
21234         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
21235         Quote first arg of AC_DEFUN.
21236         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
21237         since they are needed to parse the include file even if we need
21238         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
21239         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
21240         but with opposite signedness.
21241
21242 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21243
21244         Merge 'exclude' changes from tar 1.13.22.
21245         This fixes one or two unlikely storage allocation overflow bugs,
21246         but doesn't change user-visible behavior otherwise.
21247
21248 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21249
21250         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
21251         (jm_PREREQ_EXCLUDE): New macro.
21252
21253 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21254
21255         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21256         tm to be declared.
21257
21258 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21259
21260         * lib/hash.c: Remove '2001' from copyright notice.
21261
21262 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21263
21264         * lib/full-write.h: New file.
21265         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
21266         * lib/full-write.c: Correct credits, as cccp.c no longer
21267         exists and anyway it was so heavily changed from the old cccp
21268         code as to be unrecognizable.  Include full-write.h.
21269         (full_write) Return size_t, with short writes meaning failure.
21270         All callers changed.  This fixes a bug with large buffers
21271         on 64-bit hosts.
21272         * lib/utime.c: Include full-write.h.
21273
21274 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21275
21276         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
21277         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
21278         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
21279         Include if available.
21280         (<xalloc.h>): Include
21281         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
21282         (verify): New macro.  Use it to verify that EXCLUDE macros do not
21283         collide with FNM macros.
21284         (struct patopts): New struct.
21285         (struct exclude): Use it, as exclude patterns now come with options.
21286         (new_exclude): Support above changes.
21287         (new_exclude, add_exclude_file):
21288         Initial size must now be a power of two to simplify overflow checking.
21289         (free_exclude, fnmatch_no_wildcards): New function.
21290         (excluded_filename): No longer requires options arg, as the options
21291         are determined by add_exclude.  Now returns bool, not int.
21292         (excluded_filename, add_exclude):
21293         Add support for the fancy new exclusion options.
21294         (add_exclude, add_exclude_file): Now takes int options arg.
21295         Check for arithmetic overflow when computing sizes.
21296         (add_exclude_file): xrealloc might modify errno, so don't
21297         realloc until after errno might be used.
21298
21299         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
21300         New macros.
21301         (free_exclude): New decl.
21302         (add_exclude, add_exclude_file): Now takes int options arg.
21303         (excluded_filename): No longer requires options arg, as the options
21304         are determined by add_exclude.  Now returns bool, not int.
21305
21306 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21307
21308         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
21309
21310 2001-08-27  Jim Meyering  <meyering@lucent.com>
21311
21312         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
21313
21314         * lib/version-etc.c (N_): Remove definition.
21315         Revert most of last change.
21316         Instead, simply don't mark the `Copyright...' string for translation.
21317         Based on advice from Paul Eggert.
21318
21319         * lib/strtoxmax.c: Tweak comment.
21320
21321 2001-08-26  Jim Meyering  <meyering@lucent.com>
21322
21323         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
21324
21325         * m4/xstrtoimax.m4: New file.
21326         * m4/xstrtoumax.m4: Add comments explaining why we
21327         AC_REPLACE_FUNCS(strtol).
21328
21329 2001-08-26  Jim Meyering  <meyering@lucent.com>
21330
21331         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
21332         of copyright with `%s' so translators don't get an untranslated
21333         message in 2002.
21334         (COPYRIGHT_YEAR): Define.
21335         (version_etc): Use fprintf rather than fputs.
21336         Suggestion from Ulrich Drepper.
21337
21338         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
21339
21340         * lib/strtoll.c: New file, from GNU libc.
21341         * lib/xstrtoimax.c: New file.
21342
21343         * lib/xstrtol.h: Add xstrtoimax.
21344         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
21345         * lib/strtoimax.c: New file.  Likewise, but first define
21346         STRTOUXMAX_SIGNED.
21347
21348         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
21349         ...
21350         * lib/strtoxmax.c: ... then renamed to this.
21351
21352 2001-08-18  Paul Eggert  <eggert@twinsun.com>
21353
21354         * m4/inttypes.m4: Add AC_PREREQ(2.13).
21355         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
21356         (jm_AC_TYPE_INTMAX_T): New macro.
21357         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
21358
21359         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
21360
21361         * m4/longlong.m4: Renamed from ulonglong.m4.
21362         * m4/inttypes.m4: Renamed from inttypes_h.m4.
21363         * m4/uintmax_t.m4: Removed.
21364
21365 2001-08-13  Paul Eggert  <eggert@twinsun.com>
21366
21367         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
21368         Port to Solaris 8, where 'sed' requires a space after the 'r'
21369         command, and where sh dislikes "$/".  Clean up the spacing a bit.
21370         Redirect output to $tmp just once.
21371
21372 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
21373
21374         * lib/addext.c (<errno.h>): Include.
21375         (errno): Declare if not defined.
21376         (addext): Work correctly when pathconf returns -1 and leaves
21377         errno alone because there is no limit.  Also, work even if
21378         pathconf returns a value greater than SIZE_MAX.
21379
21380 2001-08-12  Jim Meyering  <meyering@lucent.com>
21381
21382         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
21383         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
21384         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
21385         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
21386         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
21387         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
21388         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
21389         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
21390         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
21391         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
21392         utime.m4, utimes.m4, xstrtoumax.m4:
21393         Quote the first argument in each use of AC_DEFUN.
21394
21395 2001-08-12  Jim Meyering  <meyering@lucent.com>
21396
21397         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
21398         Simply `return getcwd (NULL, 0);'.
21399         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
21400         Use 1300 as initial value for length, not PATH_MAX.
21401
21402         * lib/pathmax.h: Clean up cpp syntax.
21403
21404 2001-08-12  Jim Meyering  <meyering@lucent.com>
21405
21406         * lib/gettimeofday.c: New file.
21407         * lib/gtod.h: New file.
21408         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
21409
21410 2001-08-05  Jim Meyering  <meyering@lucent.com>
21411
21412         * m4/jm-macros.m4: Require autoconf-2.52.
21413
21414 2001-08-04  Jim Meyering  <meyering@lucent.com>
21415
21416         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
21417         stmt, to get in sync with glibc.
21418
21419 2001-08-03  Paul Eggert  <eggert@twinsun.com>
21420
21421         The following changes are from gettext 0.10.39 as maintained by
21422         Bruno Haible.
21423
21424         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
21425         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
21426         with inverted sense.  All uses changed.
21427
21428         * lib/mbswidth.c: Don't include <limits.h>.
21429         Include <stdlib.h> and <string.h> unconditionally.
21430         (iswcntrl, mbsinit, ISCNTRL): New macros.
21431         (mbsnwidth): Use K&R style function declarations.
21432         Don't bother checking for MB_LEN_MAX == 1, since the compiler
21433         can optimize it when MB_CUR_MAX == 1.
21434         The width of control characters is zero, not 1.
21435
21436 2001-08-03  Paul Eggert  <eggert@twinsun.com>
21437
21438         The following changes are from gettext 0.10.39 as maintained by
21439         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
21440
21441         * m4/codeset.m4: Upgrade to serial AM1.
21442         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
21443         all uses changed.  Quote first arg of AC_DEFUN.
21444         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
21445
21446         * m4/iconv.m4: Upgrade to serial AM2.
21447         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
21448         Add --with-libconv-prefix.
21449         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
21450         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
21451         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
21452         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
21453         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
21454
21455         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
21456         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
21457         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
21458         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
21459         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
21460         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
21461         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
21462         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
21463         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
21464
21465         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
21466         string.h any more.
21467
21468         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
21469         not the default value.
21470
21471         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
21472         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
21473         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
21474         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
21475         Also check for iswcntrl, used for wcwidth fallback.
21476         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
21477         to Autoconf 2.13.
21478
21479 2001-08-03  Jim Meyering  <meyering@lucent.com>
21480
21481         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
21482         as it was in the original.  Reported by Paul Eggert.
21483
21484 2001-07-16  Jim Meyering  <meyering@lucent.com>
21485
21486         * m4/gettimeofday.m4: New file.
21487         Prompted by a report from Bernhard Baehr.
21488
21489 2001-07-15  Jim Meyering  <meyering@lucent.com>
21490
21491         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
21492         stuff. Now it's in ../Makefile.cfg.
21493
21494 2001-07-15  Jim Meyering  <meyering@lucent.com>
21495
21496         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
21497         (BUILT_SOURCES): Add unlocked-io.h.
21498         (io_functions): Define.
21499         (unlocked-io.h): New rule.
21500         (DISTCLEANFILES): Add unlocked-io.h.
21501         (all-local): Depend on unlocked-io.h, to ensure it is created.
21502
21503         * lib/unlocked-io.hin: New file
21504
21505         * lib/regex.c: Update from glibc.
21506
21507 2001-07-05  Jim Meyering  <meyering@lucent.com>
21508
21509         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
21510         recommendation.
21511         (libfetish_a_SOURCES): Put all .h files here instead.
21512         Remove a thus-exposed (better checks in automake) duplicate and
21513         two unnecessary .h files.
21514
21515 2001-07-04  Jim Meyering  <meyering@lucent.com>
21516
21517         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
21518         that generates jm-glibc-io.m4 so that it doesn't trigger any make
21519         distcheck failure.
21520
21521 2001-07-02  Jim Meyering  <meyering@lucent.com>
21522
21523         The following changes were prompted by suggestions from Bruno Haible.
21524
21525         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
21526         is now generated.
21527         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
21528         definition of EXTRA_DIST.
21529         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
21530         ensure that the generated file is created/updated whenever the list
21531         of $(unlocked_functions) is changed.
21532         (jm-glibc-io.m4): New rule.
21533         (unlocked-io.h): New rule -- currently unused.
21534
21535 2001-06-24  Jim Meyering  <meyering@lucent.com>
21536
21537         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
21538         unmatched right bracket, rather than kludging it with an extra,
21539         falsely-matching quote in a comment.  Patch by Akim Demaille.
21540
21541 2001-06-11  Jim Meyering  <meyering@lucent.com>
21542
21543         * lib/regex.c: Update from GNU libc.
21544
21545 2001-05-27  Jim Meyering  <meyering@lucent.com>
21546
21547         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
21548         Check for ut_type in struct utmp.
21549
21550 2001-05-27  Jim Meyering  <meyering@lucent.com>
21551
21552         * lib/readutmp.h (UT_TYPE): Define.
21553
21554 2001-05-24  Jim Meyering  <meyering@lucent.com>
21555
21556         * lib/argmatch.c: Include "quote.h".
21557         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
21558         quote function.  Reported by Göran Uddeborg.
21559
21560 2001-05-22  Jim Meyering  <meyering@lucent.com>
21561
21562         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
21563         now that we use the package-supplied version unconditionally.
21564         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
21565
21566 2001-05-21  Jim Meyering  <meyering@lucent.com>
21567
21568         * m4/regex.m4: Change a couple backticks to single quotes to avoid
21569         shell syntax errors.
21570
21571 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
21572
21573         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
21574
21575 2001-05-20  Paul Eggert  <eggert@twinsun.com>
21576
21577         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
21578         Don't bother to check library strftime, since
21579         we'll be using our own my_strftime function anyway.
21580         Define my_strftime instead of strftime.
21581
21582 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
21583
21584         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
21585         which is not yet declared.
21586
21587 2001-05-15  Jim Meyering  <meyering@lucent.com>
21588
21589         * m4/regex.m4: Use proper quoting so brackets appear in the test
21590         program.
21591         Reported by, and with help from, Bruno Haible.
21592
21593 2001-05-13  Jim Meyering  <meyering@lucent.com>
21594
21595         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
21596         undefined.
21597
21598 2001-05-11  Paul Eggert  <eggert@twinsun.com>
21599
21600         dirname code cleanup.  base_name now behaves more compatibly
21601         with POSIX basename when given file names that have trailing
21602         slashes, and similarly for dir_name.  Add new primitives
21603         base_len and dir_len.  Put the directory-name-related decls
21604         into dirname.h.
21605
21606         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
21607         * lib/backupfile.c (base_name): Likewise.
21608         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
21609         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
21610         * lib/makepath.c (strip_trailing_slashes): Likewise.
21611         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
21612         ISSLASH): Likewise.
21613         * lib/rename.c (strip_trailing_slashes): Likewise.
21614         * lib/same.c (base_name): Likewise.
21615         * lib/stripslash.c (ISSLASH): Likewise.
21616
21617         * lib/addext.c: Include <dirname.h> after size_t is defined.
21618         * lib/backupfile.c: Likewise.
21619
21620         * lib/addext.c (addext): Use base_len to trim redundant
21621         trailing slashes instead of doing it ourselves.
21622         But do not trim the last slash if it is not redundant.
21623
21624         * lib/backupfile.c (find_backup_file_name,
21625         max_backup_version): Use base_len instead of rolling it ourselves.
21626         Handle the case of "" and (on DOS) "C:" correctly.
21627
21628         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
21629         needed. Include <string.h>, <dirname.h>.
21630         (base_name): Allow file names ending in slashes, other than names
21631         that are all slashes.  In this case, return the basename followed
21632         by the slashes.  This is more general, and can be used in places
21633         where the original base_name purposely had an assertion failure.
21634         (base_len): New function.
21635
21636         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
21637         Do not include <assert.h>; no longer needed.
21638         Include xalloc.h.
21639         (memrchr): Remove decl.
21640         (dir_name_r): Remove.
21641         (dir_len): Renamed from dirlen.  All callers changed.
21642         Rewrite in terms of base_name, for simplicity and consistency.
21643         (dir_name): Never return NULL.  All callers changed.
21644         Do not include <stdlib.h> in test program; no longer needed.
21645         return 0; is fine for test program.
21646
21647         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
21648         New macros.
21649         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
21650
21651         * lib/path-concat.c (path_concat): Use base_len to compute
21652         base length, not strlen; this means we cannot rely on memcpy
21653         to null-terminate.
21654
21655         * lib/same.c (STREQ): Remove.
21656         (same_name): Handle the case where the basename ends in trailing '/'.
21657
21658         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
21659         a slash was stripped.  Do not strip the last slash after a
21660         file system prefix.
21661
21662 2001-05-11  Paul Eggert  <eggert@twinsun.com>
21663
21664         * lib/Makefile.am (libfetish_a_SOURCES):
21665         Add strftime.c, since we now compile it on all hosts.
21666
21667         * lib/strftime.c (my_strftime):
21668         Define to nstrftime if emacs, but only if my_strftime is not defined.
21669         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
21670         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
21671         Add one more extra argument: a nanoseconds value.
21672         All uses changed.
21673         (ns): New macro.
21674         (my_strftime function): Add %N format.
21675         (emacs_strftimeu): Renamed from emacs_strftime,
21676         with extra ut argument.
21677
21678 2001-05-09  Paul Eggert  <eggert@twinsun.com>
21679
21680         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
21681
21682 2001-04-21  Jim Meyering  <meyering@lucent.com>
21683
21684         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
21685         doesn't interfere.
21686
21687 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
21688
21689         * m4/ftruncate.m4: Check for chsize.
21690         Link with ftruncate.o unconditionally if ftruncate is missing.
21691         This was required when cross-compiling to i586-mingw32msvc.
21692
21693 2001-04-08  Jim Meyering  <meyering@lucent.com>
21694
21695         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
21696         recomputed; that's necessary when the offset spans a DST transition.
21697         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
21698
21699 2001-04-02  Jim Meyering  <meyering@lucent.com>
21700
21701         * lib/regex.h, regex.c: Update from GNU libc.
21702
21703 2001-03-24  Jim Meyering  <meyering@lucent.com>
21704
21705         * m4/jm-macros.m4: Require autoconf-2.49d.
21706
21707 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
21708
21709         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
21710
21711 2001-03-19  Paul Eggert  <eggert@twinsun.com>
21712
21713         * lib/version-etc.c (version_etc_copyright): Update to 2001.
21714
21715 2001-03-17  Jim Meyering  <meyering@lucent.com>
21716
21717         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
21718         now that the version in autoconf is equivalent.
21719         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
21720
21721         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
21722         Suggestion from Akim Demaille.
21723
21724         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
21725         (jm_PREREQ_TEMPNAME): New function.
21726
21727 2001-03-16  Paul Eggert  <eggert@twinsun.com>
21728
21729         * lib/tempname.c (uint64_t): Define to uintmax_t if
21730         not defined, and if UINT64_MAX is not defined.
21731         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
21732         Reported by John David Anglin.
21733
21734 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
21735
21736         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
21737         resolve alias if codeset is empty.
21738         * lib/config.charset (BeOS): Use wildcard syntax.
21739
21740 2001-03-13  Jim Meyering  <meyering@lucent.com>
21741
21742         * lib/path-concat.c (path_concat)
21743         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
21744         concatenating e.g., `C:' and `foo'.
21745         From Bruno Haible.
21746
21747 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
21748
21749         * lib/localcharset.c (locale_charset): Don't use
21750         setlocale(LC_CTYPE,NULL). Don't return NULL.
21751         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
21752
21753 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
21754
21755         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
21756         support for DOS/DJGPP.
21757
21758 2001-03-01  Paul Eggert  <eggert@twinsun.com>
21759
21760         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
21761         lacks mkstemp.  Compile our own tempname.c if we compile our own
21762         mkstemp.c, as mkstemp relies on tempname.
21763
21764 2001-03-01  Jim Meyering  <meyering@lucent.com>
21765
21766         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
21767         AH_VERBATIM really does output its argument verbatim.
21768
21769 2001-02-28  Paul Eggert  <eggert@twinsun.com>
21770
21771         * lib/Makefile.am (libfetish_a_SOURCES):
21772         Add dup-safer.c, fopen-safer.c.
21773         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
21774
21775         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
21776         * lib/unistd-safer.h: New files.
21777
21778 2001-02-25  Paul Eggert  <eggert@twinsun.com>
21779
21780         The mkstemp replacement is taken from glibc 2.2.2, with some
21781         portability fixes for use outside glibc, as follows:
21782
21783         * lib/tempname.c (struct_stat64): New macro.
21784         (direxists, __gen_tempname): Use it.
21785         This avoids a portability problem with Solaris 8.
21786
21787         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
21788         (<stddef.h>, <stdint.h>, <string.h>):
21789         Include only if STDC_HEADERS || _LIBC.
21790         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
21791         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
21792         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
21793         (__set_errno): Define this macro if <errno.h> doesn't.
21794         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
21795         Define these macros if <stdio.h> doesn't.
21796         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
21797         Define these macros if <sys/stat.h>
21798         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
21799         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
21800         __xstat64): Define if not _LIBC.
21801         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
21802         (__gen_tempname): Invoke gettimeofday only if
21803         HAVE_GETTIMEOFDAY || _LIBC;
21804         otherwise, fall back on plain "time".
21805         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
21806
21807         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
21808
21809         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
21810
21811 2001-02-18  Paul Eggert  <eggert@twinsun.com>
21812
21813         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
21814
21815 2001-02-17  Paul Eggert  <eggert@twinsun.com>
21816
21817         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
21818         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
21819         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
21820         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21821
21822 2001-02-17  Paul Eggert  <eggert@twinsun.com>
21823
21824         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
21825         Remove workaround macros for hosts that have mbrtowc but not
21826         mbstate_t, as we now insist on proper declarations for both
21827         before using mbrtowc.
21828
21829 2001-02-17  Jim Meyering  <meyering@lucent.com>
21830
21831         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
21832         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
21833         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
21834         UnixWare 7.1.1.
21835
21836         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
21837         rather than AC_CACHE_VAL.
21838
21839 2001-02-17  Jim Meyering  <meyering@lucent.com>
21840
21841         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
21842         around included file name.
21843
21844         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
21845
21846         * lib/strftime.c: Update from GNU libc (the only changes were to
21847         comments).
21848
21849 2001-02-17  Jim Meyering  <meyering@lucent.com>
21850
21851         * lib/regex.c: Update from libc.
21852
21853 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
21854
21855         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
21856         clash.
21857
21858 2001-02-16  Paul Eggert  <eggert@twinsun.com>
21859
21860         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
21861         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
21862         Reported by Mark Hounschell via Paul Eggert.
21863
21864 2001-02-07  Jim Meyering  <meyering@lucent.com>
21865
21866         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
21867
21868 2001-02-05  Jim Meyering  <meyering@lucent.com>
21869
21870         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
21871         it includes the patch required for `large file' support with at least
21872         HP-UX's 10.20 /bin/cc.
21873
21874 2001-02-03  Jim Meyering  <meyering@lucent.com>
21875
21876         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
21877         AS_IF, now that it works once again (mysteriously).
21878         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21879
21880 2001-01-30  Jim Meyering  <meyering@lucent.com>
21881
21882         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
21883         * m4/chown.m4: Rename conftestchown to conftest.chown.
21884         * m4/rename.m4: s/conftestdir/conftest.d1/ and
21885         s/conftestdir2/conftest.d2/.
21886         * m4/utimes.m4: s/conftestdata/conftest.data/
21887         Inspired by Pavel Roskin's change in autoconf.
21888
21889 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
21890
21891         * lib/config.charset: Update for FreeBSD 4.2.
21892
21893 2001-01-27  Jim Meyering  <meyering@lucent.com>
21894
21895         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
21896         a use of AS_IF.
21897         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21898
21899 2001-01-26  Jim Meyering  <meyering@lucent.com>
21900
21901         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
21902         quotearg.c includes it.
21903
21904 2001-01-26  Jim Meyering  <meyering@lucent.com>
21905
21906         * lib/quotearg.c: Include stddef.h.
21907         * lib/quote.c: Include stddef.h.
21908         Reported by Axel Kittenberger.
21909
21910         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
21911         line in double quotes so that it evokes a better diagnostic.
21912         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
21913         Reported by Axel Kittenberger.
21914
21915 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
21916
21917         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
21918         as if it was a `charset'.
21919
21920 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21921
21922         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
21923         has const.
21924
21925 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21926
21927         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
21928         to avoid a warning.  Add back 'const' to inptr.
21929
21930 2001-01-20  Jim Meyering  <meyering@lucent.com>
21931
21932         Be sure that headers are checked before used in code compiled
21933         for the type checks.
21934         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
21935         In place of that, invoke jm_CHECK_ALL_TYPES.
21936         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
21937         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
21938         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
21939         The check for ssize_t was mistakenly run before the test for unistd.h.
21940
21941         The configure-time check for stdbool.h was missing.
21942         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
21943         (jm_PREREQ_HASH): New function.
21944
21945 2001-01-17  Jim Meyering  <meyering@lucent.com>
21946
21947         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
21948         for autoconf-2.49c.
21949         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
21950
21951 2001-01-16  Jim Meyering  <meyering@lucent.com>
21952
21953         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
21954         From Bruno Haible.
21955
21956 2001-01-14  Jim Meyering  <meyering@lucent.com>
21957
21958         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
21959         foo and bar.  Create conftestdir/ in the script, not in the C code.
21960         Remove directories in the script, not in the C code.
21961         Remove conftestdir{,2} before trying to create the directory.
21962         Make the entire configure script fail if the mkdir fails.
21963
21964 2001-01-14  Jim Meyering  <meyering@lucent.com>
21965
21966         * lib/rename.c: New file.  From Volker Borchert.
21967         Include stdlib.h, string.h or strings.h, and xalloc.h.
21968         Use strip_trailing_slashes rather than open-coding it.
21969
21970 2001-01-03  Paul Eggert  <eggert@twinsun.com>
21971
21972         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
21973
21974 2001-01-03  Jim Meyering  <meyering@lucent.com>
21975
21976         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
21977         of local `inptr' to avoid warning with some system declarations of
21978         iconv.
21979
21980 2001-01-02  Volker Borchert  <bt@teknon.de>
21981
21982         * m4/rename.m4: New file.
21983         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
21984
21985 2001-01-01  Jim Meyering  <meyering@lucent.com>
21986
21987         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
21988         even on systems with utmpx.h.  It's necessary for the declaration of
21989         utmp's ut_user member.  Reported by Andreas Jaeger.
21990
21991         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
21992         available. They are required for the declarations of getgrgid and
21993         getpwuid resp.
21994         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
21995         Reported by Andreas Jaeger.
21996
21997 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
21998
21999         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
22000         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
22001         so `make install' also works in VPATH builds.
22002
22003 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
22004
22005         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
22006         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
22007         can be used in subdirectories.
22008
22009 2000-12-29  Paul Eggert  <eggert@twinsun.com>
22010
22011         * lib/modechange.c: Do not assume that mode_t uses the
22012         traditional octal encoding.  E.g. "chmod 1 FOO" should set
22013         the other-execute bit of FOO even if S_IXOTH != 1.
22014
22015         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
22016         WOTH, XOTH, ALLM): New macros.
22017         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
22018          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
22019         Use them.
22020         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
22021         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
22022         (mode_compile):
22023         No need to use uintmax_t; unsigned long is long enough.
22024         Don't bother to get suffix since we don't use it.
22025
22026 2000-12-26  Jim Meyering  <meyering@lucent.com>
22027
22028         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
22029         better with autoheader.
22030
22031 2000-12-24  Jim Meyering  <meyering@lucent.com>
22032
22033         * lib/hash.c (is_prime): Return explicit boolean values.
22034         (hash_get_first): Return NULL to appease Irix5.6's 89.
22035         Reported by Nelson Beebe.
22036
22037 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
22038
22039         * lib/localcharset.c (locale_charset): Add support for Win32.
22040
22041 2000-12-18  Paul Eggert  <eggert@twinsun.com>
22042
22043         * lib/physmem.h, lib/physmem.c: New files.
22044
22045         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
22046         (noinst_HEADERS): Add physmem.h.
22047
22048         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
22049         't' for compatibility with Solaris 8 sort.
22050
22051 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
22052
22053         * lib/config.charset: Add support for BeOS.
22054
22055 2000-12-17  Jim Meyering  <meyering@lucent.com>
22056
22057         * m4/dos.m4 (jm_AC_DOS): New file and macro.
22058         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
22059
22060 2000-12-16  Jim Meyering  <meyering@lucent.com>
22061
22062         This bug had a serious impact on chown: `chown N:M FILE' (for integer
22063         N and M) would have treated it like `chown N:N FILE'.
22064
22065         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
22066
22067 2000-12-16  Jim Meyering  <meyering@lucent.com>
22068
22069         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
22070         SHELLS_FILE to a file name that's useful on djgpp systems.
22071         Include stdlib.h.
22072         (ADDITIONAL_DEFAULT_SHELLS): Define.
22073         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
22074         Based mostly on a patch from Prashant TR.
22075
22076 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
22077
22078         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
22079         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
22080         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
22081
22082 2000-12-08  Andreas Schwab  <schwab@suse.de>
22083
22084         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
22085         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
22086
22087 2000-12-07  Jim Meyering  <meyering@lucent.com>
22088
22089         * lib/stripslash.c (ISSLASH): Define.
22090         (strip_trailing_slashes): Use ISSLASH rather than comparing against
22091         `/'.
22092         From Prashant TR.
22093
22094         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
22095         (dir_name_r): Declare this function as static.
22096         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
22097         manifest itself on a name containing a mix of slashes and
22098         backslashes.
22099         Make this function work with names starting with a DOS-style
22100         drive letter and colon prefix.
22101         (dir_name): Append `.' if necessary.
22102         Based mostly on patches from Prashant TR and Eli Zaretskii.
22103
22104         * lib/dirname.h (dir_name_r): Remove prototype.
22105
22106 2000-12-06  Paul Eggert  <eggert@twinsun.com>
22107
22108         * m4/off_t-format.m4: Remove this file.
22109         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
22110
22111 2000-12-06  Jim Meyering  <meyering@lucent.com>
22112
22113         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
22114         replacement strtoull, we may well need the replacement strtoul, too.
22115         Check for declarations of strtoul and strtoull.
22116         Check for strtol.  Mainly as a cue to cause automake to include
22117         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
22118         Check for limits.h -- strtol.c needs it.
22119
22120 2000-12-05  Jim Meyering  <meyering@lucent.com>
22121
22122         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
22123
22124 2000-12-04  Jim Meyering  <meyering@lucent.com>
22125
22126         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
22127         Also include memory.h, stdlib.h, unistd.h if appropriate.
22128         Reported by Andreas Jaeger (conflicting declaration of malloc).
22129
22130 2000-12-02  Jim Meyering  <meyering@lucent.com>
22131
22132         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
22133         * m4/jm-macros.m4 (jm_MACROS): require it.
22134
22135 2000-12-02  Jim Meyering  <meyering@lucent.com>
22136
22137         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
22138
22139 2000-12-01  Paul Eggert  <eggert@twinsun.com>
22140
22141         * lib/memrchr.c: Include <config.h> before any system include file.
22142
22143 2000-11-30  Jim Meyering  <meyering@lucent.com>
22144
22145         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
22146
22147 2000-11-30  Jim Meyering  <meyering@lucent.com>
22148
22149         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
22150
22151 2000-11-29  Paul Eggert  <eggert@twinsun.com>
22152
22153         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
22154
22155 2000-11-26  Jim Meyering  <meyering@lucent.com>
22156
22157         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
22158
22159 2000-11-22  Paul Eggert  <eggert@twinsun.com>
22160
22161         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
22162         size of (size_t) -1; it's not portable.
22163
22164 2000-11-17  Jim Meyering  <meyering@lucent.com>
22165
22166         * lib/strstr.c: Update from GNU libc.
22167
22168 2000-11-17  Akim Demaille  <akim@epita.fr>
22169
22170         * lib/obstack.h: Formatting changes.
22171         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
22172         prevent type checking.
22173         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22174         cast the value to (void *): assigning a `foo *' to a `void *'
22175         variable is valid.
22176         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22177
22178 2000-11-16  Jim Meyering  <meyering@lucent.com>
22179
22180         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
22181
22182 2000-11-11  Jim Meyering  <meyering@lucent.com>
22183
22184         * lib/error.c: Add a couple #includes, merging from GNU libc version.
22185
22186 2000-11-10  Jim Meyering  <meyering@lucent.com>
22187
22188         * lib/obstack.h: Update from GNU libc.
22189         * lib/obstack.c: Likewise.
22190
22191 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
22192
22193         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
22194
22195 2000-11-06  Paul Eggert  <eggert@twinsun.com>
22196
22197         * lib/getusershell.c (setusershell): Use rewind rather than
22198         fseek/fseeko, to avoid configuration hassles with fseeko.
22199         Don't bother opening SHELLS_FILE if shellstream is NULL;
22200         it's not necessary.
22201
22202 2000-11-05  Jim Meyering  <meyering@lucent.com>
22203
22204         * lib/makepath.h (make_dir): Declare.
22205         * lib/makepath.c (make_dir): Remove `static' attribute.
22206         Tweak a comment.
22207
22208 2000-11-04  Jim Meyering  <meyering@lucent.com>
22209
22210         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
22211
22212 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
22213
22214         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
22215         last one in a bucket, advance to the next bucket.
22216
22217 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
22218
22219         * lib/fnmatch.c: Do not comment out all the code if we are using
22220         the GNU C library, because in some cases we are replacing buggy
22221         code in the GNU C library itself.
22222
22223 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
22224
22225         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
22226         (regex_compile): Catch bogus \(\1\).
22227
22228 2000-10-30  Paul Eggert  <eggert@twinsun.com>
22229
22230         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
22231         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
22232         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
22233
22234 2000-10-30  Paul Eggert  <eggert@twinsun.com>
22235
22236         * lib/error.h, getline.h, modechange.h:
22237         Remove "2000" from Copyright line, as the file hasn't been
22238         changed this year other than in the copyright notice.
22239
22240         * lib/xalloc.h: Add "2000" to Copyright line, as this file
22241         was changed this year.
22242
22243 2000-10-29  Jim Meyering  <meyering@lucent.com>
22244
22245         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
22246         renaming.
22247         * m4/ls-mntd-fs.m4: Likewise
22248
22249 2000-10-29  Jim Meyering  <meyering@lucent.com>
22250
22251         * lib/xstat.in: Fix grammar in comment.
22252
22253 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
22254
22255         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
22256         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
22257         doesn't define __restrict_arr.
22258
22259 2000-10-28  Jim Meyering  <meyering@lucent.com>
22260
22261         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
22262         (jm_PREREQ_MEMCHR): New function.
22263
22264 2000-10-28  Jim Meyering  <meyering@lucent.com>
22265
22266         * lib/memchr.c: Update from libc.
22267         Adjust for portability:
22268         [HAVE_STDLIB_H]: Include stdlib.h.
22269         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
22270         Undef __memchr, too.
22271         [!weak_alias]: Define __memchr to memchr.
22272
22273         * lib/regex.c: Update from libc.
22274         * lib/regex.h: Likewise.
22275         * lib/getopt1.c: Likewise.
22276         * lib/memcmp.c: Likewise.
22277
22278         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
22279         Avoid using fseek, when possible -- it's broken by design.
22280         Patch by Ulrich Drepper.
22281
22282 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
22283
22284         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
22285         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
22286         Giving in to popular pressure to shut up the compiler with casts.
22287
22288 2000-10-26  Jim Meyering  <meyering@lucent.com>
22289
22290         * lib/strftime.c: Update from libc.
22291
22292 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
22293
22294         * regex.c: More `unsigned char' -> `re_char' changes.
22295         Also change several `int' into `re_wchar_t'.
22296         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
22297         (PUSH_FAILURE_POINTER): Don't cast any more.
22298         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
22299         We want GCC to complain, since this piece of code makes
22300         re_match non-reentrant, which *should* be fixed.
22301         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
22302         (EXTEND_BUFFER): Use RETALLOC.
22303         (SET_LIST_BIT): Don't cast.
22304         (re_wchar_t): New type.
22305         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
22306         that those two functions will always properly return.
22307         (IMMEDIATE_QUIT_CHECK): Cast to void.
22308         (analyse_first): Use recursion rather than an explicit stack.
22309         (re_compile_fastmap): Can't fail anymore.
22310         (re_search_2): Don't check re_compile_fastmap for failure.
22311         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
22312         Now also sets the new value (passed in a new argument).
22313         (re_match_2_internal): Use it.
22314         Also, use a new var `reg' of type size_t when looping through regs
22315         rather than reuse the inappropriate `mcnt'.
22316
22317 2000-10-25  Jim Meyering  <meyering@lucent.com>
22318
22319         * lib/obstack.c: Update from libc.
22320
22321 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
22322
22323         * regex.c (regex_compile): Change the way of handling a range from
22324         a char less than 256 to a char not less than 256.
22325
22326 2000-10-24  Andrew Innes  <andrewi@gnu.org>
22327
22328         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
22329         NT-Emacs only.
22330         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
22331         so that re_search functions only quit when callers expect them to.
22332
22333 2000-10-23  Jim Meyering  <meyering@lucent.com>
22334
22335         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
22336         wrong.  That set_locale call must not have any side effects.
22337         From Paul Eggert.
22338
22339 2000-10-22  Jim Meyering  <meyering@lucent.com>
22340
22341         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
22342         [CYCLIC]: Remove now-unused definition.
22343
22344         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
22345         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
22346         Suggestion from Ulrich Drepper.
22347
22348 2000-10-21  Jim Meyering  <meyering@lucent.com>
22349
22350         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
22351         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
22352         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
22353
22354 2000-10-21  Jim Meyering  <meyering@lucent.com>
22355
22356         * lib/dirname.c (memrchr): Declare if necessary.
22357         (dir_name): Remove the restriction that there be no
22358         trailing slashes.  Now, this code skips past them, effectively
22359         ignoring them.
22360         [TEST_DIRNAME] (main): New unit tests.
22361
22362         * lib/memrchr.c: New file from GNU libc.
22363         Undef __memrchr, too.
22364         [!weak_alias]: Define __memrchr to memrchr.
22365         Guard weak_alias use with `#ifdef weak_alias'.
22366
22367 2000-10-21  Jim Meyering  <meyering@lucent.com>
22368
22369         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
22370         (dir_name): Use dir_name_r.
22371         * lib/dirname.h (dir_name_r): Declare it.
22372
22373 2000-10-17  Jim Meyering  <meyering@lucent.com>
22374
22375         * lib/quote.h (PARAMS): Define and use.
22376         Reported by Akim Demaille.
22377
22378         * lib/getopt.c: Update from libc.
22379
22380 2000-10-16  Jim Meyering  <meyering@lucent.com>
22381
22382         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
22383         setlocale.
22384         From Jan Fedak.
22385
22386 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
22387
22388         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
22389
22390 2000-09-25  Jim Meyering  <meyering@lucent.com>
22391
22392         * lib/md5.h (rol): Define (from GnuPG).
22393
22394         * lib/sha.c: Give credit (GnuPG) where due.
22395         (M): Use rol rather than open-coding it.
22396         Add a FIXME comment.
22397
22398 2000-09-21  Jim Meyering  <meyering@lucent.com>
22399
22400         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
22401         Reported by Michael Stone.
22402
22403 2000-09-20  Jim Meyering  <meyering@lucent.com>
22404
22405         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
22406         (noinst_HEADERS): Add sha.h.
22407         Based on code from Scott G. Miller and from GnuPG.
22408
22409 2000-09-18  Jim Meyering  <meyering@lucent.com>
22410
22411         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
22412         LIBS. Otherwise, everyone ends up linking with -lelf for some
22413         configurations.
22414         Reported by Mike Stone.
22415
22416 2000-09-15  Jim Meyering  <meyering@lucent.com>
22417
22418         * lib/regex.c: Update from libc.
22419
22420 2000-09-10  Jim Meyering  <meyering@lucent.com>
22421
22422         * lib/getopt.c (_getopt_internal): Update from glibc.
22423
22424 2000-09-09  Jim Meyering  <meyering@lucent.com>
22425
22426         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
22427         think it should be used as a general replacement for isascii.
22428         * lib/fnmatch.c: Likewise.
22429         * lib/mbswidth.c: Likewise
22430         * lib/regex.c: Likewise.
22431
22432         Don't use atoi.
22433         * lib/userspec.c: Include sys/param.h and limits.h.
22434         Include xstrtol.h.
22435         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22436         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
22437         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
22438         UID, GID.  Check range.
22439
22440 2000-09-06  Jim Meyering  <meyering@lucent.com>
22441
22442         * lib/getopt.c (_getopt_internal): Update from glibc.
22443
22444 2000-08-30  Jim Meyering  <meyering@lucent.com>
22445
22446         * lib/strftime.c: Merge in changes from GNU libc.
22447
22448 2000-08-26  Jim Meyering  <meyering@lucent.com>
22449
22450         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
22451         * m4/fpending.m4: New file.
22452
22453 2000-08-26  Jim Meyering  <meyering@lucent.com>
22454
22455         * lib/closeout.c: Include "__fpending.h".
22456         (close_stdout_status): Return right away if there's nothing to flush.
22457
22458         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
22459         * lib/__fpending.c: New file.
22460         * lib/__fpending.h: New file.
22461
22462 2000-08-20  Jim Meyering  <meyering@lucent.com>
22463
22464         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
22465         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
22466         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
22467
22468 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
22469
22470         Improve fileutils installation on systems where running
22471         programs (like install) can't be unlinked.
22472         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
22473         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
22474
22475 2000-08-07  Paul Eggert  <eggert@twinsun.com>
22476
22477         Standardize on "memory exhausted" instead of "Memory exhausted"
22478         or "virtual memory exhausted".
22479         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
22480         "virtual memory exhausted".
22481         * lib/same.c (same_name): Invoke xalloc_die instead of printing
22482         our own message.
22483         * lib/userspec.c (parse_user_spec): Likewise.
22484         * lib/bumpalloc.h: comment fix
22485         * lib/same.c, userspec.c: Include xalloc.h.
22486
22487         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
22488         not char *const and pointing to a constant array.
22489         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
22490         (xrealloc): Comment fix.
22491
22492         * lib/userspec.c (parse_user_spec):
22493         Don't translate a message until just before returning,
22494         to avoid unnecessary translation.
22495
22496 2000-08-07  Jim Meyering  <meyering@lucent.com>
22497
22498         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
22499         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
22500         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
22501         getgroups.c, gethostname.c, getopt.h, group-member.c,
22502         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
22503         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
22504         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
22505         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
22506         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
22507         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
22508         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
22509         yesno.c: Back out Copyright date changes for each file with no change
22510         this year.  This eases coordination with other programs using the same
22511         source code modules.  From Paul Eggert.
22512
22513 2000-08-06  Paul Eggert  <eggert@twinsun.com>
22514
22515         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
22516         not char, for compatibility with glibc 2.1.3 strftime.c.
22517
22518 2000-08-03  Greg McGary  <greg@mcgary.org>
22519
22520         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
22521         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
22522         (EXTEND_BUFFER): Use them.
22523
22524 2000-08-01  Jim Meyering  <meyering@lucent.com>
22525
22526         * lib/dirname.c (ISSLASH): Define.
22527         (BACKSLASH_IS_PATH_SEPARATOR): Define.
22528         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
22529         both `\' and `/' may be use as path separators.
22530         Based on a patch from Prashant TR.
22531
22532 2000-07-31  Paul Eggert  <eggert@twinsun.com>
22533
22534         * lib/quotearg.c (quotearg_n_options): Don't make the initial
22535         slot vector a constant, since it might get modified.
22536
22537 2000-07-31  Jim Meyering  <meyering@lucent.com>
22538
22539         * lib/xmalloc.c: Use `virtual memory exhausted', not
22540         `Memory exhausted'.
22541         * lib/obstack.c (print_and_abort): Likewise.
22542
22543 2000-07-30  Paul Eggert  <eggert@twinsun.com>
22544
22545         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
22546         buffer, so that the caller can always quote one small
22547         component of a "memory exhausted" message in slot 0.
22548         From a suggestion by Jim Meyering.
22549
22550 2000-07-30  Jim Meyering  <meyering@lucent.com>
22551
22552         * lib/makepath.c (make_path): Quote the other instance, too.
22553
22554         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
22555         (STATIC_BUF_SIZE): Define.
22556         (quotearg_n_options): Use only statically allocated storage when
22557         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
22558         than STATIC_BUF_SIZE.
22559
22560 2000-07-29  Jim Meyering  <meyering@lucent.com>
22561
22562         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
22563         * lib/dirname.c (dir_name): Likewise.
22564
22565         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
22566         `/'.
22567
22568         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
22569         (dir_name): Assert that there are no trailing slashes.
22570
22571 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
22572
22573         * lib/mbswidth.h (mbswidth): Add a flags argument.
22574         (mbswidth): New declaration.
22575         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
22576         * lib/mbswidth.c (mbswidth): Add a flags argument.
22577         (mbsnwidth): New function.
22578
22579 2000-07-24  Jim Meyering  <meyering@lucent.com>
22580
22581         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
22582
22583 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22584
22585         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
22586
22587 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22588
22589         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
22590         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
22591         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
22592         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
22593         invoke multibyte primitives.
22594
22595 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22596
22597         * lib/quotearg.c:
22598         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
22599         so that mbstate_t is always defined.
22600
22601         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
22602         be 1 in at least one GCC installation, and this configuration
22603         error is likely to be common.  Ignoring MB_LEN_MAX hurts
22604         performance on hosts that have mbrtowc but have only unibyte
22605         locales, but I assume these hosts are rare.
22606
22607 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22608
22609         * lib/mbswidth.c (_XOPEN_SOURCE):
22610         Don't define; this causes problems on Solaris 7.
22611         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
22612
22613 2000-07-23  Jim Meyering  <meyering@lucent.com>
22614
22615         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
22616         too: getgrgid, getpwuid, getuid.
22617
22618 2000-07-23  Jim Meyering  <meyering@lucent.com>
22619
22620         * lib/basename.c (base_name): Add an assertion.
22621
22622 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
22623
22624         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
22625         shadow its mbsinit function.
22626
22627 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
22628
22629         * lib/mbswidth.h: New file.
22630         * lib/mbswidth.c: New file.
22631         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
22632         (noinst_HEADERS): Add mbswidth.h.
22633
22634 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
22635
22636         * lib/config.charset: Add support for FreeBSD. Improve support for
22637         HP-UX and IRIX 6.
22638
22639 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
22640
22641         * m4/mbswidth.m4: New file.
22642         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
22643
22644 2000-07-15  Jim Meyering  <meyering@lucent.com>
22645
22646         * lib/makepath.c: Include quote.h.
22647         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
22648         corresponding argument in a `quote (...)' call.
22649         Give better diagnostics.
22650
22651         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
22652         (noinst_HEADERS): Add quote.h.
22653
22654         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
22655         from tar's src/misc.c.
22656         * lib/quote.h: New file.  Prototypes for same.
22657
22658 2000-07-14  Paul Eggert  <eggert@twinsun.com>
22659
22660         From a suggestion by Bruno Haible.
22661         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
22662         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
22663         to decide whether to define the BeOS workaround macro;
22664         this adjusts to the change to AC_MBSTATE_T.
22665
22666 2000-07-14  Jim Meyering  <meyering@lucent.com>
22667
22668         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
22669         jm_AC_TYPE_UINTMAX_T.
22670
22671 2000-07-13  Paul Eggert  <eggert@twinsun.com>
22672
22673         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
22674
22675         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
22676         quotearg_buffer_restyled): Add support for
22677         clocale_quoting_style.  Undo previous change to
22678         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
22679         and "{RIGHT QUOTATION MARK}" msgids.
22680
22681 2000-07-10  Paul Eggert  <eggert@twinsun.com>
22682
22683         From a suggestion by Bruno Haible.
22684         * m4/mbstate_t.m4 (AC_MBSTATE_T):
22685         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
22686         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
22687         and mbstate_t, to a single-part test that simply defines mbstate_t.
22688         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
22689         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
22690
22691 2000-07-10  Jim Meyering  <meyering@lucent.com>
22692
22693         * m4/strerror_r.m4: Mirror the correction made in autoconf.
22694
22695         * m4/gnu-source.m4: Output to confdefs.h directly.
22696         Suggestion from Akim Demaille.
22697
22698 2000-07-09  Paul Eggert  <eggert@twinsun.com>
22699
22700         The old behavior of quoting `like this' doesn't look good with
22701         newer, ISO-style fonts.  See:
22702         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
22703
22704         Instead, quote "like this" by default.  Let the translator
22705         tailor the locale-specific quoting behavior by providing
22706         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
22707
22708         * lib/quotearg.c (N_): New macro.
22709         (gettext_default): New function.
22710         (quotearg_buffer_restyled): Use
22711         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
22712         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
22713
22714 2000-07-09  Jim Meyering  <meyering@lucent.com>
22715
22716         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
22717         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
22718
22719         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
22720         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
22721
22722 2000-07-09  Jim Meyering  <meyering@lucent.com>
22723
22724         * lib/Most files: Update copyright dates to include 2000.
22725
22726 2000-07-08  Jim Meyering  <meyering@lucent.com>
22727
22728         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
22729         if not defined.
22730         (xgethostname): Remove now-unnecessary #ifdef.
22731         Move declaration of `err' into loop where it's used.
22732
22733 2000-07-05  Paul Eggert  <eggert@twinsun.com>
22734         and Bruno Haible  <haible@clisp.cons.org>
22735
22736         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
22737         only if the test for an object-type mbstate_t fails.  This
22738         prevents us from mistakenly reporting that mbstate_t is a
22739         system object type after we "#define mbstate_t int" to work
22740         around its lack.
22741
22742 2000-07-05  Paul Eggert  <eggert@twinsun.com>
22743         and Bruno Haible  <haible@clisp.cons.org>
22744
22745         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
22746
22747 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22748
22749         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
22750         to strerror_r.
22751         Include <ctype.h> for use of isalpha.
22752
22753 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22754
22755         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
22756         by allocating a larger buffer. Test the gethostname return value for
22757         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
22758         returns an error and ENAMETOOLONG isn't defined.
22759
22760 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22761
22762         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
22763         dimension.
22764
22765 2000-07-04  Jim Meyering  <meyering@lucent.com>
22766
22767         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
22768         of the deprecated AC_CHECKING.
22769
22770 2000-07-04  Jim Meyering  <meyering@lucent.com>
22771
22772         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
22773         Reported by Bruno Haible.
22774
22775 2000-07-04  Jim Meyering  <meyering@lucent.com>
22776
22777         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
22778         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
22779         lacks mbrtowc.
22780
22781 2000-07-03  Paul Eggert  <eggert@twinsun.com>
22782
22783         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
22784         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
22785
22786 2000-07-03  Paul Eggert  <eggert@twinsun.com>
22787         and Bruno Haible  <haible@clisp.cons.org>
22788
22789         * lib/quotearg.c (mbrtowc):
22790         Assign to *pwc, and return 1 only if result is nonzero.
22791         (iswprint): Use ISPRINT when substituting our own mbrtowc.
22792
22793 2000-07-03  Jim Meyering  <meyering@lucent.com>
22794
22795         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
22796
22797 2000-07-03  Jim Meyering  <meyering@lucent.com>
22798
22799         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
22800         This is necessary to get a definition of e.g., UTMP_FILE on
22801         HP-UX 10.20.
22802         From Bob Proulx.
22803
22804 2000-07-02  Jim Meyering  <meyering@lucent.com>
22805
22806         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
22807
22808         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
22809         AC_LIBOBJ(function_name).
22810         * m4/chown.m4: Likewise.
22811         * m4/fnmatch.m4: Likewise.
22812         * m4/ftruncate.m4: Likewise.
22813         * m4/getgroups.m4: Likewise.
22814         * m4/getline.m4: Likewise.
22815         * m4/group-member.m4: Likewise.
22816         * m4/jm-macros.m4: Likewise.
22817         * m4/lstat.m4: Likewise.
22818         * m4/malloc.m4: Likewise.
22819         * m4/memcmp.m4: Likewise.
22820         * m4/nanosleep.m4: Likewise.
22821         * m4/putenv.m4: Likewise.
22822         * m4/realloc.m4: Likewise.
22823         * m4/regex.m4: Likewise.
22824         * m4/stat.m4: Likewise.
22825         * m4/strftime.m4: Likewise.
22826
22827 2000-07-02  Jim Meyering  <meyering@lucent.com>
22828
22829         * lib/quotearg.c (mbstate_t): Don't define here.
22830
22831 2000-07-02  Jim Meyering  <meyering@lucent.com>
22832
22833         * lib/nanosleep.c (SIGCONT): Define if not already defined.
22834
22835 2000-07-01  Jim Meyering  <meyering@lucent.com>
22836
22837         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
22838
22839 2000-07-01  Jim Meyering  <meyering@lucent.com>
22840
22841         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
22842         problem.
22843
22844 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22845
22846         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
22847         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
22848
22849 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22850
22851         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
22852         per change in ../m4/ls-mntd-fs.m4.
22853         (read_filesystem_list): Ignore symbolic links.
22854
22855 2000-06-29  Jim Meyering  <meyering@lucent.com>
22856
22857         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
22858         for declaration of strcmp.
22859
22860         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
22861
22862         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
22863         Avoid warning by casting result to `char *' to remove `const'.
22864
22865 2000-06-28  Jim Meyering  <meyering@lucent.com>
22866
22867         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
22868         included by quotearg.c, for which we perform this test.  From
22869         Bruno Haible.
22870
22871 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22872
22873         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
22874         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
22875         <utmpx.h> exists, put readutmp.o into LIBOBJS.
22876
22877 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22878
22879         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
22880
22881 2000-06-26  Paul Eggert  <eggert@twinsun.com>
22882
22883         savedir now sets errno on failure and invokes xmalloc to get memory.
22884         Fix a couple of other minor bugs while we're at it.
22885
22886         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
22887         (NAMLEN): Remove macro.
22888         (malloc, realloc): Remove decls.
22889         (stpcpy): Likewise.
22890         ("xalloc.h"): Include.
22891         (NAME_SIZE_DEFAULT): New macro.
22892         (savedir): Use xmalloc / xrealloc to allocate memory.
22893         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
22894         Skip "" directory entries.
22895         Use strlen to calculate directory entry length, since the old method
22896         is rarely used these days and isn't worth supporting.
22897         Don't use a pointer after freeing it.
22898         Check for integer overflow when calculating allocation size.
22899         Use memcpy to copy entries, instead of stpcpy.
22900         Set errno properly when returning NULL.
22901         Check for readdir error.
22902
22903 2000-06-26  Jim Meyering  <meyering@lucent.com>
22904
22905         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
22906
22907 2000-06-25  Jim Meyering  <meyering@lucent.com>
22908
22909         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
22910         Linux header bug when _XOPEN_SOURCE is defined to 500.
22911
22912 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22913
22914         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
22915         deficiency.
22916
22917 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22918
22919         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
22920         Include xalloc.h.
22921         Don't include <stdlib.h>.  Don't declare malloc, realloc.
22922
22923 2000-06-24  Jim Meyering  <meyering@lucent.com>
22924
22925         * m4/strerror_r.m4: Revive this file -- to try out an experimental
22926         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
22927         for which strerror does return char*, but which lacks a conveniently
22928         accessible declaration of the function.  If the compile-test says
22929         strerror_r doesn't work, then resort to a `run'-test that works on
22930         BeOS and segfaults on DEC Unix.
22931
22932 2000-06-24  Jim Meyering  <meyering@lucent.com>
22933
22934         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
22935
22936 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22937
22938         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
22939         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
22940
22941 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22942
22943         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
22944         (mbrtowc, mbstate_t): Define substitutes if
22945         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
22946         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
22947         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
22948
22949 2000-06-23  Jim Meyering  <meyering@lucent.com>
22950
22951         * m4/afs.m4: Add missing AC_MSG_RESULT.
22952         Reported by Bruno Haible.
22953
22954         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
22955         Suggestion from Bruno Haible.
22956
22957 2000-06-23  Jim Meyering  <meyering@lucent.com>
22958
22959         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
22960
22961 2000-06-21  Jim Meyering  <meyering@lucent.com>
22962
22963         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
22964
22965 2000-06-21  Jim Meyering  <meyering@lucent.com>
22966
22967         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
22968         (noinst_HEADERS): Add getstr.h.
22969
22970         * lib/getline.c (getstr): Move into a separate file.
22971         * lib/getstr.c (getstr): New file, extracted from getline.c, with
22972         the following changes: new parameter, delim2; both delim[12]
22973         parameters have type `int', not `char'.  The latter would lose
22974         with 8-bit delimiters.
22975         * lib/getstr.h: New file.
22976
22977 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22978
22979         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
22980         than 1024, return a memory chunk of least possible size, instead
22981         of size PATH_MAX + 2. In the loop, increment the size proportionally.
22982         Use free/xmalloc instead of xrealloc to avoid copying for very long
22983         paths.
22984
22985 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22986
22987         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
22988         the empty string.
22989
22990 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22991
22992         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
22993         address, not strdup.  Include <stdlib.h> and don't declare free().
22994
22995 2000-06-19  Jim Meyering  <meyering@lucent.com>
22996
22997         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
22998
22999 2000-06-18  Jim Meyering  <meyering@lucent.com>
23000
23001         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
23002
23003         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
23004         `checking whether...' message to be consistent with that of the
23005         lstat test.
23006
23007 2000-06-18  Jim Meyering  <meyering@lucent.com>
23008
23009         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
23010         Besides, these days every porting target provides a mkdir function.
23011
23012         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
23013         needed. (this snippet comes from src/system.h).
23014
23015 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
23016
23017         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
23018
23019 2000-06-15  Paul Eggert  <eggert@twinsun.com>
23020
23021         * lib/human.c (adjust_value): New function.
23022         (human_readable_inexact): Apply rounding style even when
23023         printing approximate values.
23024
23025 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23026
23027         * lib/human.c (human_readable_inexact): Allow an input block
23028         size that is not a multiple of the output block size, and vice versa.
23029         Reported by Piergiorgio Sartor.
23030
23031 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23032
23033         * lib/getdate.y (get_date): Apply relative times after time
23034         zone indicator, not before.  Reported by Todd A. Jacobs.
23035
23036 2000-06-13  Jim Meyering  <meyering@lucent.com>
23037
23038         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
23039
23040         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
23041
23042 2000-06-12  Paul Eggert  <eggert@twinsun.com>
23043
23044         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
23045
23046 2000-06-12  Jim Meyering  <meyering@lucent.com>
23047
23048         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
23049         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
23050         optional argument.
23051         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
23052         the optional argument, `lib'.
23053
23054 2000-06-08  Jim Meyering  <meyering@lucent.com>
23055
23056         * m4/largefile.m4: Remove file (now that it's part of autoconf).
23057
23058 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23059
23060         Rewrite largefile configuration so that we don't need to run
23061         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
23062         AC_CANONICAL_HOST in configure.in -- jmm]
23063
23064         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
23065         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
23066         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
23067         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
23068         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
23069         All uses changed.
23070         Instead of inspecting the output of getconf, try to compile the
23071         test program without and with the macro definition.
23072         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
23073         for getconf.  Instead, check for the needed flags by compiling
23074         test programs.
23075
23076 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23077
23078         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
23079
23080 2000-06-04  Jim Meyering  <meyering@lucent.com>
23081
23082         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
23083         SunOS 4.1.4 for which gid_t is an unsigned type.
23084
23085 2000-06-03  Jim Meyering  <meyering@lucent.com>
23086
23087         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
23088         now that autoconf requires that.
23089
23090         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
23091         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
23092         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
23093
23094 2000-06-03  Jim Meyering  <meyering@lucent.com>
23095
23096         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
23097
23098 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
23099
23100         * m4/glibc21.m4: New file.
23101         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
23102
23103 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
23104
23105         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
23106         newer, don't install charset.alias.
23107         * lib/config.charset: Change the Linux/glibc rules so they become empty
23108         on glibc-2.1 or newer.
23109
23110 2000-06-02  Jim Meyering  <meyering@lucent.com>
23111
23112         * lib/mountlist.c: Back out last change.  Instead, do this...
23113         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
23114         me_dummy member using the same `ignore'-testing code.
23115         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
23116         fs_type strings.
23117         From Mark D. Roth.
23118
23119 2000-05-29  Jim Meyering  <meyering@lucent.com>
23120
23121         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
23122         mounts with the `ignore' attribute.  Based on a patch from
23123         Mark D. Roth.
23124
23125 2000-05-28  Jim Meyering  <meyering@lucent.com>
23126
23127         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
23128         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23129         * m4/stat.m4: Likewise.
23130         * m4/lstat.m4: Likewise.
23131         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
23132
23133         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
23134         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
23135
23136 2000-05-26  Jim Meyering  <meyering@lucent.com>
23137
23138         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
23139
23140 2000-05-24  Jim Meyering  <meyering@lucent.com>
23141
23142         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
23143         autoconf requires that.
23144         * m4/lib-check.m4: Likewise.
23145         * m4/jm-macros.m4: Likewise.
23146         * m4/strftime.m4: Likewise.
23147
23148         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
23149         AC_CHECK_DECLS, now that autoconf requires that.
23150
23151 2000-05-22  Jim Meyering  <meyering@lucent.com>
23152
23153         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23154         * m4/lstat.m4: Likewise.
23155
23156 2000-05-22  Jim Meyering  <meyering@lucent.com>
23157
23158         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
23159
23160 2000-05-20  Jim Meyering  <meyering@lucent.com>
23161
23162         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
23163         (jm_PREREQ): Use it.
23164
23165 2000-05-18  Jim Meyering  <meyering@lucent.com>
23166
23167         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
23168         back, too, since it may have been modified by allocate_entry.
23169         (hash_delete): Rewrite to use neither the assignment operator
23170         nor the comma operator in an if-expression.
23171
23172 2000-05-15  Paul Eggert  <eggert@twinsun.com>
23173
23174         * lib/closeout.c:
23175         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
23176         Remove; no longer needed.
23177         "quotearg.h": Add include.
23178         (file_name): Do not bother to explicitly initialize to NULL; it's less
23179         efficient on some hosts.
23180         (close_stdout_status): Remove test as to whether stdout was already
23181         closed; it breaks for the case "echo x | sort >&-".
23182         Quote file name colons.
23183         Do not assume that _("write error") lacks format strings.
23184
23185 2000-05-15  Jim Meyering  <meyering@lucent.com>
23186
23187         * lib/version-etc.c (version_etc_copyright): Update the copyright
23188         string used in all --version output.
23189
23190 2000-05-14  Jim Meyering  <meyering@lucent.com>
23191
23192         * lib/closeout.c (close_stdout_set_file_name): New function.
23193         (close_stdout_status): Use new file-scoped global.
23194         Return right away if fstat says the stdout file descriptor is invalid.
23195         * lib/closeout.h (close_stdout_set_file_name): Declare.
23196
23197 2000-05-10  Jim Meyering  <meyering@lucent.com>
23198
23199         * lib/closeout.c [default_exit_status]: New file-scoped variable.
23200         (close_stdout_set_status): New function.
23201         * lib/closeout.h (close_stdout_set_status): Declare.
23202
23203 2000-05-09  Jim Meyering  <meyering@lucent.com>
23204
23205         * m4/gettext.m4: Rename this...
23206         * m4/libintl.m4: ...to this.
23207
23208 2000-05-08  Jim Meyering  <meyering@lucent.com>
23209
23210         * lib/long-options.c: Don't include closeout.h.
23211         (parse_long_options): Don't call close_stdout for --version.
23212
23213 2000-05-06  Paul Eggert  <eggert@twinsun.com>
23214
23215         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
23216         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
23217         2.1.3 bug.  This avoids a clash when files like regex.c define
23218         _GNU_SOURCE.
23219
23220 2000-05-06  Jim Meyering  <meyering@lucent.com>
23221
23222         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
23223         (AC_REPLACE_FUNCS): Add strnlen.
23224
23225         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
23226         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
23227
23228         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
23229         AC_SEARCH_LIBS call for nanosleep.
23230         (LIB_NANOSLEEP): Set and AC_SUBST.
23231
23232 2000-05-06  Jim Meyering  <meyering@lucent.com>
23233
23234         * lib/strnlen.c: Undefine __strnlen and strnlen.
23235         [!weak_alias]: Define __strnlen to strnlen.
23236
23237         * lib/atexit.c: New file, from libiberty.
23238
23239 2000-05-06  Jim Meyering  <meyering@lucent.com>
23240
23241         * lib/closeout.c (close_stdout_status): Also check for errors on the
23242         stderr stream.
23243
23244 2000-05-05  Jim Meyering  <meyering@lucent.com>
23245
23246         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
23247         AC_SEARCH_LIBS call for clock_gettime.
23248         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
23249
23250         * m4/search-libs.m4: Update from autoconf.
23251
23252         su doesn't work on Solaris 2.6.
23253         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
23254         <shadow.h>.  Reported by Dragos Harabor.
23255
23256 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
23257
23258         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
23259         memcpy instead of xmalloc, xrealloc, path_concat.
23260         (locale_charset): Treat empty environment variables as absent.
23261         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
23262
23263 2000-05-04  Jim Meyering  <meyering@lucent.com>
23264
23265         * lib/getopt.c: Update from glibc.
23266         * lib/obstack.c: Likewise.
23267         * lib/obstack.h: Likewise.
23268         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
23269         file
23270
23271         * lib/regex.h: Likewise.
23272         * lib/strndup.c: Likewise.
23273         * lib/strnlen.c: New file, from glibc.
23274
23275 2000-05-03  Jim Meyering  <meyering@lucent.com>
23276
23277         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
23278
23279 2000-05-02  Paul Eggert  <eggert@twinsun.com>
23280
23281         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
23282         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
23283         compile-time test, rather than inspecting host and OS, to
23284         decide whether to define _LARGEFILE_SOURCE.
23285
23286 2000-05-01  Jim Meyering  <meyering@lucent.com>
23287
23288         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
23289
23290         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
23291         Based on a patch from Bruno Haible.
23292
23293 2000-05-01  Jim Meyering  <meyering@lucent.com>
23294
23295         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
23296
23297 2000-04-29  Jim Meyering  <meyering@lucent.com>
23298
23299         * lib/path-concat.c: Declare strdup only if it's not defined.
23300         * lib/canon-host.c: Likewise.
23301
23302 2000-04-28  Jim Meyering  <meyering@lucent.com>
23303
23304         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
23305         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
23306         is included first, then limits.h is included by locale.h by libintl.h.
23307         From John David Anglin.
23308
23309 2000-04-25  Jim Meyering  <meyering@lucent.com>
23310
23311         * lib/makepath.c (S_IRWXUGO): Define.
23312         (make_path): Always perform explicit chmod if MODE specifies any
23313         of the `special' permission bits.  Prompted by a bug report against
23314         install from Mate Wierdl and Joost van Baal.
23315
23316 2000-04-18  Jim Meyering  <meyering@lucent.com>
23317
23318         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
23319         (jm_PREREQ): Use it.
23320
23321 2000-04-18  Jim Meyering  <meyering@lucent.com>
23322
23323         * lib/README: New file.
23324
23325         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
23326         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
23327
23328 2000-04-17  Jim Meyering  <meyering@lucent.com>
23329
23330         Get it right :-)
23331         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
23332         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
23333         Suggestion from Akim Demaille.
23334
23335 2000-04-17  Jim Meyering  <meyering@lucent.com>
23336
23337         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
23338         the definition of it to rpl_strftime also defined-away the system's
23339         declaration.
23340
23341 2000-04-15  Jim Meyering  <meyering@lucent.com>
23342
23343         Use `C' to denote so-called `contiguous' files, the same way
23344         that tar does.
23345         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
23346         (ftypelet): Use S_ISCTG.
23347         From Michael Deutschmann.
23348
23349 2000-04-14  Jim Meyering  <meyering@lucent.com>
23350
23351         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
23352         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
23353         clobbered.
23354
23355 2000-04-14  Jim Meyering  <meyering@lucent.com>
23356
23357         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
23358
23359 2000-04-13  Jim Meyering  <meyering@lucent.com>
23360
23361         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
23362         AH_VERBATIM to insert required #ifndef into config.h.in.
23363         Suggestion from Akim Demaille.
23364
23365 2000-04-12  Jim Meyering  <meyering@lucent.com>
23366
23367         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
23368         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
23369         Christian Krackowizer.
23370
23371         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
23372         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
23373         (AC_SYS_LARGEFILE): Require.
23374         (AM_C_PROTOTYPES): Require.
23375
23376 2000-04-08  Jim Meyering  <meyering@lucent.com>
23377
23378         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
23379         names don't conflict.  Reported by Eli Zaretskii.
23380
23381 2000-04-07  Jim Meyering  <meyering@lucent.com>
23382
23383         * lib/putenv.c: Move inclusion of errno.h so it follows that of
23384         sys/types.h, to work around system header problems on AIX 3.2.5.
23385         From Bruno Haible.
23386
23387 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
23388
23389         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
23390         bug.  Deal with the different error behavior of Irix iconv.
23391
23392 2000-04-05  Paul Eggert  <eggert@twinsun.com>
23393
23394         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
23395         IRIX if the installer said otherwise.
23396
23397 2000-04-05  Jim Meyering  <meyering@lucent.com>
23398
23399         Portability tweaks required for ultrix4.3.
23400         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
23401         (jm_CHECK_DECLS): Add getutent to the list of functions.
23402         (_jm_DECL_HEADERS): Add utmpx.h.
23403         From John David Anglin.
23404
23405         * m4/strftime.m4: Back out the 2000-04-02 change.
23406         Instead of that change, simply undefine putenv in the test program.
23407
23408 2000-04-05  Jim Meyering  <meyering@lucent.com>
23409
23410         Portability tweaks required for ultrix4.3.
23411         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
23412         getutent.
23413         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
23414         * lib/canon-host.c: Declare strdup.
23415         * lib/path-concat.c: Likewise.
23416         From John David Anglin.
23417
23418 2000-04-04  Jim Meyering  <meyering@lucent.com>
23419
23420         Be more DOS 8.3-friendly.
23421         * lib/ref-add.sin: Renamed from ref-add.sed.in.
23422         * lib/ref-del.sin: Renamed from ref-del.sed.in.
23423         * lib/Makefile.am: Reflect renaming.
23424         Reported by Eli Zaretskii.
23425
23426         Use a temporary file name that won't clash with `charset.alias'
23427         in the DOS 8.3 name space.
23428         * lib/Makefile.am (charset_tmp): Define.
23429         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
23430         (uninstall-local): Likewise.
23431         Reported by Eli Zaretskii.
23432
23433 2000-04-03  Jim Meyering  <meyering@lucent.com>
23434
23435         * m4/gettext.m4: Fix typo in comment.
23436
23437         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
23438         textutils/configure.in).  Suggestion from Paul Eggert.
23439         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
23440
23441 2000-04-02  Paul Eggert  <eggert@twinsun.com>
23442
23443         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
23444         variable in the shell rather than using putenv, which isn't
23445         portable.  This avoids the configure-time inter-test dependency
23446         on the potentially-renamed putenv function.
23447
23448 2000-03-30  Paul Eggert  <eggert@twinsun.com>
23449
23450         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
23451         before checking struct stat.st_blksize, so that
23452         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
23453
23454 2000-03-29  Paul Eggert  <eggert@twinsun.com>
23455
23456         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
23457         since strftime.c uses HAVE_STRFTIME to decide whether to use
23458         the underlying strftime.
23459
23460 2000-03-29  Paul Eggert  <eggert@twinsun.com>
23461
23462         * lib/time/strftime.c (my_strftime): Make sure we call the system
23463         strftime, not ourselves, when invoking the underlying strftime.
23464
23465 2000-03-24  Jim Meyering  <meyering@lucent.com>
23466
23467         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
23468         (charset_alias): Define.
23469         (install-exec-local): Factor out common code.
23470         (uninstall-local): Split lines longer than 80.
23471         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
23472         (SUFFIXES): Define.
23473         (.sed.in.sed): New rule.  Don't redirect directly to $@.
23474         (CLEANFILES): Add ref-add.sed and ref-del.sed.
23475
23476 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
23477
23478         * lib/config.charset: Output a line containing "Packages using this
23479         file".
23480         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
23481         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
23482         ref-del.sed): New rules.
23483
23484 2000-03-17  Jim Meyering  <meyering@lucent.com>
23485
23486         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
23487         Otherwise, include <strings.h>
23488
23489 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
23490
23491         * lib/unicodeio.c (utf8_wctomb): New function.
23492         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
23493         format instead of in UCS-4 with platform dependent endianness.
23494
23495 2000-03-10  Jim Meyering  <meyering@lucent.com>
23496
23497         * m4/lib-check.m4: Look for getspnam in -lgen, too.
23498         From Marco Franzen.
23499
23500 2000-03-07  Paul Eggert  <eggert@twinsun.com>
23501
23502         * lib/savedir.c (savedir): Work even if directory size is
23503         negative; this can happen with some screwy NFS configurations.
23504
23505 2000-03-06  Jim Meyering  <meyering@lucent.com>
23506
23507         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
23508         if it's NULL (because we ran out of memory).  From Bruno Haible.
23509
23510 2000-03-05  Jim Meyering  <meyering@lucent.com>
23511
23512         * lib/localcharset.c ("path-concat.h"): Include.
23513         (get_charset_aliases): Use path_concat instead of ANSI string
23514         concatenation.
23515
23516         * lib/unicodeio.h (PARAMS): Define.
23517         Use it to guard prototype.
23518
23519 2000-03-04  Jim Meyering  <meyering@lucent.com>
23520
23521         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
23522         for lib/localcharset.c.
23523
23524 2000-03-04  Jim Meyering  <meyering@lucent.com>
23525
23526         * lib/Makefile.am (install-exec-local): Create $(libdir) before
23527         installing into it.
23528         (uninstall-local): Uncomment this rule so `make distcheck' works
23529         once again.
23530
23531         * lib/unicodeio.c (<errno.h>): Include it.
23532         (errno): Declare if not defined.
23533
23534         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
23535
23536         * lib/config.charset: New version, incorporating remarks from a linux
23537         i18n mailing list.  From Bruno Haible.
23538
23539 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
23540
23541         * m4/codeset.m4: New file.
23542         * m4/iconv.m4: New file.
23543         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
23544
23545 2000-03-03  Jim Meyering  <meyering@lucent.com>
23546
23547         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
23548
23549 2000-03-02  Jim Meyering  <meyering@lucent.com>
23550
23551         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
23552         the messages come out on separate lines.
23553
23554         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
23555         rather than jm_CHECK_DECLARATIONS.
23556         * m4/decl.m4: Remove now-unused file.
23557
23558         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
23559         geteuid.
23560
23561 2000-03-02  Jim Meyering  <meyering@lucent.com>
23562
23563         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
23564
23565 2000-03-01  Jim Meyering  <meyering@lucent.com>
23566
23567         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
23568         * lib/unicodeio.c: Likewise.
23569
23570 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
23571
23572         * lib/config.charset: New file.
23573         * lib/localcharset.c: New file.
23574         * lib/unicodeio.h, lib/unicodeio.c: New files.
23575         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
23576         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
23577         (noinst_HEADERS): Add unicodeio.h.
23578         (all-local, install-exec-local, charset.alias): New targets.
23579
23580 2000-02-28  Paul Eggert  <eggert@twinsun.com>
23581
23582         * lib/quotearg.c (ALERT_CHAR): New macro.
23583         (quotearg_buffer_restyled): Use it.
23584
23585 2000-02-27  Jim Meyering  <meyering@lucent.com>
23586
23587         * m4/check-decl.m4: Add getenv to the list.
23588
23589 2000-02-27  Jim Meyering  <meyering@lucent.com>
23590
23591         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
23592         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
23593
23594         * lib/backupfile.c: Guard inclusion of stdlib.h with
23595         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
23596         Declare malloc if needed.
23597
23598         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
23599         `#ifndef HAVE_DECL..'
23600         now that autoconf always defines the HAVE_DECL_ symbols.
23601         * lib/human.c: Likewise.
23602         * lib/same.c: Likewise.
23603         * lib/strtoumax.c: Likewise.
23604
23605         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
23606         declaration check was not run.
23607         * lib/hash.c: Likewise.
23608         * lib/human.c: Likewise.
23609         * lib/same.c: Likewise.
23610         * lib/strtoumax.c: Likewise.
23611
23612         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
23613         `.', then first look up the entire `.'-containing string as a login
23614         name.
23615
23616 2000-02-23  Jim Meyering  <meyering@lucent.com>
23617
23618         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
23619         in place of my hack.
23620
23621 2000-02-18  Paul Eggert  <eggert@twinsun.com>
23622
23623         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
23624         (textint): New typedef.
23625         (parser_control): Member year changed from int to textint.
23626         All uses changed.
23627         (YYSTYPE): Removed; replaced by %union with int and textint members.
23628         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
23629         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
23630         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
23631         (tSNUMBER, tUNUMBER): Now of type <textintval>.
23632         (date, number, to_year): Use width of number in digits, not its value,
23633         to determine whether it's a 2-digit year, or a 2-digit time.
23634         (yylex): Store number of digits of numeric tokens.
23635         Reported by John Kendall.
23636
23637         (parser_control): Changed from struct parser_control to typedef (for
23638         consistency).  All uses changed.
23639
23640         (tID): Removed; not used.
23641         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
23642
23643 2000-02-14  Paul Eggert  <eggert@twinsun.com>
23644
23645         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
23646         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
23647
23648 2000-02-12  Jim Meyering  <meyering@lucent.com>
23649
23650         * lib/userspec.c (ISDIGIT): Define it.
23651         (isdigit): Remove definition.
23652         (is_number): Use ISDIGIT, not isdigit.
23653         <libintl.h>: Include.
23654         (_ and N_): Define.
23655         (parse_user_spec): Mark translatable strings.
23656
23657 2000-02-10  Jim Meyering  <meyering@lucent.com>
23658
23659         With these changes, nanosleep.[ch] are finally enough like the other
23660         lib/* replacement files to compile on a few more losing systems.
23661
23662         * lib/nanosleep.h: Don't include config.h.
23663         Remove prototype from declaration of nanosleep.
23664         (PARAMS): Remove now-unneeded definition.
23665         * lib/nanosleep.c: #undef nanosleep.
23666         (rpl_nanosleep): Rename from nanosleep.
23667
23668 2000-02-10  Jim Meyering  <meyering@lucent.com>
23669
23670         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
23671         gnu_nanosleep to rpl_nanosleep.
23672
23673 2000-02-09  Jim Meyering  <meyering@lucent.com>
23674
23675         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
23676         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
23677
23678 2000-02-08  Akim Demaille  <akim@epita.fr>
23679
23680         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
23681         `[' and `]' and remove uses of `changequote'.
23682         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
23683         (AC_SYS_LARGEFILE): Likewise.
23684         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
23685         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
23686         of changequote.
23687         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
23688         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
23689         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
23690         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
23691
23692 2000-02-05  Jim Meyering  <meyering@lucent.com>
23693
23694         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
23695         Remove explicit use of AC_HEADER_TIME.  It is required by
23696         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
23697         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
23698         in autoconf whereby the expansion of the latter ended up preceding
23699         the expansion of its prerequisite, AC_HEADER_TIME.
23700         Reported by Volker Borchert.
23701
23702 2000-02-03  Jim Meyering  <meyering@lucent.com>
23703
23704         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
23705
23706 2000-02-03  Jim Meyering  <meyering@lucent.com>
23707
23708         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
23709         rather than with `#if HAVE_UTMPNAME'.
23710
23711 2000-02-02  Jim Meyering  <meyering@lucent.com>
23712
23713         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
23714         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
23715         Reported by Eli Zaretskii.
23716
23717 2000-02-01  Jim Meyering  <meyering@lucent.com>
23718
23719         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
23720
23721 2000-01-31  Jim Meyering  <meyering@lucent.com>
23722
23723         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
23724         functions.  Add the time.h and sys/time.h headers along with the
23725         AC_REQUIRE'ment of AC_HEADER_TIME.
23726
23727 2000-01-31  Jim Meyering  <meyering@lucent.com>
23728
23729         * lib/nanosleep.h (nanosleep): Guard declaration with
23730         `#if ! HAVE_DECL_NANOSLEEP'.
23731         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
23732         the declaration in that vendor's sys/timers.h.
23733         Reported by Christian Krackowizer.
23734
23735         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
23736         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
23737         (ISPRINT): Likewise.
23738         Reported by Tom Tromey.
23739
23740 2000-01-30  Jim Meyering  <meyering@lucent.com>
23741
23742         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
23743
23744         * m4/prereq.m4 (utmp_includes): Define.
23745         Check for ut_user and ut_name members in both struct utmpx
23746         and struct utmp.
23747
23748 2000-01-30  Jim Meyering  <meyering@lucent.com>
23749
23750         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
23751         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
23752         header files where only utmpx.ut_user is declared.
23753
23754         * lib/readutmp.h (UT_USER): Define.
23755
23756 2000-01-29  Jim Meyering  <meyering@lucent.com>
23757
23758         * m4/lib-check.m4: New file containing library-related checks from
23759         fileutils and sh-utils (textutils had none).
23760
23761 2000-01-28  Jim Meyering  <meyering@lucent.com>
23762
23763         * m4/perl.m4: Change format of warning message to look more like that
23764         from the missing script.  Suggestion from François Pinard.
23765
23766 2000-01-25  Jim Meyering  <meyering@lucent.com>
23767
23768         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
23769         well as time.h in the compile check.
23770         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
23771         Fix typo in cross-compiling case: s/yes/no/.
23772
23773 2000-01-23  Jim Meyering  <meyering@lucent.com>
23774
23775         * m4/jm-macros.m4: Move df-related tests here from
23776         fileutils/configure.in
23777
23778         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
23779         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
23780
23781         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
23782         s/space/ac_fsusage_space/.
23783         (jm_FILE_SYSTEM_USAGE): Take two parameters.
23784
23785         * m4/ftruncate.m4: New file (derived from part of
23786         fileutils/configure.in).
23787         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
23788         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
23789
23790         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
23791         AC_SUBST these here, rather than just in sh-util/configure.in, so
23792         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
23793         all the same.
23794         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
23795         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
23796         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
23797         (AC_SUBST(POW_LIBM)): Likewise.
23798         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
23799
23800 2000-01-23  Jim Meyering  <meyering@lucent.com>
23801
23802         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
23803         obstack.c.
23804
23805 2000-01-22  Jim Meyering  <meyering@lucent.com>
23806
23807         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
23808
23809         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
23810
23811         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
23812         configure.in
23813         (AC_CHECK_HEADERS): Likewise for sh-utils.
23814         (AC_CHECK_HEADERS): Likewise for textutils.
23815         Merge the three lists of headers.
23816
23817         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
23818         from fileutils' configure.in.
23819
23820         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
23821         code. Moved tests into their own function (_jm_DECL_HEADERS) in
23822         check-decl.m4.
23823
23824         * m4/check-decl.m4: Use #if rather than #ifdef.
23825         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
23826         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
23827         (_jm_DECL_HEADERS): Define new function.
23828         (jm_CHECK_DECLARATIONS): Require it.
23829
23830 2000-01-22  Jim Meyering  <meyering@lucent.com>
23831
23832         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
23833         [! HAVE_DECL_STRTOULL]: Declare strtoull.
23834         Required for some AIX systems.  Reported by Christian Krackowizer.
23835         [TESTING] (main): New function.
23836
23837         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
23838         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
23839         letters.
23840
23841         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
23842         iswprint.
23843
23844         * lib/strverscmp.c (ISDIGIT): Define.
23845         (strverscmp): Use ISDIGIT, not isdigit.
23846
23847 2000-01-19  Jim Meyering  <meyering@lucent.com>
23848
23849         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
23850         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
23851         defines `struct timespec' in <sys/time.h>
23852
23853         * m4/c-bs-a.m4: Remove uses of changequote altogether.
23854         Thanks to Akim for explaining.
23855
23856 2000-01-17  Paul Eggert  <eggert@twinsun.com>
23857
23858         * lib/nanosleep.c (nanosleep):
23859         Don't use SA_INTERRUPT to decide whether to call sigaction, as
23860         POSIX.1 doesn't require SA_INTERRUPT and some systems
23861         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
23862         it's been part of POSIX.1 since day 1 (in 1988).
23863
23864 2000-01-17  Jim Meyering  <meyering@lucent.com>
23865
23866         * lib/interlock: Remove unused file.  Reported by François Pinard.
23867
23868 2000-01-16  Paul Eggert  <eggert@twinsun.com>
23869
23870         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
23871         alert, backslash, formfeed, and vertical tab unnecessarily in
23872         shell quoting style.
23873
23874 2000-01-16  Jim Meyering  <meyering@lucent.com>
23875
23876         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
23877         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
23878         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
23879         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
23880
23881 2000-01-16  Jim Meyering  <meyering@lucent.com>
23882
23883         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
23884         because the latter didn't work.
23885
23886 2000-01-15  Jim Meyering  <meyering@lucent.com>
23887
23888         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
23889         (AC_REPLACE_FUNCS): Add memcpy and memset.
23890         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
23891         Add strpbrk.
23892         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
23893
23894 2000-01-12  Jim Meyering  <meyering@lucent.com>
23895
23896         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
23897         (jm_PREREQ): Use it.
23898         (jm_PREREQ_READUTMP): New macro.
23899         (jm_PREREQ): Use it.
23900
23901 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23902
23903         Quote multibyte characters correctly.
23904         * m4/c-bs-a.m4: New file.
23905         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
23906         (jm_PREREQ): Use it.
23907
23908 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23909
23910         * m4/uintmax_t.m4: Port to autoconf 2.13.
23911
23912 2000-01-08  Jim Meyering  <meyering@ascend.com>
23913
23914         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
23915         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
23916
23917 2000-01-04  Jim Meyering  <meyering@ascend.com>
23918
23919         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
23920         jm_STRUCT_DIRENT_D_TYPE.
23921         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
23922         jm_STRUCT_DIRENT_D_INO.
23923         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
23924         jm_STRUCT_UTIMBUF.
23925         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
23926         renamings.
23927         * m4/utime.m4: Likewise.
23928
23929         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
23930         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
23931
23932 2000-01-03  Paul Eggert  <eggert@twinsun.com>
23933
23934         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
23935         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
23936
23937 2000-01-02  Jim Meyering  <meyering@ascend.com>
23938
23939         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
23940         remember if this is necessary.
23941
23942 1999-12-26  Jim Meyering  <meyering@ascend.com>
23943
23944         * m4/jm-macros.m4: Use it here.
23945         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
23946
23947 1999-12-23  Jim Meyering  <meyering@ascend.com>
23948
23949         * m4/jm-macros.m4: Check for clock_gettime (moved from
23950         fileutils/configure.in)
23951         Check for gettimeofday.
23952
23953 1999-12-20  Jim Meyering  <meyering@ascend.com>
23954
23955         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
23956         autoconf-2.14a-1999-12-20.
23957
23958 1999-12-19  Jim Meyering  <meyering@ascend.com>
23959
23960         * m4/lstat-slash.m4: New file.
23961         * m4/jm-macros.m4: Use the new macro:
23962         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23963
23964 1999-12-07  Jim Meyering  <meyering@ascend.com>
23965
23966         * m4/perl.m4: Require that File::Compare be available, too.
23967         Too many systems seem to lack it.
23968
23969         * m4/strftime.m4: Add checks for most of the cpp macros tested in
23970         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
23971
23972 1999-11-18  Paul Eggert  <eggert@twinsun.com>
23973
23974         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
23975         problem with the QNX 4.25 shell, which doesn't propagate exit
23976         status of failed commands inside shell assignments.
23977
23978 1999-11-17  Jim Meyering  <meyering@ascend.com>
23979
23980         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
23981
23982 1999-11-07  Jim Meyering  <meyering@ascend.com>
23983
23984         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
23985
23986 1999-11-06  Jim Meyering  <meyering@ascend.com>
23987
23988         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
23989         * m4/jm-macros.m4 (jm_MACROS): Use it here.
23990
23991 1999-11-05  Jim Meyering  <meyering@ascend.com>
23992
23993         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
23994         configure.in of textutils, fileutils, and sh-utils into this one
23995         (shared between those packages) file.
23996         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
23997         AC_STRUCT_ST_BLKSIZE.
23998
23999 1999-11-03  Jim Meyering  <meyering@ascend.com>
24000
24001         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
24002         of AC_CHECK_TYPE checks includes unistd.h.
24003         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
24004         Suggestion from Akim Demaille.
24005
24006 1999-10-30  Jim Meyering  <meyering@ascend.com>
24007
24008         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
24009         m4-quoted string.
24010         * m4/ls-mntd-fs.m4: Likewise.
24011         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
24012         * m4/jm-winsz1.m4: Likewise.
24013
24014         * m4/const.m4: Remove file, since the fix made it into the experimental
24015         version of autoconf.
24016         * m4/mktime.m4: Likewise.
24017
24018         * m4/check-type.m4: Remove file, now that the latest version of
24019         AC_CHECK_TYPE takes a third arg to specify additional #includes.
24020
24021         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
24022         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
24023         AC_CHECK_TYPE.
24024
24025 1999-10-04  Jim Meyering  <meyering@ascend.com>
24026
24027         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
24028
24029 1999-09-22  Paul Eggert  <eggert@twinsun.com>
24030
24031         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
24032         2.95.1 bug with HP-UX 10.20.
24033
24034 1999-09-17  Jim Meyering  <meyering@ascend.com>
24035
24036         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
24037         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
24038         due to missing strdup (against sh-utils-2.0).
24039
24040 1999-08-29  Jim Meyering  <meyering@ascend.com>
24041
24042         * m4/jm-macros.m4: Require jm_BISON.
24043         * m4/bison.m4: New file.
24044
24045 1999-08-17  Paul Eggert  <eggert@twinsun.com>
24046
24047         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
24048         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
24049
24050 1999-08-05  Jim Meyering  <meyering@ascend.com>
24051
24052         * m4/getline.m4: Rename test file from conftestdata to conftest.data
24053         to avoid conflicts with `conftest' on 8+3 filesystems.
24054         Suggestion from Eli Zaretskii.
24055
24056 1999-08-04  Jim Meyering  <meyering@ascend.com>
24057
24058         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
24059         fileutils and sh-utils (textutils's getline test was inadequate).
24060         (AM_FUNC_GETLINE): Run this test.
24061         (AC_CHECK_FUNCS): Check for getdelim.
24062         Reported by Bob Proulx.
24063
24064 1999-08-02  Jim Meyering  <meyering@ascend.com>
24065
24066         * m4/jm-macros.m4: Add a comment.
24067
24068 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24069
24070         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
24071         <inttypes.h> defines strtoumax as a macro (and not as a
24072         function).
24073
24074 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24075
24076         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
24077         that we can shift, multiply and divide unsigned long long
24078         values; Ultrix cc can't do it.
24079
24080 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24081
24082         * m4/mktime.m4: New file, which is a preview of what should appear
24083         in the next public autoconf release.
24084
24085 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24086
24087         * m4/lfs.m4: Remove this file.
24088         * m4/largefile.m4: New file.  It contains the old contents of
24089         lfs.m4, except that all names with prefix AC_LFS have been
24090         changed to use the prefix AC_SYS_LARGEFILE instead, to be
24091         compatible with future autoconf versions.  Also, some minor m4
24092         quoting problems have been fixed.
24093
24094 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24095
24096         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
24097         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
24098         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
24099         and simplify the shell code.
24100
24101 1999-08-01  Jim Meyering  <meyering@ascend.com>
24102
24103         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
24104         m4.
24105
24106 1999-07-20  Jim Meyering  <meyering@ascend.com>
24107
24108         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
24109
24110 1999-07-15  Jim Meyering  <meyering@ascend.com>
24111
24112         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
24113
24114 1999-05-22  Jim Meyering  <meyering@ascend.com>
24115
24116         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
24117
24118 1999-05-20  Jim Meyering  <meyering@ascend.com>
24119
24120         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
24121         Add a colon after each `then' in case $4 is empty.
24122
24123 1999-05-16  Jim Meyering  <meyering@ascend.com>
24124
24125         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
24126
24127 1999-05-10  Jim Meyering  <meyering@ascend.com>
24128
24129         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
24130
24131         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
24132         AC_FUNC_MKTIME.
24133
24134 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
24135
24136         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
24137
24138 1999-05-04  Paul Eggert  <eggert@twinsun.com>
24139
24140         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
24141         not CPPFLAGS, so that linking works correctly in IRIX.
24142
24143 1999-04-30  Paul Eggert  <eggert@twinsun.com>
24144
24145         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
24146
24147 1999-04-20  Paul Eggert  <eggert@twinsun.com>
24148
24149         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
24150         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
24151         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
24152         jm_AC_TYPE_UNSIGNED_LONG_LONG.
24153         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
24154
24155         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
24156
24157 1999-04-20  Jim Meyering  <meyering@ascend.com>
24158
24159         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
24160         AC_REPLACE xstroull if necessary.  From Paul Eggert.
24161         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
24162
24163 1999-04-18  Jim Meyering  <meyering@ascend.com>
24164
24165         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
24166         * m4/jm-macros.m4: Use it.
24167
24168 1999-04-06  Jim Meyering  <meyering@ascend.com>
24169
24170         * m4/strftime.m4: Remove test for %f.
24171
24172 1999-03-29  Jim Meyering  <meyering@ascend.com>
24173
24174         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
24175         superset of the AC_TYPE_* checks in the textutils, fileutils,
24176         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
24177         AC_TYPE_PID_T.
24178
24179 1999-03-28  Jim Meyering  <meyering@ascend.com>
24180
24181         * m4/jm-macros.m4: Define GNU_PACKAGE here.
24182         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
24183         replaced e.g., in the *.sh files of the sh-utils.
24184
24185 1999-03-20  Jim Meyering  <meyering@ascend.com>
24186
24187         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
24188         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
24189         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
24190
24191 1999-03-19  Jim Meyering  <meyering@ascend.com>
24192
24193         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
24194
24195 1999-03-12  Jim Meyering  <meyering@ascend.com>
24196
24197         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
24198
24199 1999-03-07  Jim Meyering  <meyering@ascend.com>
24200
24201         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
24202         declared.
24203
24204 1999-02-17  Jim Meyering  <meyering@ascend.com>
24205
24206         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
24207         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
24208
24209 1999-02-07  Jim Meyering  <meyering@ascend.com>
24210
24211         * m4/group-member.m4: New file -- extracted from sh-utils'
24212         configure.in.
24213
24214         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
24215         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
24216
24217 1999-02-06  Jim Meyering  <meyering@ascend.com>
24218
24219         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
24220         * m4/fnmatch.m4: Likewise.
24221         * m4/getgroups.m4: Likewise.
24222         * m4/lstat.m4: Likewise.
24223         * m4/malloc.m4: Likewise.
24224         * m4/putenv.m4: Likewise.
24225         * m4/realloc.m4: Likewise.
24226         * m4/regex.m4: Likewise.
24227         * m4/stat.m4: Likewise.
24228         * m4/strftime.m4: Likewise.
24229         Suggestion from Alain Magloire.
24230
24231         * m4/chown.m4: Use `.$ac_objext', not `.o'.
24232         * m4/fnmatch.m4: Likewise.
24233         * m4/getgroups.m4: Likewise.
24234         * m4/getline.m4: Likewise.
24235         * m4/lstat.m4: Likewise.
24236         * m4/malloc.m4: Likewise.
24237         * m4/memcmp.m4: Likewise.
24238         * m4/putenv.m4: Likewise.
24239         * m4/realloc.m4: Likewise.
24240         * m4/regex.m4: Likewise.
24241         * m4/stat.m4: Likewise.
24242         * m4/strftime.m4: Likewise.
24243         Suggestion from Alain Magloire.
24244
24245         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
24246         an argument.
24247
24248         * m4/regex.m4: Add a run-time Test for proper operation of
24249         re_compile_pattern.
24250
24251 1999-01-31  Jim Meyering  <meyering@ascend.com>
24252
24253         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
24254
24255 1999-01-30  Jim Meyering  <meyering@ascend.com>
24256
24257         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
24258
24259         * m4/jm-mktime.m4: Make this a wrapper around the official
24260         AM_FUNC_MKTIME rather than my private copy, now that the official one
24261         is up to date.
24262         * m4/mktime.m4: Remove file.
24263
24264         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
24265         * m4/uptime.m4: Likewise.
24266         * m4/uintmax_t.m4: Likewise.
24267
24268 1999-01-28  Jim Meyering  <meyering@ascend.com>
24269
24270         * m4/jm-macros.m4: Use jm_AFS.
24271         * m4/afs.m4: New file (from fileutils' configure.in).
24272
24273         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
24274         * m4/chown.m4: Likewise.
24275         * m4/d-ino.m4: Likewise.
24276         * m4/d-type.m4: Likewise.
24277         * m4/fnmatch.m4: Likewise.
24278         * m4/getgroups.m4: Likewise.
24279         * m4/gettext.m4: Likewise.
24280         * m4/jm-mktime.m4: Likewise.
24281         * m4/jm-winsz2.m4: Likewise.
24282         * m4/lcmessage.m4: Likewise.
24283         * m4/ls-mntd-fs.m4: Likewise.
24284         * m4/malloc.m4: Likewise.
24285         * m4/memcmp.m4: Likewise.
24286         * m4/putenv.m4: Likewise.
24287         * m4/realloc.m4: Likewise.
24288         * m4/st_mtim.m4: Likewise.
24289         * m4/strftime.m4: Likewise.
24290
24291 1999-01-16  Jim Meyering  <meyering@ascend.com>
24292
24293         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
24294         (ARGMATCH_DIE_DECL): Define.
24295
24296 1999-01-12  Jim Meyering  <meyering@ascend.com>
24297
24298         * m4/Makefile.am.in: Rewrite to avoid using fmt.
24299         Reported by Lars Hecking.
24300
24301 1999-01-10  Jim Meyering  <meyering@ascend.com>
24302
24303         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
24304         gross kludge.
24305         * m4/inttypes_h.m4: Likewise.
24306         * m4/lstat.m4: Likewise.
24307         * m4/malloc.m4: Likewise.
24308         * m4/readdir.m4: Likewise.
24309         * m4/realloc.m4: Likewise.
24310         * m4/st_dm_mode.m4: Likewise.
24311         * m4/stat.m4: Likewise.
24312         * m4/utimbuf.m4: Likewise.
24313         * m4/utimes.m4: Likewise.
24314
24315         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
24316         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
24317         comments in config.h.in are meaningful.
24318
24319         * m4/jm-macros.m4: Require autoconf-2.13 here.
24320
24321         * m4/regex.m4: By default, don't use the included regex.c on systems
24322         with glibc 2.  Suggestion from Uli Drepper.
24323
24324 1999-01-02  Jim Meyering  <meyering@ascend.com>
24325
24326         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
24327
24328 1998-12-18  Jim Meyering  <meyering@ascend.com>
24329
24330         * m4/Makefile.am.in (Makefile.am): Simplify rule.
24331         Based on a suggestion from Lars Hecking.
24332
24333 1998-11-16  Paul Eggert  <eggert@twinsun.com>
24334
24335         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
24336
24337 1998-11-16  Jim Meyering  <meyering@ascend.com>
24338
24339         * m4/lfs.m4: Double-quote the `uname...` expression.
24340
24341 1998-11-14  Jim Meyering  <meyering@ascend.com>
24342
24343         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
24344         * m4/stat.m4: Likewise.
24345
24346 1998-11-03  Jim Meyering  <meyering@ascend.com>
24347
24348         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
24349         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
24350
24351 1998-10-18  Jim Meyering  <meyering@ascend.com>
24352
24353         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
24354
24355 1998-10-17  Jim Meyering  <meyering@ascend.com>
24356
24357         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
24358         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
24359         calls for those previously hard-coded headers.  Instead, take a new
24360         parameter.
24361         (jm_CHECK_DECLARATIONS): Reflect interface change.
24362         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
24363         (jm_CHECK_DECL_LOCALTIME_R): New macro.
24364
24365         * m4/mktime.m4: Test for spring-forward gap before long-running test.
24366
24367 1998-10-14  Jim Meyering  <meyering@ascend.com>
24368
24369         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
24370         instead of "TZ=America/Vancouver".  From Paul Eggert.
24371
24372 1998-10-11  Jim Meyering  <meyering@ascend.com>
24373
24374         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
24375         This adds a test for a recently added compatibility fix for mktime.c.
24376         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
24377
24378 1998-09-27  Jim Meyering  <meyering@ascend.com>
24379
24380         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
24381
24382         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
24383         ../configure.in, including a change from Gordon Matzigkeit to allow
24384         cross-compiling for the Hurd.
24385
24386         * m4/glibc.m4: New file/macro to test for the GNU C Library
24387         versions 1 and 2.  From Gordon Matzigkeit.
24388         Indent.
24389
24390 1998-09-21  Jim Meyering  <meyering@ascend.com>
24391
24392         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
24393
24394 1998-08-18  Paul Eggert  <eggert@twinsun.com>
24395
24396         Port nanosecond-resolution times to UnixWare 2.1.2 and
24397         pedantic Solaris 2.6.
24398
24399         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
24400         AC_STRUCT_ST_MTIM.
24401         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
24402         Generate name of ns member, instead of just 1 or undef.
24403         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
24404
24405 1998-08-15  Jim Meyering  <meyering@ascend.com>
24406
24407         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
24408         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
24409         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
24410         instead of jm_TYPE_SSIZE_T.
24411
24412 1998-08-12  Jim Meyering  <meyering@ascend.com>
24413
24414         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
24415
24416 1998-08-02  Jim Meyering  <meyering@ascend.com>
24417
24418         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
24419         in acconfig.h manually.
24420
24421 1998-07-31  Paul Eggert  <eggert@twinsun.com>
24422
24423         * m4/st_mtim.m4: New file.
24424
24425 1998-07-28  Jim Meyering  <meyering@ascend.com>
24426
24427         * m4/utimes.m4: Undef stat.
24428
24429 1998-07-25  Jim Meyering  <meyering@ascend.com>
24430
24431         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
24432         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
24433
24434 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
24435
24436         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
24437         uid and gid actually remain unchanged.
24438
24439 1998-07-07  Jim Meyering  <meyering@ascend.com>
24440
24441         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
24442
24443 1998-07-04  Jim Meyering  <meyering@ascend.com>
24444
24445         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
24446         to prove that this macro can be used in packages without regex.c.
24447
24448 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
24449
24450         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
24451         is to be used.
24452
24453 1998-07-03  Jim Meyering  <meyering@ascend.com>
24454
24455         * m4/gettext.m4: Add -lintl if it's found to be necessary.
24456
24457         * m4/gettext.m4: New file -- from gettext-0.10.35.
24458         * m4/lcmessage.m4: Likewise.
24459         * m4/progtest.m4: Likewise.
24460
24461         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
24462         * m4/jm-macros.m4: Require the new macro.
24463
24464 1998-06-29  Jim Meyering  <meyering@ascend.com>
24465
24466         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
24467         for the definition of NGROUPS (used in a system header included
24468         by sys/mount.h).
24469
24470 1998-06-28  Jim Meyering  <meyering@ascend.com>
24471
24472         * m4/ls-mntd-fs.m4: New file.
24473         * m4/fstypename.m4: New file.
24474
24475         * m4/jm-macros.m4: Require the new macro.
24476         * m4/jm-glibc-io.m4: New file.
24477
24478 1998-05-19  Jim Meyering  <meyering@ascend.com>
24479
24480         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
24481         * m4/lchown.m4: New file.
24482
24483         * m4/Makefile.am.in: New file.
24484         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
24485
24486 1998-05-14  Jim Meyering  <meyering@ascend.com>
24487
24488         * m4/Makefile.am (EXTRA_DIST): Add them.
24489         * m4/jm-macros.m4: New file.
24490         * m4/utimbuf.m4: New file.
24491
24492 1998-05-12  Jim Meyering  <meyering@ascend.com>
24493
24494         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
24495
24496 1998-05-11  Jim Meyering  <meyering@ascend.com>
24497
24498         * m4/isc-posix.m4: New file.
24499
24500 1998-05-10  Jim Meyering  <meyering@ascend.com>
24501
24502         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
24503
24504 1998-05-09  Jim Meyering  <meyering@ascend.com>
24505
24506         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
24507         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
24508         with automake.
24509
24510         * m4/ssize_t.m4: New file.
24511         * m4/mktime.m4: Remove file -- the new automake has this now.
24512
24513 1998-04-26  Jim Meyering  <meyering@ascend.com>
24514
24515         * m4/assert.m4: New file.
24516         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
24517
24518 1998-04-05  Jim Meyering  <meyering@ascend.com>
24519
24520         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
24521         (jm_PREREQ): Use it here.
24522
24523 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
24524
24525         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
24526         in acconfig.h.
24527
24528 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
24529
24530         * m4/prereq.m4: New file.
24531         * m4/error.m4: New file.
24532         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
24533
24534 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
24535
24536         * m4/getline.m4: Don't set am_cv_func_working_getline before the
24537         cache-check for the same variable -- that defeated the purpose of
24538         the test; the test program was never run.  This was a problem only
24539         on systems with losing getline functions -- HP-UX 10.20 is one.
24540         Reported by Bjorn Helgaas.
24541
24542 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
24543
24544         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
24545
24546 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
24547
24548         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
24549
24550         * m4/const.m4: New file.  Use an initializer in this declaration
24551         typedef int charset[2]; const charset x;
24552         Reported by Bob Glickstein.
24553
24554 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
24555
24556         * m4/chown.m4: Fix reversed types on -1 args to chown.
24557         From Kaveh Ghazi.
24558
24559 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
24560
24561         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
24562         Add lseek and memchr.
24563
24564         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
24565         T.E.Dickey <dickey@clark.net> said that some older preprocessors
24566         have a 20-character limit on names.
24567
24568 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
24569
24570         * m4/inttypes_h.m4: New file.
24571         * m4/uintmax_t.m4: New file.
24572         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
24573
24574 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
24575   Free Software Foundation, Inc.
24576 Copying and distribution of this file, with or without modification,
24577 are permitted provided the copyright notice and this notice are preserved.