ea99ee0f015a937d8a27a6169b2445b30839f910
[gnulib.git] / ChangeLog
1 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2
3         * gnulib-tool (func_import): Fix typo in actioncmd.
4
5 2006-11-02  Bruno Haible  <bruno@clisp.org>
6
7         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
8         newline sequence in the Makefile.am snippet as a space, like "make"
9         does.
10         Reported by Roger Persson <perrog@gmail.com>.
11
12 2006-11-01  Bruno Haible  <bruno@clisp.org>
13
14         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
15         already declared in <string.h>.
16         * lib/strcase.h (strncasecmp): Don't declare it if yes.
17
18 2006-11-01  Bruno Haible  <bruno@clisp.org>
19
20         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
21         * lib/strcase.h: Include <string.h>.
22         (strcasecmp): Define to rpl_strcasecmp here.
23
24 2006-11-01  Bruno Haible  <bruno@clisp.org>
25
26         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
27
28 2006-11-01  Eric Blake  <ebb9@byu.net>
29
30         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
31
32         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
33
34 2006-10-29  Bruno Haible  <bruno@clisp.org>
35
36         Make it compile in C++ mode.
37         * lib/full-write.c (full_rw): Add a cast.
38
39 2006-11-01  Bruno Haible  <bruno@clisp.org>
40
41         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
42         be POSIX compliant.
43         Reported by Roger Persson <perrog@gmail.com>.
44
45 2006-11-01  Eric Blake  <ebb9@byu.net>
46
47         * lib/getopt_.h: Fix comments.
48
49 2006-10-31  Eric Blake  <ebb9@byu.net>
50
51         * modules/tmpdir (Depends-on): Add sys_stat.
52         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
53         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
54         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
55         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
56         tempname.
57
58 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
59
60         Avoid some C++ diagnostics reported by Bruno Haible.
61         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
62         xmalloc.
63         (quotearg_alloc): Use xcharalloc rather than xmalloc.
64         (struct slotvec): Move to top level.
65         (quotearg_n_options): Rewrite to avoid xmalloc.
66         * lib/xalloc.h (xcharalloc): New function.
67         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
68         [defined __cplusplus]: Add function template that provides result
69         type propagation.  This part of the change is from Bruno Haible.
70
71 2006-10-29  Bruno Haible  <bruno@clisp.org>
72
73         Make it compile in C++ mode.
74         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
75         * lib/strnlen1.c (strnlen1): Cast memchr result.
76         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
77         * lib/clean-temp.c (string_equals, string_hash): Add casts.
78         (create_temp_dir): Rename local variable 'template'.
79         (compile_csharp_using_sscli): Add cast.
80         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
81         * lib/findprog.c (find_in_path): Likewise.
82         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
83         * lib/wait-process.c (register_slave_subprocess): Likewise.
84
85 2006-10-22  Bruno Haible  <bruno@clisp.org>
86
87         * modules/tsearch: New file.
88         * lib/tsearch.h: New file.
89         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
90         * m4/tsearch.m4: New file.
91         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
92
93 2006-10-29  Eric Blake  <ebb9@byu.net>
94
95         * lib/arcfour.c: Assume config.h.
96         * lib/arctwo.c: Likewise.
97         * lib/base64.c: Likewise.
98         * lib/check-version.c: Likewise.
99         * lib/crc.c: Likewise.
100         * lib/des.c: Likewise.
101         * lib/gc-gnulib.c: Likewise.
102         * lib/gc-libgcrypt.c: Likewise.
103         * lib/gc-pbkdf2-sha1.c: Likewise.
104         * lib/getaddrinfo.c: Likewise.
105         * lib/getdelim.c: Likewise.
106         * lib/getline.c: Likewise.
107         * lib/hmac-md5.c: Likewise.
108         * lib/hmac-sha1.c: Likewise.
109         * lib/iconvme.c: Likewise.
110         * lib/md2.c: Likewise.
111         * lib/md4.c: Likewise.
112         * lib/memxor.c: Likewise.
113         * lib/read-file.c: Likewise.
114         * lib/readline.c: Likewise.
115         * lib/rijndael-alg-fst.c: Likewise.
116         * lib/rijndael-api-fst.c: Likewise.
117         * lib/xgetdomainname.c: Likewise.
118
119 2006-10-28  Eric Blake  <ebb9@byu.net>
120
121         * lib/xstrndup.c: Assume config.h.
122
123 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
124
125         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
126         stat-macros.h is now for our own macros, whereas stat_h is for
127         macros in the <sys/stat.h> name space.
128         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
129         (STAT_MACROS_H): Remove.
130         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
131         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
132         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
133         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
134         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
135         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
136         Move these macros to ...
137         * lib/stat_.h: here.  Don't include stat-macros.h.
138         * lib/canonicalize.c: Don't include stat-macros.h.
139         * lib/chown.c: Likewise.
140         * lib/euidaccess.c: Likewise.
141         * lib/file-type.c: Likewise.
142         * lib/filemode.c: Likewise.
143         * lib/glob.c: Likewise.
144         * lib/isapipe.c: Likewise.
145         * lib/lchown.c: Likewise.
146         * lib/lstat.c: Likewise.
147         * lib/mkdir-p.c: Likewise.
148         * lib/rmdir.c: Likewise.
149         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
150         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
151         unless mkdir isn't declared, to speed up 'configure'.
152         Always create sys/stat.h, since it's unlikely any real sys/stat.h
153         would define all the S_* symbols.
154         * modules/canonicalize (Depends-on):
155         Depend on sys_stat, not stat-macros.
156         * modules/chown: Likewise.
157         * modules/euidaccess: Likewise.
158         * modules/filemode: Likewise.
159         * modules/file-type: Likewise.
160         * modules/glob: Likewise.
161         * modules/isapipe: Likewise.
162         * modules/lchown: Likewise.
163         * modules/lstat: Likewise.
164         * modules/mkancesdirs: Likewise.
165         * modules/rmdir: Likewise.
166         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
167         * modules/modechange: Likewise.
168         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
169         (configure.ac): Remove gl_STAT_MACROS.
170         * modules/sys_stat (Depends-on): Remove stat-macros.
171
172 2006-10-27  Bruno Haible  <bruno@clisp.org>
173
174         * m4/signed.m4: Remove file.
175         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
176         invocation.
177         * modules/vasnprintf (Files): Remove m4/signed.m4.
178
179 2006-10-27  Bruno Haible  <bruno@clisp.org>
180
181         Update to GNU gettext 0.16.
182         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
183         m4/inttypes-h.m4, m4/signed.m4.
184         * m4/gettext.m4: Update to GNU gettext 0.16.
185         * m4/intl.m4: New file, from GNU gettext.
186         * m4/intldir.m4: New file, from GNU gettext.
187         * config/srclist.txt: Update
188
189 2006-10-27  Eric Blake  <ebb9@byu.net>
190
191         * MODULES.html.sh: Document tempname.
192         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
193         dependencies.
194         (Files): Move lib/tempname.c...
195         * modules/tempname: ...to this new module.
196         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
197         (gl_PREREQ_TEMPNAME): Move...
198         * m4/tempname.m4: ...to this new file.
199         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
200         * modules/sys_stat (Depends-on): Add stat-macros.
201         * lib/stat_.h (includes): Pick up stat macros.
202         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
203         if stat macros are broken.
204         * lib/tempname.c (includes): No need to include "stat-macros.h".
205         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
206         (direxists, __path_search) [!_LIBC]: Don't compile these in
207         gnulib; the tmpdir module covers that.
208         * lib/tempname.h: New file.
209
210 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
211
212         * COPYING: Explain how gnulib-tool converts licence headers.
213         Almost all wording by Eric Blake.
214
215 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
216
217         * lib/mbchar.h (is_basic_table): Make read-only.
218         * lib/mbchar.c (is_basic_table): Likewise.
219         Reported by John Darrington.
220
221 2006-10-25  Bruno Haible  <bruno@clisp.org>
222
223         * lib/progname.h (set_program_name): Undefine before defining.
224
225 2006-10-25  Bruno Haible  <bruno@clisp.org>
226
227         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
228         false for non-gcc C++ compilers.
229         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
230
231 2006-10-24  Bruno Haible  <bruno@clisp.org>
232
233         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
234         iconv implementations like Irix iconv.
235
236 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
237
238         * modules/vararrays: New file.
239         * m4/vararrays.m4: New file, taken from diffutils.
240         * MODULES.html.sh: New module vararrays.
241
242 2006-10-24  Karl Berry  <karl@gnu.org>
243
244         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
245         Don't call GNU Unix.
246
247 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
248
249         * users.txt: Add Libtool.
250
251         Sync from Libtool:
252
253         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
254
255         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
256         to gnulib's policy of including config.h unconditionally.
257
258 2006-10-24  Bruno Haible  <bruno@clisp.org>
259
260         * modules/wcwidth (Files): Add m4/wint_t.m4.
261         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
262         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
263
264 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
265
266         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
267         to pacify GCC with some -W flags enabled.  Problem reported by
268         Bruno Haible.
269
270 2006-10-24  Jim Meyering  <jim@meyering.net>
271
272         * MODULES.html.sh: Remove uinttostr.  It's not a module.
273         Reported by Karl Berry.
274
275 2006-10-23  Bruno Haible  <bruno@clisp.org>
276
277         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
278
279 2006-10-24  Bruno Haible  <bruno@clisp.org>
280
281         * lib/gl_list.h: Use C comment style, not C++ comment style.
282
283 2006-10-23  Eric Blake  <ebb9@byu.net>
284
285         * lib/getaddrinfo.c (includes): Add missing include.
286
287 2006-10-23  Bruno Haible  <bruno@clisp.org>
288             Paul Eggert  <eggert@cs.ucla.edu>
289
290         Ability to rename obstack_free.
291         * lib/obstack.h (__obstack_free): New macro. Declare instead of
292         obstack_free.
293         (obstack_free): Invoke the __obstack_free macro.
294         * lib/obstack.c (obstack_free): Use __obstack_free macro.
295
296 2006-10-23  Bruno Haible  <bruno@clisp.org>
297             Paul Eggert  <eggert@cs.ucla.edu>
298
299         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
300         __argc, __argv from the declaration. (They are defined as macros on
301         mingw.)
302
303 2006-10-22  Bruno Haible  <bruno@clisp.org>
304
305         * doc/gnulib-intro.texi: New file.
306         * doc/gnulib.texi: Include it.
307
308 2006-10-21  Bruno Haible  <bruno@clisp.org>
309
310         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
311         "Introduction", "Miscellanous Notes", "Particular Modules".
312
313 2006-10-21  Bruno Haible  <bruno@clisp.org>
314
315         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
316         Change mostlyclean-local rule to avoid sh syntax error from bash
317         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
318
319 2006-10-23  Jim Meyering  <jim@meyering.net>
320
321         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
322         in place of snprintf.
323
324         * modules/inttostr (Files): Add lib/uinttostr.c.
325         * lib/uinttostr.c (inttostr): New file/function.
326         * lib/inttostr.h (uinttostr): Declare.
327         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
328         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
329         Add uinttostr.
330         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
331
332 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
333
334         * lib/canonicalize.c (ELOOP): Define if not already defined.
335         Problem reported by Bruno Haible in
336         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
337
338 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
339
340         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
341         Problem reported by Perry Smith and Ville Laurikari.
342
343         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
344         uses.
345
346 2006-10-19  Bruno Haible  <bruno@clisp.org>
347
348         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
349         for mingw.
350
351 2006-10-19  Bruno Haible  <bruno@clisp.org>
352
353         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
354         Needed for mingw.
355
356 2006-10-19  Bruno Haible  <bruno@clisp.org>
357
358         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
359
360 2006-10-19  Bruno Haible  <bruno@clisp.org>
361
362         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
363         it.
364
365 2006-10-19  Bruno Haible  <bruno@clisp.org>
366
367         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
368         invocation.
369
370 2006-10-19  Bruno Haible  <bruno@clisp.org>
371
372         * gnulib-tool (func_create_testdir): Don't include ftruncate and
373         mountlist by default.
374
375 2006-10-16  Bruno Haible  <bruno@clisp.org>
376
377         * lib/c-strstr.c: Include c-strstr.h.
378
379 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
380
381         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
382         in a slash.
383
384 2006-10-18  Bruno Haible  <bruno@clisp.org>
385
386         * lib/lock.h [C++]: Wrap definitions in extern "C".
387
388 2006-10-18  Bruno Haible  <bruno@clisp.org>
389
390         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
391         gl_LIBOBJS list.
392
393 2006-10-18  Bruno Haible  <bruno@clisp.org>
394
395         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
396
397 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
398
399         * lib/xstrtol.h: Include gettext.h.
400         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
401         Problem reported by Eric Blake.
402         * modules/xstrtol (Depends-on): Add gettext-h.
403
404 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
405
406         * lib/strftime.c (advance): New macro.
407         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
408         incomplete type, so you can't add 0 to it.  Problem and patch
409         reported by Eelco Dolstra for dietlibc.
410
411 2006-10-18  Jim Meyering  <jim@meyering.net>
412
413         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
414         type for a local, and rename it: s/up/user_proc/.
415
416 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
417
418         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
419         READ_UTMP_USER_PROCESS.
420         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
421
422 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
423
424         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
425         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
426
427 2006-10-17  Eric Blake  <ebb9@byu.net>
428
429         * lib/sigprocmask.c (sigprocmask): Fix typo.
430
431         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
432
433         * modules/clean-temp (Makefile.am): Don't add to make output...
434         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
435         config.h.
436
437 2006-10-17  Bruno Haible  <bruno@clisp.org>
438
439         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
440         differently if DEFAULT_TEXT_DOMAIN is set.
441
442 2006-10-16  Bruno Haible  <bruno@clisp.org>
443
444         * lib/clean-temp.c: Include fwriteerror.h.
445
446 2006-10-16  Bruno Haible  <bruno@clisp.org>
447
448         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
449
450 2006-10-16  Bruno Haible  <bruno@clisp.org>
451
452         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
453         * lib/sigprocmask.h: Include <sys/types.h>.
454         (sigset_t): Use the system's definition if present.
455
456 2006-10-17  Eric Blake  <ebb9@byu.net>
457
458         * lib/xvasprintf.c (includes): Assume config.h.
459         * lib/xasprintf.c (includes): Likewise.
460
461 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
462
463         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
464         at least as wide as intmax_t.
465
466 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
467
468         (Imported from Automake.)
469         * build-aux/gnupload: Update to version 1.1 of directive file.
470
471 2006-10-16  Eric Blake  <ebb9@byu.net>
472
473         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
474         match Automake 1.10a.
475
476 2006-10-14  Bruno Haible  <bruno@clisp.org>
477
478         * modules/sigprocmask: New file.
479         * lib/sigprocmask.h: New file.
480         * lib/sigprocmask.c: New file.
481         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
482         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
483         request sigprocmask.o.
484         (gl_PREREQ_SIGPROCMASK): New macro.
485         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
486         (Depends-on): Add sigprocmask.
487         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
488         gt_SIGNALBLOCKING. Test for 'raise' only once.
489         * lib/fatal-signal.c: Include sigprocmask.h.
490         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
491         unblock_fatal_signals): Define always.
492         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
493         sigprocmask.
494
495 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
496
497         Sync from Automake.
498         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
499         which incorrectly sets the mode of an existing destination
500         directory.  In some cases the unpatched install-sh could do the
501         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
502         system.  We hope this is rare in practice, but it's clearly worth
503         fixing.  Problem reported by Alex Unleashed in
504         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
505         Also, don't bother to check for -m bugs unless we're using -m;
506         suggested by Stepan Kasal.
507
508 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
509
510         Sync from Automake.
511         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
512         `-c' flag, so they appear at the same position as in %FASTDEP%
513         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
514         which ignores unknown options only after the first non-option.
515         Bug report against M4 by Nelson H. F. Beebe.
516
517 2006-10-13  Jim Meyering  <jim@meyering.net>
518
519         Fix a bug in yesterday's change.
520         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
521         p->fts_statp->st_dev would be used uninitialized.
522         Ensures that we always call fts_stat on the very first entry.
523         Miklos Szeredi reported that find -xdev stopped working.
524
525 2006-10-12  Bruno Haible  <bruno@clisp.org>
526
527         * gnulib-tool (func_get_automake_snippet): Append an automatically
528         computed EXTRA_DIST augmentation.
529         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
530         * modules/alloca-opt (Makefile.am): Likewise.
531         * modules/allocsa (Makefile.am): Likewise.
532         * modules/arcfour (Makefile.am): Likewise.
533         * modules/arctwo (Makefile.am): Likewise.
534         * modules/argmatch (Makefile.am): Likewise.
535         * modules/argz (Makefile.am): Likewise.
536         * modules/atexit (Makefile.am): Likewise.
537         * modules/backupfile (Makefile.am): Likewise.
538         * modules/byteswap (Makefile.am): Likewise.
539         * modules/c-strtod (Makefile.am): Likewise.
540         * modules/c-strtold (Makefile.am): Likewise.
541         * modules/calloc (Makefile.am): Likewise.
542         * modules/canon-host (Makefile.am): Likewise.
543         * modules/canonicalize (Makefile.am): Likewise.
544         * modules/chdir-long (Makefile.am): Likewise.
545         * modules/chdir-safer (Makefile.am): Likewise.
546         * modules/check-version (Makefile.am): Likewise.
547         * modules/chown (Makefile.am): Likewise.
548         * modules/cloexec (Makefile.am): Likewise.
549         * modules/close-stream (Makefile.am): Likewise.
550         * modules/closeout (Makefile.am): Likewise.
551         * modules/crc (Makefile.am): Likewise.
552         * modules/csharpexec (Makefile.am): Likewise.
553         * modules/cycle-check (Makefile.am): Likewise.
554         * modules/des (Makefile.am): Likewise.
555         * modules/dev-ino (Makefile.am): Likewise.
556         * modules/dirfd (Makefile.am): Likewise.
557         * modules/dirname (Makefile.am): Likewise.
558         * modules/dup2 (Makefile.am): Likewise.
559         * modules/eealloc (Makefile.am): Likewise.
560         * modules/error (Makefile.am): Likewise.
561         * modules/euidaccess (Makefile.am): Likewise.
562         * modules/exclude (Makefile.am): Likewise.
563         * modules/exitfail (Makefile.am): Likewise.
564         * modules/fcntl-safer (Makefile.am): Likewise.
565         * modules/fcntl (Makefile.am): Likewise.
566         * modules/file-type (Makefile.am): Likewise.
567         * modules/fileblocks (Makefile.am): Likewise.
568         * modules/filemode (Makefile.am): Likewise.
569         * modules/filenamecat (Makefile.am): Likewise.
570         * modules/fnmatch (Makefile.am): Likewise.
571         * modules/fopen-safer (Makefile.am): Likewise.
572         * modules/fpending (Makefile.am): Likewise.
573         * modules/fprintftime (Makefile.am): Likewise.
574         * modules/free (Makefile.am): Likewise.
575         * modules/fsusage (Makefile.am): Likewise.
576         * modules/ftruncate (Makefile.am): Likewise.
577         * modules/fts (Makefile.am): Likewise.
578         * modules/gc-arcfour (Makefile.am): Likewise.
579         * modules/gc-des (Makefile.am): Likewise.
580         * modules/gc-hmac-md5 (Makefile.am): Likewise.
581         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
582         * modules/gc-md4 (Makefile.am): Likewise.
583         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
584         * modules/gc-sha1 (Makefile.am): Likewise.
585         * modules/gc (Makefile.am): Likewise.
586         * modules/getaddrinfo (Makefile.am): Likewise.
587         * modules/getcwd (Makefile.am): Likewise.
588         * modules/getdelim (Makefile.am): Likewise.
589         * modules/getdomainname (Makefile.am): Likewise.
590         * modules/getgroups (Makefile.am): Likewise.
591         * modules/gethostname (Makefile.am): Likewise.
592         * modules/gethrxtime (Makefile.am): Likewise.
593         * modules/getline (Makefile.am): Likewise.
594         * modules/getloadavg (Makefile.am): Likewise.
595         * modules/getlogin_r (Makefile.am): Likewise.
596         * modules/getndelim2 (Makefile.am): Likewise.
597         * modules/getopt (Makefile.am): Likewise.
598         * modules/getpagesize (Makefile.am): Likewise.
599         * modules/getpass-gnu (Makefile.am): Likewise.
600         * modules/getpass (Makefile.am): Likewise.
601         * modules/getsubopt (Makefile.am): Likewise.
602         * modules/gettime (Makefile.am): Likewise.
603         * modules/gettimeofday (Makefile.am): Likewise.
604         * modules/getugroups (Makefile.am): Likewise.
605         * modules/getusershell (Makefile.am): Likewise.
606         * modules/glob (Makefile.am): Likewise.
607         * modules/group-member (Makefile.am): Likewise.
608         * modules/hard-locale (Makefile.am): Likewise.
609         * modules/hash (Makefile.am): Likewise.
610         * modules/hmac-md5 (Makefile.am): Likewise.
611         * modules/hmac-sha1 (Makefile.am): Likewise.
612         * modules/human (Makefile.am): Likewise.
613         * modules/idcache (Makefile.am): Likewise.
614         * modules/imaxabs (Makefile.am): Likewise.
615         * modules/imaxdiv (Makefile.am): Likewise.
616         * modules/inet_ntop (Makefile.am): Likewise.
617         * modules/inet_pton (Makefile.am): Likewise.
618         * modules/intprops (Makefile.am): Likewise.
619         * modules/inttostr (Makefile.am): Likewise.
620         * modules/inttypes (Makefile.am): Likewise.
621         * modules/isapipe (Makefile.am): Likewise.
622         * modules/javaversion (Makefile.am): Likewise.
623         * modules/lchmod (Makefile.am): Likewise.
624         * modules/lchown (Makefile.am): Likewise.
625         * modules/localcharset (Makefile.am): Likewise.
626         * modules/long-options (Makefile.am): Likewise.
627         * modules/lstat (Makefile.am): Likewise.
628         * modules/malloc (Makefile.am): Likewise.
629         * modules/mathl (Makefile.am): Likewise.
630         * modules/mbchar (Makefile.am): Likewise.
631         * modules/md2 (Makefile.am): Likewise.
632         * modules/md4 (Makefile.am): Likewise.
633         * modules/md5 (Makefile.am): Likewise.
634         * modules/memcasecmp (Makefile.am): Likewise.
635         * modules/memchr (Makefile.am): Likewise.
636         * modules/memcmp (Makefile.am): Likewise.
637         * modules/memcoll (Makefile.am): Likewise.
638         * modules/memcpy (Makefile.am): Likewise.
639         * modules/memmem (Makefile.am): Likewise.
640         * modules/memmove (Makefile.am): Likewise.
641         * modules/mempcpy (Makefile.am): Likewise.
642         * modules/memrchr (Makefile.am): Likewise.
643         * modules/memset (Makefile.am): Likewise.
644         * modules/memxor (Makefile.am): Likewise.
645         * modules/mkancesdirs (Makefile.am): Likewise.
646         * modules/mkdir-p (Makefile.am): Likewise.
647         * modules/mkdir (Makefile.am): Likewise.
648         * modules/mkdtemp (Makefile.am): Likewise.
649         * modules/mkstemp (Makefile.am): Likewise.
650         * modules/mktime (Makefile.am): Likewise.
651         * modules/modechange (Makefile.am): Likewise.
652         * modules/mountlist (Makefile.am): Likewise.
653         * modules/nanosleep (Makefile.am): Likewise.
654         * modules/obstack (Makefile.am): Likewise.
655         * modules/openat (Makefile.am): Likewise.
656         * modules/pagealign_alloc (Makefile.am): Likewise.
657         * modules/pathmax (Makefile.am): Likewise.
658         * modules/physmem (Makefile.am): Likewise.
659         * modules/poll (Makefile.am): Likewise.
660         * modules/posixtm (Makefile.am): Likewise.
661         * modules/posixver (Makefile.am): Likewise.
662         * modules/putenv (Makefile.am): Likewise.
663         * modules/quote (Makefile.am): Likewise.
664         * modules/quotearg (Makefile.am): Likewise.
665         * modules/raise (Makefile.am): Likewise.
666         * modules/read-file (Makefile.am): Likewise.
667         * modules/readline (Makefile.am): Likewise.
668         * modules/readlink (Makefile.am): Likewise.
669         * modules/readtokens (Makefile.am): Likewise.
670         * modules/readutmp (Makefile.am): Likewise.
671         * modules/realloc (Makefile.am): Likewise.
672         * modules/regex (Makefile.am): Likewise.
673         * modules/rename-dest-slash (Makefile.am): Likewise.
674         * modules/rename (Makefile.am): Likewise.
675         * modules/rijndael (Makefile.am): Likewise.
676         * modules/rmdir (Makefile.am): Likewise.
677         * modules/rpmatch (Makefile.am): Likewise.
678         * modules/safe-read (Makefile.am): Likewise.
679         * modules/safe-write (Makefile.am): Likewise.
680         * modules/same-inode (Makefile.am): Likewise.
681         * modules/same (Makefile.am): Likewise.
682         * modules/save-cwd (Makefile.am): Likewise.
683         * modules/savedir (Makefile.am): Likewise.
684         * modules/setenv (Makefile.am): Likewise.
685         * modules/settime (Makefile.am): Likewise.
686         * modules/sha1 (Makefile.am): Likewise.
687         * modules/sig2str (Makefile.am): Likewise.
688         * modules/snprintf (Makefile.am): Likewise.
689         * modules/stat-macros (Makefile.am): Likewise.
690         * modules/stat-time (Makefile.am): Likewise.
691         * modules/stdbool (Makefile.am): Likewise.
692         * modules/stdint (Makefile.am): Likewise.
693         * modules/stdlib-safer (Makefile.am): Likewise.
694         * modules/stpcpy (Makefile.am): Likewise.
695         * modules/stpncpy (Makefile.am): Likewise.
696         * modules/strcase (Makefile.am): Likewise.
697         * modules/strcasestr (Makefile.am): Likewise.
698         * modules/strchrnul (Makefile.am): Likewise.
699         * modules/strcspn (Makefile.am): Likewise.
700         * modules/strdup (Makefile.am): Likewise.
701         * modules/strerror (Makefile.am): Likewise.
702         * modules/strftime (Makefile.am): Likewise.
703         * modules/strndup (Makefile.am): Likewise.
704         * modules/strnlen (Makefile.am): Likewise.
705         * modules/strpbrk (Makefile.am): Likewise.
706         * modules/strsep (Makefile.am): Likewise.
707         * modules/strstr (Makefile.am): Likewise.
708         * modules/strtod (Makefile.am): Likewise.
709         * modules/strtoimax (Makefile.am): Likewise.
710         * modules/strtok_r (Makefile.am): Likewise.
711         * modules/strtol (Makefile.am): Likewise.
712         * modules/strtoll (Makefile.am): Likewise.
713         * modules/strtoul (Makefile.am): Likewise.
714         * modules/strtoull (Makefile.am): Likewise.
715         * modules/strtoumax (Makefile.am): Likewise.
716         * modules/strverscmp (Makefile.am): Likewise.
717         * modules/sys_socket (Makefile.am): Likewise.
718         * modules/sys_stat (Makefile.am): Likewise.
719         * modules/sysexits (Makefile.am): Likewise.
720         * modules/time_r (Makefile.am): Likewise.
721         * modules/timegm (Makefile.am): Likewise.
722         * modules/timespec (Makefile.am): Likewise.
723         * modules/tmpfile-safer (Makefile.am): Likewise.
724         * modules/trim (Makefile.am): Likewise.
725         * modules/unistd-safer (Makefile.am): Likewise.
726         * modules/unlinkdir (Makefile.am): Likewise.
727         * modules/unlocked-io (Makefile.am): Likewise.
728         * modules/userspec (Makefile.am): Likewise.
729         * modules/utime (Makefile.am): Likewise.
730         * modules/utimecmp (Makefile.am): Likewise.
731         * modules/utimens (Makefile.am): Likewise.
732         * modules/vasnprintf (Makefile.am): Likewise.
733         * modules/vasprintf (Makefile.am): Likewise.
734         * modules/vsnprintf (Makefile.am): Likewise.
735         * modules/xalloc (Makefile.am): Likewise.
736         * modules/xgetcwd (Makefile.am): Likewise.
737         * modules/xnanosleep (Makefile.am): Likewise.
738         * modules/xreadlink (Makefile.am): Likewise.
739         * modules/xstrtod (Makefile.am): Likewise.
740         * modules/xstrtol (Makefile.am): Likewise.
741         * modules/xstrtold (Makefile.am): Likewise.
742         * modules/yesno (Makefile.am): Likewise.
743         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
744
745 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
746
747         * modules/error (Makefile.am): Distribute files through
748         EXTRA_DIST, not lib_SOURCES.
749
750 2006-10-12  Eric Blake  <ebb9@byu.net>
751
752         * modules/error (Makefile.am): Distribute files in /lib.
753         * modules/obstack (Makefile.am): Likewise.
754
755 2006-10-12  Bruno Haible  <bruno@clisp.org>
756
757         * modules/acl (Makefile.am): Distribute all files in lib/ through
758         EXTRA_DIST.
759         * modules/arcfour (Makefile.am): Likewise.
760         * modules/arctwo (Makefile.am): Likewise.
761         * modules/argmatch (Makefile.am): Likewise.
762         * modules/argz (Makefile.am): Likewise.
763         * modules/atexit (Makefile.am): Likewise.
764         * modules/backupfile (Makefile.am): Likewise.
765         * modules/c-strtod (Makefile.am): Likewise.
766         * modules/c-strtold (Makefile.am): Likewise.
767         * modules/calloc (Makefile.am): Likewise.
768         * modules/canon-host (Makefile.am): Likewise.
769         * modules/canonicalize (Makefile.am): Likewise.
770         * modules/chdir-long (Makefile.am): Likewise.
771         * modules/chdir-safer (Makefile.am): Likewise.
772         * modules/check-version (Makefile.am): Likewise.
773         * modules/chown (Makefile.am): Likewise.
774         * modules/cloexec (Makefile.am): Likewise.
775         * modules/close-stream (Makefile.am): Likewise.
776         * modules/closeout (Makefile.am): Likewise.
777         * modules/crc (Makefile.am): Likewise.
778         * modules/cycle-check (Makefile.am): Likewise.
779         * modules/des (Makefile.am): Likewise.
780         * modules/dirfd (Makefile.am): Likewise.
781         * modules/dirname (Makefile.am): Likewise.
782         * modules/dup2 (Makefile.am): Likewise.
783         * modules/euidaccess (Makefile.am): Likewise.
784         * modules/exclude (Makefile.am): Likewise.
785         * modules/exitfail (Makefile.am): Likewise.
786         * modules/fcntl-safer (Makefile.am): Likewise.
787         * modules/file-type (Makefile.am): Likewise.
788         * modules/fileblocks (Makefile.am): Likewise.
789         * modules/filemode (Makefile.am): Likewise.
790         * modules/filenamecat (Makefile.am): Likewise.
791         * modules/fnmatch (Makefile.am): Likewise.
792         * modules/fopen-safer (Makefile.am): Likewise.
793         * modules/fpending (Makefile.am): Likewise.
794         * modules/fprintftime (Makefile.am): Likewise.
795         * modules/free (Makefile.am): Likewise.
796         * modules/fsusage (Makefile.am): Likewise.
797         * modules/ftruncate (Makefile.am): Likewise.
798         * modules/fts (Makefile.am): Likewise.
799         * modules/gc (Makefile.am): Likewise.
800         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
801         * modules/getaddrinfo (Makefile.am): Likewise.
802         * modules/getcwd (Makefile.am): Likewise.
803         * modules/getdelim (Makefile.am): Likewise.
804         * modules/getdomainname (Makefile.am): Likewise.
805         * modules/getgroups (Makefile.am): Likewise.
806         * modules/gethostname (Makefile.am): Likewise.
807         * modules/gethrxtime (Makefile.am): Likewise.
808         * modules/getline (Makefile.am): Likewise.
809         * modules/getloadavg (Makefile.am): Likewise.
810         * modules/getlogin_r (Makefile.am): Likewise.
811         * modules/getopt (Makefile.am): Likewise.
812         * modules/getpass (Makefile.am): Likewise.
813         * modules/getpass-gnu (Makefile.am): Likewise.
814         * modules/getsubopt (Makefile.am): Likewise.
815         * modules/gettime (Makefile.am): Likewise.
816         * modules/gettimeofday (Makefile.am): Likewise.
817         * modules/getugroups (Makefile.am): Likewise.
818         * modules/getusershell (Makefile.am): Likewise.
819         * modules/glob (Makefile.am): Likewise.
820         * modules/group-member (Makefile.am): Likewise.
821         * modules/hard-locale (Makefile.am): Likewise.
822         * modules/hash (Makefile.am): Likewise.
823         * modules/hmac-md5 (Makefile.am): Likewise.
824         * modules/hmac-sha1 (Makefile.am): Likewise.
825         * modules/human (Makefile.am): Likewise.
826         * modules/idcache (Makefile.am): Likewise.
827         * modules/imaxabs (Makefile.am): Likewise.
828         * modules/imaxdiv (Makefile.am): Likewise.
829         * modules/inet_ntop (Makefile.am): Likewise.
830         * modules/inet_pton (Makefile.am): Likewise.
831         * modules/inttostr (Makefile.am): Likewise.
832         * modules/isapipe (Makefile.am): Likewise.
833         * modules/lchown (Makefile.am): Likewise.
834         * modules/long-options (Makefile.am): Likewise.
835         * modules/lstat (Makefile.am): Likewise.
836         * modules/malloc (Makefile.am): Likewise.
837         * modules/mathl (Makefile.am): Likewise.
838         * modules/mbchar (Makefile.am): Likewise.
839         * modules/md2 (Makefile.am): Likewise.
840         * modules/md4 (Makefile.am): Likewise.
841         * modules/md5 (Makefile.am): Likewise.
842         * modules/memcasecmp (Makefile.am): Likewise.
843         * modules/memchr (Makefile.am): Likewise.
844         * modules/memcmp (Makefile.am): Likewise.
845         * modules/memcoll (Makefile.am): Likewise.
846         * modules/memcpy (Makefile.am): Likewise.
847         * modules/memmem (Makefile.am): Likewise.
848         * modules/memmove (Makefile.am): Likewise.
849         * modules/mempcpy (Makefile.am): Likewise.
850         * modules/memrchr (Makefile.am): Likewise.
851         * modules/memset (Makefile.am): Likewise.
852         * modules/memxor (Makefile.am): Likewise.
853         * modules/mkancesdirs (Makefile.am): Likewise.
854         * modules/mkdir (Makefile.am): Likewise.
855         * modules/mkdir-p (Makefile.am): Likewise.
856         * modules/mkdtemp (Makefile.am): Likewise.
857         * modules/mkstemp (Makefile.am): Likewise.
858         * modules/mktime (Makefile.am): Likewise.
859         * modules/modechange (Makefile.am): Likewise.
860         * modules/mountlist (Makefile.am): Likewise.
861         * modules/nanosleep (Makefile.am): Likewise.
862         * modules/openat (Makefile.am): Likewise.
863         * modules/pagealign_alloc (Makefile.am): Likewise.
864         * modules/physmem (Makefile.am): Likewise.
865         * modules/poll (Makefile.am): Likewise.
866         * modules/posixtm (Makefile.am): Likewise.
867         * modules/posixver (Makefile.am): Likewise.
868         * modules/putenv (Makefile.am): Likewise.
869         * modules/quote (Makefile.am): Likewise.
870         * modules/quotearg (Makefile.am): Likewise.
871         * modules/raise (Makefile.am): Likewise.
872         * modules/read-file (Makefile.am): Likewise.
873         * modules/readline (Makefile.am): Likewise.
874         * modules/readlink (Makefile.am): Likewise.
875         * modules/readtokens (Makefile.am): Likewise.
876         * modules/readutmp (Makefile.am): Likewise.
877         * modules/realloc (Makefile.am): Likewise.
878         * modules/regex (Makefile.am): Likewise.
879         * modules/rename (Makefile.am): Likewise.
880         * modules/rename-dest-slash (Makefile.am): Likewise.
881         * modules/rijndael (Makefile.am): Likewise.
882         * modules/rmdir (Makefile.am): Likewise.
883         * modules/rpmatch (Makefile.am): Likewise.
884         * modules/safe-read (Makefile.am): Likewise.
885         * modules/safe-write (Makefile.am): Likewise.
886         * modules/same (Makefile.am): Likewise.
887         * modules/save-cwd (Makefile.am): Likewise.
888         * modules/savedir (Makefile.am): Likewise.
889         * modules/setenv (Makefile.am): Likewise.
890         * modules/settime (Makefile.am): Likewise.
891         * modules/sha1 (Makefile.am): Likewise.
892         * modules/sig2str (Makefile.am): Likewise.
893         * modules/snprintf (Makefile.am): Likewise.
894         * modules/stdlib-safer (Makefile.am): Likewise.
895         * modules/stpcpy (Makefile.am): Likewise.
896         * modules/stpncpy (Makefile.am): Likewise.
897         * modules/strcase (Makefile.am): Likewise.
898         * modules/strcasestr (Makefile.am): Likewise.
899         * modules/strchrnul (Makefile.am): Likewise.
900         * modules/strcspn (Makefile.am): Likewise.
901         * modules/strdup (Makefile.am): Likewise.
902         * modules/strerror (Makefile.am): Likewise.
903         * modules/strftime (Makefile.am): Likewise.
904         * modules/strndup (Makefile.am): Likewise.
905         * modules/strnlen (Makefile.am): Likewise.
906         * modules/strpbrk (Makefile.am): Likewise.
907         * modules/strsep (Makefile.am): Likewise.
908         * modules/strstr (Makefile.am): Likewise.
909         * modules/strtod (Makefile.am): Likewise.
910         * modules/strtoimax (Makefile.am): Likewise.
911         * modules/strtok_r (Makefile.am): Likewise.
912         * modules/strtol (Makefile.am): Likewise.
913         * modules/strtoll (Makefile.am): Likewise.
914         * modules/strtoul (Makefile.am): Likewise.
915         * modules/strtoull (Makefile.am): Likewise.
916         * modules/strtoumax (Makefile.am): Likewise.
917         * modules/strverscmp (Makefile.am): Likewise.
918         * modules/time_r (Makefile.am): Likewise.
919         * modules/timegm (Makefile.am): Likewise.
920         * modules/tmpfile-safer (Makefile.am): Likewise.
921         * modules/unistd-safer (Makefile.am): Likewise.
922         * modules/unlinkdir (Makefile.am): Likewise.
923         * modules/userspec (Makefile.am): Likewise.
924         * modules/utime (Makefile.am): Likewise.
925         * modules/utimecmp (Makefile.am): Likewise.
926         * modules/utimens (Makefile.am): Likewise.
927         * modules/vasnprintf (Makefile.am): Likewise.
928         * modules/vasprintf (Makefile.am): Likewise.
929         * modules/vsnprintf (Makefile.am): Likewise.
930         * modules/xalloc (Makefile.am): Likewise.
931         * modules/xgetcwd (Makefile.am): Likewise.
932         * modules/xnanosleep (Makefile.am): Likewise.
933         * modules/xreadlink (Makefile.am): Likewise.
934         * modules/xstrtod (Makefile.am): Likewise.
935         * modules/xstrtol (Makefile.am): Likewise.
936         * modules/xstrtold (Makefile.am): Likewise.
937         * modules/yesno (Makefile.am): Likewise.
938
939 2006-10-12  Jim Meyering  <jim@meyering.net>
940
941         * m4/getloadavg.m4: Revert the change below.
942
943         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
944         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
945         fail with a symlink, which is what coreutils' ./bootstrap now
946         creates by default.
947
948 2006-10-12  Bruno Haible  <bruno@clisp.org>
949
950         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
951         mingw.
952         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
953         MSVC and mingw explicitly.
954
955 2006-10-11  Simon Josefsson  <jas@extundo.com>
956             Bruno Haible  <bruno@clisp.org>
957
958         Add support for multiple gnulib-tool invocations in the scope of a
959         single configure.ac file.
960         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
961         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
962         with the same contents as the _LIBADD variable.
963         (func_emit_initmacro_start, func_emit_initmacro_end,
964         func_emit_initmacro_done): New functions.
965         (func_import, func_create_testdir): Invoke them. Allow the identifiers
966         gl_LIBOBJS and gl_LTLIBOBJS.
967
968 2006-10-11  Bruno Haible  <bruno@clisp.org>
969
970         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
971         (func_create_testdir): Don't create po/Makefile.am, don't invoke
972         autoreconf. Instead, invoke autopoint explicitly but move back the
973         *.m4 files from gnulib.
974
975 2006-10-11  Bruno Haible  <bruno@clisp.org>
976
977         * gnulib-tool (func_usage): Make module names after --create-testdir
978         optional.
979         (func_create_testdir): If no module was specified, use nearly all
980         modules.
981
982 2006-10-12  Jim Meyering  <jim@meyering.net>
983
984         Big performance improvement for fts-based tools that use FTS_NOSTAT.
985         Avoid spurious inode-mismatch problems on non-POSIX file systems.
986         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
987         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
988         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
989         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
990         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
991         (fts_set_stat_required): New function.
992         (fts_open): Defer the calls to fts_stat, if possible or requested.
993         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
994         into fts_stat itself.
995         (fts_read): Perform any required (deferred) fts_stat call.
996         (fts_build): Likewise, for the directory we're about to open and read.
997         In the readdir loop, carefully decide whether each entry will require
998         an eventual call to fts_stat, using dirent.d_type info if available.
999         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
1000         a command line argument into this function.  Update all callers.
1001         Map a return value of FTS_DOT to FTS_D for a command line argument.
1002         * modules/fts (Depends-on): Add d-type.  Alphabetize.
1003         Thanks to Miklos Szeredi for his tenacity and for the initial
1004         bug report about "find" failing on a FUSE-based file system.
1005
1006         * lib/fts.c (fts_open): Use consistent indentation.
1007
1008 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
1009
1010         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
1011         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
1012         reported by Jim Meyering.  All uses of cache variables renamed
1013         to match Autoconf's.
1014         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
1015         the other one.
1016
1017         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
1018         Fix misspelling in diagnostic.
1019
1020 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1021
1022         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
1023         defined.  Problem reported by Matthew Woehlke.
1024
1025         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
1026         Add support for Tandem NonStop R series.
1027         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
1028         Use new macro.
1029
1030         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
1031         (has_trailing_slash): Omit size arg; all callers changed.
1032         Omit 'inline', since it doesn't help performance and we'd
1033         need to configure it.
1034         Don't count //, ///, etc. as having a trailing slash.
1035         As a side effect, this removes a C99ism reported by Matthew Woehlke.
1036         (rpl_rename_dest_slash): On failure, use rename's errno rather
1037         than (in some cases) an incorrect or junk errno.
1038         Simplify code by removing need to compute length; this does
1039         cause it to make two passes instead of one over the file name,
1040         but it's worth it.
1041
1042         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
1043         change, since Autoconf's version may no longer be appropriate now
1044         that we are using CVS Autoconf's version.  Add support for Tandem.
1045
1046 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1047             Bruno Haible  <bruno@clisp.org>
1048
1049         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
1050         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
1051         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
1052         gl_AC_TYPE_LONG_LONG.
1053
1054         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
1055         instead of HAVE_LONG_LONG.
1056         * lib/printf-args.c (printf_fetchargs): Likewise.
1057         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
1058         * lib/vasnprintf.c (VASNPRINTF): Likewise.
1059         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
1060         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
1061         gl_AC_TYPE_LONG_LONG.
1062
1063 2006-10-11  Bruno Haible  <bruno@clisp.org>
1064
1065         * m4/longlong.m4: Add comments.
1066         * m4/ulonglong.m4: Likewise.
1067
1068 2006-10-10  Bruno Haible  <bruno@clisp.org>
1069
1070         Make it possible to #define stpcpy, strdup to aliases.
1071         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
1072         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
1073
1074 2006-10-10  Bruno Haible  <bruno@clisp.org>
1075
1076         Make it possible to #define gcd to an alias.
1077         * lib/gcd.c: Include config.h.
1078
1079 2006-10-10  Bruno Haible  <bruno@clisp.org>
1080
1081         Make it possible to #define c_isascii to an alias.
1082         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
1083         defined. Undefine the macros before defining them, to avoid gcc
1084         warnings.
1085         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
1086         define NO_C_CTYPE_MACROS early.
1087
1088 2006-10-10  Bruno Haible  <bruno@clisp.org>
1089
1090         Make it possible to #define set_program_name to an alias.
1091         * lib/progname.c: Don't undefine set_program_name; instead, undefine
1092         ENABLE_RELOCATABLE early.
1093
1094 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
1095
1096         Port to Tandem NSK OSS, which has 64-bit signed int but at most
1097         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
1098         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
1099         More generally, don't assume that 64-bit signed int is available
1100         if unsigned int is, and vice versa.
1101         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
1102         unsigned symbols, not on their signed counterparts.
1103         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
1104         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
1105         (UINT64_C, UINTMAX_C):
1106         Likewise.
1107         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
1108         unsigned counterparts.
1109         (Have_long_long, Unsigned): New macros.
1110         (Int): Renamed from INT.
1111         (strtoimax): Use the new macros.
1112         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
1113         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
1114         * modules/inttypes (inttypes.h): Substitute
1115         HAVE_UNSIGNED_LONG_LONG_INT.
1116         * modules/stdint (stdint.h): Likewise.
1117         (Files): Add m4/ulonglong.m4.
1118
1119 2006-10-10  Bruno Haible  <bruno@clisp.org>
1120
1121         Fix a gcc -Wshadow warning.
1122         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
1123         to 'bucket'.
1124         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
1125         gl_linked_indexof_from_to): Likewise.
1126         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
1127         Likewise.
1128         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
1129         Likewise.
1130         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
1131         Reported by Eric Blake.
1132
1133 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
1134
1135         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
1136         for NetBSD.  Problem reported by Bruno Haible.
1137
1138 2006-10-09  Jim Meyering  <jim@meyering.net>
1139
1140         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
1141         Patch from Bruno Haible.
1142
1143 2006-10-09  Jim Meyering  <jim@meyering.net>
1144
1145         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
1146         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
1147         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
1148
1149 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1150
1151         Don't include <config.h> twice; this doesn't work in some cases,
1152         e.g., when config.h has "#define intmax_t long long int" and
1153         we include <config.h>, <inttypes.h>, <config.h> in that order.
1154         Problem reported by Matthew Woehlke in:
1155         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
1156         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
1157         * lib/fts-cycle.c: Don't include config.h.
1158         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
1159         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
1160         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
1161         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
1162         inttypes.h.
1163         * lib/xstrtoumax.c: Likewise.
1164         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
1165         __strtol and the like, so that this module is more like its siblings.
1166         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
1167         Remove; no longer needed now that we assume gnulib inttypes.h.
1168
1169 2006-10-08  Bruno Haible  <bruno@clisp.org>
1170
1171         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
1172         option.
1173
1174 2006-10-07  Jim Meyering  <jim@meyering.net>
1175
1176         * modules/inttypes (inttypes.h): Revert what seems to have been
1177         an inadvertent part of today's change: use "|", not "/" in the
1178         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
1179
1180 2006-10-07  Bruno Haible  <bruno@clisp.org>
1181
1182         * modules/sublist: New file.
1183
1184 2006-10-07  Bruno Haible  <bruno@clisp.org>
1185
1186         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
1187         * modules/argz (argz.h): Likewise.
1188         * modules/arpa_inet (arpa/inet.h): Likewise.
1189         * modules/byteswap (byteswap.h): Likewise.
1190         * modules/configmake (configmake.h): Likewise.
1191         * modules/fcntl (fcntl.h): Likewise.
1192         * modules/fnmatch (fnmatch.h): Likewise.
1193         * modules/getopt (getopt.h): Likewise.
1194         * modules/glob (glob.h): Likewise.
1195         * modules/inttypes (inttypes.h): Likewise.
1196         * modules/netinet_in (netinet/in.h): Likewise.
1197         * modules/poll (poll.h): Likewise.
1198         * modules/stdbool (stdbool.h): Likewise.
1199         * modules/stdint (stdint.h): Likewise.
1200         * modules/sys_select (sys/select.h): Likewise.
1201         * modules/sys_socket (sys/socket.h): Likewise.
1202         * modules/sys_stat (sys/stat.h): Likewise.
1203         * modules/sysexits (sysexits.h): Likewise.
1204         * modules/unistd (unistd.h): Likewise.
1205         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1206         Add a "DO NOT EDIT" comment to the generated file.
1207         (func_import): Likewise for gnulib-comp.m4.
1208
1209 2006-10-07  Bruno Haible  <bruno@clisp.org>
1210
1211         * lib/gl_sublist.h: New file.
1212         * lib/gl_sublist.c: New file.
1213
1214 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
1215
1216         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
1217         name (relative to the original working directory) and the file
1218         name component (relative to the temporary working directory).  All
1219         callers changed.
1220         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
1221         * lib/mkdir-p.c (make_dir_parents): Likewise.
1222         * lib/mkdir-p.h (make_dir_parents): Likewise.
1223
1224 2006-10-06  Eric Blake  <ebb9@byu.net>
1225
1226         Define several macros for use by the clean-temp module.
1227         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
1228         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
1229         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
1230
1231         * lib/clean-temp.h (close_stream_temp): New declaration.
1232         * lib/clean-temp.c (includes): Pull in headers according to what
1233         other modules are in use.
1234         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
1235
1236 2006-10-06  Bruno Haible  <bruno@clisp.org>
1237
1238         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
1239         instead of fopen, fwriteerror.
1240
1241 2006-10-06  Bruno Haible  <bruno@clisp.org>
1242
1243         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
1244         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
1245         int.
1246         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
1247         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
1248         Return an error indicator.
1249         Suggested by Eric Blake.
1250
1251 2006-10-06  Bruno Haible  <bruno@clisp.org>
1252
1253         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
1254         Reported by Eric Blake.
1255
1256 2006-10-06  Bruno Haible  <bruno@clisp.org>
1257
1258         * modules/closeout (Description): Mention stderr too.
1259
1260 2006-10-06  Bruno Haible  <bruno@clisp.org>
1261         and Paul Eggert  <eggert@cs.ucla.edu>
1262
1263         * lib/closeout.c (close_stdout): Also close stderr.
1264         * lib/closeout.h: Update comment.
1265
1266 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
1267
1268         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
1269         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
1270         * lib/dirchownmod.c: Include lchown.h.
1271         * lib/lchown.c: Don't include files that lchown.h now includes.
1272         Don't declare chown, since lchown.h now does that.
1273         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
1274         (lchown): Define to rpl_chown if lchown is declared but
1275         does not exist.  Declare using a prototype if lchown is not
1276         declared.  Add a copyright notice.
1277         * lib/mkstemp.h: Include <unistd.h>.
1278         * lib/openat.c: Include lchown.h.
1279
1280         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
1281         we now test for that separately.
1282         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
1283         rather than O_NOFOLLOW, when testing whether it's possible to
1284         avoid a race condition reliably.
1285         * lib/savewd.c (savewd_chdir): Likewise.
1286
1287         Remove macros that are no longer needed now that stdint.h is
1288         reliable.
1289         * lib/fsusage.c (UINTMAX_MAX): Remove.
1290         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
1291         * lib/utimecmp.c (SIZE_MAX): Remove.
1292
1293         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
1294
1295         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
1296         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
1297         O_NOATIME works.
1298
1299 2006-10-05  Bruno Haible  <bruno@clisp.org>
1300
1301         * lib/gl_list.h (gl_sortedlist_search_from_to,
1302         gl_sortedlist_indexof_from_to): New declarations.
1303         (gl_list_implementation): New fields sortedlist_search_from_to,
1304         sortedlist_indexof_from_to.
1305         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
1306         inline functions.
1307         * lib/gl_list.c (gl_sortedlist_search_from_to,
1308         gl_sortedlist_indexof_from_to): New functions.
1309         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
1310         function.
1311         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
1312         (gl_array_sortedlist_search_from_to): New function.
1313         (gl_array_list_implementation): Update.
1314         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
1315         function.
1316         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
1317         (gl_carray_sortedlist_search_from_to): New function.
1318         (gl_carray_list_implementation): Update.
1319         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
1320         gl_linked_sortedlist_indexof_from_to): New functions.
1321         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
1322         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
1323         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
1324         gl_tree_sortedlist_indexof_from_to): New functions.
1325         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
1326         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
1327         Update.
1328         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
1329         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
1330         Update.
1331
1332 2006-10-05  Bruno Haible  <bruno@clisp.org>
1333
1334         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
1335         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
1336         (struct gl_list_implementation): Add fields search_from_to,
1337         indexof_from_to. Remove fields search, indexof.
1338         (gl_list_search): Use the search_from_to method.
1339         (gl_list_search_from, gl_list_search_from_to): New functions.
1340         (gl_list_indexof): Use the indexof_from_to method.
1341         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
1342         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
1343         (gl_list_search_from, gl_list_search_from_to): New functions.
1344         (gl_list_indexof): Use the indexof_from_to method.
1345         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
1346         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
1347         gl_array_indexof. Add start_index, end_index arguments.
1348         (gl_array_search_from_to): Renamed from gl_array_search. Add
1349         start_index, end_index arguments.
1350         (gl_array_remove, gl_array_list_implementation): Update.
1351         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
1352         gl_carray_indexof. Add start_index, end_index arguments.
1353         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
1354         start_index, end_index arguments.
1355         (gl_carray_remove, gl_carray_list_implementation): Update.
1356         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
1357         gl_linked_search. Add start_index, end_index arguments.
1358         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
1359         start_index, end_index arguments.
1360         (gl_linked_remove): Update.
1361         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
1362         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
1363         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
1364         field to 'size_t'.
1365         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
1366         gl_tree_search. Add start_index, end_index arguments.
1367         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
1368         start_index, end_index arguments.
1369         (gl_tree_remove): Update.
1370         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
1371         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
1372         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
1373         function.
1374         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
1375         gl_tree_search. Add start_index, end_index arguments.
1376         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
1377         start_index, end_index arguments.
1378         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
1379         Update.
1380         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
1381
1382 2006-10-05  Bruno Haible  <bruno@clisp.org>
1383
1384         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
1385
1386         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
1387         fwriteerror_temp): New declarations.
1388         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
1389         (descriptors): New variable.
1390         (cleanup): First, close the descriptors.
1391         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
1392         fclose_temp, fwriteerror_temp): New functions.
1393
1394 2006-10-04  Jim Meyering  <jim@meyering.net>
1395
1396         * lib/fts.c (fts_open): Tiny comment change.
1397
1398 2006-10-04  Bruno Haible  <bruno@clisp.org>
1399
1400         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
1401         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
1402         gl_LOCK_BODY.
1403         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
1404         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
1405         gl_LOCK_EARLY_BODY.
1406         (gl_LOCK): Require gl_LOCK_BODY.
1407
1408 2006-10-04  Bruno Haible  <bruno@clisp.org>
1409
1410         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
1411         (gl_oset_search_atleast): New declaration.
1412         (struct gl_oset_implementation): Add field 'search_atleast'.
1413         (gl_oset_search_atleast): New inline function.
1414         * lib/gl_oset.c (gl_oset_search_atleast): New function.
1415         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
1416         (gl_array_oset_implementation): Update.
1417         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
1418         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
1419         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
1420
1421 2006-10-04  Bruno Haible  <bruno@clisp.org>
1422
1423         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
1424
1425 2006-10-03  Bruno Haible  <bruno@clisp.org>
1426
1427         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
1428         from gl_avltreehash_list_implementation.
1429
1430 2006-10-03  Bruno Haible  <bruno@clisp.org>
1431
1432         * lib/gl_oset.c (gl_oset_add): Fix return type.
1433
1434 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
1435
1436         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
1437
1438 2006-10-02  Eric Blake  <ebb9@byu.net>
1439
1440         * modules/strnlen (Depends-on): Add extensions.
1441
1442 2006-10-02  Eric Blake  <ebb9@byu.net>
1443
1444         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
1445         definition in 2.60+.
1446
1447 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
1448
1449         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
1450         checks.
1451
1452 2006-10-02  Bruno Haible  <bruno@clisp.org>
1453
1454         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
1455         to the AUTOMAKE_OPTIONS.
1456         Reported by Jim Meyering.
1457
1458 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
1459
1460         Work around bug in Solaris 10 /proc file system:
1461         /proc/self/fd/NNN/.. isn't the parent directory of
1462         the directory whose file descriptor is NNN.  This needs to
1463         be worked around at run time, not compile time, since a
1464         program might be built on Solaris 8, where things work, and
1465         run on Solaris 10.
1466         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
1467         to use the following interface instead:
1468         (OPENAT_BUFFER_SIZE): New macro.
1469         (openat_proc_name): New function.
1470         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
1471         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
1472         Likewise.
1473         * lib/openat-proc.c: New file.
1474         * modules/openat (Files): Add lib/openat-proc.c.
1475         (Depends-on): Add same-inode, stdbool.
1476         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
1477
1478 2006-09-29  Bruno Haible  <bruno@clisp.org>
1479
1480         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
1481         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
1482         argument. Set stdout_closed before testing for ferror, not after.
1483         (fwriteerror, fwriteerror_no_ebadf): New functions.
1484
1485 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1486
1487         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
1488
1489 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
1490
1491         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
1492         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
1493
1494 2006-09-28  Jim Meyering  <jim@meyering.net>
1495
1496         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
1497         Include <unistd.h>.
1498
1499 2006-09-28  Bruno Haible  <bruno@clisp.org>
1500
1501         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
1502         * modules/linkedhash-list (Depends-on): Likewise.
1503         * modules/rbtreehash-list (Depends-on): Likewise.
1504
1505 2006-09-28  Bruno Haible  <bruno@clisp.org>
1506
1507         * lib/strndup.h: Simplify the redefinition of strndup.
1508         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
1509         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
1510
1511 2006-09-28  Bruno Haible  <bruno@clisp.org>
1512
1513         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
1514         * lib/gl_linkedhash_list.c: Likewise.
1515         * lib/gl_rbtreehash_list.c: Likewise.
1516
1517 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
1518
1519         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
1520         getaddrinfo.
1521
1522         * lib/__fpending.h: Don't include <stdio_ext.h> unless
1523         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
1524         it causes <stdio_ext.h> to cause a compile-time error.
1525         Problem reported by Nelson H. F. Beebe.
1526         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
1527         of HAVE_DECL___PENDING.
1528
1529         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
1530         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
1531         declaration.
1532
1533 2006-09-27  Jim Meyering  <jim@meyering.net>
1534
1535         This file could end up with a definition for a function
1536         named __strndup, rather than rpl_strndup on a system with
1537         incomplete weak_alias support.
1538         * lib/strndup.c (strndup): Rename from __strndup.
1539         Remove #defines that used to map __strndup to strndup.
1540         Don't use K&R prototypes.
1541         Remove LIBC-related code, since this file is not sync'd with glibc.
1542         * lib/strndup.h: Revamp, accordingly.
1543         * m4/strndup.m4: Modernize.
1544
1545 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
1546
1547         * modules/savewd (Depends-on): Add 'raise'.
1548         * lib/savewd.c: Include <signal.h>, for 'raise'.
1549
1550 2006-09-26  Jim Meyering  <jim@meyering.net>
1551
1552         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
1553         when we detect Darwin 8.7.0's acl_get_file bug.
1554         Rearrange to perform the new (below) run-test while $LIBS
1555         contains any acl-related library.  Set USE_ACL at the end.
1556         (gl_ACL_GET_FILE): New function.
1557
1558 2006-09-26  Eric Blake  <ebb9@byu.net>
1559
1560         * lib/verror.c: Include <config.h> unconditionally.
1561
1562 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
1563
1564         * modules/clock-time (Maintainer): Add self.
1565         * modules/getlogin_r (Depends-on): Add extensions.
1566
1567 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1568
1569         * modules/clock-time: New module.
1570         * modules/nanosleep (Depends-on): Add clock-time.
1571         * modules/gethrxtime (Depends-on): Likewise.
1572         * modules/gettime (Depends-on): Likewise.
1573         * modules/settime (Depends-on): Likewise.
1574
1575         * modules/fts-lgpl: Depend on openat.
1576         * modules/mkancesdirs: Depend on savewd.
1577         * modules/mkdir-p: Likewise.
1578
1579 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1580
1581         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
1582
1583         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
1584         `gl_have_arbitrary_file_name_length_limit' to
1585         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
1586         actually works between configure runs.
1587
1588 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1589             Bruno Haible  <bruno@clisp.org>
1590
1591         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
1592
1593 2006-09-25  Jim Meyering  <jim@meyering.net>
1594
1595         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
1596         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
1597
1598 2006-09-25  Eric Blake  <ebb9@byu.net>
1599
1600         * gnulib-tool (func_import, func_create_testdir): Fix typos in
1601         exec's in 2006-09-18 patch when shuffling fds.
1602
1603 2006-09-25  Bruno Haible  <bruno@clisp.org>
1604
1605         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
1606         Reported by Jim Meyering.
1607
1608 2006-09-24  Jim Meyering  <jim@meyering.net>
1609
1610         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
1611         compare a pointer against a literal "0".  That caused failures with
1612         at least HP-UX's hpcc.
1613
1614 2006-09-22  Simon Josefsson  <jas@extundo.com>
1615
1616         * modules/gc-sha1:
1617         * modules/gc-md4:
1618         * modules/gc-hmac-sha1:
1619         * modules/gc-hmac-md5:
1620         * modules/gc-des:
1621         * modules/gc-arcfour: Distribute more files.
1622
1623 2006-09-22  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1624
1625         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
1626         (gl_linked_iterator_from_to): Initialize struct completely.
1627         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
1628         (gl_tree_iterator_from_to): Likewise
1629         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
1630         * lib/gl_array_list.c [lint] (gl_array_iterator)
1631         (gl_array_iterator_from_to): Likewise.
1632         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
1633         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
1634         (gl_carray_iterator_from_to): Likewise.
1635
1636         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
1637         * lib/md4.c (md4_process_block): Remove unused variable.
1638         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
1639         parentheses for clarity.
1640
1641 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1642
1643         * modules/bison-i18n (Depends-on): Add gettext.
1644
1645 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1646
1647         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
1648         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
1649         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
1650         also add missing comma that caused broken test.
1651         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
1652         stdlib.h, for `abort'.
1653         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
1654         variables.
1655         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
1656         include unistd.h if present, for `rmdir'.
1657         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
1658         variables.
1659         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
1660         in the process include standard headers for prototypes.
1661         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
1662         gets declared on GNU/Linux.
1663         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
1664         unistd.h, for `rmdir'.
1665         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
1666
1667         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
1668         always true.
1669         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
1670
1671         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
1672
1673 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1674
1675         * gnulib-tool (func_version): Create output all at once.  This
1676         may help avoid triggering unnecessary SIGPIPEs, and at any
1677         rate it doesn't hurt.
1678
1679 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1680             Bruno Haible  <bruno@clisp.org>
1681
1682         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
1683         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1684         * m4/signed.m4 (bh_C_SIGNED): Likewise.
1685
1686         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
1687         (gl_FUNC_VASPRINTF): Invoke it.
1688
1689 2006-09-22  Bruno Haible  <bruno@clisp.org>
1690
1691         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
1692         getloadavg.c as first argument.
1693
1694 2006-09-22  Bruno Haible  <bruno@clisp.org>
1695
1696         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
1697         at the beginning of the gl_INIT macro.
1698         * modules/getloadavg (configure.ac): Pass $gl_source_base to
1699         gl_GETLOADAVG.
1700
1701 2006-09-22  Bruno Haible  <bruno@clisp.org>
1702
1703         * gnulib-tool (func_create_megatestdir): Don't include the config-h
1704         module.
1705         Suggested by Ralf Wildenhues.
1706
1707 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
1708
1709         Import this patch from libc:
1710
1711         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
1712
1713         * lib/regex_internal.c (re_string_reconstruct): Handle
1714         offset < pstr->valid_raw_len && pstr->offsets_needed case.
1715         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
1716         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
1717         re_string_context_at.
1718
1719         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
1720         now requires it.
1721         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
1722         gl_REGEX now does it for us.
1723         (gl_REGEX): Add test taken from
1724         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
1725
1726         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
1727         Check that large offsets work.  Modernize Autoconf usages.
1728         Prefer "yes" to mean a good thing rather than a bad.
1729         Don't put "#define mkstemp" in config.h, as this might interfere
1730         with standard system headers that "#define mkstemp mkstemp64".
1731
1732         * modules/mkstemp (Depends-on): Add extensions, so that
1733         mkstemp is visible on some platforms.
1734         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
1735         (Include): Change to "mkstemp.h" from <stdlib.h>.
1736         (Files): Add mkstemp.h.
1737
1738         * lib/mkstemp.h: New file, since some standard headers
1739         #define mkstemp.
1740         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
1741         Include "mkstemp.h".
1742         Make the _LIBC code resemble glibc original more,
1743         e.g., use K&R style.
1744         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
1745         (mkstemp): Remove, since mkstemp.h does this for us.
1746         * lib/stdlib--.h: Include mkstemp.h.
1747
1748         Import this patch from libc:
1749
1750         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
1751
1752         * lib/tempname.c (__gen_tempname): Change attempts_min
1753         into a macro.  Use preprocessor to decide how to initialize
1754         attempts [Coverity CID 67].
1755
1756 2006-09-20  Bruno Haible  <bruno@clisp.org>
1757
1758         * lib/mkdtemp.c: Import from libc.
1759         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
1760                 * sysdeps/posix/tempname.c (__gen_tempname): Change
1761                 attempts_min into a macro.  Use preprocessor to decide how to
1762                 initialize attempts [Coverity CID 67].
1763         2001-11-27  Paul Eggert  <eggert@twinsun.com>
1764                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
1765                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
1766
1767 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1768
1769         * gnulib-tool (func_exit): New function, to allow to pass the
1770         exit status portably through the trap.  Use everywhere.
1771         (--help, --version): Signal a write error.
1772         (trap): catch SIGPIPE, for write errors.
1773         Exit at the end of the trap, with the correct exit status.
1774
1775 2006-09-19  Karl Berry  <karl@gnu.org>
1776
1777         * doc/gnulib.texi: note about the license texinfo files.
1778
1779 2006-09-19  Eric Blake  <ebb9@byu.net>
1780
1781         * gnulib-tool: Avoid space-tab.
1782
1783 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
1784
1785         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
1786         that prevented coreutils 6.1 from building.  Problem reported
1787         by Petter Reinholdtsen.
1788
1789 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
1790
1791         * gnulib-tool (avoidlist): Fix typo that broke options like
1792         --avoid=lock that are used by coreutils bootstrap.
1793
1794 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
1795
1796         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
1797         more systematically.
1798
1799 2006-09-18  Jim Meyering  <jim@meyering.net>
1800
1801         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
1802
1803 2006-09-18  Bruno Haible  <bruno@clisp.org>
1804
1805         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
1806
1807 2006-09-18  Bruno Haible  <bruno@clisp.org>
1808
1809         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
1810         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
1811         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
1812         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
1813         * m4/gettext.m4: Require autoconf >= 2.52.
1814         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
1815         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
1816         of gl_cv_header_inttypes_h.
1817
1818 2006-09-18  Bruno Haible  <bruno@clisp.org>
1819
1820         * lib/javaversion.c: Include configmake.h.
1821
1822 2006-09-18  Bruno Haible  <bruno@clisp.org>
1823
1824         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
1825         avoid that the while loops be executed in a subshell.
1826
1827 2006-09-18  Bruno Haible  <bruno@clisp.org>
1828
1829         * MODULES.html.sh (func_module): Break long lines.
1830         Suggested by Bruce Korb <bkorb@gnu.org>.
1831
1832 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1833
1834         Speed up by a factor of 1.12.
1835         * gnulib-tool (nl): New variable.
1836         (func_import): Rewrite include directive extraction to only read each
1837         directive once.
1838
1839 2006-09-17  Bruno Haible  <bruno@clisp.org>
1840
1841         * modules/javaversion (Makefile.am): Remove DEFS setting.
1842         (Depends-on): Add configmake, for PKGDATADIR definition.
1843
1844 2006-09-17  Bruno Haible  <bruno@clisp.org>
1845
1846         * gnulib-tool (func_create_testdir): Rewrite all files at once.
1847
1848 2006-09-17  Bruno Haible  <bruno@clisp.org>
1849
1850         * gnulib-tool (func_append): New function, stolen from libtool.m4.
1851         (func_modules_transitive_closure, func_modules_add_dummy,
1852         func_modules_to_filelist, func_import, func_create_testdir,
1853         func_create_megatestdir, ...): Use it wherever possible.
1854         Suggested by Ralf Wildenhues.
1855
1856 2006-09-16  Karl Berry  <karl@gnu.org>
1857
1858         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
1859         to avoid sectioning errors.
1860         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
1861         [ifinfo]: blank line after @center-ed titles.
1862         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
1863         Spell FSF address consistently with others.
1864         (These changes approved by rms.)
1865
1866 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1867
1868         Speed up by a factor of 1.61.
1869         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
1870         already checked module names again.
1871
1872 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1873
1874         Speed up by a factor of 1.13.
1875         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
1876         for new_files, and the input to func_add_or_update.
1877
1878 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1879
1880         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
1881         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
1882
1883 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
1884
1885         * modules/mkancesdirs (Depends-on): Add fcntl.
1886         * modules/savewd: New file.
1887         * MODULES.html.sh (File system functions): Add savewd.
1888
1889         * modules/configmake (Makefile.am): Add support for the
1890         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
1891
1892 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
1893
1894         * m4/savewd.m4: New file.
1895
1896 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
1897
1898         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
1899         (dirchownmod): New arg FD.  All callers changed.
1900         Use FD rather than opening the directory ourself, as opening is
1901         now the caller's responsibility.
1902         * lib/dirchownmod.h: Likewise.
1903         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
1904         hosts that require <sys/types.h> before <sys/stat.h>.  Include
1905         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
1906         (test_dir): Remove.
1907         (mkancesdirs): Return length of prefix of FILE that has already
1908         been made, or -2 if there is a child doing the work.  Redo
1909         algorithm so that it is O(N) rather than O(N**2).  Optimize away
1910         ".", and treat ".." specially since it might stray back into
1911         already-created areas.  Use a subprocess if necessary.  New arg
1912         WD; all users changed.  MAKE_DIR function should now return 1
1913         if it creates a directory that is not readable.  Return -2 if
1914         a child process is spun off.
1915         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
1916         Adjust signature to match code.
1917         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
1918         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
1919         all users changed.
1920         * lib/savewd.c, savewd.h: New files.
1921
1922 2006-09-15  Jim Meyering  <jim@meyering.net>
1923
1924         * modules/rename-dest-slash: New module.
1925         * MODULES.html.sh (posix_compat): Add it here.
1926
1927         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
1928
1929 2006-09-15  Jim Meyering  <jim@meyering.net>
1930
1931         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
1932         file.
1933
1934         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
1935
1936 2006-09-15  Jim Meyering  <jim@meyering.net>
1937
1938         * lib/rename-dest-slash.c (has_trailing_slash): Use
1939         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
1940         (rpl_rename_dest_slash): Perform the cheaper trailing slash
1941         test before testing whether SRC is a directory.
1942         Suggestions from Bruno Haible.
1943
1944         Avoid a warning about an unused variable.
1945         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
1946         into the #ifdef block where it's used.
1947
1948         * lib/rename-dest-slash.c: New file.
1949
1950 2006-09-14  Bruno Haible  <bruno@clisp.org>
1951
1952         * lib/allocsa.c: Include <config.h> unconditionally.
1953         * lib/asnprintf.c: Likewise.
1954         * lib/asprintf.c: Likewise.
1955         * lib/c-strcasecmp.c: Likewise.
1956         * lib/c-strcasestr.c: Likewise.
1957         * lib/c-strncasecmp.c: Likewise.
1958         * lib/c-strstr.c: Likewise.
1959         * lib/classpath.c: Likewise.
1960         * lib/clean-temp.c: Likewise.
1961         * lib/concatpath.c: Likewise.
1962         * lib/copy-file.c: Likewise.
1963         * lib/csharpcomp.c: Likewise.
1964         * lib/csharpexec.c: Likewise.
1965         * lib/execute.c: Likewise.
1966         * lib/fatal-signal.c: Likewise.
1967         * lib/findprog.c: Likewise.
1968         * lib/fwriteerror.c: Likewise.
1969         * lib/gl_array_list.c: Likewise.
1970         * lib/gl_array_oset.c: Likewise.
1971         * lib/gl_avltree_list.c: Likewise.
1972         * lib/gl_avltree_oset.c: Likewise.
1973         * lib/gl_avltreehash_list.c: Likewise.
1974         * lib/gl_carray_list.c: Likewise.
1975         * lib/gl_linked_list.c: Likewise.
1976         * lib/gl_linkedhash_list.c: Likewise.
1977         * lib/gl_list.c: Likewise.
1978         * lib/gl_oset.c: Likewise.
1979         * lib/gl_rbtree_list.c: Likewise.
1980         * lib/gl_rbtree_oset.c: Likewise.
1981         * lib/gl_rbtreehash_list.c: Likewise.
1982         * lib/imaxabs.c: Likewise.
1983         * lib/imaxdiv.c: Likewise.
1984         * lib/javacomp.c: Likewise.
1985         * lib/javaexec.c: Likewise.
1986         * lib/javaversion.c: Likewise.
1987         * lib/linebreak.c: Likewise.
1988         * lib/localcharset.c: Likewise.
1989         * lib/lock.c: Likewise.
1990         * lib/mbchar.c: Likewise.
1991         * lib/mbswidth.c: Likewise.
1992         * lib/mkdtemp.c: Likewise.
1993         * lib/pipe.c: Likewise.
1994         * lib/printf-args.c: Likewise.
1995         * lib/printf-parse.c: Likewise.
1996         * lib/progname.c: Likewise.
1997         * lib/progreloc.c: Likewise.
1998         * lib/readlink.c: Likewise.
1999         * lib/sh-quote.c: Likewise.
2000         * lib/stpcpy.c: Likewise.
2001         * lib/stpncpy.c: Likewise.
2002         * lib/strcasecmp.c: Likewise.
2003         * lib/strcasestr.c: Likewise.
2004         * lib/strcspn.c: Likewise.
2005         * lib/striconv.c: Likewise.
2006         * lib/strncasecmp.c: Likewise.
2007         * lib/strnlen1.c: Likewise.
2008         * lib/strstr.c: Likewise.
2009         * lib/strtok_r.c: Likewise.
2010         * lib/tls.c: Likewise.
2011         * lib/tmpdir.c: Likewise.
2012         * lib/unicodeio.c: Likewise.
2013         * lib/unsetenv.c: Likewise.
2014         * lib/vasnprintf.c: Likewise.
2015         * lib/vasprintf.c: Likewise.
2016         * lib/wait-process.c: Likewise.
2017         * lib/xallocsa.c: Likewise.
2018         * lib/xsetenv.c: Likewise.
2019         * lib/xstriconv.c: Likewise.
2020
2021 2006-09-13  Simon Josefsson  <jas@extundo.com>
2022
2023         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
2024         that internally, suggested by Ralf Wildenhues
2025         <Ralf.Wildenhues@gmx.de>.
2026
2027 2006-09-13  Simon Josefsson  <jas@extundo.com>
2028
2029         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
2030         @LIBOBJS@.
2031         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2032
2033 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
2034
2035         * lib/_fpending.c: Include <config.h> unconditionally, since we no
2036         longer worry about uses that don't define HAVE_CONFIG_H.
2037         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
2038         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
2039         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
2040         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
2041         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
2042         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
2043         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
2044         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
2045         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
2046         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
2047         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
2048         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
2049         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
2050         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
2051         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
2052         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
2053         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
2054         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
2055         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
2056         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
2057         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
2058         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
2059         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
2060         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
2061         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
2062         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
2063         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
2064         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
2065         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
2066         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
2067         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
2068         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
2069         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
2070         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
2071         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
2072         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
2073         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
2074         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
2075         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
2076         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
2077         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
2078         Likewise.
2079
2080 2006-09-13  Eric Blake  <ebb9@byu.net>
2081
2082         * lib/getopt.c: Fix typo in last commit.
2083
2084 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2085
2086         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
2087         dgettext.
2088
2089 2006-09-12  Jim Meyering  <jim@meyering.net>
2090
2091         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
2092         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
2093         Reported by Nelson H. F. Beebe.
2094
2095 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
2096
2097         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
2098         program_invocation_name and program_invocation_short_name are
2099         initialized.
2100         * lib/argp-namefrob.h: Move declarations of program_invocation_name
2101         and program_invocation_short_name to argp.h, so they are visible
2102         to user programs.
2103         * lib/argp.h: Likewise
2104
2105 2006-09-10  Bruno Haible  <bruno@clisp.org>
2106
2107         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
2108         m4/inttypes_h.m4, m4/uintmax_t.m4.
2109
2110 2006-09-10  Bruno Haible  <bruno@clisp.org>
2111
2112         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
2113         gl_AC_TYPE_UINTMAX_T.
2114
2115 2006-09-10  Bruno Haible  <bruno@clisp.org>
2116
2117         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
2118
2119 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
2120
2121         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
2122         convention.  Text proposed by Bruno Haible.
2123         (struct argp_option): Document the use of N_() wrappers.
2124
2125         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
2126         '\v', and translate the two parts separately, instead of feeding
2127         the whole string to gettext.  This allows to exclude
2128         '\v' from the strings visible to the translator by writing doc
2129         strings as N_("..") "\v" N_("..").
2130
2131 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
2132
2133         * config/srclist.txt: Undo latest change; the bug was fixed.
2134
2135 2006-09-09  Bruno Haible  <bruno@clisp.org>
2136
2137         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
2138         assignments if building a library without libtool.
2139         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
2140         in func_emit_lib_Makefile_am.
2141         (func_import): When building a static library libfoo.a, arrange to
2142         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
2143         (func_create_testdir): Likewise.
2144         * modules/gc (configure.ac, Makefile.am): If building statically,
2145         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
2146         * modules/iconvme (configure.ac, Makefile.am): Likewise.
2147         * modules/striconv (configure.ac, Makefile.am): Likewise.
2148         Based on a suggestion by Ralf Wildenhues.
2149
2150 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2151
2152         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2153         Check for unistd.h too, since Autoconf doesn't assume POSIX.
2154         Also:
2155
2156         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2157         Add year_2050_test to catch glibc bug 2821
2158         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
2159
2160         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
2161         Prefer #ifdef to #if.
2162
2163         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
2164         Return from 'main' instead of calling 'exit'.
2165
2166 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2167
2168         * lib/mktime.c (guess_time_tm): Fix bug where mktime
2169         returned the maximum time_t value rather than (time_t) -1.
2170         Problem originally reported by William Bardwell
2171         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
2172
2173         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
2174         Moved to here ...
2175         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
2176         ... from here.
2177
2178 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2179
2180         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
2181         2821 is fixed.
2182
2183 2006-09-08  Jim Meyering  <jim@meyering.net>
2184
2185         Don't make generated files read-only.  That would bother too many
2186         people.  However, do retain the ability to work when targets are
2187         read-only: remove the destination and temporary files before writing
2188         them (when generated via sed or echo), or by using the -f option for
2189         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
2190         * modules/alloca-opt, modules/argz, modules/arpa_inet:
2191         * modules/byteswap, modules/configmake, modules/fcntl:
2192         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
2193         * modules/localcharset, modules/netinet_in, modules/poll:
2194         * modules/stdbool, modules/stdint, modules/sys_select:
2195         * modules/sys_socket, modules/sys_stat, modules/sysexits:
2196
2197 2006-09-08  Jim Meyering  <jim@meyering.net>
2198
2199         Avoid new build failure on FreeBSD 6.0.
2200         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
2201         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
2202         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
2203
2204 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2205
2206         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
2207
2208 2006-09-07  Jim Meyering  <jim@meyering.net>
2209
2210         Fix global typo in last change: use chmod u-w, not chmod u-x.
2211         Spotted by Paul Eggert and Bruce Korb.
2212         * modules/alloca-opt, modules/argz, modules/arpa_inet:
2213         * modules/byteswap, modules/configmake, modules/fcntl:
2214         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
2215         * modules/localcharset, modules/netinet_in, modules/poll:
2216         * modules/stdbool, modules/stdint, modules/sys_select:
2217         * modules/sys_socket, modules/sys_stat, modules/sysexits:
2218
2219 2006-09-06  Jim Meyering  <jim@meyering.net>
2220
2221         Make generated files be read-only.
2222         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
2223         Ensure that each generated file is now read-only.
2224         * modules/argz: Likewise.
2225         * modules/arpa_inet: Likewise.
2226         * modules/byteswap: Likewise.
2227         * modules/configmake: Likewise.
2228         * modules/fcntl: Likewise.
2229         * modules/fnmatch: Likewise.
2230         * modules/getopt: Likewise.
2231         * modules/glob: Likewise.
2232         * modules/inttypes: Likewise.
2233         * modules/netinet_in: Likewise.
2234         * modules/poll: Likewise.
2235         * modules/stdbool: Likewise.
2236         * modules/stdint: Likewise.
2237         * modules/sys_select: Likewise.
2238         * modules/sys_socket: Likewise.
2239         * modules/sys_stat: Likewise.
2240         * modules/sysexits: Likewise.
2241         * modules/localcharset: Same as above, but continue using temporary
2242         file named "t-$@" (why different?) rather than the "$@-t" used
2243         everywhere else.
2244
2245         * modules/sysexits (Makefile.am): Replace literal occurrences
2246         of "sysexit.h" more readable, and more consistent, "$@".
2247
2248 2006-09-06  Bruno Haible  <bruno@clisp.org>
2249
2250         * modules/striconv: New file.
2251         * modules/xstriconv: New file.
2252         * MODULES.html.sh (Internationalization functions): Add striconv,
2253         xstriconv.
2254
2255 2006-09-06  Bruno Haible  <bruno@clisp.org>
2256
2257         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
2258         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
2259         not using libtool correctly.
2260
2261 2006-09-06  Bruno Haible  <bruno@clisp.org>
2262
2263         * lib/striconv.h: New file.
2264         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
2265         iconvstring.c.
2266         * lib/xstriconv.h: New file.
2267         * lib/xstriconv.c: New file.
2268
2269 2006-09-06  Bruno Haible  <bruno@clisp.org>
2270
2271         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2272         lib_..._LDFLAGS.
2273
2274 2006-09-05  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2275
2276         * lib/argz_.h: Sync from Libtool.
2277
2278         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
2279                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2280
2281         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
2282
2283 2006-09-05  Davide Angelocola <davide.angelocola@tiscali.it>
2284
2285         * modules/trim: New file.
2286
2287 2006-09-05  Davide Angelocola <davide.angelocola@tiscali.it>
2288
2289         * lib/trim.h: New file.
2290         * lib/trim.c: New file.
2291
2292 2006-09-05  Bruno Haible  <bruno@clisp.org>
2293
2294         * MODULES.html.sh (String handling): Add trim.
2295
2296 2006-09-04  Karl Berry  <karl@gnu.org>
2297
2298         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
2299         until next release.
2300
2301 2006-09-03  Bruno Haible  <bruno@clisp.org>
2302
2303         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
2304         correctly.
2305
2306 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
2307
2308         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
2309         not gl_GETLOADAVG.  Omit unneeded semicolons.
2310         Problems reported by Ralf Wildenhues in
2311         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
2312         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
2313         at the end, which is the usual gnulib style.
2314
2315         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
2316         of doing all the work ourselves.
2317         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
2318         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
2319
2320 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
2321
2322         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
2323         Problem reported by Ralf Wildenhues in
2324         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
2325
2326         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
2327         HAVE_STRUCT_STATFS_F_FSTYPENAME.
2328
2329 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
2330
2331         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
2332         yesterday's patch by changing test -n to test -z.
2333
2334 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
2335
2336         * modules/getloadavg (Files): Add m4/getloadavg.m4.
2337         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
2338         the former is now obsolescent.
2339
2340         * modules/chdir-long (Depends-on): Add fcntl.
2341
2342 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
2343
2344         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
2345         obsolescent, and programs should use gnulib instead.
2346         * m4/getloadavg.m4: New file, with contents taken from Autoconf
2347         but with prefixes changed.
2348
2349 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
2350
2351         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
2352         or stdbool.h, because they might not exist while configuring.
2353
2354         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
2355         Don't include unistd.h or limits.h; not needed, since chdir-long.h
2356         does that for us.
2357         (O_DIRECTORY): Remove.
2358
2359 2006-08-31  Eric Blake  <ebb9@byu.net>
2360
2361         * gnulib-tool: Don't let emacs change spaces to TAB.
2362
2363 2006-08-31  Bruno Haible  <bruno@clisp.org>
2364
2365         * gnulib-tool: When calling func_import more than once, do it in a
2366         subshell.
2367         Reported by Eric Blake <ebb9@byu.net>.
2368
2369 2006-08-31  Bruno Haible  <bruno@clisp.org>
2370
2371         * gnulib-tool (nl): Remove variable.
2372         (sed_transform_lib_file): Use more robust test for config-h module.
2373         (func_import): Fix typo in 2006-08-25 patch.
2374
2375 2006-08-31  Bruno Haible  <bruno@clisp.org>
2376
2377         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
2378         specified, augment Makefile.am variables instead of assigning them.
2379
2380 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2381
2382         Work around a bug in both the Linux and SunOS 64-bit kernels:
2383         nanosleep mishandles sleeps for longer than 2**31 seconds.
2384         Problem reported by Frank v Waveren in
2385         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
2386         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
2387         Check for nanosleep bug.
2388         (LIB_NANOSLEEP): Append clock_gettime library if needed.
2389
2390 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2391
2392         Work around a bug in both the Linux and SunOS 64-bit kernels:
2393         nanosleep mishandles sleeps for longer than 2**31 seconds.
2394         Problem reported by Frank v Waveren in
2395         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
2396         * lib/nanosleep.c (BILLION): New constant.
2397         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
2398         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
2399         implementation.
2400
2401 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2402
2403         * modules/nanosleep (Depends-on): Add gettime.
2404
2405 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2406         and Simon Josefsson  <jas@extundo.com>
2407         and Oskar Liljeblad  <oskar@osk.mine.nu>
2408
2409         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
2410         * gnulib-tool (func_import): New license type 'unmodifiable license
2411         text'.
2412         * modules/fdl: Use it.  Longer description.
2413         * module/gpl, module/lgpl: New files.
2414
2415 2006-08-30  Jim Meyering  <jim@meyering.net>
2416
2417         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
2418         shadowing the parameter.
2419
2420 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2421
2422         Sync from Libtool:
2423
2424         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2425
2426         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
2427         sharing with gnulib.  Report by Eric Blake.
2428
2429 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2430
2431         * modules/isapipe: New file.
2432         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
2433
2434 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2435
2436         * modules/configmake (Makefile.am): Add a comment, and omit
2437         the CONFIGMAKE_ prefix from generated macro names.  Suggested
2438         by Bruno Haible.
2439
2440 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2441
2442         * m4/isapipe.m4: New file.
2443
2444 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2445
2446         * lib/isapipe.c, isapipe.h: New files.
2447
2448 2006-08-29  Jim Meyering  <jim@meyering.net>
2449
2450         * modules/configmake (Makefile.am): Make configmake.h depend on
2451         Makefile.  Otherwise, a stale configmake.h could hang around.
2452
2453 2006-08-29  Eric Blake  <ebb9@byu.net>
2454
2455         * lib/error.c (error_at_line, print_errno_message): Match libc, after
2456         resolution of upstream bug 3044.
2457
2458 2006-08-29  Bruno Haible  <bruno@clisp.org>
2459
2460         * modules/localcharset (Depends-on): Add configmake.
2461         (Makefile.am): Remove setting of LIBDIR through DEFS.
2462
2463 2006-08-29  Bruno Haible  <bruno@clisp.org>
2464
2465         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
2466         defined.
2467
2468 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2469
2470         * modules/fcntl: New file.
2471         * modules/chdir-safer (Depends-on): Add fcntl.
2472         * modules/fts: Likewise.
2473         * modules/mkdir-p: Likewise.
2474
2475         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
2476         This undoes the most recent change, since we're now addressing the
2477         problem in a different way.
2478
2479         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
2480         into output, since the output might be called Makefile.am even
2481         if $makefile_name is something different.
2482         (func_import): Use $makefile_am rather than
2483         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
2484         empty.
2485
2486         * modules/inttypes (Files): Add m4/inttypes-h.m4.
2487
2488 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2489
2490         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
2491         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
2492         recent change to stdint.m4, since we're now addressing the problem in a
2493         different way.
2494
2495 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2496
2497         * m4/fcntl_h.m4: New file.
2498
2499 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2500
2501         * lib/fcntl_.h: New file.
2502         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
2503         the fcntl module.
2504         * lib/dirchownmod.c: Likewise.
2505         * lib/fts.c: Likewise.
2506
2507         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
2508         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
2509         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
2510         just before including <inttypes.h>, to avoid circular inclusion.
2511
2512 2006-08-28  Jim Meyering  <jim@meyering.net>
2513
2514         * doc/visibility.texi: Actually read and correct the grammar of the
2515         sentence affected by yesterday's change.
2516
2517 2006-08-28  Eric Blake  <ebb9@byu.net>
2518
2519         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
2520         needs wrapper.
2521
2522 2006-08-28  Eric Blake  <ebb9@byu.net>
2523
2524         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
2525
2526 2006-08-28  Eric Blake  <ebb9@byu.net>
2527
2528         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
2529
2530 2006-08-28  Bruno Haible  <bruno@clisp.org>
2531
2532         * modules/c-strstr: New file, from GNU gettext.
2533         * MODULES.html.sh (String handling): Add c-strstr.
2534
2535 2006-08-28  Bruno Haible  <bruno@clisp.org>
2536
2537         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
2538         macros.
2539         Reported by Eric Blake.
2540
2541 2006-08-28  Bruno Haible  <bruno@clisp.org>
2542
2543         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
2544         (VASNPRINTF): Return a string of length > INT_MAX without failing.
2545         * lib/vasprintf.c: Include errno.h, limits.h.
2546         (EOVERFLOW): New fallback definition.
2547         (vasprintf): Test here whether the string length is > INT_MAX.
2548         * lib/vsnprintf.c: Include errno.h, limits.h.
2549         (EOVERFLOW): New fallback definition.
2550         (vsnprintf): Fix bug when generated string was too long for the buffer.
2551         Test here whether the string length is > INT_MAX.
2552
2553 2006-08-28  Bruno Haible  <bruno@clisp.org>
2554
2555         * lib/inttypes_.h (SCNX*): Remove definitions.
2556         Reported by Eric Blake.
2557
2558 2006-08-28  Bruno Haible  <bruno@clisp.org>
2559
2560         * lib/c-strstr.h: New file, from GNU gettext.
2561         * lib/c-strstr.c: New file, from GNU gettext.
2562
2563 2006-08-28  Bruno Haible  <bruno@clisp.org>
2564
2565         * gnulib-tool: Reorder some statements.
2566
2567 2006-08-28  Bruno Haible  <bruno@clisp.org>
2568
2569         * gnulib-tool: New option --makefile-name.
2570         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
2571         $makefile_name.
2572         (func_import): Write $makefile_name to the cache file, and read it from
2573         there unless explicitly specified. Use $makefile_name as file name
2574         instead of Makefile.am. Adjust the recommendations accordingly.
2575
2576 2006-08-28  Bruno Haible  <bruno@clisp.org>
2577
2578         * gnulib-tool (func_verify_module): Check against misapplying patch.
2579
2580 2006-08-28  Bruno Haible  <bruno@clisp.org>
2581
2582         * gnulib-tool (func_relativize, func_relconcat): New functions.
2583         Give an error if --local-dir is given with --update.
2584         Remove trailing slashes from $local_gnulib_dir.
2585         (func_import): Store the relativized $local_gnulib_dir in
2586         gnulib-cache.m4, and read it from there if not specified explicitly.
2587
2588 2006-08-28  Bruno Haible  <bruno@clisp.org>
2589
2590         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
2591         is the current directory. Respect also $local_gnulib_dir.
2592
2593 2006-08-28  Bruno Haible  <bruno@clisp.org>
2594             Simon Josefsson  <jas@extundo.com>
2595
2596         BeOS portability.
2597         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
2598
2599 2006-08-27  Jim Meyering  <jim@meyering.net>
2600
2601         * doc/visibility.texi: Remove duplicate word: "pointer".
2602
2603 2006-08-26  Bruno Haible  <bruno@clisp.org>
2604
2605         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
2606         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
2607         (Makefile.am): Create inttypes.h from inttypes_.h.
2608         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
2609
2610         * modules/imaxabs: New file.
2611
2612         * modules/imaxdiv: New file.
2613
2614 2006-08-26  Bruno Haible  <bruno@clisp.org>
2615
2616         * m4/inttypes.m4: New file.
2617         * m4/_inttypes_h.m4: Remove file.
2618         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
2619         PRI_MACROS_BROKEN.
2620         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
2621
2622         * m4/imaxabs.m4: New file.
2623
2624         * m4/imaxdiv.m4: New file.
2625
2626 2006-08-26  Bruno Haible  <bruno@clisp.org>
2627
2628         * lib/inttypes_.h: New file.
2629         * lib/inttypes.h: Remove file.
2630         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
2631
2632         * lib/imaxabs.c: New file.
2633
2634         * lib/imaxdiv.c: New file.
2635
2636 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
2637
2638         New config-h module, so that "make" output needn't be cluttered
2639         by -DHAVE_CONFIG_H.
2640         * MODULES.html.sh (Support for building libraries and executables):
2641         Add config-h.
2642         * modules/config-h: New file.
2643         * gnulib-tool (nl, sed_transform_lib_file): New vars.
2644         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
2645         the config-h module is used.
2646
2647         New configmake module, so that "make" output needn't be cluttered
2648         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
2649         * MODULES.html.sh (Support for building libraries and executables):
2650         Add configmake.
2651         * modules/configmake: New file.
2652
2653 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
2654
2655         * m4/config-h.m4: New file.
2656
2657 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
2658
2659         * config/srclist.txt: Add elisp-comp.
2660
2661 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
2662
2663         * MODULES.html.sh (Support for building libraries and executables):
2664         Add elisp-comp.
2665         * build-aux/elisp-comp: New file.
2666         * modules/elisp-comp: New file.
2667
2668 2006-08-24  Bruno Haible <bruno@clisp.org>
2669
2670         * gnulib-tool (func_create_testdir): Use non-default values of
2671         sourcebase and m4base.
2672
2673 2006-08-24  Bruno Haible <bruno@clisp.org>
2674
2675         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
2676         HTML structure.
2677
2678 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
2679
2680         * modules/openat (Depends-on): Add lchown.
2681
2682 2006-08-23  Bruno Haible <bruno@clisp.org>
2683
2684         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
2685         of gl_LOCK_EARLY instead of gl_LOCK.
2686
2687 2006-08-23  Bruno Haible  <bruno@clisp.org>
2688
2689         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
2690         on OSF/1 to no.
2691         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
2692
2693 2006-08-23  Bruno Haible  <bruno@clisp.org>
2694
2695         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
2696         as unusable.
2697
2698         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
2699         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
2700         (gl_LOCK): New macro.
2701
2702 2006-08-22  Simon Josefsson  <jas@extundo.com>
2703
2704         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
2705         to md5 module.
2706
2707 2006-08-22  Simon Josefsson  <jas@extundo.com>
2708
2709         * MODULES.html.sh: Add "Support for maintaining and release
2710         projects".
2711
2712         * build-aux/gnupload: New file, from coreutils.
2713
2714 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
2715
2716         Avoid the need for AC_LIBSOURCES in m4 macros.
2717         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
2718         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
2719         * modules/check-version (EXTRA_DIST): Add check-version.h.
2720         * modules/crc (EXTRA_DIST): Add crc.h.
2721         * modules/des (EXTRA_DIST): Add des.h.
2722         * modules/gc (EXTRA_DIST): Add gc.h.
2723         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
2724         * modules/getline (EXTRA_DIST): Add getline.h.
2725         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
2726         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
2727         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
2728         * modules/md2 (EXTRA_DIST): Add md2.h.
2729         * modules/md4 (EXTRA_DIST): Add md4.h.
2730         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
2731         * modules/read-file (EXTRA_DIST): Add read-file.h.
2732         * modules/readline (EXTRA_DIST): Add readline.h.
2733         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
2734         rijndael-api-fst.h.
2735
2736 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
2737
2738         * m4/rijndael.m4 (gl_ARCFOUR):
2739         * m4/arctwo.m4 (gl_ARCTWO):
2740         * m4/check-version.m4 (gl_CHECK_VERSION):
2741         * m4/crc.m4 (gl_CRC):
2742         * m4/des.m4 (gl_DES):
2743         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
2744         * m4/gc.m4 (gl_GC):
2745         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
2746         * m4/getline.m4 (gl_FUNC_GETLINE):
2747         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
2748         * m4/hmac-md5.m4 (gl_HMAC_MD5):
2749         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
2750         * m4/md2.m4 (gl_MD2):
2751         * m4/md4.m4 (gl_MD4):
2752         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
2753         * m4/read-file.m4 (gl_FUNC_READ_FILE):
2754         * m4/readline.m4 (gl_FUNC_READLINE):
2755         * m4/rijndael.m4 (gl_RIJNDAEL):
2756         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
2757         to get the necessary .h files and whatnot.
2758
2759 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
2760
2761         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
2762         gnulib rather than the other way around.
2763         * config/srclistvars.sh (COREUTILS): Remove.
2764
2765 2006-08-22  Jim Meyering  <jim@meyering.net>
2766
2767         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
2768
2769         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
2770
2771 2006-08-22  Eric Blake  <ebb9@byu.net>
2772
2773         * modules/regexprops-generic: New file.
2774         * MODULES.html.sh (Support for building documentation): List it.
2775
2776 2006-08-22  Eric Blake  <ebb9@byu.net>
2777
2778         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
2779         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
2780         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
2781         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
2782
2783 2006-08-22  Bruno Haible <bruno@clisp.org>
2784
2785         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
2786         and lib_LTLIBRARIES like the other lib_* variables.
2787
2788 2006-08-22  Bruno Haible <bruno@clisp.org>
2789
2790         * build-aux/x-to-1.in: New file, from GNU gettext.
2791
2792 2006-08-22  Bruno Haible  <bruno@clisp.org>
2793
2794         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
2795         <utmpx.h> exists.
2796
2797 2006-08-22  Bruno Haible  <bruno@clisp.org>
2798
2799         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
2800         <utmpx.h> exists.
2801
2802 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
2803
2804         BeOS portability.
2805         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
2806         exist.
2807         Problem reported by Bruno Haible.
2808
2809 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
2810
2811         Avoid the need for AC_LIBSOURCES in m4 macros.
2812         * modules/acl (EXTRA_DIST): Add acl.h.
2813         * modules/argmatch (Files): Add m4/argmatch.m4.
2814         (configure.ac): Add gl_ARGMATCH.
2815         (EXTRA_DIST): Renamed from lib_SOURCES, for
2816         consistency with the other modules.  Remove argmatch.c.
2817         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
2818         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
2819         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
2820         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
2821         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
2822         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
2823         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
2824         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
2825         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
2826         * modules/closeout (EXTRA_DIST): Add closeout.h.
2827         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
2828         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
2829         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
2830         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
2831         dirname.h; remove basename.c and stripslash.c.
2832         * modules/exclude (EXTRA_DIST): Add exclude.h.
2833         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
2834         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
2835         * modules/file-type (EXTRA_DIST): Add file-type.h.
2836         * modules/filemode (EXTRA_DIST): Add filemode.h.
2837         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
2838         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
2839         * modules/fpending (EXTRA_DIST): Add __fpending.h.
2840         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
2841         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
2842         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
2843         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
2844         * modules/getdate (EXTRA_DIST): Add getdate.c.
2845         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
2846         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
2847         * modules/getpass (EXTRA_DIST): Add getpass.h.
2848         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
2849         * modules/group-member (EXTRA_DIST): Add group-member.h.
2850         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
2851         * modules/hash (EXTRA_DIST): Add hash.h.
2852         * modules/human (EXTRA_DIST): Add human.h.
2853         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
2854         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
2855         * modules/lchown (EXTRA_DIST): Add lchown.h.
2856         * modules/long-options (EXTRA_DIST): Add long-options.h.
2857         * modules/lstat (EXTRA_DIST): Add lstat.h.
2858         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
2859         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
2860         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
2861         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
2862         * modules/memxor (EXTRA_DIST): Add memxor.h.
2863         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
2864         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
2865         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
2866         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
2867         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
2868         * modules/physmem (EXTRA_DIST): Add physmem.h.
2869         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
2870         * modules/posixver (EXTRA_DIST): Add posixver.h.
2871         * modules/quote (EXTRA_DIST): Add quote.h.
2872         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
2873         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
2874         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
2875         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
2876         regex_internal.h regexec.c.
2877         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
2878         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
2879         * modules/same (EXTRA_DIST): Add same.h.
2880         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
2881         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
2882         * modules/savedir (EXTRA_DIST): Add savedir.h.
2883         * modules/sha1 (EXTRA_DIST): Add sha1.h.
2884         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
2885         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
2886         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
2887         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
2888         * modules/strdup (EXTRA_DIST): Add strdup.h.
2889         * modules/strftime (EXTRA_DIST): Add strftime.h.
2890         * modules/strndup (EXTRA_DIST): Add strndup.h.
2891         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
2892         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
2893         * modules/time_r (EXTRA_DIST): Add time_r.h.
2894         * modules/timespec (EXTRA_DIST): Add timespec.h.
2895         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
2896         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
2897         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
2898         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
2899         * modules/userspec (EXTRA_DIST): Add userspec.h.
2900         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
2901         * modules/utimens (EXTRA_DIST): Add utimens.h.
2902         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
2903         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
2904         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
2905         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
2906         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
2907         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
2908         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
2909         * modules/yesno (EXTRA_DIST): Add yesno.h.
2910
2911 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
2912
2913         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
2914
2915         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
2916         * m4/dev-ino.m4, same-inode.m4: Remove.
2917
2918         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
2919         * m4/acl.m4 (AC_FUNC_ACL):
2920         * m4/backupfile.m4 (gl_BACKUPFILE):
2921         * m4/c-strtod.m4 (gl_C99_STRTOLD):
2922         * m4/canon-host.m4 (gl_CANON_HOST):
2923         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2924         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
2925         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
2926         * m4/cloexec.m4 (gl_CLOEXEC):
2927         * m4/close-stream.m4 (gl_CLOSE_STREAM):
2928         * m4/closeout.m4 (gl_CLOSEOUT):
2929         * m4/dirfd.m4 (gl_FUNC_DIRFD):
2930         * m4/dirname.m4 (gl_DIRNAME):
2931         * m4/exclude.m4 (gl_EXCLUDE):
2932         * m4/exitfail.m4 (gl_EXITFAIL):
2933         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
2934         * m4/file-type.m4 (gl_FILE_TYPE):
2935         * m4/filemode.m4 (gl_FILEMODE):
2936         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
2937         * m4/fpending.m4 (gl_FUNC_FPENDING):
2938         * m4/fprintftime.m4 (gl_FPRINTFTIME):
2939         * m4/fts.m4 (gl_FUNC_FTS):
2940         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
2941         * m4/getdate.m4 (gl_GETDATE):
2942         * m4/gethrxtime.m4 (gl_GETHRXTIME):
2943         * m4/getpagesize.m4 (gl_GETPAGESIZE):
2944         * m4/getpass.m4 (gl_FUNC_GETPASS):
2945         * m4/gettime.m4 (gl_GETTIME):
2946         * m4/getugroups.m4 (gl_GETUGROUPS):
2947         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
2948         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
2949         * m4/hard-locale.m4 (gl_HARD_LOCALE):
2950         * m4/hash.m4 (gl_HASH):
2951         * m4/idcache.m4 (gl_IDCACHE):
2952         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
2953         * m4/lchown.m4 (gl_FUNC_LCHOWN):
2954         * m4/long-options.m4 (gl_LONG_OPTIONS):
2955         * m4/lstat.m4 (gl_FUNC_LSTAT):
2956         * m4/md5.m4 (gl_MD5):
2957         * m4/memcasecmp.m4 (gl_MEMCASECMP):
2958         * m4/memcoll.m4 (gl_MEMCOLL):
2959         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
2960         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
2961         * m4/memxor.m4 (gl_MEMXOR):
2962         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
2963         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
2964         * m4/modechange.m4 (gl_MODECHANGE):
2965         * m4/mountlist.m4 (gl_MOUNTLIST):
2966         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2967         * m4/openat.m4 (gl_FUNC_OPENAT):
2968         * m4/pathmax.m4 (gl_PATHMAX):
2969         * m4/physmem.m4 (gl_PHYSMEM):
2970         * m4/posixtm.m4 (gl_POSIXTM):
2971         * m4/posixver.m4 (gl_POSIXVER):
2972         * m4/quote.m4 (gl_QUOTE):
2973         * m4/quotearg.m4 (gl_QUOTEARG):
2974         * m4/readtokens.m4 (gl_READTOKENS):
2975         * m4/readutmp.m4 (gl_READUTMP):
2976         * m4/regex.m4 (gl_REGEX):
2977         * m4/safe-read.m4 (gl_SAFE_READ):
2978         * m4/safe-write.m4 (gl_SAFE_WRITE):
2979         * m4/same.m4 (gl_SAME):
2980         * m4/save-cwd.m4 (gl_SAVE_CWD):
2981         * m4/savedir.m4 (gl_SAVEDIR):
2982         * m4/settime.m4 (gl_SETTIME):
2983         * m4/sha1.m4 (gl_SHA1):
2984         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
2985         * m4/stat-macros.m4 (gl_STAT_MACROS):
2986         * m4/stat-time.m4 (gl_STAT_TIME):
2987         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
2988         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
2989         * m4/strdup.m4 (gl_FUNC_STRDUP):
2990         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
2991         * m4/strndup.m4 (gl_FUNC_STRNDUP):
2992         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
2993         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
2994         * m4/time_r.m4 (gl_TIME_R):
2995         * m4/timespec.m4 (gl_TIMESPEC):
2996         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
2997         * m4/unlinkdir.m4 (gl_UNLINKDIR):
2998         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
2999         * m4/userspec.m4 (gl_USERSPEC):
3000         * m4/utimecmp.m4 (gl_UTIMECMP):
3001         * m4/utimens.m4 (gl_UTIMENS):
3002         * m4/xalloc.m4 (gl_XALLOC):
3003         * m4/xgetcwd.m4 (gl_XGETCWD):
3004         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
3005         * m4/xreadlink.m4 (gl_XREADLINK):
3006         * m4/xstrtod.m4 (gl_XSTRTOD):
3007         * m4/yesno.m4 (gl_YESNO):
3008         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
3009         to get the necessary .h files and whatnot.
3010
3011 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
3012             Bruno Haible <bruno@clisp.org>
3013
3014         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
3015         /bin/sh understanding of '!' conditional negation.
3016
3017 2006-08-21  Jim Meyering  <jim@meyering.net>
3018
3019         * modules/openat (Depends-on): Really alphabetize.
3020
3021         * modules/acl (Depends-on): Add error and quote.
3022
3023         * check-module (find_included_lib_files): Add at-func.c to the
3024         ok-to-include-more-than-once white list.
3025
3026         * modules/openat (Depends-on): Add lstat.  Alphabetize.
3027
3028 2006-08-21  Bruno Haible <bruno@clisp.org>
3029
3030         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3031         Emit a pkgdata_DATA variable only if some snippets add contents to it.
3032         Reported by Martin Lambers <marlam@marlam.de>.
3033
3034 2006-08-21  Bruno Haible <bruno@clisp.org>
3035
3036         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
3037         specify an installation location, don't emit a noinst_LIBRARIES or
3038         noinst_LTLIBRARIES assignment.
3039
3040 2006-08-21  Bruno Haible  <bruno@clisp.org>
3041
3042         BeOS portability.
3043         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
3044         BeOS has mbrtowc() but no <wctype.h>.
3045
3046 2006-08-21  Bruno Haible  <bruno@clisp.org>
3047
3048         BeOS portability.
3049         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
3050         exist.
3051
3052 2006-08-21  Bruno Haible  <bruno@clisp.org>
3053
3054         BeOS portability.
3055         * lib/mbchar.h: Include <wctype.h> only if it exists.
3056
3057 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3058
3059         Remove files that are no longer needed by their respective modules.
3060         * m4/obstack.m4: Remove.
3061         * m4/strerror_r.m4: Remove.
3062         * m4/uint32_t.m4: Remove.
3063         * m4/uintptr_t.m4: Remove.
3064         * m4/ullong_max.m4: Remove.
3065         * m4/xstrtoimax.m4: Remove.
3066         * m4/xstrtoumax.m4: Remove.
3067
3068         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
3069         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
3070         dependencies now capture this.
3071
3072         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
3073         Do not use AC_LIBSOURCES, since gnulib modules now do this.
3074         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
3075         * m4/human.m4 (gl_HUMAN): Likewise.
3076         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
3077         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
3078
3079         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
3080
3081         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
3082         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
3083         stdint.
3084         * m4/human.m4 (gl_HUMAN): Likewise.
3085         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
3086         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
3087         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3088         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3089         * m4/xstrtol (gl_XSTRTOL): Likewise.
3090
3091         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
3092         AC_TYPE_LONG_LONG_INT.
3093         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3094         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
3095         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
3096         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3097
3098         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
3099         on stdbool.
3100
3101         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
3102         (gl_PREREQ_XSTRTOUL): Remove.
3103
3104         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
3105
3106         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
3107         mode.
3108
3109 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3110
3111         Add and change modules to make it easier for coreutils to use
3112         gnulib-tool.
3113         * modules/backupfile (Files): Remove m4/d-ino.m4.
3114         (Depends-on): Add d-ino.
3115         * modules/cycle-check (Depends-on): Add stdint.
3116         (lib_SOURCES): Add cycle-check.h.
3117         * modules/d-ino: New module.
3118         * modules/d-type: New module.
3119         * modules/error (Files): Remove m4/strerror_r.m4.
3120         * modules/filemode (Files): Add m4/st_dm_mode.m4.
3121         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
3122         m4/inttypes_h.m4, m4/uintmax_t.m4.
3123         (Depends-on): Add stdint.
3124         (lib_SOURCES): Add fsusage.h.
3125         * modules/getcwd (Files): Remove d-ino.m4.
3126         (Depends-on): Add d-ino.
3127         * modules/getndelim2 (Depends-on): Add stdint.
3128         * modules/glob (Files): Remove m4/d-type.m4.
3129         (Depends-on): Add d-type.
3130         * modules/host-os: New module.
3131         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
3132         m4/inttypes_h.m4, m4/uintmax_t.m4.
3133         * Depends-on: Add stdint.
3134         (lib_SOURCES): Add human.h.
3135         * modules/inttostr (Files): Remove m4/intmax_t.m4,
3136         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
3137         m4/uintmax_t.m4, m4/ulonglong.m4.
3138         (Depends-on): Add stdint.
3139         (EXTRA_DIST): Add inttostr.h.
3140         * modules/lchmod: New module.
3141         * modules/link-follow: New module.
3142         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
3143         (Depends-on): Add lchmod.
3144         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
3145         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
3146         (Depends-on): Add stdint.
3147         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
3148         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3149         (Depends-on): Add stdint.
3150         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
3151         * modules/perl: New module.
3152         * modules/regex (Depends-on): Add stdint.
3153         * modules/rmdir-errno: New module.
3154         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
3155         m4/intmax_t.m4.
3156         (Depends-on): Add stdint.
3157         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
3158         m4/uintmax_t.m4.
3159         (Depends-on): Add stdint.
3160         * modules/unlink-busy: New module.
3161         * modules/utimecmp (Depends-on): Add stdint.
3162         * modules/uptime: New module.
3163         * modules/winsz-ioctl: New module.
3164         * modules/winsz-termios: New module.
3165         * modules/xnanosleep (Depends-on): Add nanosleep.
3166         * modules/ullong_max: Remove.
3167         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
3168         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
3169         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
3170         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
3171         (Depends-on): Add inttypes.
3172         (lib_SOURCES): Add xstrtol.h.
3173         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
3174         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
3175         * MODULES.html.sh: Move 'assert' into the assert section.
3176         Move 'dummy' into the linking section.
3177         Remove ullong_max.
3178         Add section for compatibility checks for POSIX:2001 functions,
3179         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
3180         winsz-ioctl, and winsz-termios into it.
3181         Add lchmod.
3182         Add top-level Misc section and put host-os, perl, and uptime
3183         into it.
3184
3185 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3186
3187         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
3188         now assume the stdint module.  Do not include inttypes.h.
3189         * lib/fsusage.h: Likewise.
3190         * lib/getndelim2.c: Likewise.
3191         * lib/human.h: Likewise.
3192         * lib/inttostr.h: Likewise.
3193         * lib/obstack.c: Likewise.
3194         * lib/regex_internal.h: Likewise.
3195         * lib/tempname.c: Likewise.
3196         * lib/utimecmp.c: Likewise.
3197         * lib/xstrtol.h: Likewise.
3198
3199         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
3200
3201         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
3202         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
3203         * lib/xtime.h: Likewise.
3204
3205 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
3206
3207         * modules/openat (Files): Add lib/fchmodat.c.
3208         Fixes problem reported by Jay Youngman.
3209
3210 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
3211
3212         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
3213         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
3214
3215 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
3216             Bruno Haible  <bruno@clisp.org>
3217
3218         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3219         and is a script that invokes bison. Tighten the code. Add comments.
3220
3221 2006-08-18  Jim Meyering  <jim@meyering.net>
3222
3223         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
3224         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
3225         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
3226         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
3227
3228 2006-08-18  Bruno Haible  <bruno@clisp.org>
3229
3230         * modules/bison-i18n: New file.
3231         * MODULES.html.sh (Internationalization functions): Add it.
3232
3233 2006-08-18  Bruno Haible  <bruno@clisp.org>
3234
3235         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
3236         sys/statvfs.h. When getmntinfo was found, check its declaration and
3237         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
3238
3239 2006-08-18  Bruno Haible  <bruno@clisp.org>
3240
3241         * m4/bison-i18n.m4: New file, from bison.
3242
3243 2006-08-18  Bruno Haible  <bruno@clisp.org>
3244
3245         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
3246         (ME_DUMMY): Treat "kernfs" as a dummy.
3247         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
3248
3249 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
3250
3251         Update from coreutils.
3252
3253         2006-08-15  Jim Meyering  <jim@meyering.net>
3254
3255         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
3256
3257         2006-01-17  Jim Meyering  <jim@meyering.net>
3258
3259         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
3260
3261         2006-01-11  Jim Meyering  <jim@meyering.net>
3262
3263         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
3264         Check for the lchmod function.
3265
3266 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
3267
3268         Update from coreutils.
3269
3270         * lib/__fpending.h: Add copyright notice.
3271         * lib/fprintftime.h: Likewise.
3272         * lib/savedir.c: Use (C) in copyright notice.
3273         * lib/savedir.h: Likewise.
3274
3275         2006-08-15  Jim Meyering  <jim@meyering.net>
3276
3277         * lib/at-func.c: New file, with the logic of all emulated at-functions.
3278         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
3279         in support of the EXPECTED_ERRNO macro.
3280         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
3281         definitions.  Instead, define the appropriate symbols and include
3282         "at-func.c".
3283         * lib/mkdirat.c (mkdirat): Likewise.
3284         * lib/fchmodat.c (fchmodat): Likewise.
3285         (ENOSYS): Remove definition.
3286         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
3287         it.  Don't include "unistd--.h" -- it wasn't ever used.
3288
3289         2006-01-17  Jim Meyering  <jim@meyering.net>
3290
3291         Rewrite fts.c not to change the current working directory,
3292         by using openat, fstatat, fdopendir, etc..
3293
3294         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
3295         (HAVE_OPENAT_SUPPORT): Define.
3296         [_LIBC] (fchdir): Don't undef or define; no longer used.
3297         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
3298         Now, this `function' always succeeds, and consumes its file descriptor
3299         parameter -- so callers must not close such FDs.  Update callers.
3300         (diropen_fd, opendirat, cwd_advance_fd): New functions.
3301         (diropen): Add parameter, SP.  Adjust all callers.
3302         Implement using diropen_fd, rather than open.
3303         (fts_open): Initialize new member, fts_cwd_fd.
3304         Remove fts_rft-setting code.
3305         (fts_close): Close fts_cwd_fd, if necessary.
3306         (__opendir2): Define in terms of opendir or opendirat,
3307         depending on whether the FST_NOCHDIR flag is set.
3308         (fts_build): Since fts_safe_changedir consumes its FD, and since
3309         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
3310         and close the dup'd file descriptor upon failure.
3311         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
3312         (fts_safe_changedir): Tweak semantics to reflect that this function
3313         now calls cwd_advance_fd and hence consumes its FD argument.
3314         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
3315         [struct FTS] (fts_rft): Remove now-unused member.
3316         [struct FTS] (fts_cycle.state): Improve comment.
3317
3318         * lib/openat.c (openat_needs_fchdir): New function.
3319         * lib/openat.h (openat_needs_fchdir): Declare it.
3320
3321 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
3322
3323         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
3324         Problem and fix reported by Pádraig Brady in
3325         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
3326
3327 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3328
3329         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
3330
3331 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3332
3333         * lib/memcoll.c (memcoll): Optimize for the common case where the
3334         arguments are bytewise equal.
3335
3336 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3337
3338         * doc/regexprops-generic.texi: Add a copyright notice.
3339
3340 2006-08-15  Bruno Haible  <bruno@clisp.org>
3341
3342         * modules/tmpdir (License): Change to LGPL.
3343
3344 2006-08-15  Bruno Haible  <bruno@clisp.org>
3345
3346         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
3347         module.
3348
3349 2006-08-14  Simon Josefsson  <jas@extundo.com>
3350
3351         * config/srclist.txt: Add gnupload.
3352
3353 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3354
3355         Change copyright notice from LGPL 2 to GPL 2, since that's the
3356         standard form used in the gnulib repository.
3357         * tests/test-lock.c: Likewise.
3358         * tests/test-stdint.c: Likewise.
3359         * tests/test-tls.c: Likewise.
3360
3361         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
3362         prelude-manager.  User shorter URLs for GNU projects, without '?'.
3363         Add copyright notice.
3364
3365         * check-module: Add copyright notice.  Output a copyright
3366         notice if "--version" is specified.
3367         * modules/COPYING: New file.
3368         * tests/test-getaddrinfo.c: Add copyright notice.
3369         * tests/test-verify.c: Likewise.
3370
3371 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3372
3373         Change copyright notice from LGPL 2 to GPL 2, since that's the
3374         standard form used in the gnulib repository.
3375         * lib/lock.c: LGPL -> GPL.
3376         * lib/lock.h: Likewise.
3377         * lib/strnlen1.c: Likewise.
3378         * lib/strnlen1.h: Likewise.
3379         * lib/tls.c: Likewise.
3380         * lib/tls.h: Likewise.
3381         * lib/tmpdir.c: Likewise.
3382
3383         * lib/TODO: Remove; this belongs only in coreutils.
3384
3385 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3386
3387         Add copyright notices to long-enough files that lack them, since
3388         otherwise the files aren't clearly free.  Use the same notice that
3389         getdate.texi already uses.
3390         * doc/alloca-opt.texi: Add copyright notice.
3391         * doc/alloca.texi: Likewise.
3392         * doc/ctime.texi: Likewise.
3393         * doc/functions.texi: Likewise.
3394         * doc/gcd.texi: Likewise.
3395         * doc/gnulib-tool.texi: Likewise.
3396         * doc/inet_ntoa.texi: Likewise.
3397         * doc/visibility.texi: Likewise.
3398
3399         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
3400         * doc/quote.texi: Add copyright notice.
3401
3402         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
3403         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
3404         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
3405         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
3406         is now obsolete, and give a pointer to the Sun list.
3407         Add copyright notice.
3408
3409 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3410
3411         * config/srclistvars.sh: Add copyright notice.
3412
3413 2006-08-14  Eric Blake  <ebb9@byu.net>
3414
3415         Import the following change from libc:
3416
3417         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
3418
3419         Upstream bug 2997.
3420         * lib/misc/error.c: Add space between program name and message if file
3421         name is missing.
3422
3423 2006-08-12  Karl Berry  <karl@gnu.org>
3424
3425         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
3426         remove, these originate in gnulib now.
3427
3428 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3429
3430         * doc/Makefile (standards.info standards.html standards.dvi):
3431         Also depend on make-stds.texi.
3432
3433 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
3434
3435         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
3436         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
3437
3438         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
3439         in wchar_t.  Problem reported by Eric Blake.
3440
3441         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
3442         LEN is smaller than SIZE.  Suggested by Bruno Haible.
3443         Also, help the compiler to keep LEN in a register.
3444
3445 2006-08-11  Eric Blake  <ebb9@byu.net>
3446
3447         * users.txt: Sort.  Add tar.
3448
3449 2006-08-11  Bruno Haible  <bruno@clisp.org>
3450
3451         * users.txt: New file.
3452
3453 2006-08-11  Bruno Haible  <bruno@clisp.org>
3454
3455         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
3456         before <wchar.h>. Needed for OSF/1 and BSD/OS.
3457
3458 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
3459
3460         * modules/snprintf (Depends-on): Remove minmax.
3461         (Maintainer): Add self and Bruno.
3462
3463 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
3464
3465         * lib/.cppi-disable: Add snprintf.h, socket_.h.
3466         * lib/snprintf.c: Include <errno.h> and <limits.h>.
3467         (EOVERFLOW): Define if the system does not.
3468         Do not include "minmax.h"; it wasn't used.
3469         (snprintf): Don't assume size_t promotes to an unsigned type.
3470         Fix bug when generated string was too long for the buffer: the
3471         buffer's contents are supposed to be the initial prefix of the
3472         output.  Don't assume vasnprintf returns EOVERFLOW if the size
3473         exceeds INT_MAX; do the check ourselves.
3474
3475         Import the following changes from libc:
3476
3477         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
3478
3479         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
3480         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
3481         set wc to the byte which couldn't be converted.
3482         (re_string_reconstruct): Don't clear valid_raw_len before calling
3483         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
3484         tip_context using re_string_context_at.
3485
3486         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
3487
3488         * lib/posix/regex.h: g++ still cannot handled [restrict].
3489
3490         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
3491
3492         * lib/posix/regex.h: Remove special handling for VMS.
3493
3494 2006-08-10  Jim Meyering  <jim@meyering.net>
3495
3496         * modules/same-inode: New module.
3497         * modules/dev-ino: New module.
3498         * modules/cycle-check: Depend on these modules, rather than simply
3499         including their .h files.
3500         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
3501         required via m4/cycle-check.m4.
3502         * modules/same: Depend on new same-inode module, rather than
3503         including same-inode.h.
3504         * modules/chdir-safer: New file.
3505
3506         * modules/chown (Depends-on): Add stat-macros.
3507
3508 2006-08-10  Jim Meyering  <jim@meyering.net>
3509
3510         * m4/cycle-check.m4: New file.
3511         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
3512         * m4/dev-ino.m4, same-inode.m4: New files.
3513
3514 2006-08-10  Eric Blake  <ebb9@byu.net>
3515
3516         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
3517         in from original proposal.
3518
3519 2006-08-10  Eric Blake  <ebb9@byu.net>
3520         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3521
3522         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
3523         namespace.
3524
3525 2006-08-10  Bruno Haible  <bruno@clisp.org>
3526
3527         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
3528         as well.
3529
3530 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3531
3532         Sync from coreutils.
3533
3534         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
3535
3536         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
3537         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
3538
3539 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3540
3541         * modules/restrict: Remove; no longer needed now that we assume
3542         Autoconf 2.59 or later.
3543         * MODULES.html.sh: Remove 'restrict'.
3544         * modules/argp (Depends-on): Remove 'restrict'.
3545         * modules/base64 (Depends-on): Likewise.
3546         * modules/gc (Depends-on): Likewise.
3547         * modules/getaddrinfo (Depends-on): Likewise.
3548         * modules/glob (Depends-on): Likewise.
3549         * modules/inet_ntop (Depends-on): Likewise.
3550         * modules/inet_pton (Depends-on): Likewise.
3551         * modules/memxor (Depends-on): Likewise.
3552         * modules/regex (Depends-on): Likewise.
3553         * modules/strtok_r (Depends-on): Likewise.
3554         * modules/time_r (Depends-on): Likewise.
3555
3556 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3557
3558         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
3559         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
3560         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
3561         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
3562         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
3563         * m4/memxor.m4 (gl_MEMXOR): Likewise.
3564         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
3565         gl_C_RESTRICT replaced by AC_C_RESTRICT.
3566
3567         Merge from coreutils.
3568         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
3569         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
3570         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
3571         * m4/time_r.m4 (gl_TIME_R): Likewise.
3572
3573 2006-08-09  Karl Berry  <karl@gnu.org>
3574
3575         * config/srclist.txt: no more gettext-tools, per Bruno.
3576
3577 2006-08-08  Eric Blake  <ebb9@byu.net>
3578
3579         * modules/verror: New module.
3580         * MODULES.html.sh: Document it.
3581
3582 2006-08-08  Eric Blake  <ebb9@byu.net>
3583
3584         * lib/verror.h, verror.c: New files.
3585
3586 2006-08-08  Eric Blake  <ebb9@byu.net>
3587
3588         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
3589         verror_at_line output complies with GNU Coding Standards even when
3590         file is NULL.
3591
3592 2006-08-07  Bruno Haible  <bruno@clisp.org>
3593
3594         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
3595         versions of AIX.
3596         Reported by Ralf Wildenhues.
3597
3598 2006-08-07  Bruno Haible  <bruno@clisp.org>
3599
3600         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
3601         in an AC_DEFUN. Needed so that the autoconf snippets can use
3602         AC_REQUIRE.
3603
3604 2006-08-06  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3605
3606         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3607         Initialize pkgdata_DATA.
3608         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
3609         overriding it.
3610
3611 2006-08-06  Eric Blake  <ebb9@byu.net>
3612
3613         * lib/error.h: Fold in some upstream changes from glibc.
3614         * lib/error.c: Likewise.
3615
3616 2006-08-04  Bruno Haible  <bruno@clisp.org>
3617
3618         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3619         Make the mostlyclean-local rule depend on mostlyclean-generic.
3620         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
3621
3622 2006-07-31  Bruno Haible  <bruno@clisp.org>
3623
3624         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
3625         <stdlib.h>, <string.h>.
3626
3627 2006-07-30  Bruno Haible  <bruno@clisp.org>
3628
3629         * modules/readlink (License): Change to LGPL.
3630
3631 2006-07-30  Bruno Haible  <bruno@clisp.org>
3632
3633         * modules/javaversion (Makefile.am): Distribute javaversion.java and
3634         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
3635         set PKGDATADIR to point to it.
3636
3637 2006-07-30  Bruno Haible  <bruno@clisp.org>
3638
3639         * modules/csharpexec (configure.ac): Comment out macro invocation.
3640         * modules/javaexec (configure.ac): Likewise.
3641         * modules/javacomp-script (configure.ac): Likewise.
3642
3643         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
3644
3645 2006-07-30  Bruno Haible  <bruno@clisp.org>
3646
3647         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
3648         linked-list.
3649
3650 2006-07-30  Bruno Haible  <bruno@clisp.org>
3651
3652         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
3653
3654 2006-07-30  Bruno Haible  <bruno@clisp.org>
3655
3656         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3657         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
3658         get removed.
3659
3660 2006-07-29  Bruno Haible  <bruno@clisp.org>
3661
3662         Make it possible for gnulib-tool to work with locally modified or
3663         augmented gnulib repositories.
3664         * gnulib-tool (func_usage): Document --local-dir option.
3665         (local_gnulib_dir): New variable.
3666         Handle --local-dir option.
3667         (func_lookup_file): New function.
3668         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
3669         (func_get_description, func_get_filelist, func_get_description,
3670         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
3671         func_get_automake_snippet, func_get_include_directive,
3672         func_get_license, func_get_maintainer): Use func_lookup_file.
3673         (func_import, func_create_testdir): Use func_lookup_file.
3674
3675 2006-07-29  Bruno Haible  <bruno@clisp.org>
3676
3677         * modules/setenv (Depends-on): Add unistd.
3678
3679 2006-07-29  Bruno Haible  <bruno@clisp.org>
3680
3681         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
3682
3683 2006-07-29  Bruno Haible  <bruno@clisp.org>
3684
3685         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
3686
3687 2006-07-29  Bruno Haible  <bruno@clisp.org>
3688
3689         * gnulib-tool (import, update): If there is no Makefile.am, look at
3690         aclocal.m4, instead of bailing out.
3691
3692 2006-07-29  Bruno Haible  <bruno@clisp.org>
3693
3694         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
3695         Categorize the options by when they are useful.
3696
3697 2006-07-29  Bruno Haible  <bruno@clisp.org>
3698
3699         * gnulib-tool (func_usage): Document option --no-libtool.
3700         Handle option --no-libtool.
3701         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
3702         for changed semantics of $libtool variable.
3703         (func_import): Likewise. If libtool is not used, show this through
3704         an option --no-libtool.
3705         (func_create_testdir): Update.
3706
3707 2006-07-29  Bruno Haible  <bruno@clisp.org>
3708
3709         * gnulib-tool (func_import): Extend error message about missing
3710         --doc-base.
3711
3712 2006-07-29  Bruno Haible  <bruno@clisp.org>
3713
3714         * gnulib-tool (func_import): Don't create the $docbase directory if
3715         there is no file to store there.
3716
3717 2006-07-29  Bruno Haible  <bruno@clisp.org>
3718
3719         * gnulib-tool (autoconf_minversion): If a --dir option is given and
3720         relevant, look for configure.ac there, not in the current directory.
3721         Also use a simple search for AC_PREREQ, not "autoconf --trace".
3722
3723 2006-07-29  Bruno Haible  <bruno@clisp.org>
3724
3725         * gnulib-tool (SORT): New variable.
3726         (func_usage): Undocument --assume-autoconf option.
3727         Remove --assume-autoconf option handling.
3728         (autoconf_minversion): Determine from the contents of configure.ac.
3729         (func_import): Remove autoconf_minversion handling.
3730         Suggested by Eric Blake.
3731
3732 2006-07-29  Bruno Haible  <bruno@clisp.org>
3733
3734         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
3735
3736 2006-07-29  Bruno Haible  <bruno@clisp.org>
3737
3738         * config/srclist.txt (*setenv.[ch]): Remove rules.
3739
3740 2006-07-28  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3741
3742         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
3743
3744 2006-07-28  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3745
3746         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
3747         arpa/inet.h.
3748
3749 2006-07-28  Simon Josefsson  <jas@extundo.com>
3750
3751         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
3752         * modules/inet_pton (Depends-on): Likewise.
3753
3754 2006-07-28  Simon Josefsson  <jas@extundo.com>
3755
3756         * m4/netinet_in_h.m4: New file.
3757
3758 2006-07-28  Simon Josefsson  <jas@extundo.com>
3759
3760         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
3761         #include's.
3762
3763 2006-07-28  Simon Josefsson  <jas@extundo.com>
3764
3765         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
3766         #include's.
3767
3768 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
3769
3770         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
3771         setgid on directories only if they set these bits.
3772         * lib/modechange.h: Remove obsolete comment about masks.
3773
3774 2006-07-28  Eric Blake  <ebb9@byu.net>
3775
3776         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
3777         macro expansion.
3778
3779 2006-07-28  Bruno Haible <bruno@clisp.org>
3780
3781         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
3782
3783 2006-07-28  Bruno Haible  <bruno@clisp.org>
3784
3785         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
3786
3787 2006-07-28  Bruno Haible  <bruno@clisp.org>
3788
3789         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
3790         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
3791         Define fallbacks.
3792         Avoids link error on FreeBSD 4.x.
3793         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
3794
3795         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
3796         encoding.
3797         * lib/mbswidth.c (iswcntrl): Likewise.
3798
3799 2006-07-27  Bruno Haible  <bruno@clisp.org>
3800
3801         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
3802         test.
3803
3804 2006-07-27  Bruno Haible  <bruno@clisp.org>
3805
3806         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
3807         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
3808         defined.
3809
3810 2006-07-26  Eric Blake  <ebb9@byu.net>
3811
3812         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
3813
3814 2006-07-26  Eric Blake  <ebb9@byu.net>
3815
3816         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
3817         like mingw that lack mkstemp.
3818         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
3819         avoid compilation warning on mingw.
3820
3821 2006-07-26  Bruno Haible  <bruno@clisp.org>
3822
3823         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
3824         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
3825         INT_FAST*_MIN, INTPTR_MIN.
3826
3827 2006-07-25  Bruno Haible  <bruno@clisp.org>
3828
3829         * modules/version-etc (Depends-on): Add stdarg.
3830
3831 2006-07-25  Bruno Haible  <bruno@clisp.org>
3832
3833         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
3834         complex commands.
3835
3836 2006-07-25  Bruno Haible  <bruno@clisp.org>
3837
3838         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
3839         defined in <stdarg.h> or config.h.
3840
3841 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
3842
3843         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
3844         (gl_STDIO_SAFER): Remove.
3845
3846 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
3847
3848         * MODULES.html.sh (File stream based Input/Output):
3849         Add fopen-safer, tmpfile-safer; remove stdio-safer.
3850         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
3851         * modules/fopen-safer, modules/tmpfile-safer: New files.
3852         * modules/stdio-safer: Remove.
3853
3854 2006-07-24  Bruno Haible  <bruno@clisp.org>
3855
3856         * modules/tmpdir: New file.
3857         * MODULES.html.sh (File system functions): Add it.
3858
3859 2006-07-24  Bruno Haible  <bruno@clisp.org>
3860
3861         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
3862         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
3863
3864 2006-07-24  Bruno Haible  <bruno@clisp.org>
3865
3866         * modules/clean-temp: New file.
3867
3868 2006-07-24  Bruno Haible  <bruno@clisp.org>
3869
3870         * m4/tmpdir.m4: New file, from GNU gettext.
3871
3872 2006-07-24  Bruno Haible  <bruno@clisp.org>
3873
3874         * lib/tmpdir.h: New file, from GNU gettext.
3875         * lib/tmpdir.c: New file, from GNU gettext.
3876
3877 2006-07-24  Bruno Haible  <bruno@clisp.org>
3878
3879         * lib/clean-temp.h: New file, from GNU gettext.
3880         * lib/clean-temp.c: New file, from GNU gettext.
3881
3882 2006-07-23  Eric Blake  <ebb9@byu.net>
3883
3884         * modules/stdio-safer (Files): Add tmpfile-safer.c.
3885         (Depends-on): Add binary-io.
3886
3887 2006-07-23  Eric Blake  <ebb9@byu.net>
3888
3889         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
3890
3891 2006-07-23  Eric Blake  <ebb9@byu.net>
3892
3893         * lib/tmpfile-safer.c: New file.
3894         * lib/stdio-safer.h (fopen_safer): Add prototype.
3895         * lib/stdio--.h (tmpfile): Make safer.
3896
3897 2006-07-23  Bruno Haible  <bruno@clisp.org>
3898
3899         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
3900         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
3901         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
3902         gl_linked_remove_at): Use it.
3903
3904 2006-07-22  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3905         and Simon Josefsson <jas@extundo.com>
3906
3907         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
3908
3909         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
3910
3911 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
3912
3913         * modules/close-stream: New file.
3914         * modules/closeout (Description): Make it clear that it exits
3915         with a diagnostic on error.
3916         (Depends-on): Add close-stream.  Remove fpending, stdbool.
3917         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
3918
3919 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
3920
3921         * m4/close-stream.m4: New file.
3922
3923 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
3924
3925         * lib/close-stream.c, close-stream.h: New files.
3926
3927 2006-07-22  Bruno Haible  <bruno@clisp.org>
3928
3929         Merge from GNU gettext 0.15.
3930
3931         2006-05-01  Bruno Haible  <bruno@clisp.org>
3932
3933                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
3934
3935         2006-07-22  Bruno Haible  <bruno@clisp.org>
3936
3937                 * modules/javaversion: New file.
3938                 * MODULES.html.sh (Java): Add javaversion.
3939
3940         2006-03-12  Bruno Haible  <bruno@clisp.org>
3941
3942                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
3943
3944         2005-12-04  Bruno Haible  <bruno@clisp.org>
3945
3946                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
3947                 (untested).
3948
3949         2006-06-21  Bruno Haible  <bruno@clisp.org>
3950
3951                 Avoid warnings from recent versions of mcs.
3952                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
3953                 -o, -L, -r any more. Use options documented since mcs-1.0
3954                 instead. Similarly for -g.
3955
3956         2005-12-04  Bruno Haible  <bruno@clisp.org>
3957
3958                 * build-aux/csharpcomp.sh.in: Suffix for resources is
3959                 .resources, not .resource.
3960
3961         2005-07-09  Bruno Haible  <bruno@clisp.org>
3962
3963                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
3964                 add a .dll suffix.
3965                 Reported by Mark Junker <mjscod@gmx.de>.
3966
3967         2006-07-22  Bruno Haible  <bruno@clisp.org>
3968
3969                 * modules/gettext: Upgrade to gettext-0.15.
3970                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
3971                 m4/visibility.m4.
3972                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
3973
3974 2006-07-22  Bruno Haible  <bruno@clisp.org>
3975
3976         Merge from GNU gettext 0.15.
3977
3978         2006-03-25  Bruno Haible  <bruno@clisp.org>
3979
3980                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
3981
3982         2006-07-21  Bruno Haible  <bruno@clisp.org>
3983
3984                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
3985                 "1.1".
3986
3987         2006-05-09  Bruno Haible  <bruno@clisp.org>
3988
3989                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
3990                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
3991                 for the conftestver execution.
3992
3993         2006-05-01  Bruno Haible  <bruno@clisp.org>
3994
3995                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
3996                 optional target-version argument. Verify that the compiler
3997                 groks source of the specified source-version, or add -source
3998                 option as necessary. Verify that the compiler produces
3999                 bytecode in the specified target-version, or add -target and
4000                 -source options as necessary. Make the result of the test
4001                 available as variable CONF_JAVAC. Also log error output in
4002                 config.log.
4003
4004         2006-03-11  Bruno Haible  <bruno@clisp.org>
4005
4006                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
4007
4008         2006-05-09  Bruno Haible  <bruno@clisp.org>
4009
4010                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
4011                 CLASSPATH_SEPARATOR to a semicolon.
4012
4013         2006-03-12  Bruno Haible  <bruno@clisp.org>
4014
4015                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
4016                 available as variable CONF_JAVA, for subsequent autoconf
4017                 tests. Also log error output in config.log.
4018
4019         2006-07-19  Bruno Haible  <bruno@clisp.org>
4020
4021                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
4022                 that getline works on glibc2 systems. Needed to avoid trouble
4023                 in relocatable.c.
4024                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
4025
4026         2005-12-04  Bruno Haible  <bruno@clisp.org>
4027
4028                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
4029                 launcher (untested).
4030
4031         2005-12-04  Bruno Haible  <bruno@clisp.org>
4032
4033                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
4034
4035         2006-07-22  Bruno Haible  <bruno@clisp.org>
4036
4037                 * gettext.m4: Update from GNU gettext-0.15.
4038                 * nls.m4: Likewise.
4039                 * po.m4: Likewise.
4040                 * inttypes-pri.m4: Likewise.
4041                 * inttypes-h.m4: Renamed from inttypes.m4.
4042                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
4043
4044 2006-07-22  Bruno Haible  <bruno@clisp.org>
4045
4046         Merge from GNU gettext 0.15.
4047
4048         2005-07-05  Bruno Haible  <bruno@clisp.org>
4049
4050                 * printf-args.c (printf_fetchargs): Work around broken
4051                 definition of wint_t on mingw.
4052
4053         2005-02-12  Bruno Haible  <bruno@clisp.org>
4054
4055                 * xallocsa.h: Add extern "C" for C++.
4056
4057         2006-05-17  Bruno Haible  <bruno@clisp.org>
4058
4059                 Cygwin portability.
4060                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
4061
4062         2006-04-30  Bruno Haible  <bruno@clisp.org>
4063
4064                 * progreloc.c: Include <mach-o/dyld.h> if available.
4065                 (find_executable): Use _NSGetExecutablePath when possible.
4066
4067         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4068
4069                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
4070                 function.
4071
4072         2005-12-29  Bruno Haible  <bruno@clisp.org>
4073
4074                 * progreloc.c (set_program_name_and_installdir): Fix
4075                 compilation error.
4076
4077         2005-12-04  Bruno Haible  <bruno@clisp.org>
4078
4079                 Cygwin portability.
4080                 * progreloc.c: Include <windows.h> also on Cygwin.
4081                 (find_executable): Add support for Cygwin.
4082                 (set_program_name_and_installdir): Handle also platforms with
4083                 nonempty EXEEXT.
4084
4085         2006-07-11  Bruno Haible  <bruno@clisp.org>
4086
4087                 * javacomp.c: Fix a comment.
4088                 Reported by Jim Meyering.
4089
4090         2006-04-30  Bruno Haible  <bruno@clisp.org>
4091
4092                 * javacomp.h (compile_java_class): Add source_version,
4093                 target_version arguments.
4094                 * javacomp.c: Rewritten to choose only a compiler that
4095                 respects the specified source_version and target_version.
4096
4097         2006-06-27  Bruno Haible  <bruno@clisp.org>
4098
4099                 Assume correct S_ISDIR macro.
4100                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
4101
4102         2006-07-22  Bruno Haible  <bruno@clisp.org>
4103
4104                 * javaversion.h: New file, from GNU gettext.
4105                 * javaversion.c: New file, from GNU gettext.
4106                 * javaversion.java: New file, from GNU gettext.
4107                 * javaversion.class: New file, from GNU gettext.
4108
4109         2006-05-17  Bruno Haible  <bruno@clisp.org>
4110
4111                 Cygwin portability.
4112                 * javaexec.c (execute_java_class): Test for jview program
4113                 also on Cygwin.
4114
4115         2006-04-09  Bruno Haible  <bruno@clisp.org>
4116
4117                 * fatal-signal.c: Don't include string.h.
4118                 (at_fatal_signal): Use a copying loop instead of memcpy.
4119
4120         2005-12-04  Bruno Haible  <bruno@clisp.org>
4121
4122                 * csharpexec.c: Add support for 'clix' launcher (untested).
4123                 (execute_csharp_using_sscli): New function.
4124                 (execute_csharp_program): Call it.
4125
4126         2006-06-21  Bruno Haible  <bruno@clisp.org>
4127
4128                 Avoid warnings from recent versions of mcs.
4129                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
4130                 -o, -L, -r any more. Use options documented since mcs-1.0
4131                 instead. Similarly for -g.
4132
4133         2005-07-09  Bruno Haible  <bruno@clisp.org>
4134
4135                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
4136                 add a .dll suffix.
4137                 Reported by Mark Junker <mjscod@gmx.de>.
4138
4139         2006-06-17  Bruno Haible  <bruno@clisp.org>
4140
4141                 * config.charset: Update for NetBSD 3.0.
4142
4143         2006-05-17  Bruno Haible  <bruno@clisp.org>
4144
4145                 Cygwin portability.
4146                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
4147
4148         2006-05-16  Bruno Haible  <bruno@clisp.org>
4149
4150                 * localcharset.c [CYGWIN]: Include <windows.h>.
4151                 (get_charset_aliases): For Cygwin, return the same CPxxx
4152                 aliases list as under WIN32.
4153                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
4154                 the environment variables. Fall back to GetACP().
4155
4156         2006-04-05  Bruno Haible  <bruno@clisp.org>
4157
4158                 * config.charset: Update Juan Manuel Guerrero's address.
4159
4160         2005-02-12  Bruno Haible  <bruno@clisp.org>
4161
4162                 * allocsa.h: Add extern "C" for C++.
4163
4164         2005-02-10  Bruno Haible  <bruno@clisp.org>
4165
4166                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
4167                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
4168
4169         2006-07-22  Bruno Haible  <bruno@clisp.org>
4170
4171                 * gettext.h: Update to GNU gettext-0.15.
4172
4173 2006-07-22  Bruno Haible  <bruno@clisp.org>
4174
4175         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
4176         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
4177         lib-prefix.m4, longdouble.m4, ssize_t.m4.
4178
4179 2006-07-21  Eric Blake  <ebb9@byu.net>
4180
4181         * modules/stdlib-safer: New file.
4182         * MODULES.html.sh (File stream based Input/Output): Add
4183         stdlib-safer.
4184
4185 2006-07-21  Eric Blake  <ebb9@byu.net>
4186
4187         * lib/stdlib-safer.h: New file from coreutils, required by
4188         stdlib--.h.
4189
4190 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
4191
4192         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
4193
4194 2006-07-20  Bruno Haible  <bruno@clisp.org>
4195
4196         * gnulib-tool: Recognize new option --assume-autoconf.
4197         (autoconf_minversion): New variable.
4198         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
4199
4200 2006-07-20  Bruno Haible  <bruno@clisp.org>
4201
4202         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
4203
4204 2006-07-19  Derek R. Price  <derek@ximbiot.com>
4205
4206         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
4207         Reindent and repaginate.
4208
4209 2006-07-19  Derek Price  <derek@ximbiot.com>
4210
4211         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
4212         Correct grammar.
4213
4214 2006-07-17  Bruno Haible  <bruno@clisp.org>
4215
4216         * modules/list: New file.
4217         * modules/array-list: New file.
4218         * modules/carray-list, modules/carray-list-tests: New files.
4219         * modules/linked-list, modules/linked-list-tests: New files.
4220         * modules/avltree-list, modules/avltree-list-tests: New files.
4221         * modules/rbtree-list, modules/rbtree-list-tests: New files.
4222         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
4223         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
4224         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
4225         * modules/oset: New file.
4226         * modules/array-oset: New file.
4227         * modules/avltree-oset, modules/avltree-oset-tests: New files.
4228         * modules/rbtree-oset, rbtree-oset-tests: New files.
4229         * tests/test-carray_list.c: New file.
4230         * tests/test-linked_list.c: New file.
4231         * tests/test-avltree_list.c: New file.
4232         * tests/test-rbtree_list.c: New file.
4233         * tests/test-linkedhash_list.c: New file.
4234         * tests/test-avltreehash_list.c: New file.
4235         * tests/test-rbtreehash_list.c: New file.
4236         * tests/test-avltree_oset.c: New file.
4237         * tests/test-rbtree_oset.c: New file.
4238         * MODULES.html.sh (Container data structures): New section.
4239
4240 2006-07-17  Bruno Haible  <bruno@clisp.org>
4241
4242         * m4/gl_list.m4: New file.
4243
4244 2006-07-17  Bruno Haible  <bruno@clisp.org>
4245
4246         * lib/gl_list.h: New file.
4247         * lib/gl_list.c: New file.
4248         * lib/gl_array_list.h: New file.
4249         * lib/gl_array_list.c: New file.
4250         * lib/gl_carray_list.h: New file.
4251         * lib/gl_carray_list.c: New file.
4252         * lib/gl_linked_list.h: New file.
4253         * lib/gl_linked_list.c: New file.
4254         * lib/gl_anylinked_list1.h: New file.
4255         * lib/gl_anylinked_list2.h: New file.
4256         * lib/gl_avltree_list.h: New file.
4257         * lib/gl_avltree_list.c: New file.
4258         * lib/gl_anyavltree_list1.h: New file.
4259         * lib/gl_anyavltree_list2.h: New file.
4260         * lib/gl_rbtree_list.h: New file.
4261         * lib/gl_rbtree_list.c: New file.
4262         * lib/gl_anyrbtree_list1.h: New file.
4263         * lib/gl_anyrbtree_list2.h: New file.
4264         * lib/gl_anytree_list1.h: New file.
4265         * lib/gl_anytree_list2.h: New file.
4266         * lib/gl_linkedhash_list.h: New file.
4267         * lib/gl_linkedhash_list.c: New file.
4268         * lib/gl_anyhash_list1.h: New file.
4269         * lib/gl_anyhash_list2.h: New file.
4270         * lib/gl_avltreehash_list.h: New file.
4271         * lib/gl_avltreehash_list.c: New file.
4272         * lib/gl_rbtreehash_list.h: New file.
4273         * lib/gl_rbtreehash_list.c: New file.
4274         * lib/gl_anytreehash_list1.h: New file.
4275         * lib/gl_anytreehash_list2.h: New file.
4276
4277         * lib/gl_oset.h: New file.
4278         * lib/gl_oset.c: New file.
4279         * lib/gl_array_oset.h: New file.
4280         * lib/gl_array_oset.c: New file.
4281         * lib/gl_avltree_oset.h: New file.
4282         * lib/gl_avltree_oset.c: New file.
4283         * lib/gl_rbtree_oset.h: New file.
4284         * lib/gl_rbtree_oset.c: New file.
4285         * lib/gl_anytree_oset.h: New file.
4286
4287 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
4288
4289         * m4/mkancesdirs.m4: New file.
4290         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
4291         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
4292         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
4293         it.
4294
4295 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
4296
4297         * lib/dirchownmod.c, dirchownmod.h, mkancesdirs.c, mkancesdirs.h:
4298         New files.
4299         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
4300         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
4301         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
4302         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
4303         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
4304         callers changed.  Revamp internals significantly, by not
4305         attempting to create directories that are temporarily more
4306         permissive than the final results.  Do not attempt to use
4307         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
4308         This removes some race conditions, fixes some bugs, and simplifies
4309         things.  Use new dirchownmod function to do owner and mode changes.
4310         * lib/mkdir-p.h: Likewise.
4311         * lib/modechange.c (octal_to_mode): New function.
4312         (struct mode_change): New member mentioned.
4313         (make_node_op_equals): New arg mentioned.  All callers changed.
4314         (mode_compile): Keep track of which mode bits the user has explicitly
4315         mentioned.
4316         (mode_adjust): New arg DIR, so that we implement the X op correctly.
4317         New arg PMODE_BITS, to keep track of which mode bits the user
4318         mentioned; it treats S_ISUID and S_ISGID speciall.
4319         All callers changed.
4320         * lib/modechange.h: Likewise.
4321
4322 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
4323
4324         * MODULES.html.sh: Add mkancestors.
4325         * modules/mkancesdirs: New module.
4326         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
4327         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
4328         The chdir-safer and afs files are now orphans; I'll remove them
4329         unless someone speaks up.
4330         Add lib/dirchownmod.c, lib/dirchownmod.h.
4331         (Depends-on): Remove alloca, chown, save-cwd, dirname.
4332         Add lchown, mkancesdirs.
4333         (Maintainer): Add self.
4334
4335 2006-07-15  Karl Berry  <karl@gnu.org>
4336
4337         * gnulib-tool: help message wording/arrangement.
4338
4339 2006-07-14  Simon Josefsson  <jas@extundo.com>
4340
4341         * doc/gnulib.texi (Libtool and Windows): New section.
4342
4343 2006-07-12  Simon Josefsson  <jas@extundo.com>
4344
4345         * modules/gendocs (License): Fix license, approved by Karl.
4346
4347 2006-07-12  Eric Blake  <ebb9@byu.net>
4348
4349         * MODULES.html.sh: Add gendocs.
4350
4351 2006-07-11  Eric Blake  <ebb9@byu.net>
4352
4353         * modules/fdl: New module, to install doc/fdl.texi.
4354         * MODULES.html.sh: Add new section for documentation modules.
4355         * gnulib-tool: Avoid space-tab.
4356         (--doc-base): New option, to manage files from doc.
4357
4358 2006-07-11  Eric Blake  <ebb9@byu.net>
4359
4360         * m4/absolute-header.m4: Fix comments to match recent change.
4361
4362 2006-07-11  Eric Blake  <ebb9@byu.net>
4363
4364         * gnulib-tool: List --doc-base before --tests-base.
4365
4366 2006-07-11  Derek R. Price  <derek@ximbiot.com>
4367
4368         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
4369
4370 2006-07-11  Bruno Haible  <bruno@clisp.org>
4371
4372         * README: Mention where to put documentation.
4373
4374 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4375
4376         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
4377
4378 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
4379
4380         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
4381         to stdint.m4.
4382
4383 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
4384
4385         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
4386         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
4387         "no/such/file/stdint.h" when there is no such file, so that
4388         the resulting C code can be parsed by dodgy compilers.
4389         Problems reported by Bob Proulx.
4390
4391 2006-07-10  Derek R. Price  <derek@ximbiot.com>
4392
4393         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
4394         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
4395         macros into the GNU _D_EXACT_NAMLEN.
4396         * lib/savedir.c:  Likewise.
4397         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
4398
4399 2006-07-10  Derek R. Price  <derek@ximbiot.com>
4400         and Paul Eggert  <eggert@cs.ucla.edu>
4401
4402         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
4403         * m4/savedir.m4:
4404         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
4405         macros into the GNU _D_EXACT_NAMLEN.
4406
4407 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4408
4409         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
4410         around the absolute name, to work around a problem with the HP-UX
4411         11.23 native C compiler, reported by Bob Proulx.
4412
4413 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4414
4415         * doc/maintain.texi, make-stds.texi: Sync from
4416         <http://savannah.gnu.org/projects/gnustandards>.
4417
4418 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4419
4420         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
4421
4422 2006-07-09  Jim Meyering  <jim@meyering.net>
4423
4424         * m4/glob.m4: Remove a doubled word in a comment.
4425
4426 2006-07-09  Jim Meyering  <jim@meyering.net>
4427
4428         * lib/argp-pv.c: Remove a doubled word in a comment.
4429         * lib/check-version.c (check_version): Likewise.
4430         * lib/javacomp.c (compile_java_class): Likewise.
4431
4432 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
4433
4434         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
4435         for the benefit of people using Autoconf 2.60.  If you want to
4436         support older Autoconf versions you can copy m4/onceonly_2_57.m4
4437         (or m4/onceonly.m4, if pre-2.57) manually.
4438
4439 2006-07-08  Jim Meyering  <jim@meyering.net>
4440
4441         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
4442         comment.
4443         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
4444         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
4445         comment.
4446
4447 2006-07-08  Jim Meyering  <jim@meyering.net>
4448
4449         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
4450
4451 2006-07-07  Simon Josefsson  <jas@extundo.com>
4452
4453         * tests/test-crc.c: Change expected crc value, the test vector
4454         were probably computed using the old broken crc.c?
4455
4456 2006-07-06  Simon Josefsson  <jas@extundo.com>
4457
4458         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
4459         now the canonical place for the M4 file).
4460
4461         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
4462         from the sys_socket dependency now.
4463
4464         * modules/inet_pton (Files): Ditto.
4465
4466         * modules/inet_ntop (Files): Ditto.
4467
4468 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
4469
4470         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
4471         not gl_PREREQ_GETUSERSHELL.
4472
4473 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4474
4475         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
4476         with only one argument, for Autoconf 2.60.
4477         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
4478         expand to nothing, so add a shell command to avoid syntax error.
4479         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
4480
4481 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4482
4483         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
4484
4485 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
4486
4487         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
4488         no longer needed.  Check for isblank decl.
4489         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
4490         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
4491         of existence.
4492
4493 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
4494
4495         * lib/getloadavg.c: Use __VMS, not VMS.
4496         * lib/getopt.c: Likewise.
4497         * lib/getpagesize.h: Likewise.
4498         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
4499         and probably does not work.
4500
4501 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
4502
4503         * lib/.cppi-disable: Add wcwidth.
4504         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
4505         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
4506         (ISGRAPH): Remove.  All uses changed to isgraph.
4507         (FOLD) [!defined _LIBC]: Remove special case.
4508         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
4509         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
4510         HAVE_ISBLANK.
4511         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
4512         case.
4513
4514 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
4515
4516         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
4517         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
4518         brackets.  Other minor changes to suppress some compiler
4519         warnings.
4520
4521 2006-07-06  Derek R. Price  <derek@ximbiot.com>
4522         and Paul Eggert  <eggert@cs.ucla.edu>
4523
4524         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
4525         of invoking obsolescent AC_HEADER_DIRENT macro.
4526         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
4527         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
4528         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
4529         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
4530         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
4531         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
4532         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
4533         * m4/readdir.m4: Remove; no longer needed.
4534
4535 2006-07-06  Derek R. Price  <derek@ximbiot.com>
4536         and Paul Eggert  <eggert@cs.ucla.edu>
4537
4538         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
4539         Don't worry about this obsolete case any more.
4540         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
4541         directories.
4542         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
4543         worry about this obsolete case any more.
4544         * lib/fts.c: Likewise.
4545         * lib/getcwd.c: Likewise.
4546         * lib/glob.h: Likewise.
4547         * lib/savedir.c: Likewise.
4548
4549 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
4550
4551         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
4552         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
4553         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
4554         needed.
4555         All uses removed.
4556         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
4557         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
4558         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
4559         needed.
4560         * m4/getdate.m4 (gl_GETDATE): Likewise.
4561         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
4562         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
4563         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
4564         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
4565         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
4566         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
4567         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
4568         needed.
4569
4570 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
4571
4572         * lib/memcasecmp.c: Include <limits.h>.
4573         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
4574         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
4575         Don't assume isdigit succeeds only on '0' through '9'.
4576
4577 2006-07-05  Eric Blake  <ebb9@byu.net>
4578
4579         * modules/getaddrinfo (Depends-on): Add snprintf.
4580
4581 2006-07-05  Eric Blake  <ebb9@byu.net>
4582
4583         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
4584         to avoid 'header present but could not be compiled' on cygwin.
4585
4586 2006-07-05  Eric Blake  <ebb9@byu.net>
4587
4588         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
4589         missing from netdb.h.
4590         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
4591
4592 2006-07-05  Derek R. Price  <derek@ximbiot.com>
4593
4594         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
4595         no longer needed.
4596         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
4597         * m4/getdate.m4 (gl_GETDATE): Likewise.
4598         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
4599         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
4600         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
4601         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
4602         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
4603
4604 2006-07-05  Derek R. Price  <derek@ximbiot.com>
4605
4606         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
4607         All uses of is_space replaced by isspace.
4608         * lib/exit.h: Don't talk about STDC_HEADERS.
4609         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
4610         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
4611         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
4612         replaced by isprint etc.
4613         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
4614         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
4615         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
4616         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
4617         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
4618         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
4619
4620 2006-07-05  Bruno Haible  <bruno@clisp.org>
4621
4622         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
4623         the function exists, before testing against AIX.
4624         Reported by Martin Lambers <marlam@marlam.de>.
4625
4626 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
4627
4628         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
4629         From Mark D. Baushke.
4630
4631 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
4632
4633         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
4634         to the absolute name, not just one, to bypass Sun C 5.8's
4635         "warning: #include of /usr/include/... may be non-portable".
4636
4637 2006-07-04  Eric Blake  <ebb9@byu.net>
4638
4639         * modules/dirname-tests: New test module.
4640         * tests/test-dirname.c: New file, replacing dirname.c
4641         TEST_DIRNAME section that was recently deleted.
4642
4643 2006-07-04  Bruno Haible  <bruno@clisp.org>
4644
4645         Assume ANSI C header files and <ctype.h> functions.
4646         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
4647         (mbsnwidth): Use isprint, iscntrl instead.
4648
4649 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
4650
4651         Merge from coreutils.
4652         * MODULES.html.sh: Add xstrtold.
4653         * modules/xstrtold: New file.
4654         * modules/cycle-check (Files): Add lib/same-inode.h.
4655         * modules/dirname (Files): Add m4/double-slash-root.m4.
4656         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
4657         * modules/mkdir-p (Files): Add lib/same-inode.h.
4658         * modules/same (Files): Add lib/same-inode.h.
4659
4660 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
4661
4662         * m4/absolute-header.m4: Renamed from full-header-path.m4.
4663         This is to keep the terminology clean; POSIX talks about
4664         "absolute pathnames", not "full pathnames", but the GNU
4665         Coding Standards say to use "path" for something else;
4666         so use "absolute" to keep both sides happy.
4667         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
4668         Set gl_absolute_header, not gl_full_header_path.
4669         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
4670         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
4671         All uses changed.
4672
4673         Merge from coreutils.
4674
4675         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
4676
4677         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
4678         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
4679         want to require the building of c-strtod.o.
4680         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
4681         needs -lm directly.
4682         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
4683
4684         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
4685
4686         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
4687         --as-needed option if available.  Problem reported by Albert Chin in
4688         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
4689         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
4690         cc merely issues a bunch of annoying warnings for --as-needed
4691         (this problem was reported by Bob Proulx).  Also, try linking with
4692         -lm to detect a bug in binutils 2.16 (this problem was reported
4693         by Ralf Wildenhues).
4694
4695         2006-06-18  Jim Meyering  <jim@meyering.net>
4696
4697         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
4698         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
4699         macro.
4700         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
4701         also check for glibc-2.4's abort-inducing bug.
4702
4703         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
4704         Low-probability clean-up should be to use rmdir to get rid of
4705         the just-created directory, not unlink.
4706
4707         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
4708         configure fail, and request a bug report to inform us about it.
4709         Add a comment that, barring reports to the contrary, in 2007 we'll
4710         assume ftruncate is universally available.
4711
4712         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
4713
4714         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
4715
4716         2006-03-12  Jim Meyering  <jim@meyering.net>
4717
4718         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
4719         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
4720         * m4/same.m4 (gl_SAME): Likewise.
4721         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
4722
4723         2006-03-11  Eric Blake  <ebb9@byu.net>
4724
4725         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
4726         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
4727         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
4728         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
4729
4730 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
4731
4732         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
4733         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
4734         reported by Mark D. Baushke, one in
4735         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
4736
4737         Merge from coreutils.
4738
4739         * lib/.cppi-disable: Add stdint_.h.
4740         * lib/.cvsignore: Add stdint.h.
4741
4742         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
4743
4744         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
4745         both double and long double versions.
4746         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
4747         * lib/xstrtold.c: New file.
4748         * lib/xstrtod.h (xstrtold): New decl.
4749
4750         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
4751
4752         * lib/filemode.c (setst): Remove.
4753         (strmode): Rewrite to avoid setst.  This makes the code shorter,
4754         (arguably) clearer, and the generated code is a bit smaller on my
4755         Debian GNU/Linux stable x86 host.
4756
4757         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
4758
4759         * lib/filemode.c: Include "filemode.h" first, to test the interface.
4760         Assume that filemode.h includes sys/types.h and sys/stat.h.
4761         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
4762         (ftypelet): Reorder to put common cases first, for efficiency.
4763         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
4764         to do 'M'.
4765         (strmode): Renamed from mode_string, and now stores 12 bytes instead
4766         of 10, for compatibility with FreeBSD.  All callers changed.
4767         (filemodestring): Now stores 12 bytes instead of 10, and sets file
4768         types that can't be deduced solely from st_mode.  First arg is now a
4769         const pointer.
4770         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
4771         (strmode): Renamed from mode_string.
4772         (filemodestring): New decl.
4773         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
4774         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
4775         needed.
4776         (S_ISPORT, S_ISWHT): New macros, if not already defined.
4777
4778         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
4779
4780         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
4781         fsusage.h now does that.  Include fsusage.h first, to test interface.
4782         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
4783         at most one method (the old code could have generated decls that
4784         didn't conform to C89, not that this was ever exercised).
4785         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
4786
4787         2006-03-19  Jim Meyering  <jim@meyering.net>
4788
4789         Work even in a chroot where d_ino values for entries in "/"
4790         don't match the stat.st_ino values for the same names.
4791         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
4792         number, iterate through all entries again, using lstat instead.
4793         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
4794         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
4795
4796         * lib/getcwd.c (__getcwd): Clarify a comment.
4797         Use memcpy in place of a call to strcpy.
4798
4799         2006-03-12  Jim Meyering  <jim@meyering.net>
4800
4801         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
4802         matches that of the current directory (which we're about to chdir ".."
4803         out of), then save the dev-ino of the parent, instead.
4804
4805         * lib/same-inode.h (SAME_INODE): New file/macro.
4806         * lib/chdir-safer.c (SAME_INODE): Remove definition.
4807         Include "same-inode.h", instead.
4808         * lib/same.c: Likewise.
4809         * lib/cycle-check.h: Include "same-inode.h".
4810         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
4811         * lib/cycle-check.c (SAME_INODE): Remove definition.
4812         * lib/root-dev-ino.h: Include "same-inode.h".
4813
4814         2006-03-11  Eric Blake  <ebb9@byu.net>
4815
4816         * lib/same.c (same_name): s/base_name/last_component/
4817         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
4818         * lib/filenamecat.c (file_name_concat): Likewise.
4819
4820         2006-03-11  Eric Blake  <ebb9@byu.net>,
4821                     Paul Eggert  <eggert@cs.ucla.edu>
4822
4823         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
4824         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
4825         drive prefix.
4826         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
4827         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
4828         (last_component): New method.
4829         * lib/dirname.c (dir_len): Determine when drive letters need a
4830         subsequent slash.  Preserve // when it is special.
4831         (dir_name): Don't append dot when drive letter is absolute.
4832         [TEST_DIRNAME]: Move into a full-blown gnulib test.
4833         * lib/basename.c (base_name): New semantics - malloc the result.
4834         Preserve // when it is special.  Preserve relative files that look
4835         like drive letters.
4836         (base_len): Preserve // when it is special.
4837         (last_component): New method, similar to old base_name semantics.
4838         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
4839         base_name.  Strip redundant slashes from ///.
4840
4841 2006-07-03  Jim Meyering  <jim@meyering.net>
4842
4843         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
4844         macro is used before the first cycle_check call.
4845
4846 2006-07-03  Eric Blake  <ebb9@byu.net>
4847
4848         * modules/dirname (Depends-on): Add xstrndup.
4849
4850 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
4851
4852         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
4853         test cases, so that config.log is a bit easier to follow.
4854
4855 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
4856
4857         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
4858         both are 64 bits, since this seems to be the tradition, and this
4859         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
4860         we ever run into a host that prefers long long to long in this
4861         case, we'll need another configure-time test.  Problem reported by
4862         Jim Meyering.
4863
4864 2006-07-02  Eric Blake  <ebb9@byu.net>
4865
4866         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
4867
4868 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4869
4870         * modules/inttypes (Depends-on): No longer depends on stdint.
4871         * modules/stdint (Description): Say more about assumptions.
4872         Say that the fast types might differ.  Say macros are used.
4873         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
4874         (Makefile.am): Revise list of substituted symbols to match
4875         new stdint.m4.
4876         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
4877         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
4878         * tests/test-stdint.c (verify_same_types)
4879         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
4880         the code conforms to C99/C89.
4881         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
4882         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
4883
4884 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4885
4886         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
4887         but fix a bug, by requiring at least 64 bits.
4888         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
4889         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
4890         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
4891         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
4892
4893         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
4894         changes.  Make 2.59 a prerequisite.  Check and substitute for
4895         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
4896         inttypes.h.  Do not use special include files; just use the
4897         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
4898         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
4899         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
4900         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
4901         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
4902         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
4903         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
4904         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
4905         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
4906         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
4907         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
4908         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
4909         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
4910         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
4911         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
4912         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
4913         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
4914         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
4915         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
4916         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
4917         WINT_MAX.  Check for C99 conformance more strictly, by detecting
4918         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
4919         not check for things that C99 does not require, e.g., int8_t.  If
4920         a test isn't needed unless <stdint.h> isn't working, and is
4921         unlikely to be needed for any other reason, then don't do it
4922         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
4923         size_t, since we assume C89 freestanding at least.  Do not check
4924         for sig_atomic_t, wchar_t, or wint_t, since the code now does
4925         the right thing even if the types are not defined.  Instead use:
4926         (gl_STDINT_TYPE_PROPERTIES): New macro.
4927         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
4928         testing whether <sys/types.h> clashes, as Autoconf does this for
4929         us now.  All uses removed.
4930         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
4931         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
4932         (gl_CHECK_TYPE_SAME):
4933         Remove; no longer needed.
4934         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
4935         exists, since we'll return 0 anyway in that case.
4936         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
4937
4938 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4939
4940         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
4941         possible collision with system files.
4942         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
4943         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
4944         WCHAR_MIN and WCHAR_MAX in this case.
4945         (<stddef.h>): Do not include; no longer needed.
4946         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
4947         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
4948         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
4949         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
4950         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
4951         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
4952         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
4953         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
4954         !defined(__c99))]: Include in this case too, since it's harmless
4955         now.
4956         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
4957         dangerous to do so.
4958         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
4959         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
4960         (_STDINT_MIN, _STDINT_MAX): New macros.
4961         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
4962         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
4963         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
4964         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
4965         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
4966         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
4967         macros, not typedefs; this simplifies things quite a bit.
4968         Use long int for all types narrower than int64_t.
4969         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
4970         Define in terms of long long int or int64_t or long int,
4971         not int64_t or int32_t.  This saves some compile-time testing.
4972         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
4973         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
4974         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
4975         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
4976         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
4977         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
4978         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
4979         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
4980         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
4981         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
4982         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
4983         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
4984         undef any previous version and define our own version, for
4985         simplicity and consistency with the new macros for types.
4986         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
4987         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
4988         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
4989         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
4990         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
4991         @WINT_T_SUFFIX@ to keep things simple here.
4992         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
4993         Simplify by assuming typical 8/16/32/64 host, since we're
4994         already doing that elsewhere anyway.
4995         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
4996         and assume long long int is 64 bits if available.  This
4997         speeds up 'configure'.
4998
4999 2006-07-01  Eric Blake  <ebb9@byu.net>
5000
5001         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
5002         Reported by Andreas Buening.
5003
5004 2006-07-01  Eric Blake  <ebb9@byu.net>
5005
5006         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
5007
5008 2006-06-30  Jim Hyslop <jhyslop@dreampossible.ca>  (tiny change)
5009
5010         * lib/getaddrinfo.c: fixed typo
5011
5012 2006-06-29  Jim Meyering  <jim@meyering.net>
5013
5014         * modules/strftime (Maintainer): Add my name, since with the
5015         FPRINTFTIME changes strftime.c has forked from glibc.
5016
5017 2006-06-29  Eric Blake  <ebb9@byu.net>
5018
5019         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
5020
5021 2006-06-29  Eric Blake  <ebb9@byu.net>
5022
5023         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
5024
5025 2006-06-29  Eric Blake  <ebb9@byu.net>
5026
5027         * lib/stat_.h: New file.
5028
5029 2006-06-29  Eric Blake  <ebb9@byu.net>
5030
5031         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
5032         unused static function.
5033
5034 2006-06-29  Eric Blake  <ebb9@byu.net>
5035
5036         * doc/functions.texi (Function Portability): Document missing lstat
5037         on mingw.
5038
5039 2006-06-29  Eric Blake  <ebb9@byu.net>
5040
5041         * MODULES.html.sh: Add sys_stat.
5042         * modules/sys_stat: New module.
5043         * modules/mkstemp (Depends-on): Add sys_stat.
5044
5045 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5046
5047         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
5048
5049 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5050
5051         * m4/c-bs-a.m4: Removed.
5052
5053 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5054
5055         * lib/strftime.c: Assume strftime() exists.
5056
5057 2006-06-29  Derek Price  <derek@ximbiot.com>
5058
5059         * modules/c-bs-a: Removed - \a is C89.
5060         * MODULES.html.sh: Remove c-bs-a.
5061
5062 2006-06-29  Bruno Haible  <bruno@clisp.org>
5063
5064         * modules/wcwidth (License): Change to LGPL.
5065
5066 2006-06-28  Simon Josefsson  <jas@extundo.com>
5067
5068         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
5069         on _WIN32.
5070
5071         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
5072         getnameinfo.
5073
5074 2006-06-28  Simon Josefsson  <jas@extundo.com>
5075
5076         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
5077
5078 2006-06-28  Simon Josefsson  <jas@extundo.com>
5079
5080         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
5081         functions there.  It will succeed on Windows XP, but on Windows
5082         2000 and (presumably) earlier, it will fail, and use the internal
5083         re-implementation.
5084         (use_win32_p): New function.
5085         (getaddrinfo): Use strtoul on servname, to support numeric ports.
5086         Support AI_NUMERICSERV to disable getservbyname.
5087         (getnameinfo): New function, only supports
5088         NI_NUMERICHOST|NI_NUMERICSERV for now.
5089
5090         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
5091         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
5092         getnameinfo.
5093
5094 2006-06-28  Eric Blake  <ebb9@byu.net>
5095
5096         * modules/wcwidth: New file.
5097         * modules/mbchar (Depends-on): Add wcwidth.
5098         * modules/mbswidth (Depends-on): Add wcwidth.
5099         * MODULES.html.sh: Add wcwidth.
5100
5101 2006-06-28  Eric Blake  <ebb9@byu.net>
5102
5103         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
5104         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
5105
5106 2006-06-28  Eric Blake  <ebb9@byu.net>
5107
5108         * lib/xvasprintf.h: Fix comments.
5109
5110 2006-06-28  Eric Blake  <ebb9@byu.net>
5111
5112         * lib/mbchar.h (wcwidth): Include wcwidth.h.
5113         * lib/mbswidth.c (wcwidth): Move from here...
5114         * lib/wcwidth.h: ...to this new file.
5115
5116 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5117
5118         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
5119
5120         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
5121         it's obsolete.
5122         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
5123
5124 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5125
5126         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
5127         Autoconf 2.60 says this stuff was obsolete.
5128
5129 2006-06-28  Bruno Haible  <bruno@clisp.org>
5130
5131         * modules/wcwidth (Files): Add m4/wchar_t.m4.
5132
5133 2006-06-28  Bruno Haible  <bruno@clisp.org>
5134
5135         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
5136         gt_TYPE_WCHAR_T.
5137
5138 2006-06-28  Bruno Haible  <bruno@clisp.org>
5139
5140         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
5141         declaration for wcwidth.
5142         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
5143
5144 2006-06-28  Bruno Haible  <bruno@clisp.org>
5145
5146         * lib/mkdtemp.c [MINGW]: Include <io.h>.
5147         (mkdir): Define using _mkdir.
5148
5149 2006-06-28  Bruno Haible  <bruno@clisp.org>
5150
5151         * lib/getaddrinfo.h: Fix POSIX URL.
5152         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
5153         _WIN32.
5154         (use_win32_p): Make static.
5155         (getaddrinfo): Reject service name if it is empty or does not consist
5156         solely of decimal digits, or if its value is > 65535.
5157         (getnameinfo): Remove useless casts.
5158
5159 2006-06-27  Simon Josefsson  <jas@extundo.com>
5160
5161         * modules/sys_select: New file, suggested by Bruno Haible, Paul
5162         Eggert and Martin Lambers.
5163
5164 2006-06-27  Simon Josefsson  <jas@extundo.com>
5165
5166         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
5167         Eggert and Martin Lambers.
5168
5169 2006-06-27  Bruno Haible  <bruno@clisp.org>
5170
5171         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
5172         result to 0, not to empty.
5173         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
5174
5175 2006-06-27  Bruno Haible  <bruno@clisp.org>
5176
5177         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
5178
5179 2006-06-26  Simon Josefsson  <jas@extundo.com>
5180
5181         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
5182         present.
5183
5184 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
5185
5186         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
5187         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
5188         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
5189
5190 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
5191
5192         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
5193
5194 2006-06-26  Bruno Haible  <bruno@clisp.org>
5195
5196         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
5197
5198 2006-06-26  Bruno Haible  <bruno@clisp.org>
5199
5200         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
5201
5202 2006-06-26  Bruno Haible  <bruno@clisp.org>
5203
5204         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
5205         SGI C compiler in pre-C99 mode.
5206         Suggested by Mark D. Baushke and Larry Jones.
5207
5208 2006-06-26  Bruno Haible  <bruno@clisp.org>
5209
5210         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
5211         WCHAR_MAX.
5212         Reported by Mark D. Baushke and Larry Jones.
5213
5214 2006-06-26  Bruno Haible  <bruno@clisp.org>
5215
5216         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
5217         in pre-C99 mode.
5218         Suggested by Mark D. Baushke and Larry Jones.
5219
5220 2006-06-23  Simon Josefsson  <jas@extundo.com>
5221             Bruno Haible  <bruno@clisp.org>
5222
5223         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
5224         Emit mostlyclean-local rule.
5225         (func_emit_tests_Makefile_am): Likewise.
5226         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
5227
5228 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
5229
5230         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
5231
5232 2006-06-23  Bruno Haible  <bruno@clisp.org>
5233
5234         * tests/test-stdint.c: Update to match ISO C 99 Technical
5235         Corrigendum 1.
5236
5237 2006-06-23  Bruno Haible  <bruno@clisp.org>
5238
5239         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
5240
5241 2006-06-23  Bruno Haible  <bruno@clisp.org>
5242
5243         * lib/stdint_.h: Treat IRIX like OpenBSD.
5244
5245 2006-06-23  Bruno Haible  <bruno@clisp.org>
5246
5247         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
5248         ISO C 99 Technical Corrigendum 1.
5249
5250 2006-06-22  Simon Josefsson  <jas@extundo.com>
5251
5252         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
5253         MinGW.
5254
5255 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
5256
5257         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
5258         needed.  Some compiler complained about some of them.  Problem reported
5259         by Larry Jones in
5260         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
5261
5262 2006-06-21  Simon Josefsson  <jas@extundo.com>
5263
5264         * tests/test-getaddrinfo.c: New file.
5265
5266         * modules/getaddrinfo-tests: New file.
5267
5268         * MODULES.html.sh: Add inet_pton.
5269
5270         * modules/inet_pton: New file.
5271
5272 2006-06-21  Simon Josefsson  <jas@extundo.com>
5273
5274         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
5275         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
5276         of using the (limited) gnulib implementation on Windows XP.
5277
5278         * m4/inet_pton.m4: New file.
5279
5280 2006-06-21  Simon Josefsson  <jas@extundo.com>
5281
5282         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
5283         variable.
5284
5285         * lib/socket_.h: Don't define WINVER.
5286
5287         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
5288         slightly modified to work in gnulib.
5289
5290 2006-06-21  Simon Josefsson  <jas@extundo.com>
5291
5292         * doc/gnulib.texi (Windows sockets): Add.
5293
5294 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
5295
5296         * lib/read-file.c (fread_file): Start with buffer allocation of
5297         0 bytes rather than 1 byte; this simplifies the code.
5298         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
5299         code to free buffer and save/restore errno.
5300         (internal_read_file): Remove unused local.
5301
5302 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
5303
5304         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
5305         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
5306         Problem reported by Denis Excoffier in
5307         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
5308
5309 2006-06-19  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
5310
5311         * modules/sys_socket, modules/socklen: Include sys/types since
5312         FreeBSD 4.x's sys/socket.h needs it.
5313
5314 2006-06-19  Simon Josefsson  <jas@extundo.com>
5315
5316         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
5317
5318 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
5319
5320         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
5321
5322 2006-06-19  Bruno Haible  <bruno@clisp.org>
5323
5324         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
5325         and FULL_PATH_INTTYPES_H in angle brackets.
5326         Reported by Mark D. Baushke <mdb@gnu.org>.
5327
5328 2006-06-17  Eric Blake  <ebb9@byu.net>
5329
5330         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
5331         errno.
5332
5333 2006-06-17  Bruno Haible  <bruno@clisp.org>
5334
5335         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
5336         <sys/inttypes.h>.
5337
5338 2006-06-17  Bruno Haible  <bruno@clisp.org>
5339
5340         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
5341         whether errno is declared. Assume <errno.h> declares errno.
5342
5343 2006-06-17  Bruno Haible  <bruno@clisp.org>
5344
5345         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
5346
5347 2006-06-17  Bruno Haible  <bruno@clisp.org>
5348
5349         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
5350         problem on Solaris 2.5.1.
5351
5352 2006-06-16  Eric Blake  <ebb9@byu.net>
5353
5354         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
5355         * lib/unicodeio.c [!defined errno]: Likewise.
5356         * lib/strtol.c [!defined errno]: Likewise.
5357         * lib/strtod.c [!defined errno]: Likewise.
5358
5359 2006-06-15  Eric Blake  <ebb9@byu.net>
5360
5361         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
5362
5363 2006-06-15  Eric Blake  <ebb9@byu.net>
5364
5365         * config/srclist.txt (ssize_t.m4): Lose sync.
5366
5367 2006-06-15  Bruno Haible  <bruno@clisp.org>
5368
5369         * modules/stdint (Files): Include m4/full-header-path.m4,
5370         m4/size_max.m4, m4/wchar_t.m4.
5371         (Makefile.am): Many more substitutions.
5372         * modules/stdint-tests: New file.
5373         * tests/test-stdint.c: New file.
5374
5375 2006-06-15  Bruno Haible  <bruno@clisp.org>
5376
5377         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
5378         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
5379         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
5380         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
5381         gl_CHECK_TYPE_SAME): New macros.
5382
5383 2006-06-15  Bruno Haible  <bruno@clisp.org>
5384
5385         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
5386
5387 2006-06-15  Bruno Haible  <bruno@clisp.org>
5388
5389         * lib/stdint_.h: Rewritten to be fully auto-configured.
5390         Fixes bug on HP-UX/IA64.
5391
5392 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
5393
5394         * lib/getdate.y (__attribute__): Don't define if already defined.
5395         Problem reported by Larry Jones.
5396         * lib/utimens.c (__attribute__): Likewise.
5397
5398 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
5399
5400         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
5401         reported by Andreas Schwab.
5402
5403 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5404             Bruno Haible  <bruno@clisp.org>
5405
5406         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
5407         check for the declaration of strnlen and a run test that exposes the
5408         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
5409         rpl_strndup.
5410
5411 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5412             Bruno Haible  <bruno@clisp.org>
5413
5414         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
5415
5416 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5417
5418         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
5419         compile test, for Tru64 4.0D.
5420
5421 2006-05-28  Karl Berry  <karl@gnu.org>
5422
5423         * config/srclist.txt (printf-args.c): lose sync.
5424
5425 2006-05-26  Martin Lambers  <marlam@marlam.de>
5426
5427         * lib/getpass.c: Updates the test for the native W32 API, and adds
5428         missing includes, thus fixing compilation warnings.
5429
5430 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
5431
5432         * lib/exclude.c (exclude_fnmatch): New function.
5433         (excluded_file_name): Call exclude_fnmatch.
5434         * lib/exclude.h (excluded_file_name): New prototype
5435
5436 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
5437
5438         * lib/tempname.c (small_open, large_open): New macros.
5439         (__open, __open64) [!_LIBC]: Remove.
5440         (__gen_tempname): Use small_open and large_open instead of __open
5441         and __open64.  This fixes a portability bug on HP-UX 11.11i
5442         reported by Simon Wing-Tang in
5443         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
5444
5445 2006-05-24  Bruno Haible  <bruno@clisp.org>
5446
5447         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
5448         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
5449         Reported by Thorsten Maerz <torte@netztorte.de> via
5450         Aaron Stone <aaron@serendipity.cx>.
5451
5452 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
5453
5454         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
5455         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
5456         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
5457         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
5458         not really conditional on the cache.
5459         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
5460
5461 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
5462
5463         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
5464         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
5465         (my_usleep): Don't mishandle maximum value.
5466
5467 2006-05-19  Jim Meyering  <jim@meyering.net>
5468
5469         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
5470
5471 2006-05-17  Bruno Haible  <bruno@clisp.org>
5472
5473         Cygwin portability.
5474         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
5475
5476 2006-05-17  Bruno Haible  <bruno@clisp.org>
5477
5478         * lib/stdint_.h: Fix recognition of Cygwin.
5479
5480 2006-05-15  Bruno Haible  <bruno@clisp.org>
5481
5482         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
5483         on libtool patch by Ralf Wildenhues.
5484
5485 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
5486
5487         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
5488         test for C99 conformance; (bool) 0.5 is an integer constant
5489         expression, but (bool) -0.5 is not.  Problem reported by Fedor
5490         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
5491
5492 2006-05-11  Simon Josefsson  <jas@extundo.com>
5493
5494         * m4/xvasprintf.m4: Fix obvious typo.
5495
5496 2006-05-11  Jim Meyering  <jim@meyering.net>
5497
5498         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
5499         James Lemley.
5500
5501 2006-05-10  Simon Josefsson  <jas@extundo.com>
5502
5503         * lib/md4.c: Typo fix, update copyright years.
5504         (K1, K2): Don't use L because it turn computations into 64-bit on
5505         64-bit platforms.
5506
5507 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
5508
5509         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
5510         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
5511         unwanted sign propagation, e.g., on hosts with 64-bit int.
5512         There still are some problems with reeelly weird theoretical hosts
5513         (e.g., 33-bit int) but it's not worth worrying about now.
5514         * lib/sha1.c (rol): Likewise.
5515         (K1, K2, K3, K4): Remove unnecessary L suffix.
5516
5517 2006-05-10  Bruno Haible  <bruno@clisp.org>
5518
5519         * lib/des.c: Cast to avoid warnings.
5520
5521 2006-05-09  Bruno Haible  <bruno@clisp.org>
5522
5523         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
5524         (Depends-on): Depend also on xsize, stdarg.
5525         (configure.ac): Add gl_XVASPRINTF.
5526
5527 2006-05-09  Bruno Haible  <bruno@clisp.org>
5528
5529         * m4/xvasprintf.m4: New file.
5530
5531 2006-05-09  Bruno Haible  <bruno@clisp.org>
5532
5533         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
5534         (EOVERFLOW): Define fallback value.
5535         (xstrcat): New function.
5536         (xvasprintf): Recognize the special case of a string concatenation.
5537
5538 2006-05-08  Eric Blake  <ebb9@byu.net>
5539
5540         * gnulib-tool (func_version): Base copyright year on CVS date.
5541         (func_emit_copyright_notice): New function.
5542         (func_emit_lib_Makefile_am): Use it.
5543         (func_emit_tests_Makefile_am): Likewise.
5544         (func_import): Likewise.
5545
5546 2006-05-08  Bruno Haible  <bruno@clisp.org>
5547
5548         * modules/stdarg: New file.
5549         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
5550
5551 2006-05-08  Bruno Haible  <bruno@clisp.org>
5552
5553         * m4/stdarg.m4: New file, from GNU gettext.
5554
5555 2006-05-08  Bruno Haible  <bruno@clisp.org>
5556
5557         * config/srclist.txt (build-aux/config.rpath): different from latest
5558         release.
5559
5560 2006-05-08  Bruno Haible  <bruno@clisp.org>
5561
5562         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
5563
5564 2006-05-05  Jim Meyering  <jim@meyering.net>
5565
5566         * m4/warning.m4: New file, derived from bison's file by the same name.
5567
5568 2006-05-03  Bruno Haible  <bruno@clisp.org>
5569
5570         * lib/stdint_.h: Shorter URL.
5571         * lib/inttypes.h: Likewise.
5572
5573 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
5574
5575         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
5576
5577 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
5578
5579         * lib/verify.h: Document the internals better.  Most of this change
5580         was written by Bruno Haible.
5581
5582 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
5583
5584         * doc/verify.texi: New file, partly based on a proposal by
5585         Bruno Haible.
5586
5587 2006-05-02  Bruno Haible  <bruno@clisp.org>
5588
5589         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
5590         test from here...
5591         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
5592
5593 2006-04-29  Bruno Haible  <bruno@clisp.org>
5594
5595         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
5596         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
5597
5598 2006-04-29  Bruno Haible  <bruno@clisp.org>
5599
5600         * gnulib-tool: Make --update option actually work.
5601
5602 2006-04-29  Bruno Haible  <bruno@clisp.org>
5603
5604         * doc/gcd.texi: New file.
5605         * doc/gnulib.texi: Include it.
5606
5607 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
5608
5609         * lib/getdate.y (get_date): When adding relative date, start with the
5610         initial time, not with the result of the first mktime call.
5611
5612 2006-04-25  Bruno Haible  <bruno@clisp.org>
5613
5614         * gnulib-tool (func_import): Output the include directives in three
5615         blocks, sorted separately.
5616         Reported by Ben Pfaff <blp@cs.stanford.edu>.
5617
5618 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
5619
5620         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
5621         to define main with arguments, for C++.  Reported by Eric Blake.
5622         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
5623         Prefer 'int main ()' to 'int main (void)', for C++.
5624         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
5625         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
5626         for 'main', for C99 and C++.
5627
5628 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
5629
5630         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
5631         Don't assume that exit status -1 is valid.
5632         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
5633         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
5634         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
5635         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
5636         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
5637         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
5638         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
5639         functions can be used without declaring them, or that you can
5640         exit with status -1.
5641         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
5642
5643 2006-04-24  Karl Berry  <karl@gnu.org>
5644
5645         * config/srclist.txt (longdouble.m4): sync lost.
5646
5647 2006-04-24  Eric Blake  <ebb9@byu.net>
5648
5649         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
5650
5651 2006-04-24  Bruno Haible  <bruno@clisp.org>
5652
5653         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
5654         poll() implementation in AIX.
5655         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5656
5657 2006-04-24  Bruno Haible  <bruno@clisp.org>
5658
5659         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
5660         assigned exactly once.
5661
5662 2006-04-23  Claudio Fontana  <claudio@gnu.org>
5663             Bruno Haible  <bruno@clisp.org>
5664
5665         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
5666         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
5667         for AM_CPPFLAGS.
5668
5669 2006-04-23  Bruno Haible  <bruno@clisp.org>
5670
5671         * modules/copy-file: Depend on unistd.
5672         * modules/execute: Likewise.
5673         * modules/fatal-signal: Likewise.
5674         * modules/findprog: Likewise.
5675         * modules/mkdtemp : Likewise.
5676         * modules/pipe: Likewise.
5677         * modules/wait-process: Likewise.
5678
5679 2006-04-23  Bruno Haible  <bruno@clisp.org>
5680
5681         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
5682         condition was already detected.
5683         Reported by Ben Pfaff <blp@cs.stanford.edu>.
5684
5685 2006-04-23  Bruno Haible  <bruno@clisp.org>
5686
5687         * lib/copy-file.c: Include <unistd.h> unconditionally.
5688         * lib/execute.c: Likewise.
5689         * lib/fatal-signal.c: Likewise.
5690         * lib/findprog.c: Likewise.
5691         * lib/mkdtemp.c: Likewise.
5692         * lib/pipe.h: Likewise.
5693         * lib/pipe.c: Likewise.
5694         * lib/wait-process.h: Likewise.
5695
5696 2006-04-23  Bruno Haible  <bruno@clisp.org>
5697
5698         * gnulib-tool (func_usage): Fix --import description. Document
5699         --update.
5700         (func_import): Create temporary file in a temporary directory, if
5701         --dry-run is specified. Silence errors from 'grep' when there are no
5702         m4 files in $m4dir.
5703         (func_create_testdir): Silence errors from 'grep' when there are no
5704         m4 files in $m4dir.
5705         Reported by Karl Berry <karl@freefriends.org>.
5706
5707 2006-04-20  Bruno Haible  <bruno@clisp.org>
5708
5709         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
5710         one argument, so that the code will be portable to Autoconf 2.60.
5711         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
5712         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
5713         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
5714
5715 2006-04-19  Derek Price  <derek@ximbiot.com>
5716             Eric Blake  <ebb9@byu.net>
5717
5718         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
5719         rather than "/full/path.h".  Update comment to match.  Shorten &
5720         generalize m4_translit call via AS_TR_CPP.
5721
5722 2006-04-19  Derek Price  <derek@ximbiot.com>
5723             Eric Blake  <ebb9@byu.net>
5724
5725         * lib/inttypes.h: Correct grammar in comment.
5726
5727 2006-04-18  Derek Price  <derek@ximbiot.com>
5728             Paul Eggert  <eggert@cs.ucla.edu>
5729
5730         * modules/inttypes: New file.
5731         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
5732
5733 2006-04-18  Derek Price  <derek@ximbiot.com>
5734             Paul Eggert  <eggert@cs.ucla.edu>
5735
5736         * m4/_inttypes_h.m4, full-header-path.m4, include_next: New files.
5737
5738 2006-04-18  Derek Price  <derek@ximbiot.com>
5739             Paul Eggert  <eggert@cs.ucla.edu>
5740
5741         * lib/inttypes.h: New file.
5742         * lib/strtoimax.c: Assume <inttypes.h>.
5743
5744 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
5745
5746         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
5747         isn't mounted.  Problem reported by Kir Kolyshkin.
5748
5749 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
5750
5751         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
5752         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
5753         Derek R. Price.
5754         * lib/regex.h (RE_DUP_MAX): Update comment to match current
5755         implementation.
5756
5757 2006-04-12  Eric Blake  <ebb9@byu.net>
5758
5759         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
5760         is now done automatically by the corresponding Autoconf macro.
5761
5762 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
5763
5764         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
5765         time_r.h.
5766
5767 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5768
5769         Merge regex changes from libc, removing some of our
5770         POSIX-conformance changes that were rejected and redoing them in a
5771         less-intrusive way.
5772
5773         * lib/regcomp.c (re_compile_internal, init_dfa):
5774         Length arg is now size_t, not Idx.  All uses changed.
5775         (peek_token): Forward decl now says internal_function.
5776         (__re_error_msgid, __re_error_msgid_idx):
5777         Now static rather than extern with attribute_hidden.
5778         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
5779         For some reason libc prefers K&R style defns for external functions.
5780         (regerror) [!defined _LIBC]: Likewise.
5781         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
5782         (seek_collating_symbol_entry, lookup_collation_sequence_value):
5783         (build_range_exp, build_collating_symbol):
5784         Use K&R-style defn.
5785         (re_compile_fastmap): Use '\0' to memset, not 0.
5786         (utf8_sb_map): Make the calculations more obvious.
5787         (init_dfa, parse_bracket_exp, build_charclass_op):
5788         Call calloc and cast result, as glibc does.
5789         (init_word_char, fetch_token, peek_token, peek_token_bracket):
5790         (build_range_exp, build_collating_symbol):
5791         Now internal functions.
5792
5793         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
5794
5795         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
5796         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
5797         Don't depend on VMS; depend on __VMS instead, for POSIX
5798         namespace cleanness.
5799         (regoff_t): Define to ssize_t, not long int.
5800
5801         Remove the REG_ macros named below.  Instead, make the old names
5802         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
5803         __USE_GNU_REGEX.
5804         (REG_BACKSLASH_ESCAPE_IN_LISTS):
5805         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
5806         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
5807         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
5808         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
5809         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
5810         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
5811         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
5812         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
5813         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
5814         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
5815         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
5816         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
5817         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
5818         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
5819         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
5820         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
5821         (REG_NREGS):
5822         Remove.  All uses replaced by the old RE_* names.
5823         (RE_BACKSLASH_ESCAPE_IN_LISTS):
5824         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
5825         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
5826         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
5827         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
5828         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
5829         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
5830         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
5831         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
5832         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
5833         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
5834         Don't bother having these macros be independent of each others'
5835         values, since they no longer exist in the POSIX name space.
5836
5837         Rename the following member names back to their old names,
5838         unless !__USE_GNU_REGEX.  All uses changed back.
5839         (buffer): Renamed from re_buffer.
5840         (allocated): Renamed from re_allocated.
5841         (used): Renamed from re_used.
5842         (syntax): Renamed from re_syntax.
5843         (fastmap): Renamed from re_fastmap.
5844         (translate): Renamed from re_translate.
5845         (can_be_null): Renamed from re_can_be_null.
5846         (regs_allocated): Renamed from re_regs_allocated.
5847         (fastmap_accurate): Renamed from re_fastmap_accurate.
5848         (no_sub): Renamed from re_no_sub.
5849         (not_bol): Renamed from re_not_bol.
5850         (not_eol): Renamed from re_not_eol.
5851         (newline_anchor): Renamed from re_newline_anchor.
5852         (num_regs): Renamed from rm_num_regs.
5853         (start): Renamed from rm_start.
5854         (end): Renamed from rm_end.
5855
5856         (free_state): Move up a bit.
5857
5858         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
5859         #define to be empty.
5860         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
5861         when that is what is intended.
5862         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
5863         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
5864         (MAX): New macro.
5865         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
5866         All uses changed back to re_malloc, etc.  It's now the caller's
5867         responsibility to check for overflow; all callers changed.
5868         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
5869         (re_x2nrealloc): Remove.
5870         (free_state): Remove decl.
5871
5872         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
5873         (re_set_registers, re_exec):
5874         Use K&R-style defn.
5875
5876         2006-01-31  Roland McGrath  <roland@redhat.com>
5877
5878         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
5879         Reported by Mike Frysinger <vapier@gentoo.org>.
5880
5881         2006-01-15  Andreas Jaeger  <aj@suse.de>
5882
5883         [BZ #1950]
5884         * lib/regex_internal.c (re_string_reconstruct): Adjust for
5885         build_wcs_upper_buffer change.
5886         (build_wcs_upper_buffer): Change return type.
5887
5888         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
5889
5890         * lib/regex_internal.h: Include <stdint.h> if available.
5891
5892         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
5893
5894         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
5895
5896         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
5897
5898         * lib/regcomp.c: Adjust for changed secondary hash function.
5899
5900         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
5901
5902         * lib/regex.h: Pretty printing.
5903         Clean up namespace a bit.
5904
5905         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
5906
5907         * lib/regexec.c (update_cur_sifted_state, check_arrival,
5908         check_arrival_add_next_nodes): Avoid using uninitialized variable.
5909
5910         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
5911                     Ulrich Drepper  <drepper@redhat.com>
5912
5913         [BZ #1302]
5914         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
5915         changed.
5916         (bitset_word_t): Renamed from bitset_word.  All uses changed.
5917
5918         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
5919
5920         [BZ #281]
5921         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
5922         * lib/regcomp.c: Remove unnecessary uses of
5923         unsigned RE_TRANSLATE_TYPE.
5924         * lib/regex_internal.h: Likewise.
5925         * lib/regex_internal.c: Likewise.
5926         * lib/regexec.c: Likewise.
5927         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
5928
5929         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
5930
5931         * lib/regexec.c (find_recover_state): Remove unnecessary
5932         initialization.
5933         (transit_state_bkref): Make DFA a const pointer.
5934         (get_subexp): Likewise.
5935         (check_arrival): Likewise.
5936         (update_cur_sifted_state): Likewise.
5937         (re_search_internal): Likewise.
5938         (prune_impossible_nodes): Likewise.
5939         (acquire_init_state_context): Likewise.
5940         (proceed_next_node): Likewise.
5941         (set_regs): Likewise.
5942         (free_fail_stack_return): Likewise.
5943         (check_arrival_expand_ecl): Mark DFA parameter as const.
5944         (check_arrival_expand_ecl_sub): Likewise.
5945         (check_subexp_limits): Likewise.
5946         (sub_epsilon_src_nodes):  Likewise.
5947         (add_epsilon_src_nodes):  Likewise.
5948         (merge_state_array): Likewise.
5949         (update_regs): Likewise.
5950         (build_trtable): Likewise.
5951         (sift_states_backward): Mark MCTX parameter as const.
5952         (build_sifted_states): Likewise.
5953         (update_cur_sifted_state): Likewise.
5954         (sift_states_mkref): Likewise.
5955         (check_arrival_expand_ecl): Mark eclosure as const.
5956         (check_dst_limits_calc_pos_1): Likewise.
5957         * lib/regex_internal.h (re_match_context_t): Make dfa a const
5958         pointer.
5959
5960         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
5961
5962         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
5963         (transit_state_sb): Likewise.
5964         (transit_state_mb): Likewise.
5965         (sift_states_iter_mb): Likewise.
5966         (check_arrival_add_next_nodes): Likewise.
5967         (check_node_accept_bytes): Change first parameter to pointer-to-const.
5968         [_LIBC] (re_search_2_stub): Use mempcpy.
5969
5970         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
5971         mbrtowc for very simple UTF-8 case.
5972
5973         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
5974         a pointer-to-const.
5975         (re_acquire_state_context): Likewise.
5976         * lib/regex_internal.h: Adjust prototypes.
5977
5978         * lib/regex.c: Prevent using C++ compilers.
5979
5980         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
5981         (re_acquire_state_context): Likewise.
5982
5983 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5984
5985         * modules/regex (Depends-on): Add ssize_t.
5986
5987 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5988
5989         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
5990         translation table.
5991
5992 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5993
5994         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
5995
5996 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
5997             Bruno Haible  <bruno@clisp.org>
5998
5999         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
6000         <sys/types.h> and <inttypes.h>.
6001
6002 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6003
6004         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
6005         `__error_t_defined', so argp.h will not typedef the former.
6006
6007 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
6008
6009         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
6010         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
6011         glibc names.  Even if glibc is changed to conform to POSIX, the
6012         traditional names will be available anyway, since regex depends on
6013         the extensions module.  Also, fix a longstanding typo in the
6014         implementation of Spencer ERE test #75 from grep 2.3.  Problems
6015         reported by Emanuele Giaquinta.  Also, change sense of cached
6016         variable, so that the message makes sense.
6017
6018 2006-03-24  Simon Josefsson  <jas@extundo.com>
6019
6020         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
6021         including some doc fixes.
6022         (base64_encode_alloc): Fix +1 bug on allocation failures.
6023
6024 2006-03-24  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6025
6026         * lib/base64.c (base64_encode): Do not read past end of array with
6027         unsanitized input on systems with CHAR_BIT > 8.
6028
6029 2006-03-24  Eric Blake  <ebb9@byu.net>
6030
6031         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
6032
6033 2006-03-22  Karl Berry  <karl@gnu.org>
6034
6035         * config/srclist.txt (*setenv.[ch]): get from coreutils.
6036         * config/srclistvars.sh (COREUTILS): new var.
6037
6038 2006-03-17  Jim Meyering  <jim@meyering.net>
6039
6040         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
6041         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
6042
6043 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6044
6045         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
6046         no longer needs it.  Instead, check that regoff_t is as least
6047         as wide as ptrdiff_t.
6048
6049         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
6050         so that our regex.h stays compatible with the installed regex.
6051         This is helpful for installers who configure --without-included-regex.
6052         Problem reported by Emanuele Giaquinta.
6053
6054 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6055
6056         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
6057         Typedef to long int, not to off_, as POSIX will likely change
6058         in that direction.
6059
6060 2006-03-15  Eric Blake  <ebb9@byu.net>
6061
6062         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
6063
6064 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6065
6066         * lib/argp-help.c (validate_uparams): Fix typo
6067         * lib/argp-parse.c (argp_default_options): Consistently begin help
6068         messages with a lowercase letter.
6069
6070 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
6071
6072         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
6073         overrun buffers and shouldn't be used (much as gets shouldn't be
6074         used).
6075         * lib/time_r.c (asctime_r, ctime_r): Likewise.
6076
6077 2006-03-08  Simon Josefsson  <jas@extundo.com>
6078
6079         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
6080         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6081
6082 2006-03-08  Simon Josefsson  <jas@extundo.com>
6083
6084         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
6085         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6086
6087 2006-03-08  Simon Josefsson  <jas@extundo.com>
6088
6089         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
6090         signal that configure disabled the device.
6091
6092 2006-03-08  Simon Josefsson  <jas@extundo.com>
6093
6094         * build-aux/maint.mk: Fix refresh-po, to handle no translated
6095         languages.
6096
6097 2006-03-07  Simon Josefsson  <jas@extundo.com>
6098
6099         * modules/getopt (Depends-on): Add unistd.
6100
6101         * modules/unistd: New file.
6102
6103 2006-03-07  Simon Josefsson  <jas@extundo.com>
6104
6105         * modules/gc-random: New file.
6106
6107 2006-03-07  Simon Josefsson  <jas@extundo.com>
6108
6109         * m4/unistd_h.m4: New file.
6110
6111 2006-03-07  Simon Josefsson  <jas@extundo.com>
6112
6113         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
6114         test to be side-effect free by storing the result in the cache
6115         variable gl_cv_lib_readline, and moving the assignment of
6116         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
6117         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6118
6119 2006-03-07  Simon Josefsson  <jas@extundo.com>
6120
6121         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
6122         error on missing devices (the functions will return an error).
6123
6124         * m4/gc.m4: Move random stuff to gc-random.m4
6125
6126 2006-03-07  Simon Josefsson  <jas@extundo.com>
6127
6128         * lib/unistd_.h: New file.
6129
6130 2006-03-07  Simon Josefsson  <jas@extundo.com>
6131
6132         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
6133
6134 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6135
6136         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
6137         Problem reported by Juan Manuel Guerrero.
6138
6139 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6140
6141         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
6142         the unistd module.
6143         * lib/getlogin_r.c: Likewise.
6144         * lib/getlogin_r.h: Likewise.
6145         * lib/glob.c: Likewise.
6146         * lib/pagealign_alloc.c: Likewise.
6147         * lib/unistd_.h: Remove; no longer needed.
6148
6149 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6150
6151         * MODULES.html.sh (Support for systems lacking POSIX:2001):
6152         Add unistd.
6153         * modules/c-stack (Depends-on): Add unistd.
6154         * modules/getlogin_r: Likewise.
6155         * modules/glob: Likewise.
6156         * modules/pagealign_alloc: Likewise.
6157         * modules/unistd (Files): Remove lib/unistd_.h.
6158         (EXTRA_DIST): Remove.
6159         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
6160         need unistd_.h.
6161         (MOSTLYCLEANFILES): Remove unistd.h-t.
6162
6163 2006-03-03  Simon Josefsson  <jas@extundo.com>
6164
6165         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
6166
6167 2006-03-03  Simon Josefsson  <jas@extundo.com>
6168
6169         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
6170         libidn and bison.
6171
6172 2006-03-03  Simon Josefsson  <jas@extundo.com>
6173
6174         * build-aux/maint.mk: Add indent target.
6175
6176 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
6177
6178         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
6179         our replacement poll.h in any case, to avoid a differing
6180         declaration from a system header.  Seen on AIX.
6181
6182 2006-03-01  Simon Josefsson  <jas@extundo.com>
6183
6184         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
6185         <kasal@ucw.cz>.
6186
6187 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
6188
6189         * modules/gettime (Depends-on): Add extensions module.
6190         * modules/nanosleep (Depends-on): Likewise.
6191         * modules/settime (Depends-on): Likewise.
6192
6193 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
6194
6195         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
6196         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
6197         pedantically.
6198         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6199         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
6200
6201         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
6202         not "==".  Reported by Ralf Wildenhues.
6203
6204 2006-03-01  Karl Berry  <karl@gnu.org>
6205
6206         * doc/Copyright/request-*: new files, synced from gnuorg.
6207
6208 2006-03-01  Karl Berry  <karl@gnu.org>
6209
6210         * config/srclist.txt (Copyright/*): new entries.
6211
6212 2006-02-28  Simon Josefsson  <jas@extundo.com>
6213
6214         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
6215
6216 2006-02-27  Simon Josefsson  <jas@extundo.com>
6217
6218         * lib/base64.h: Indent #define's.  From Jim Meyering
6219         <jim@meyering.net>.
6220
6221 2006-02-27  Jim Meyering  <jim@meyering.net>
6222
6223         Revert the change of 2006-02-24, so these files can continue
6224         to be sync'd from gettext.
6225         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
6226         of `config.h'.
6227
6228 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
6229
6230         * modules/intprops: New file.
6231         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
6232         Add intprops.
6233         * modules/getloadavg (Files): Remove lib/intprops.h.
6234         (Depends-on): Add intprops.
6235         * modules/human: Likewise.
6236         * modules/inttostr: Likewise.
6237         * modules/openat: Likewise.
6238         * modules/sig2str: Likewise.
6239         * modules/userspec: Likewise.
6240         * modules/utimecmp: Likewise.
6241         * modules/xnanosleep: Likewise.
6242         * modules/xstrtol: Likewise.
6243
6244 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
6245
6246         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
6247         * modules/lock-tests (TESTS): Use $(EXEEXT).
6248         * modules/tls-tests: Likewise.
6249         * modules/argp-tests: Likewise.
6250         (check_PROGRAMS): New var, replacing...
6251         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
6252
6253 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6254
6255         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
6256         `config.h'.
6257
6258 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
6259
6260         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
6261
6262 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6263
6264         Sync from coreutils.
6265         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
6266         gl_CHDIR_SAFER.
6267
6268 2006-02-22  Jim Meyering  <jim@meyering.net>
6269
6270         Sync from coreutils.
6271         * m4/chdir-safer.m4: New file.
6272
6273 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
6274
6275         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
6276         AT_FDCWD exceeds INT_MAX.
6277         * lib/openat.h (AT_FDCWD): Likewise.
6278
6279 2006-02-17  Eric Blake  <address@hidden>
6280
6281         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
6282
6283 2006-02-16  Simon Josefsson  <jas@extundo.com>
6284
6285         * modules/getaddrinfo (Depends-on): Add sys_socket.
6286
6287 2006-02-15  Simon Josefsson  <jas@extundo.com>
6288
6289         * build-aux/maint.mk: Add dsyntax-check rule.
6290
6291 2006-02-15  Eric Blake  <ebb9@byu.net>
6292
6293         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
6294         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
6295         'present but cannot compile' warnings on cygwin.
6296         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
6297         use ws2tcpip.h if sys/socket.h works.
6298         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
6299         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
6300
6301 2006-02-14  Simon Josefsson  <jas@extundo.com>
6302
6303         * modules/maintainer-makefile (Files): Rename.
6304
6305         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
6306         and (the local) Makefile.cfg to maint-cfg.mk.
6307
6308         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
6309         to the latter.
6310
6311         * modules/maintainer-makefile: New module.
6312
6313         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
6314         severaly stripped to make it possible to build it up from scratch
6315         with reliable tests.
6316
6317         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
6318         fixes to permit overriding the default actions when configure and
6319         makefile are not available.
6320
6321 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
6322
6323         Sync from coreutils.
6324         * modules/lstat (Depends-on): Don't depend on xalloc.
6325         (License): Change from GPL to LGPL, since this is now simply a
6326         replacement for a libc function.
6327
6328 2006-02-14  Jim Meyering  <jim@meyering.net>
6329
6330         Sync from coreutils.
6331
6332         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
6333         failure on deficient systems, and simplify gnulib lgpl dependencies.
6334         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
6335         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
6336
6337         * lib/xalloc-die.c: Remove unused definition of N_.
6338
6339 2006-02-14  Jim Meyering  <jim@meyering.net>
6340
6341         Sync from coreutils.
6342         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
6343         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
6344         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
6345         double-quote uses of that variable, to accommodate the rare case in
6346         which getmntent is available in none of the libraries checked.  This
6347         happens at least on FreeBSD 5.0.
6348
6349 2006-02-13  Simon Josefsson  <jas@extundo.com>
6350
6351         * gnulib-tool (Usage): Fix --import, from
6352         karl@freefriends.org (Karl Berry).
6353
6354 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6355
6356         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
6357
6358 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
6359
6360         * lib/argp-namefrob.h: Restore changes accidentally lost during the
6361         "autoupdate" on 2005-12-12.
6362
6363 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
6364
6365         * modules/closeout (Depends-on): Remove atexit.
6366
6367 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
6368
6369         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
6370         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
6371
6372 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
6373
6374         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
6375         __EXTENSIONS__ if this causes compilation to fail.  Problem
6376         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
6377         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
6378
6379 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
6380
6381         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
6382         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
6383         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
6384         All uses changed.
6385
6386 2006-01-26  Simon Josefsson  <jas@extundo.com>
6387
6388         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
6389         prototype is visible on mingw32.
6390
6391         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
6392         for mingw32.
6393
6394         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
6395         mingw32).
6396
6397 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
6398
6399         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
6400         attempt to open for write; this always fails, at least on POSIX
6401         hosts.  This reinstates the 2006-01-09 change, which was
6402         inadvertently removed.
6403
6404 2006-01-26  Bruno Haible  <bruno@clisp.org>
6405
6406         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
6407         Reported by Paul Eggert.
6408
6409 2006-01-26  Bruno Haible  <bruno@clisp.org>
6410             Paul Eggert  <eggert@cs.ucla.edu>
6411
6412         * lib/stdbool_.h (_Bool)
6413         [(! (defined __cplusplus || defined __BEOS__)
6414           && !defined __GNUC__
6415           && !(defined __HP_cc || defined __xlc__
6416                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
6417                || defined __sgi))]:
6418         #define to signed char in these cases too; this simplifies
6419         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
6420         etc., separately) and makes it more conservative.
6421
6422 2006-01-25  Simon Josefsson  <jas@extundo.com>
6423
6424         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
6425         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
6426         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
6427
6428 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
6429
6430         * lib/argp-namefrob.h: Bugfix. Remove stray #
6431
6432 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
6433
6434         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
6435         so that we test the test.
6436         Check for yet another HP-UX cc bug involving *bool |= bool.
6437
6438 2006-01-25  Karl Berry  <karl@gnu.org>
6439
6440         * config/srclist.txt (vasnprintf.c): sync lost.
6441
6442 2006-01-25  Jim Meyering  <jim@meyering.net>
6443
6444         Sync from the stable (b5) branch of coreutils:
6445
6446         * lib/fts.c (fts_children): Don't let close() clobber errno from
6447         failed fchdir().
6448
6449         * lib/fts.c (fts_stat): When following a symlink-to-directory,
6450         don't necessarily interpret stat-fails+lstat-succeeds as indicating
6451         a dangling symlink.  That can also happen at least for ELOOP.
6452         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
6453         FYI, this bug predates the inclusion of fts.c in coreutils.
6454
6455         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
6456         in their own block, so pre-c99 compilers don't object.
6457
6458         Avoid the double-free (first in fts_read, second in fts_close) that
6459         would occur when an `active' directory is made inaccessible (e.g.,
6460         via chmod a-x) during a traversal.
6461         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
6462         before returning.  Reproduce this failure by
6463         mkdir -p a/b; cd a; chmod a-x . b
6464         Reported by Stavros Passas.
6465
6466 2006-01-25  Jim Meyering  <jim@meyering.net>
6467
6468         * lib/fileblocks.c: Remove more useless parentheses.
6469         * lib/readutmp.h: Likewise.
6470
6471 2006-01-25  Bruno Haible  <bruno@clisp.org>
6472
6473         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
6474         warnings.
6475         Reported by Paul Eggert.
6476
6477 2006-01-25  Bruno Haible  <bruno@clisp.org>
6478
6479         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
6480         rid of a trap command. For Solaris sh.
6481         Reported by Mark D. Baushke <mdb@gnu.org>.
6482
6483 2006-01-24  Simon Josefsson  <jas@extundo.com>
6484
6485         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
6486         Bruno.
6487
6488 2006-01-24  Karl Berry  <karl@gnu.org>
6489
6490         * config/srclist.txt (argp-namefrob.h): sync lost.
6491
6492 2006-01-24  Jim Meyering  <jim@meyering.net>
6493
6494         * modules/openat (Files): Add lib/intprops.h.
6495         From Mark D. Baushke.
6496
6497 2006-01-24  Jim Meyering  <jim@meyering.net>
6498
6499         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
6500         Reported by Mark D. Baushke.
6501
6502 2006-01-24  Jim Meyering  <jim@meyering.net>
6503
6504         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
6505
6506 2006-01-24  Bruno Haible  <bruno@clisp.org>
6507
6508         * modules/strnlen (Maintainer): Change from glibc to all.
6509
6510 2006-01-24  Bruno Haible  <bruno@clisp.org>
6511
6512         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
6513         Patch by Paul Eggert.
6514
6515 2006-01-24  Bruno Haible  <bruno@clisp.org>
6516
6517         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
6518         already has it.
6519         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
6520         2005-11-26.
6521
6522         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
6523         'signed char' to avoid problems with the built-in _Bool type.
6524         Reported by Paul Eggert on 2005-11-26.
6525
6526 2006-01-24  Bruno Haible  <bruno@clisp.org>
6527
6528         * gnulib-tool (func_import): Avoid constructing complicated sed
6529         expressions inside backquote.
6530         Report and solution by Mark D. Baushke <mdb@gnu.org>.
6531
6532 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
6533
6534         These changes imported from libc.
6535         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
6536         test and two separate function calls.
6537         * lib/strndup.c (__strndup): Add libc_hidden_def.
6538
6539 2006-01-23  Simon Josefsson  <jas@extundo.com>
6540
6541         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
6542         Remove the test_*_SOURCES variable: automake infers it by default.
6543         * modules/tls-tests: Likewise.
6544
6545 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6546
6547         Work around porting bugs reported by Dieter in
6548         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
6549         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
6550         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
6551         Include "getopt.h" first, to check interface.
6552         (getenv): Declare only if defined HAVE_DECL_GETENV &&
6553         !HAVE_DECL_GETENV.
6554         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
6555         (__strndup): Revert to K&R-style function dfns, the glibc style.
6556         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
6557         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
6558         Include strnlen.h first, to get prototype properly.
6559         (strnlen): Renamed from __strnlen.
6560         Remove weak alias.
6561
6562 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6563
6564         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
6565
6566 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6567
6568         * config/srclist.txt: Adjust to reflect glibc reorganization.
6569         This affects only comments.
6570
6571 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6572
6573          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
6574          Reported by Bruce Korb <bkorb@gnu.org>.
6575
6576 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
6577
6578         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
6579         to pacify gcc -Wswitch-default.
6580
6581 2006-01-22  Bruno Haible  <bruno@clisp.org>
6582
6583         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
6584         temporary buffer for sprintf, take into account the precision also
6585         for 'd', 'i', 'u', 'o', 'x', 'X'.
6586
6587 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
6588
6589         * modules/argp-tests: New module
6590         * tests/test-argp.c: New file
6591         * tests/test-argp-2.sh: New file
6592
6593 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
6594
6595         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
6596         (__argp_base_name): Removed
6597         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
6598         typo.
6599         (__argp_base_name): Provide macro definition or extern declaration
6600         depending on the configuration
6601
6602 2006-01-20  Simon Josefsson  <jas@extundo.com>
6603
6604         * modules/inet_ntop (Depends-on): Depend on sys_socket.
6605
6606 2006-01-20  Simon Josefsson  <jas@extundo.com>
6607
6608         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
6609
6610 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
6611
6612         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
6613         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
6614         Suggested by Bruno Haible.
6615
6616 2006-01-20  Karl Berry  <karl@gnu.org>
6617
6618         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
6619         until changes propagate, I guess.
6620
6621 2006-01-19  Simon Josefsson  <jas@extundo.com>
6622
6623         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
6624
6625 2006-01-19  Simon Josefsson  <jas@extundo.com>
6626
6627         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
6628
6629 2006-01-19  Simon Josefsson  <jas@extundo.com>
6630
6631         * gnulib-tool: Set check_PROGRAMS.
6632
6633         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
6634         modules/des-tests, modules/gc-arcfour-tests,
6635         modules/gc-arctwo-tests, modules/gc-des-tests,
6636         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
6637         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
6638         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
6639         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
6640         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
6641         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
6642         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
6643         test_*_SOURCES.
6644
6645 2006-01-18  Simon Josefsson  <jas@extundo.com>
6646
6647         * modules/socklen (Depends-on): Depend on sys_socket.
6648
6649 2006-01-18  Simon Josefsson  <jas@extundo.com>
6650
6651         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
6652         modules/des-tests, modules/gc-arcfour-tests,
6653         modules/gc-arctwo-tests, modules/gc-des-tests,
6654         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
6655         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
6656         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
6657         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
6658         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
6659         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
6660         $(EXEEXT) to automake TESTS variable, for mingw32.
6661
6662 2006-01-17  Simon Josefsson  <jas@extundo.com>
6663
6664         * modules/socklen (Include): Need sys/socket.h.
6665
6666 2006-01-17  Bruno Haible  <bruno@clisp.org>
6667
6668         * modules/ssize_t (Include): Add <sys/types.h>.
6669
6670 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
6671
6672         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
6673         it's not portable and it doesn't work with cross-compiles.
6674         Problem reported by Bruno Haible.  Fix missing-$ typo in
6675         'test "gl_cv_ignore_unused_libraries" ...' that prevented
6676         -zignore from being used with Sun's C compiler.
6677
6678 2006-01-12  Simon Josefsson  <jas@extundo.com>
6679
6680         * lib/base64.c: Fix warning, reported by Bruno Haible
6681         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
6682
6683 2006-01-12  Bruno Haible  <bruno@clisp.org>
6684
6685         * modules/ldd: New file.
6686         * build-aux/ldd.sh.in: New file.
6687         * MODULES.html.sh (Support for building libraries and executables): Add
6688         ldd.
6689
6690 2006-01-12  Bruno Haible  <bruno@clisp.org>
6691
6692         * m4/ldd.m4: New file.
6693
6694 2006-01-12  Bruno Haible  <bruno@clisp.org>
6695
6696         * gnulib-tool (func_import, func_create_testdir): Don't go into an
6697         endless loop while replacing $auxdir with build-aux.
6698
6699 2006-01-11  Simon Josefsson  <jas@extundo.com>
6700
6701         * lib/stdint_.h (SIZE_MAX): Add missing (.
6702
6703 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
6704
6705         Sync from coreutils.
6706         * lib/md5.c: Fix commentary typos.
6707         (alignof, UNALIGNED_P): No need for a GCC-specific version.
6708         * lib/md5.h (__attribute__): Remove; unused.
6709         * lib/sha1.c: Fix commentary to match md5 better.
6710         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
6711         so that we don't need to worry about alignment.  All uses changed.
6712         This merges the 2005-10-28 md5 change into sha1.
6713
6714 2006-01-11  Jim Meyering  <jim@meyering.net>
6715
6716         Sync from coreutils.
6717         * lib/md5.c (OP): Fix spacing.
6718
6719 2006-01-11  Bruno Haible  <bruno@clisp.org>
6720
6721         Ensure automatic ordering between gl_LOCK and gl_ARGP.
6722         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
6723         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
6724
6725 2006-01-11  Bruno Haible  <bruno@clisp.org>
6726
6727         Ensure automatic ordering between gl_LOCK and gl_ARGP.
6728         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
6729         the "early" section as well.
6730
6731 2006-01-11  Bruno Haible  <bruno@clisp.org>
6732
6733         Avoid "ar: no archive members specified" error on MacOS X.
6734         * gnulib-tool (func_modules_add_dummy): New function.
6735         (func_import, func_create_testdir): Invoke it.
6736
6737 2006-01-11  Bruno Haible  <bruno@clisp.org>
6738
6739         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
6740         with $auxdir in AC_CONFIG_FILES statements.
6741
6742 2006-01-11  Bruno Haible  <bruno@clisp.org>
6743
6744         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6745         Initialize also noinst_HEADERS to empty.
6746
6747 2006-01-11  Bruno Haible  <bruno@clisp.org>
6748
6749         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
6750         variables.
6751         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
6752         autoreconf.
6753
6754 2006-01-11  Bruno Haible  <bruno@clisp.org>
6755
6756         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
6757         overridable by the user.
6758         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6759
6760 2006-01-10  Simon Josefsson  <jas@extundo.com>
6761
6762         * modules/sys_socket: New file.
6763
6764 2006-01-10  Simon Josefsson  <jas@extundo.com>
6765
6766         * m4/sys_socket_h.m4: New file.
6767
6768 2006-01-10  Simon Josefsson  <jas@extundo.com>
6769
6770         * lib/socket_.h: New file.
6771
6772 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6773
6774         * modules/readutmp (Maintainer): Add myself.
6775
6776 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6777
6778         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
6779         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
6780         People who are still concerned with buggy memcmp implementations
6781         can invoke gl_FUNC_MEMCMP themselves.
6782
6783 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6784
6785         * lib/regex_internal.h (BITSET_WORD_BITS):
6786         Work around a bug in 64-bit PGC (before version 6.1-2), where the
6787         preprocessor mishandles large unsigned values as if they were signed.
6788         Problem reported by Claudio Fontana in
6789         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
6790
6791 2006-01-10  Jim Meyering  <jim@meyering.net>
6792
6793         Avoid the double-free (first in fts_read, second in fts_close) that
6794         would occur when an `active' directory is made inaccessible (e.g.,
6795         via chmod a-x) during a traversal.
6796         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
6797         before returning.  Reproduce this failure by
6798         mkdir -p a/b; cd a; chmod a-x . b
6799         Reported by Stavros Passas.
6800
6801         Sync from coreutils.
6802         * lib/sha1.c: Tweak grammar in a comment.
6803
6804 2006-01-10  Jim Meyering  <jim@meyering.net>
6805
6806         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
6807         Patch by Joerg Sonnenberger.
6808
6809 2006-01-10  Bruno Haible  <bruno@clisp.org>
6810
6811         * modules/readutmp: Depend on module free.
6812         * modules/strtok_r: Depend on module restrict.
6813
6814 2006-01-10  Bruno Haible  <bruno@clisp.org>
6815
6816         * modules/gettext (configure.ac): Add an invocation of
6817         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
6818
6819 2006-01-10  Bruno Haible  <bruno@clisp.org>
6820
6821         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
6822         Reported by Werner Lemberg <wl@gnu.org>.
6823
6824 2006-01-10  Bruno Haible  <bruno@clisp.org>
6825
6826         * lib/localcharset.c: Update from GNU gettext.
6827
6828 2006-01-10  Bruno Haible  <bruno@clisp.org>
6829
6830         * lib/argp.h (__const): Remove macro. Use const instead.
6831         * lib/argp-fmtstream.h (__const): Likewise.
6832         * lib/glob_.h (__const): Remove macro.
6833         * lib/glob-libc.h: Use const instead of __const.
6834
6835 2006-01-10  Bruno Haible  <bruno@clisp.org>
6836
6837         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
6838         variable.
6839         Needed to avoid an automake error regarding the 'gettext' module.
6840
6841 2006-01-09  Simon Josefsson  <jas@extundo.com>
6842
6843         * modules/inet_ntop (Depends-on): Add restrict.
6844
6845 2006-01-09  Simon Josefsson  <jas@extundo.com>
6846
6847         * modules/gc-rijndael-tests (License): Put under LGPL.
6848
6849         * modules/gc-des-tests (License): Likewise.
6850
6851         * modules/gc-arcfour-tests (License): Likewise.
6852
6853         * modules/gc-arctwo-tests (License): Likewise.
6854
6855         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
6856
6857         * modules/gc-hmac-sha1-tests (Files): Likewise.
6858
6859         * modules/gc-hmac-md5-tests (License): Likewise.
6860
6861         * modules/gc-sha1-tests (License): Likewise.
6862
6863         * modules/gc-md5-tests (License): Likewise.
6864
6865         * modules/gc-md4-tests (License): Likewise.
6866
6867         * modules/gc-md2-tests (License): Likewise.
6868
6869         * modules/gc-tests (License): Likewise.
6870
6871         * modules/des-tests (License): Likewise.
6872
6873         * modules/md4-tests (License): Likewise.
6874
6875         * modules/md2-tests (License): Likewise.
6876
6877 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6878
6879         Sync from coreutils:
6880
6881         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
6882         * modules/lib-ignore: New file.
6883         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
6884         chdir-safer.m4, lchmod.m4.
6885         * modules/openat: Add mkdirat.c, openat-priv.h.
6886
6887 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6888
6889         Sync from coreutils.
6890         * m4/lib-ignore.m4: New file.
6891         * m4/lchmod.m4: New file.
6892
6893 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6894
6895         Sync from coreutils.
6896         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
6897         for write access: POSIX says that must fail.
6898         * lib/fts.c (diropen): Likewise.
6899         * lib/save-cwd.c (save_cwd): Likewise.
6900         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
6901         well, for minor improvements on hosts that lack O_DIRECTORY.
6902         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
6903         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
6904         Fall back on chown if open failed with EACCES.
6905
6906         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
6907         Report an error at compile-time if only a 1-second nominal clock
6908         resolution is found.
6909
6910         * lib/lchmod.h: New file.
6911         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
6912         (make_dir_parents): Use lchown rather than chown, and
6913         lchmod rather than chmod.
6914
6915         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
6916         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
6917         "proc" reported by n0dalus.
6918
6919         * lib/mountlist.c: Include <limits.h>.
6920         (dev_from_mount_options)
6921         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
6922         New function.  It no longer assumes "dev=" has the System V meaning
6923         on Linux (since it doesn't).  It also parses "dev=" more carefully.
6924         (read_file_system_list)
6925         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
6926         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
6927         dev= in that case.
6928
6929         * lib/posixtm.h (PDS_PRE_2000): New macro.
6930         * lib/posixtm.c (year): Arg is now syntax_bits rather than
6931         allow_century.  All usages changed.  Reject dates outside the range
6932         1969-1999 if PDS_PRE_2000 is used.
6933
6934 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6935
6936         Sync from coreutils.
6937         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
6938         (Time of day items): Mention the possibility of leap seconds.
6939         Problem reported by Dr. David Alan Gilbert.
6940
6941 2006-01-09  Jim Meyering  <jim@meyering.net>
6942
6943         Sync from coreutils.
6944
6945         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
6946
6947         * lib/chdir-safer.h, chdir-safer.c: New files.
6948
6949         * lib/modechange.c (mode_compile): Reject an invalid mode string
6950         that starts with an octal digit.  From Andreas Gruenbacher.
6951
6952         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
6953         and dup to open_safer and dup_safer, respectively.
6954         (openat_permissive): Fix typo in comment.
6955
6956         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
6957         "gettext.h"; either no longer needed or are guaranteed by openat.h.
6958         (_): Remove; no longer needed.
6959         (openat): Renamed from rpl_openat; no need for rpl_openat
6960         since openat.h renames openat for us.
6961         Replace most of the body with a call to openat_permissive,
6962         to avoid duplicate code.
6963         Port to (probably hypothetical) environments were mode_t is
6964         wider than int.
6965         (openat_permissive): Require mode arg, so that we can check
6966         types better.  Put it just after flags.  Change cwd failure
6967         indicator from pointer-to-bool to pointer-to-errno-value.
6968         All callers changed.
6969         Invoke openat_save_fail and/or openat_restore_fail if
6970         cwd_errno is null, so that openat can call us.
6971         (openat_permissive, fdopendir, fstatat, unlinkat):
6972         Simplify errno handling to avoid some duplicate code,
6973         as it's OK to set errno on success.
6974         * lib/openat.h: Revamp code so that function macros depend on
6975         __OPENAT_PREFIX only, not also on AT_FDCWD.
6976         (openat_ro): Remove.  Caller changed to use openat_permissive.
6977         (openat_permissive): Now a macro, if not a function.
6978         (openat_restore_fail, openat_save_fail): Now always functions,
6979         since mkdirat needs them even if __OPENAT_PREFIX is defined.
6980
6981         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
6982         and openat.c.
6983         * lib/mkdirat.c: Include openat-priv.h.
6984         Remove definitions of macros defined therein.
6985         * lib/openat.c: Likewise.
6986
6987         * lib/mkdirat.c (mkdirat): New file and function.
6988         * lib/openat.h (mkdirat): Declare.
6989
6990         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
6991
6992         * lib/openat.h (openat_permissive): Declare.
6993         (openat_ro): Define.
6994
6995         * lib/openat.c (EXPECTED_ERRNO): New macro.
6996         (openat_permissive): New function -- used in remove.c rewrite.
6997         (all functions): Set errno just before returning, only if there
6998         was an actual failure.
6999         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
7000
7001         Emulate openat-family functions using Linux's procfs, if possible.
7002         Idea and some code based on Ulrich Drepper's glibc changes.
7003
7004         * lib/openat.c: (BUILD_PROC_NAME): New macro.
7005         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
7006         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
7007         before falling back on save_cwd and restore_cwd.
7008         (fdopendir, fstatat, unlinkat): Likewise.
7009
7010         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
7011         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
7012
7013         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
7014         as second argument to va_arg.  Otherwise, some versions of gcc
7015         warn that `if this code is reached, the program will abort'.
7016
7017 2006-01-09  Jim Meyering  <jim@meyering.net>
7018
7019         Sync from coreutils.
7020         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
7021         Require openat-priv.h.
7022
7023 2006-01-09  Bruno Haible  <bruno@clisp.org>
7024
7025         * modules/strnlen (Include): Use strnlen.h.
7026
7027 2006-01-09  Bruno Haible  <bruno@clisp.org>
7028
7029         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
7030
7031 2006-01-09  Bruno Haible  <bruno@clisp.org>
7032
7033         * lib/sysexit_.h (EX_OK): New macro.
7034         Suggested by Martin Lambers <marlam@marlam.de>.
7035
7036 2006-01-09  Bruno Haible  <bruno@clisp.org>
7037
7038         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
7039         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
7040
7041 2006-01-09  Bruno Haible  <bruno@clisp.org>
7042
7043         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
7044         numbers.
7045
7046 2006-01-09  Bruno Haible  <bruno@clisp.org>
7047
7048         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
7049         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
7050         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
7051         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
7052
7053 2006-01-09  Bruno Haible  <bruno@clisp.org>
7054
7055         * build-aux/javacomp.sh.in: New file, moved from lib/.
7056         * modules/javacomp-script (Files): Update.
7057         (configure.ac): Add AC_CONFIG_FILES invocation.
7058         (EXTRA_DIST): Remove variable.
7059
7060         * build-aux/javaexec.sh.in: New file, moved from lib/.
7061         * modules/javaexec (Files): Update.
7062         (configure.ac): Add AC_CONFIG_FILES invocation.
7063         (EXTRA_DIST): Remove javaexec.sh.in.
7064
7065         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
7066         * modules/csharpcomp-script (Files): Update.
7067         (configure.ac): Add AC_CONFIG_FILES invocation.
7068         (EXTRA_DIST): Remove variable.
7069
7070         * build-aux/csharpexec.sh.in: New file, moved from lib/.
7071         * modules/csharpexec (Files): Update.
7072         (configure.ac): Add AC_CONFIG_FILES invocation.
7073         (EXTRA_DIST): Remove csharpexec.sh.in.
7074
7075 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7076
7077         Sync from coreutils.
7078
7079         Add POSIX ACL support
7080         * lib/acl.h (copy_acl, set_acl): Add declarations.
7081         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
7082         systems other than Linux.
7083         (chmod_or_fchmod): New function: use fchmod when possible,
7084         and chmod otherwise.
7085         (file_has_acl): Add a POSIX ACL implementation, with a
7086         Linux-specific subcase.
7087         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
7088         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
7089         acls are unsupported.
7090         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
7091         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
7092         are unsupported.
7093
7094 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7095
7096         Sync from coreutils.
7097         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
7098
7099 2006-01-07  Bruno Haible  <bruno@clisp.org>
7100
7101         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
7102         gl_EARLY.
7103
7104 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7105
7106         * lib/strftime.c (tzname): Don't declare if it is already #defined.
7107         Problem reported for Mingw by Mark Junker.
7108
7109 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7110
7111         * README: Gnulib normally doesn't generate a tarball.
7112
7113 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
7114
7115         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
7116         long int, not int, for nanosecond counts, so that people who are
7117         used to POSIX struct timespec won't be surprised.  Reported by Jim
7118         Meyering.
7119
7120 2005-12-28  Bruno Haible  <bruno@clisp.org>
7121
7122         * build-aux/config.rpath: Update from GNU gettext.
7123
7124 2005-12-16  Jim Meyering  <jim@meyering.net>
7125
7126         * modules/fprintftime: New module.
7127         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
7128
7129 2005-12-16  Jim Meyering  <jim@meyering.net>
7130
7131         * m4/fprintftime.m4: New file.
7132
7133 2005-12-16  Jim Meyering  <jim@meyering.net>
7134
7135         * lib/fprintftime.c, fprintftime.h: New files.
7136
7137 2005-12-15  Simon Josefsson  <jas@extundo.com>
7138
7139         * modules/socklen (configure.ac): Fix M4 macro name, to align with
7140         new m4/socklen.m4.
7141
7142 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7143
7144         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
7145         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
7146
7147 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7148
7149         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
7150         * lib/argp-help.c (fill_in_uparams): Check if the constructed
7151         struct uparams is valid. Fall back to the default values if it is
7152         not.
7153
7154 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7155
7156         * modules/argp (Files): Add argp-pin.c
7157         (Depends-on): dirname
7158         (lib_SOURCES): Add argp-pin.c
7159
7160 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7161
7162         * m4/argp.m4:  Check if program_invocation_name and
7163         program_invocation_short_name are declared and define appropriate
7164         macros if they are not.
7165
7166 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7167
7168         * lib/argp-help.c (__argp_base_name): New function
7169         (__argp_short_program_name): Rewrite using __argp_base_name
7170         * lib/argp-namefrob.h: Define program_invocation_name and
7171         program_invocation_short_name if requested
7172         (__argp_base_name): Add prototype
7173         * lib/argp-parse.c (argp_def): Use gettext wrappers
7174         (argp_default_parser): Use __argp_base_name
7175         * lib/argp-pin.c: New file. Defines program_invocation_name and
7176         program_invocation_short_name on systems that lack them.
7177
7178 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
7179
7180         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
7181         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
7182         porting problem reported by Georg Schwarz in
7183         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
7184
7185 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
7186
7187         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
7188         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
7189         porting problem reported by Georg Schwarz in
7190         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
7191
7192 2005-12-05  Bruno Haible  <bruno@clisp.org>
7193
7194         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
7195         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
7196         Reported by Mark Junker <mjscod@gmx.de>.
7197
7198 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
7199
7200         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
7201         Use implementation from Albert Chin, with some
7202         comments/corrections by Stepan Kasal and myself.
7203
7204 2005-12-02  Bruno Haible  <bruno@clisp.org>
7205
7206         * gnulib-tool (func_import): Accept GPLed build tool modules when
7207         --lgpl is given.
7208         * modules/csharpcomp-script: New file.
7209         * modules/csharpcomp: Depend on it.
7210         * modules/javacomp-script: New file.
7211         * modules/javacomp: Depend on it.
7212         Suggested by Simon Josefsson.
7213
7214 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
7215
7216         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
7217         statement, to work around an HP-UX 10.20 compiler bug reported by
7218         Peter O'Gorman.
7219
7220 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
7221
7222         * modules/savedir (Depends-on): Add openat.
7223
7224 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
7225
7226         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
7227         (uintmax_t) [defined uintmax_t]: Do not declare.
7228         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
7229         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
7230         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
7231         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
7232         sake of portability to weird hosts that C allows (though we don't
7233         know of any practical examples).
7234
7235         * lib/savedir.h (fdsavedir): New decl.
7236         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
7237         contains most of the former guts of savedir.
7238         (savedir): Use savedirstream.
7239         Include "openat.h".
7240
7241 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
7242
7243         * modules/obstack (Files): Add m4/ulonglong.m4.
7244         Problem reported by Davide Angelocola.
7245
7246 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
7247
7248         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
7249         coreutils no longer futzes with rounding modes.
7250
7251 2005-11-14  Jim Meyering  <jim@meyering.net>
7252
7253         * lib/mkstemp-safer.c: Include <config.h>, required for possible
7254         replacement of mkstemp.
7255
7256 2005-11-10  Simon Josefsson  <jas@extundo.com>
7257
7258         * lib/readline.c: Remove EOL.
7259
7260 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
7261
7262         * modules/gethrxtime (Depends-on): Add gettime.
7263
7264 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
7265
7266         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
7267         or gettimeofday; no longer needed.
7268
7269 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
7270
7271         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
7272         time business.
7273         (gethrxtime) [! (HAVE_NANOUPTIME
7274         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
7275         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
7276         our own approximation.
7277
7278 2005-11-08  Eric Blake  <ebb9@byu.net>
7279
7280         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
7281
7282 2005-11-08  Eric Blake  <ebb9@byu.net>
7283
7284         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
7285
7286 2005-11-04  Bruno Haible  <bruno@clisp.org>
7287
7288         * gnulib-tool: Implement --update mode.
7289
7290 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
7291
7292         Fix porting problem reported by Theodoros V. Kalamatianos.
7293         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
7294         Don't assume that futimes failing means we must fail.
7295
7296 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
7297
7298         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
7299         variables to suggest the intended function of the PATH_MAX check.
7300
7301 2005-10-30  Kean Johnston  <jkj@sco.com>
7302
7303         Trivial changes to support SCO systems.
7304         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
7305         as PATH_MAX.
7306         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
7307         where __ptr is null when no I/O is pending.
7308
7309 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
7310
7311         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
7312         leave errno alone.  Problem reported by Dmitry V. Levin.
7313
7314 2005-10-28  Simon Josefsson  <jas@extundo.com>
7315
7316         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
7317         Test more.
7318
7319         * tests/test-gc-md2.c, tests/test-md2.c: New files.
7320
7321         * modules/md2, modules/md2-tests: New files.
7322
7323 2005-10-28  Simon Josefsson  <jas@extundo.com>
7324
7325         * m4/inet_ntop.m4: More tests.
7326
7327         * m4/gc-md2.m4, md2.m4: New file.
7328
7329 2005-10-28  Simon Josefsson  <jas@extundo.com>
7330
7331         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
7332         "restrict" keywords, as per POSIX.  Protect the function
7333         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
7334         Don't use K&R prototypes.  Check the sprintf return values.
7335         Re-define EAFNOSUPPORT if not present.  Indent.
7336
7337         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
7338         suggested by Bruno Haible <bruno@clisp.org>.
7339
7340         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
7341
7342         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
7343
7344         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
7345         libgcrypt).
7346
7347         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
7348
7349         * lib/md2.h, md2.c: New files.
7350
7351 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
7352
7353         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
7354         errno alone.  Problem reported by Frederic Jolliton.
7355
7356 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
7357
7358         * modules/verify (License): Change from GPL to LGPL.  This is a
7359         tiny module and there are apparently near-equivalents that are
7360         under the BSD license.
7361
7362 2005-10-24  Simon Josefsson  <jas@extundo.com>
7363
7364         * modules/sha1: Relicense to LGPL.
7365
7366 2005-10-24  Simon Josefsson  <jas@extundo.com>
7367
7368         * lib/md4.h: Shrink buffer size, now that we changed the type.
7369
7370 2005-10-23  Simon Josefsson  <jas@extundo.com>
7371
7372         * gnulib-tool (func_import): Fix --tests-base.
7373
7374 2005-10-22  Simon Josefsson  <jas@extundo.com>
7375
7376         * modules/arcfour (Depends-on): Need stdint.
7377
7378 2005-10-22  Simon Josefsson  <jas@extundo.com>
7379
7380         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
7381         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
7382
7383 2005-10-22  Simon Josefsson  <jas@extundo.com>
7384
7385         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
7386         suggested by Bruno Haible <bruno@clisp.org>.
7387
7388 2005-10-22  Simon Josefsson  <jas@extundo.com>
7389
7390         * lib/crc.h: Include stddef.h, for size_t.
7391
7392 2005-10-22  Simon Josefsson  <jas@extundo.com>
7393
7394         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
7395         arcfour_context struct (simplify test vector testing in GNU
7396         Shishi).
7397
7398 2005-10-21  Simon Josefsson  <jas@extundo.com>
7399
7400         * modules/des, modules/des-tests: New files.
7401
7402         * modules/gc-des, modules/gc-des-tests: New files.
7403
7404         * tests/test-des.c, tests/test-gc-des.c: New file.
7405
7406 2005-10-21  Simon Josefsson  <jas@extundo.com>
7407
7408         * modules/arctwo, modules/arctwo-tests: New files.
7409
7410         * tests/test-arctwo.c: New file.
7411
7412         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
7413
7414         * tests/test-gc-arctwo.c: New file.
7415
7416 2005-10-21  Simon Josefsson  <jas@extundo.com>
7417
7418         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
7419         Bruno Haible <bruno@clisp.org>.
7420
7421         * m4/gc-des.m4: New file.
7422
7423 2005-10-21  Simon Josefsson  <jas@extundo.com>
7424
7425         * m4/arctwo.m4: New file.
7426
7427         * m4/gc-arctwo.m4: New file.
7428
7429 2005-10-21  Simon Josefsson  <jas@extundo.com>
7430
7431         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
7432         block.
7433
7434 2005-10-21  Simon Josefsson  <jas@extundo.com>
7435
7436         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
7437         <bruno@clisp.org>.
7438
7439         * lib/hmac-sha1.c (hmac_sha1): Likewise.
7440
7441         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
7442         Bruno Haible <bruno@clisp.org>.
7443
7444         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
7445         <bruno@clisp.org>.
7446
7447 2005-10-21  Simon Josefsson  <jas@extundo.com>
7448
7449         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
7450
7451 2005-10-21  Simon Josefsson  <jas@extundo.com>
7452
7453         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
7454
7455 2005-10-21  Simon Josefsson  <jas@extundo.com>
7456
7457         * lib/des.h, des.c: New files.
7458
7459         * lib/gc-gnulib.c: Support DES.c
7460
7461 2005-10-21  Simon Josefsson  <jas@extundo.com>
7462
7463         * lib/arctwo.h, arctwo.c: New files.
7464
7465         * lib/gc-gnulib.c: Support ARCTWO.
7466
7467 2005-10-21  Simon Josefsson  <jas@extundo.com>
7468
7469         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
7470         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7471
7472 2005-10-21  Simon Josefsson  <jas@extundo.com>
7473
7474         * gnulib-tool (func_import, func_create_testdir): Define automake
7475         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
7476         Makefile.am snippet),
7477         suggested by Bruno Haible <bruno@clisp.org>.
7478
7479         * modules/gc (Makefile.am): Use it.
7480
7481 2005-10-21  Bruno Haible  <bruno@clisp.org>
7482
7483         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
7484         patch.
7485
7486 2005-10-19  Simon Josefsson  <jas@extundo.com>
7487
7488         * tests/test-gc-rijndael.c: New file.
7489
7490         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
7491
7492 2005-10-19  Simon Josefsson  <jas@extundo.com>
7493
7494         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
7495         interface too.
7496
7497 2005-10-19  Simon Josefsson  <jas@extundo.com>
7498
7499         * tests/test-gc-arcfour.c: New file.
7500
7501         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
7502
7503 2005-10-19  Simon Josefsson  <jas@extundo.com>
7504
7505         * modules/gc-md4, modules/gc-md4-tests: New file.
7506
7507         * tests/test-gc-md4.c: New file.
7508
7509 2005-10-19  Simon Josefsson  <jas@extundo.com>
7510
7511         * m4/gc-md4.m4: New file.
7512
7513 2005-10-19  Simon Josefsson  <jas@extundo.com>
7514
7515         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
7516         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
7517         <kasal@ucw.cz>.
7518
7519 2005-10-19  Simon Josefsson  <jas@extundo.com>
7520
7521         * m4/gc-arcfour.m4: New file.
7522
7523         * m4/gc-rijndael.m4: New file.
7524
7525 2005-10-19  Simon Josefsson  <jas@extundo.com>
7526
7527         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
7528
7529 2005-10-19  Simon Josefsson  <jas@extundo.com>
7530
7531         * lib/gc-gnulib.c: Support ARCFOUR.
7532
7533 2005-10-19  Simon Josefsson  <jas@extundo.com>
7534
7535         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
7536         support.
7537
7538         * lib/gc.h: Add ECB enum type.
7539
7540         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
7541
7542 2005-10-18  Simon Josefsson  <jas@extundo.com>
7543
7544         * tests/test-md5.c: New file.
7545
7546         * modules/md5-tests: New file.
7547
7548 2005-10-18  Simon Josefsson  <jas@extundo.com>
7549
7550         * tests/test-md4.c: New file.
7551
7552         * modules/md4, modules/md4-tests: New files.
7553
7554 2005-10-18  Simon Josefsson  <jas@extundo.com>
7555
7556         * m4/md4.m4: New file.
7557
7558 2005-10-18  Simon Josefsson  <jas@extundo.com>
7559
7560         * lib/md4.h, md4.c: New files, based on md5.?.
7561
7562 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
7563
7564         * gnulib-tool (func_create_testdir): Omit the second check whether
7565         BUILT_SOURCES in nonempty.
7566
7567 2005-10-17  Simon Josefsson  <jas@extundo.com>
7568
7569         * tests/test-rijndael.c: New file.
7570
7571 2005-10-17  Simon Josefsson  <jas@extundo.com>
7572
7573         * modules/sha1: Depend on stdint instead of md5.
7574
7575         * modules/md5: Depend on stdint, remove uint32_t.
7576
7577 2005-10-17  Simon Josefsson  <jas@extundo.com>
7578
7579         * modules/gc-sha1-tests: New file.
7580
7581         * tests/test-gc-sha1.c: New file.
7582
7583 2005-10-17  Simon Josefsson  <jas@extundo.com>
7584
7585         * m4/md5.m4: Remove call to uint32_t.m4.
7586
7587 2005-10-17  Simon Josefsson  <jas@extundo.com>
7588
7589         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
7590
7591         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
7592         md5.h.
7593
7594         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
7595
7596         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
7597
7598 2005-10-17  Simon Josefsson  <jas@extundo.com>
7599
7600         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
7601
7602 2005-10-17  Simon Josefsson  <jas@extundo.com>
7603
7604         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
7605
7606 2005-10-17  Simon Josefsson  <jas@extundo.com>
7607
7608         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
7609
7610         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
7611
7612 2005-10-17  Bruno Haible  <bruno@clisp.org>
7613
7614         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
7615         that it can also be used in a test.
7616
7617 2005-10-16  Bruno Haible  <bruno@clisp.org>
7618
7619         * gnulib-tool (func_emit_tests_Makefile_am): Also define
7620         TESTS_ENVIRONMENT, so that individual tests can augment it.
7621
7622         * gnulib-tool (func_create_testdir): Use an intermediate target for
7623         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
7624         macros, like $(ALLOCA_H), which cannot be passed through the command
7625         line.
7626
7627 2005-10-15  Simon Josefsson  <jas@extundo.com>
7628
7629         * modules/rijndael-tests: New file.
7630
7631         * modules/rijndael: New file.
7632
7633 2005-10-15  Simon Josefsson  <jas@extundo.com>
7634
7635         * m4/rijndael.m4: New file.
7636
7637 2005-10-15  Simon Josefsson  <jas@extundo.com>
7638
7639         * lib/rijndael-api-fst.h, rijndael-api-fst.c: New files.
7640
7641         * lib/rijndael-alg-fst.h, rijndael-alg-fst.c: New files.
7642
7643 2005-10-14  Simon Josefsson  <jas@extundo.com>
7644
7645         * tests/test-arcfour.c: New file.
7646
7647         * modules/arcfour, modules/arcfour-tests: New files.
7648
7649 2005-10-14  Simon Josefsson  <jas@extundo.com>
7650
7651         * m4/arcfour.m4: New file.
7652
7653 2005-10-14  Simon Josefsson  <jas@extundo.com>
7654
7655         * lib/arcfour.h, arcfour.c: New files.
7656
7657 2005-10-14  Roland McGrath  <roland@redhat.com>
7658
7659         Import from libc.  [BZ #1331]
7660         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
7661         macro argument.
7662         Reported by Matej Vela <vela@debian.org>.
7663
7664 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
7665
7666         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
7667         include <wchar.h>; no longer needed.
7668
7669 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
7670
7671         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
7672
7673 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
7674         and  Ulrich Drepper  <drepper@redhat.com>
7675
7676         Import from libc.
7677         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
7678         instead of inline stream orientation test and two separate
7679         function calls.  Pay no attention to USE_IN_LIBIO.
7680
7681 2005-10-13  Simon Josefsson  <jas@extundo.com>
7682
7683         * modules/gc-hmac-md5-tests: New file.
7684
7685         * tests/test-gc-hmac-sha1.c: New file.
7686
7687         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
7688
7689         * modules/gc-hmac-md5-tests: New file.
7690
7691         * tests/test-gc-md5.c: New file.
7692
7693         * modules/gc-md5-tests: New file.
7694
7695 2005-10-13  Simon Josefsson  <jas@extundo.com>
7696
7697         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
7698         Move memory allocation outside of loop.
7699
7700 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
7701
7702         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
7703         intermediate directory is in a read-only file system.  Problem
7704         reported by Eric Blake.
7705
7706 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
7707
7708         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
7709
7710 2005-10-12  Simon Josefsson  <jas@extundo.com>
7711
7712         * tests/test-hmac-sha1.c: New file.
7713
7714         * modules/hmac-sha1-tests: New file.
7715
7716         * modules/hmac-sha1: New file.
7717
7718 2005-10-12  Simon Josefsson  <jas@extundo.com>
7719
7720         * modules/gc-sha1: New file.
7721
7722 2005-10-12  Simon Josefsson  <jas@extundo.com>
7723
7724         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
7725
7726         * tests/test-gc-pbkdf2-sha1.c: New file.
7727
7728 2005-10-12  Simon Josefsson  <jas@extundo.com>
7729
7730         * modules/gc-md5, modules/gc-hmac-md5: New files.
7731
7732         * modules/gc (Files): Remove md5, memxor and hmac files.
7733
7734 2005-10-12  Simon Josefsson  <jas@extundo.com>
7735
7736         * m4/gc-pbkdf2-sha1.m4: New file.
7737
7738         * m4/gc-hmac-sha1.m4: New file.
7739
7740         * m4/gc-sha1: New file.
7741
7742         * m4/hmac-sha1.m4: New file.
7743
7744 2005-10-12  Simon Josefsson  <jas@extundo.com>
7745
7746         * m4/gc-md5.m4, gc-hmac-md5: New files.
7747
7748         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
7749
7750 2005-10-12  Simon Josefsson  <jas@extundo.com>
7751
7752         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
7753         suggested by Bruno Haible <bruno@clisp.org>.
7754
7755 2005-10-12  Simon Josefsson  <jas@extundo.com>
7756
7757         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
7758
7759 2005-10-12  Simon Josefsson  <jas@extundo.com>
7760
7761         * lib/gc-pbkdf2-sha1.c: New file.
7762
7763         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
7764
7765 2005-10-12  Simon Josefsson  <jas@extundo.com>
7766
7767         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
7768
7769         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
7770
7771 2005-10-12  Simon Josefsson  <jas@extundo.com>
7772
7773         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
7774         GC_USE_HMAC_MD5, respectively.
7775
7776         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
7777         (gc_md5): Fix typo.
7778
7779         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
7780
7781         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
7782
7783         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
7784
7785 2005-10-12  Bruno Haible  <bruno@clisp.org>
7786
7787         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
7788         Reported by Stepan Kasal <kasal@ucw.cz>.
7789
7790 2005-10-11  Simon Josefsson  <jas@extundo.com>
7791
7792         * tests/test-crc.c: New file.
7793
7794         * modules/crc, modules/crc-tests: New files.
7795
7796 2005-10-11  Simon Josefsson  <jas@extundo.com>
7797
7798         * m4/crc.m4: New file.
7799
7800 2005-10-11  Simon Josefsson  <jas@extundo.com>
7801
7802         * lib/gc.h: Add gc_hash and gc_hash_buffer.
7803
7804         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
7805
7806         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
7807
7808 2005-10-11  Simon Josefsson  <jas@extundo.com>
7809
7810         * lib/crc.h, crc.c: New files.
7811
7812         * lib/gc.h (gc_hash_buffer): Add doc.
7813
7814 2005-10-11  Bruno Haible  <bruno@clisp.org>
7815
7816         * modules/c-strcasestr: New file.
7817         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
7818
7819 2005-10-11  Bruno Haible  <bruno@clisp.org>
7820
7821         * modules/c-strcase: New file.
7822         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
7823
7824 2005-10-11  Bruno Haible  <bruno@clisp.org>
7825
7826         * lib/strcasecmp.c: Include limits.h.
7827         (strcasecmp): Avoid integer overflow on exotic platforms.
7828         * lib/strncasecmp.c: Include limits.h.
7829         (strncasecmp): Avoid integer overflow on exotic platforms.
7830         Reported by Paul Eggert.
7831
7832 2005-10-11  Bruno Haible  <bruno@clisp.org>
7833
7834         * lib/c-strcasestr.h: New file, from GNU gettext.
7835         * lib/c-strcasestr.c: New file, from GNU gettext.
7836
7837 2005-10-11  Bruno Haible  <bruno@clisp.org>
7838
7839         * lib/c-strcase.h: New file, from GNU gettext.
7840         * lib/c-strcasecmp.c: New file, from GNU gettext.
7841         * lib/c-strncasecmp.c: New file, from GNU gettext.
7842
7843 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
7844
7845         * modules/mempcpy (License): GPL -> LGPL.
7846         * modules/strchrnul (License): Likewise.
7847         * modules/sysexits (License): Likewise.
7848
7849 2005-10-08  Simon Josefsson  <jas@extundo.com>
7850
7851         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
7852
7853 2005-10-07  Simon Josefsson  <jas@extundo.com>
7854
7855         * m4/memxor.m4: Remove gl_C_RESTRICT call.
7856
7857 2005-10-06  Simon Josefsson  <jas@extundo.com>
7858
7859         * tests/test-hmac-md5.c: New file.
7860
7861         * modules/hmac-md5-tests: New file.
7862
7863         * modules/hmac-md5: New file.
7864
7865 2005-10-06  Simon Josefsson  <jas@extundo.com>
7866
7867         * m4/hmac-md5.m4: New file.
7868
7869         * m4/memxor.m4: Require gl_C_RESTRICT.
7870
7871 2005-10-06  Simon Josefsson  <jas@extundo.com>
7872
7873         * lib/memxor.c (memxor): Avoid casts and warnings.
7874
7875 2005-10-06  Simon Josefsson  <jas@extundo.com>
7876
7877         * lib/hmac-md5.c: New file.
7878
7879         * lib/hmac.h: New file.
7880
7881 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
7882
7883         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
7884         promotes to int, not unsigned int, to catch the AIX 5.3
7885         compiler bug.
7886
7887 2005-10-05  Simon Josefsson  <jas@extundo.com>
7888
7889         * modules/memxor: New file.
7890
7891         * modules/iconv (Files): Move config.rpath to havelib, it is used
7892         there.
7893
7894         * modules/havelib (Files): Add config.rpath.
7895
7896 2005-10-05  Simon Josefsson  <jas@extundo.com>
7897
7898         * m4/memxor.m4: New file.
7899
7900 2005-10-05  Simon Josefsson  <jas@extundo.com>
7901
7902         * lib/memxor.c (memxor): Fix compiler error.
7903
7904         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
7905         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
7906
7907         * lib/memxor.h, memxor.c: New files.
7908
7909         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
7910         we assume all systems have it, suggested by Jim Meyering
7911         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
7912         any systems lack sys/socket.h; mingw32 is known to lack it, but we
7913         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
7914         same reasons.
7915
7916 2005-10-05  Simon Josefsson  <jas@extundo.com>
7917
7918         * config/srclist.txt: Add glibc bug 1423 for md5.h.
7919
7920 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
7921
7922         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
7923         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
7924         needed, since the source code now assumes these .h files.
7925
7926 2005-10-05  Derek Price  <derek@ximbiot.com>
7927
7928         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
7929
7930 2005-10-05  Bruno Haible  <bruno@clisp.org>
7931
7932         * modules/stdint (License): Change to LGPL.
7933
7934 2005-10-04  Simon Josefsson  <jas@extundo.com>
7935
7936         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
7937         D. Baushke" <mdb@gnu.org>.
7938
7939 2005-10-04  Bruno Haible  <bruno@clisp.org>
7940
7941         * lib/verify.h (verify_true): Provide alternative definition for C++.
7942
7943 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
7944
7945         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
7946         (SSIZE_MAX): New macro, if not already defined.
7947         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
7948         than 2 GiB.
7949
7950 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
7951
7952         Sync from coreutils.
7953         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
7954         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
7955         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
7956         ULLONG_MAX doesn't work with 2.7.2.1.
7957
7958 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
7959
7960         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
7961         From Ben Pfaff.
7962
7963         * modules/exclude (Depends-on): Depend on verify.
7964         * modules/strtoimax (Depends-on): Likewise.
7965         * modules/utimecmp (Depends-on): Likewise.
7966
7967 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
7968
7969         * lib/exclude.c: Include verify.h.
7970         (verify): Remove.  All callers changed to use verify.h's version.
7971         * lib/strtoimax.c: Likewise.
7972         * lib/utimecmp.c: Likewis.e
7973
7974         Sync from coreutils.
7975         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
7976         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
7977         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
7978         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
7979         bother returning ENOSYS if settimeofday or stime fails; just let
7980         them return whatever errno they want to return.
7981         * lib/utimens.c: Include unistd.h, for dup2.
7982         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
7983         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
7984
7985 2005-10-02  Jim Meyering  <jim@meyering.net>
7986
7987         Sync from coreutils.
7988         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
7989         from glibc-2.2.5 that fails for read-only files.
7990
7991 2005-10-02  Jim Meyering  <jim@meyering.net>
7992
7993         Sync from coreutils.
7994         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
7995         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
7996         `#if HAVE_CONFIG_H'.
7997         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
7998         Remove AT_FDCWD test.
7999         Do not consume the fd unless successful.
8000         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
8001         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
8002         block, so that we don't even try to compile it if settimeofday is
8003         available.  This works around a compilation failure on OSF1 V5.1,
8004         due to stime requiring a `long int*' while tv_sec is `int'.
8005
8006 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
8007
8008         Sync from coreutils.
8009         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
8010         against `yes', rather than just testing for nonempty.
8011
8012 2005-10-01  Simon Josefsson  <jas@extundo.com>
8013
8014         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
8015         and Darwin.
8016
8017         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
8018         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
8019         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
8020         freeaddrinfo and gai_strerror are declared by the POSIX headers.
8021         Check if struct addrinfo is declared.
8022
8023 2005-10-01  Simon Josefsson  <jas@extundo.com>
8024
8025         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
8026         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
8027         AI_* and EAI_* definitions.  Protect function declarations.
8028
8029 2005-10-01  Jim Meyering  <jim@meyering.net>
8030
8031         Sync from coreutils.
8032
8033         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
8034         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
8035         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
8036         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8037         in the inet and nsl libraries.  Required on Solaris 5.7.
8038
8039 2005-10-01  Jim Meyering  <jim@meyering.net>
8040
8041         Sync from coreutils.
8042         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8043         in the inet and nsl libraries.  Required on Solaris 5.7.
8044
8045 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
8046
8047         * lib/getdelim.c (getdelim): Remove unused variables.
8048
8049 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
8050
8051         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
8052         so that the code works even with ancient cpp.  Portability problem
8053         with GCC 2.7.2.1 reported by Thomas M.Ott.
8054
8055 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
8056
8057         * modules/regex (Depends-on): Add strcase.
8058
8059         * modules/gethostname (Licence): Change from GPL to LGPL, since
8060         gethostname.c is a trivial implementation of a standard library
8061         function.
8062         * modules/poll (License): Change from GPL to LGPL, since it's
8063         derived from LGPL code.
8064
8065 2005-09-27  Jim Meyering  <jim@meyering.net>
8066
8067         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
8068         HAVE_CONFIG_H.
8069
8070         * lib/intprops.h (signed_type_or_expr__): Define.
8071         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
8072         for unsigned types.
8073
8074 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
8075
8076         * lib/verify.h (verify_expr): Remove, replacing with:
8077         (verify_true): New macro that returns true instead of void.
8078         (verify_type__): Remove.
8079         (verify): Use verify_true rather than verify_type__.
8080
8081 2005-09-26  Bruno Haible  <bruno@clisp.org>
8082
8083         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
8084         is necessary.
8085         (lib_SOURCES): Remove mbchar.c.
8086         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
8087         (Files): Add m4/mbrtowc.m4.
8088         * modules/mbiter: Likewise.
8089         * modules/mbuiter: Likewise.
8090
8091 2005-09-26  Bruno Haible  <bruno@clisp.org>
8092
8093         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
8094         compile mbchar.c if they are not both present.
8095         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
8096         * m4/mbiter.m4 (gl_MBITER): Likewise.
8097         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
8098         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
8099         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
8100
8101 2005-09-25  Jim Meyering  <jim@meyering.net>
8102
8103         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
8104         also uses socklen_t.
8105
8106 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
8107
8108         * lib/utimens.c (ENOSYS): Define if not already defined.
8109         (futimens): Support having a null PATH if the file descriptor
8110         is nonnegative.
8111
8112         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
8113         Remove.
8114         (__attribute): Define to empty unless GCC 3.1 or later.
8115         This works around a core dump on OpenBSD 3.4, which has GCC
8116         2.95.3, which dumps core when given __attribute__(()).  It also
8117         simplifies other tests, since we really don't want to bother with
8118         worrying about which ancient version of GCC supported what.
8119         Original problem reported by Yoann Vandoorselaere, with part of
8120         the fix suggested by Derek Price.
8121
8122 2005-09-24  Jim Meyering  <jim@meyering.net>
8123
8124         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
8125         so we can once again use a positive bitfield width of 1 -- now we
8126         don't have to explain why we were using a bitfield width of 2.
8127
8128 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8129
8130         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
8131         and similarly for the other external symbols.  Problem reported
8132         by James Gallager.
8133
8134         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
8135         bug reported by Jim Meyering.
8136
8137         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
8138         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
8139         not needed, since socklen is a prerequisite module.
8140
8141 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8142
8143         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
8144         Problem reported by Eric Blake.
8145         (getaddrinfo): Initialize se so that it's not garbage.
8146         Redo internal storage allocation so that it doesn't make unportable
8147         assumptions about alignment.
8148         Fix a memory leak.
8149
8150         * lib/utimens.c (futimens): Use futimesat if available.
8151         Prefer it to futimes since it doesn't have the futimes bug.
8152
8153         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
8154         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
8155         Instead, declare a function that returns a pointer to an array,
8156         and use verify_type__ to declare the size of the array.
8157         Problem and germ of a solution reported by Bruno Haible.
8158         (verify_type__): Use 2, not 1, for bitfield size, to avoid
8159         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
8160
8161 2005-09-23  Jim Meyering  <jim@meyering.net>
8162
8163         Sync from coreutils.
8164         Correct build failure (socklen_t not defined) on at least
8165         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
8166         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
8167
8168 2005-09-23  Jim Meyering  <jim@meyering.net>
8169
8170         * modules/getaddrinfo (Depends-on): Add socklen.
8171
8172 2005-09-23  Bruno Haible  <bruno@clisp.org>
8173
8174         * tests/test-verify.c: New file.
8175
8176 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8177
8178         Sync from coreutils.
8179
8180         * modules/argmatch (Depends-on): Add verify.
8181         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
8182         unistd-safer.
8183         * modules/save-cwd (Depends-on): Likewise.
8184
8185         * modules/openat (Files): Add lib/openat-die.c.
8186         (Depends-on): Remove error, exitfail.
8187         Add dirname.
8188
8189         * modules/verify: New file.
8190         * MODULES.html.sh (Diagnostics <assert.h>): New section,
8191         with "verify" module.
8192
8193 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8194
8195         Sync from coreutils.
8196
8197         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
8198         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
8199         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
8200         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
8201         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
8202         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
8203         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
8204         Don't bother checking for string.h, stdlib.h, unistd.h.
8205         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
8206         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
8207         module's job.
8208         * m4/jm-macros.m4 (gl_MACROS): Likewise.
8209         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
8210
8211         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
8212         (gl_GETDATE): Use it.
8213
8214         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
8215
8216 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8217
8218         Sync from coreutils.
8219
8220         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
8221         stat-time.h.
8222         * lib/argmatch.h: Include verify.h
8223         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
8224         (ARGMATCH_ASSERT): Remove; unused.
8225         * lib/canonicalize.c: Assume STDC_HEADERS.
8226         * lib/exclude.c: Include "strcase.h".
8227         * lib/regex_internal.h [!defined _LIBC]: Likewise.
8228         * lib/getusershell.c: Include stdio--.h rather than stdio.h
8229         and stdio-safer.h.
8230         (getusershell): Call fopen, not fopen_safer.
8231         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
8232         Do not include unistd-safer.h.
8233         (save_cwd): Don't call fd_safer; no longer needed
8234         now that we include fcntl--.h.
8235
8236         * lib/getdate.y (relative_time): New type.
8237         (RELATIVE_TIME_0): New constant.
8238         (parser_control): Use relative_time instead of doing it ourselves.
8239         (%union): Add new relative_time rel member.
8240         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
8241         Now typeless.
8242         (relunit, relunit_snumber): Now of type rel.
8243         (zone, rel, relunit, get_date): Adjust to above changes.
8244
8245         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
8246         Do not include unistd-safer.h.
8247         (getloadavg): Don't call fd_safer; no longer needed
8248         now that we include fcntl--.h.
8249
8250         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
8251         (make_dir_parents): Treat ENOSYS like EEXIST.
8252
8253         Improve quality of diagnostics on restore_cwd failure.
8254         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
8255         (make_dir_parents): Last arg is now int * (for errno), not bool *.
8256         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
8257         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
8258         each time through the loop.  Do not diagnose restore_cwd failure;
8259         that is the caller's job (and perhaps the caller does not care).
8260
8261         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
8262         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
8263         If the file already exists but is not a directory, don't bother
8264         to try to make its parents.
8265         Close potential file descriptor leak if we can't chdir("/") (!).
8266         Don't always return true if chdir($PWD) fails; return true only
8267         if the requested action was done successfully (except for the
8268         chdir($PWD)).
8269         Don't log final directory unless we actually made it.
8270         Refactor to avoid duplicate code to fix up permissions.
8271         Don't attempt to fix up parent permissions if chdir($PWD) fails.
8272
8273         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
8274         to make it a bit faster and (I hope) clearer.
8275         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
8276         Fix bug in formats like %2N.
8277
8278         * lib/verify.h: New file.
8279
8280 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8281
8282         Sync from coreutils.
8283         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
8284
8285 2005-09-22  Jim Meyering  <jim@meyering.net>
8286
8287         Sync from coreutils.
8288
8289         * m4/lstat.m4 (gl_FUNC_LSTAT):
8290         Use AC_LIBSOURCES to require lstat.c and lstat.h.
8291         Remove obsolete comment.
8292         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
8293         * m4/xstrtod.m4: Likewise.
8294
8295         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
8296
8297 2005-09-22  Jim Meyering  <jim@meyering.net>
8298
8299         Sync from coreutils.
8300
8301         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
8302
8303         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
8304         the .tm_year member, since otherwise gcc-4.0 would now warn about
8305         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
8306
8307         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
8308         order to avoid an unsuppressible warning from gcc on 64-bit systems.
8309
8310         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
8311         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
8312         when run in a time zone for which daylight savings time is in effect
8313         for the starting date.
8314
8315         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
8316         stop us from restricting permissions of just-created absolute-named
8317         directories.
8318         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
8319         to restore initial working directory.
8320         * lib/mkdir-p.c (make_dir_parents): New parameter:
8321         different_working_dir, to tell caller if/when we change the working
8322         directory and are unable to return to the initial one.
8323         * lib/mkdir-p.h (make_dir_parents): Update prototype.
8324         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
8325         `return false'.  This fixes a bug introduced on 2004-07-30.
8326
8327         * lib/openat.c (fdopendir): Be sure to close the supplied
8328         file descriptor before returning.  This makes our replacement
8329         implementation a little closer to Solaris's, where fdopendir
8330         ties the file descriptor to the returned DIR* pointer.
8331         * lib/openat.c (unlinkat): New function.
8332         * lib/openat.h (unlinkat): Add prototype.
8333         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
8334         (openat_restore_fail): Rename from openat_restore_die.
8335         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
8336
8337         Provide an alternative to exiting immediately upon save_cwd or
8338         restore_cwd failure.  Now, an application can arrange e.g.,
8339         to perform a longjump in that case.
8340         * lib/openat.c: Include dirname.h.
8341         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
8342         (rpl_openat, fdopendir, fstatat): Call openat_save_die
8343         and openat_restore_die rather than calling error directly.
8344         Don't include "error.h" or "exitfail.h"; they're no longer needed.
8345
8346         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
8347         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
8348         define.
8349
8350         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
8351         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
8352                             int utc, int nanoseconds);
8353         Background:
8354         date should not have to allocate a megabyte of virtual memory to
8355         handle a format argument like +%1048575T.  When implemented with
8356         strftime, it must allocate such a buffer, use strftime to fill it
8357         in, print it, then free it.
8358         With fprintftime, it simply prints everything and exits.
8359         With no need for memory allocation, that's one fewer way to fail.
8360         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
8361         optional field width, not before, so we accept %9:z, not %:9z.
8362         (my_strftime): Be sure to use L_('x') for literals.
8363
8364         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
8365         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
8366         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
8367         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
8368         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
8369         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
8370         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
8371         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
8372         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
8373         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
8374         * lib/xgethostname.c, lib/xreadlink.c:
8375         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
8376
8377         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
8378         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
8379         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
8380         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
8381         and don't include <sys/file.h>).
8382
8383 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
8384
8385         Sync from coreutils.
8386
8387         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
8388         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
8389         [!LDAV_DONE]: Avoid unused variable warning.
8390
8391 2005-09-21  Bruno Haible  <bruno@clisp.org>
8392
8393         * lib/unicodeio.h (unicode_to_mb): New declaration.
8394
8395 2005-09-20  Derek Price  <derek@ximbiot.com>
8396
8397         * lib/getaddrinfo.c: Don't include <netdb.h> included from
8398         getaddrinfo.h.
8399
8400 2005-09-20  Bruno Haible  <bruno@clisp.org>
8401
8402         * gnulib-tool: Remove trailing slashes from the values specified for
8403         --source-base, --m4-base, --tests-base, --aux-dir.
8404         Suggested by Simon Josefsson <jas@extundo.com>.
8405
8406 2005-09-20  Bruno Haible  <bruno@clisp.org>
8407
8408         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
8409         func_modules_to_filelist, func_import, func_create_testdir): Make all
8410         sorting results locale-independent, so that gnulib-cache.m4 doesn't
8411         change when gnulib-tool is invoked in a different locale.
8412
8413 2005-09-19  Simon Josefsson  <jas@extundo.com>
8414
8415         * m4/socklen.m4: Fix typo.
8416
8417 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8418
8419         Use a consistent style for including <config.h>.
8420         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
8421         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
8422         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
8423         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
8424         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
8425         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
8426         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
8427         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
8428         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
8429         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
8430         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
8431         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
8432         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
8433         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
8434         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
8435         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
8436         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
8437         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
8438         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
8439         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
8440         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
8441         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
8442         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
8443         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
8444         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
8445         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
8446         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
8447         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
8448         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
8449         lib/xstrtoumax.c, lib/yesno.c:
8450         Standardize inclusion of config.h.
8451         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
8452         lib/inttostr.h:  Removed inclusion of config.h from header files.
8453         * lib/inttostr.c:  Adjusted in-tree users.
8454         * lib/timespec.h: Remove superfluous warning to include config.h.
8455         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
8456         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
8457         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
8458         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
8459         config.h with HAVE_CONFIG_H.
8460
8461 2005-09-19  Jim Meyering  <jim@meyering.net>
8462
8463         * modules/pathmax (License): Change to LGPL.
8464
8465 2005-09-19  Derek Price  <derek@ximbiot.com>
8466
8467         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
8468
8469 2005-09-19  Bruno Haible  <bruno@clisp.org>
8470
8471         * gnulib-tool (import): Provide default for --tests-base.
8472
8473 2005-09-19  Bruno Haible  <bruno@clisp.org>
8474
8475         * doc/quote.texi: New file, extracted from gnulib.texi.
8476         * doc/ctime.texi: New file, extracted from gnulib.texi.
8477         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
8478         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
8479         * doc/gnulib.texi: Include them.
8480
8481 2005-09-18  Bruno Haible  <bruno@clisp.org>
8482
8483         Portability fix.
8484         * gnulib-tool (func_readlink): New function.
8485         (func_ln_if_changed): Use it.
8486
8487 2005-09-18  Bruno Haible  <bruno@clisp.org>
8488
8489         * gnulib-tool: Support --with-tests also with --import.
8490         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
8491         (func_import): Use variables $testsbase and $inctests. Emit a
8492         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
8493         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
8494         SUBDIRS += $testsdir.
8495         (func_create_testdir): Update.
8496
8497 2005-09-18  Bruno Haible  <bruno@clisp.org>
8498
8499         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
8500         instead of $dry_run.
8501         (func_cp_if_changed, func_mv_if_changed): Remove functions.
8502         (func_ln_if_changed): Don't handle dry-run here.
8503         (func_import): In dry-run mode, detect more precisely which actions
8504         would be performed, and don't use "...ing" verbs.
8505
8506 2005-09-18  Bruno Haible  <bruno@clisp.org>
8507
8508         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
8509         (func_import): Use join on two temporary files instead of three nested
8510         loops, in order to determine which files are new or old.
8511
8512 2005-09-18  Bruno Haible  <bruno@clisp.org>
8513
8514         * gnulib-tool (func_import): Comment out code that spits out the
8515         new files with --dry-run.
8516
8517 2005-09-18  Bruno Haible  <bruno@clisp.org>
8518
8519         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
8520
8521 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
8522
8523         * lib/stat-time.h: New file.
8524         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
8525         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
8526         in a different way.
8527         (timespec_cmp): New function.
8528         * lib/utimecmp.c: Include stat-time.h.
8529         (SYSCALL_RESOLUTION): Depend on whether various struct stat
8530         members exist, not on the obsolescent ST_MTIM_NSEC.
8531         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
8532
8533 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
8534
8535         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
8536
8537 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
8538
8539         * MODULES.html.sh (File system functions): Add stat-time.
8540         * modules/stat-time: New file.
8541         * modules/timespec (Files): Remove m4/st_mtim.m4; this
8542         is now done in a different way, by the stat-time module.
8543         * modules/utimecmp (Depends-on): Add stat-time.
8544
8545 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8546
8547         * m4/st_mtim.m4: Remove.  Superseded by...
8548         * m4/stat-time.m4: New file.
8549         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
8550         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
8551
8552 2005-09-15  Derek Price  <derek@ximbiot.com>
8553
8554         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
8555
8556 2005-09-15  Derek Price  <derek@ximbiot.com>
8557
8558         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
8559         * lib/regex_internal.c: Ditto, using this...
8560         (__GNUC_PREREQ): ...new macro.
8561         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
8562         using...
8563         (__GNUC_PREREQ): ...this new macro.
8564
8565         * lib/strstr.h: Include string.h. Define strstr as a macro here.
8566
8567 2005-09-15  Derek Price  <derek@ximbiot.com>
8568             Paul Eggert  <eggert@cs.ucla.edu>
8569
8570         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
8571         changes, consolidating in...
8572         * lib/regex_internal.h: ...this file.
8573
8574 2005-09-13  Jim Meyering  <jim@meyering.net>
8575
8576         * lib/canon-host.c: Filter through gnu indent and reword comments
8577         slightly.
8578         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
8579
8580 2005-09-13  Derek Price  <derek@ximbiot.com>
8581
8582         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
8583         failure.
8584         Reported by Jim Meyering  <jim@meyering.net>.
8585
8586 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8587
8588         * lib/base64.c: Typo.
8589         (base64_encode): Put b64str in initialized data section.
8590
8591 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
8592
8593         Merge glibc and coreutils changes into gnulib, plus a few
8594         extra fixes.
8595         * lib/md5.c: Use #error rather than a string.
8596         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
8597         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
8598         (__attribute__): Define to empty for non recent-GCC.
8599         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
8600         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
8601         Renamed from their non-__ counterparts, with new macros replacing
8602         them if not _LIBC.  Add __THROW attribute.
8603         (rol): Remove.
8604         (struct md5_ctx): Align buffer if using GCC.
8605         * lib/sha1.h (struct sha1_ctx): Likewise.
8606         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
8607         The old name was backwards.
8608         (NOTSWAP): Remove; not used.
8609         (rol): New macro, moved here from md5.h.
8610         (sha1_process_block): Remove a FIXME that doesn't make sense.
8611
8612 2005-09-12  Derek Price  <derek@ximbiot.com>
8613
8614         Return usable errors from canon-host.
8615         * lib/canon-host.h: New file.
8616         * lib/canon-host.c (canon_host): Wrap...
8617         (canon_host_r): ...this new function, which now relies exclusively on
8618         getaddrinfo.
8619         (ch_strerror): New function.
8620         (last_cherror): New global.
8621         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
8622         interface.
8623         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
8624         void *.
8625         (freeaddrinfo): Free ai->ai_canonname when set.
8626
8627 2005-09-12  Derek Price  <derek@ximbiot.com>
8628
8629         Make canon-host require getaddrinfo.
8630         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
8631         AC_LIBSOURCE canon-host.h.  Call...
8632         (gl_PREREQ_CANON_HOST): ...this new function, which requires
8633         gl_GETADDRINFO.
8634         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
8635
8636 2005-09-12  Derek Price  <derek@ximbiot.com>
8637
8638         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
8639         LGPL.
8640         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
8641
8642 2005-09-12  Derek Price  <derek@ximbiot.com>
8643
8644         * lib/gai_strerror.c: Include config.h when available.  Include
8645         getaddrinfo.h before other headers to test interface.
8646         Reported by Larry Jones <lawrence.jones@ugs.com>.
8647
8648 2005-09-12  Derek Price  <derek@ximbiot.com>
8649             Paul Eggert  <eggert@cs.ucla.edu>
8650
8651         * modules/glob (Files): Add glob-libc.h.
8652
8653 2005-09-12  Derek Price  <derek@ximbiot.com>
8654             Paul Eggert  <eggert@cs.ucla.edu>
8655
8656         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
8657         glob_.h, glob-libc.h.
8658         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
8659
8660 2005-09-12  Derek Price  <derek@ximbiot.com>
8661             Paul Eggert  <eggert@cs.ucla.edu>
8662
8663         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
8664         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
8665         protecting things that should be done only in gnulib contexts.
8666         * lib/glob_.h: New file, containing only the glob things needed for
8667         gnulib.
8668         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
8669         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
8670         (glob, globfree, glob_pattern_p): Now defined simply in terms of
8671         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
8672         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
8673         and to respect the namespace rules better.
8674
8675 2005-09-08  Simon Josefsson  <jas@extundo.com>
8676
8677         * modules/socklen: New file.
8678
8679 2005-09-08  Simon Josefsson  <jas@extundo.com>
8680
8681         * m4/socklen.m4: New file.
8682
8683 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8684
8685         * modules/utimens (Files): Add m4/utimbuf.m4, since
8686         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
8687         Reported by Sergey Poznyakoff.
8688
8689 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8690
8691         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
8692         definitions, since that's the preferred style in glibc.
8693         Fix a minor spacing issue, and update copyright notice to match
8694         glibc's.
8695
8696 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8697
8698         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
8699
8700 2005-09-06  Simon Josefsson  <jas@extundo.com>
8701
8702         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
8703         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
8704
8705 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8706
8707         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
8708         warning.
8709
8710 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8711
8712         * config/srclist.txt: Add glibc bug 1302.
8713
8714 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
8715
8716         Change bitset word type from unsigned int to unsigned long int,
8717         as this has better performance on typical 64-bit hosts.
8718         Port bitset code to hosts with unusual word sizes.
8719         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
8720         (build_collating_symbol):
8721         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
8722         argument is a bitset.  This is merely a style issue, but it makes
8723         it clearer that an entire array is expected.
8724         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
8725         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
8726         Port to the case where bitset_word is not the same as unsigned int.
8727         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
8728         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
8729         Likewise.
8730         * lib/regexec.c (check_dst_limits_calc_pos_1,
8731         check_subexp_matching_top):
8732         (build_trtable, group_nodes_into_DFAstates):
8733         Likewise.
8734         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
8735         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
8736         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
8737         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
8738         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
8739         * lib/regcomp.c (optimize_subexps, lower_subexp):
8740         Work even if bitset_word has holes in its bitwise representation.
8741         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
8742         * lib/regexec.c (check_dst_limits_calc_pos_1,
8743         check_subexp_matching_top):
8744         Likewise.
8745         * lib/regex_internal.c (re_string_reconstruct):
8746         Don't assume UCHAR_MAX == 255.
8747         * lib/regex_internal.h (bitset_set_all): Likewise.
8748         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
8749         All uses changed.
8750         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
8751         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
8752         All uses changed.
8753         (BITSET_WORD_MAX): New macro.
8754         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
8755         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
8756         (bitset_empty, bitset_copy):
8757         Prefer sizeof (bitset) to multiplying it out ourselves.
8758         (bitset_not_merge): Remove; unused.
8759         (bitset_contain): Return bool, not unsigned int with one bit on.
8760         All callers changed.
8761         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
8762         alignment than re_node_set; do this by defining a new internal
8763         type struct dests_alloc and using it to allocate memory.
8764
8765 2005-09-05  Bruno Haible  <bruno@clisp.org>
8766
8767         * gnulib-tool (func_import): Fix comparison in handling of symbolic
8768         links.
8769
8770 2005-09-04  Martin Lambers <marlam@marlam.de>  (tiny change)
8771
8772         * modules/size_max (Makefile.am): Add size_max.h
8773
8774 2005-09-04  Derek Price  <derek@ximbiot.com>
8775
8776         * gnulib-tool (func_import): Fix reversed $symbolic logic.
8777
8778 2005-09-03  Simon Josefsson  <jas@extundo.com>
8779
8780         * gnulib-tool: Fix typo.
8781
8782 2005-09-03  Simon Josefsson  <jas@extundo.com>
8783
8784         * config/srclist.txt: Add glibc bug 1293.
8785
8786 2005-09-03  Derek Price  <derek@ximbiot.com>
8787
8788         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
8789         From Larry Jones <lawrence.jones@ugs.com>.
8790
8791 2005-09-02  Simon Josefsson  <jas@extundo.com>
8792
8793         * modules/socklen: New file.
8794
8795 2005-09-02  Simon Josefsson  <jas@extundo.com>
8796
8797         * modules/havelib: New module.
8798
8799         * modules/gettext, modules/iconv, modules/lock, modules/readline:
8800         Use havelib.
8801
8802 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
8803
8804         Check for arithmetic overflow when calculating sizes, to prevent
8805         some buffer-overflow issues.  These patches are conservative, in the
8806         sense that when I couldn't determine whether an overflow was possible,
8807         I inserted a run-time check.
8808         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
8809         macros.
8810         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
8811         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
8812         (re_xnrealloc, re_x2nrealloc): New inline functions.
8813         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
8814         parse_bracket_exp):
8815         (build_equiv_class, build_charclass): Check for arithmetic overflow
8816         in size expression calculations.
8817         * lib/regex_internal.c (re_string_realloc_buffers):
8818         (build_wcs_upper_buffer, re_node_set_add_intersect):
8819         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
8820         (re_dfa_add_node, register_state): Likewise.
8821         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
8822         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
8823         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
8824         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
8825
8826 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
8827
8828         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
8829         m4/ulonglong.m4.  Problem reported by Martin Lambers.
8830
8831 2005-09-02  Bruno Haible  <bruno@clisp.org>
8832
8833         Support for lib vs. lib64 distinction on biarch platforms.
8834         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
8835         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
8836         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
8837
8838 2005-09-02  Bruno Haible  <bruno@clisp.org>
8839
8840         * gnulib-tool (import): In the other first-use case, provide defaults
8841         as well.
8842
8843 2005-09-02  Bruno Haible  <bruno@clisp.org>
8844
8845         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
8846         patches not yet found in the latest gettext release.
8847
8848 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8849
8850         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
8851         to avoid a collision with bits/local_lim.h in glibc.
8852         All uses changed.  Problem reported by Dmitry V. Levin in
8853         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
8854
8855         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
8856         bugs in int versus size_t comparisons.
8857         (re_string_context_at): Fix bug where the code assumed that
8858         Idx is signed.
8859
8860         Use bool where appropriate.
8861         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
8862         All callers changed.
8863         (calc_eclosure_iter): Likewise, for ROOT arg.
8864         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
8865         (build_charclass_op): Likewise, for NON_MATCH arg.
8866         * lib/regex_internal.c (re_string_allocate, re_string_construct):
8867         (re_string_construct_common): Likewise, for ICASE arg.
8868         * lib/regexec.c (re_search_2_stub, re_search_stub):
8869         Likewise, for RET_LEN arg.
8870         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
8871         (set_regs): Likewise, for FL_BACKTRACK arg.
8872         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
8873         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
8874         (calc_eclosure_iter, parse_bracket_exp):
8875         Use bool for internal variables that are booleans.
8876         * lib/regexec.c (re_search_internal, check_matching,
8877         proceed_next_node):
8878         (set_regs, build_sifted_states, sift_states_bkref):
8879         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
8880         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
8881         (find_collation_sequence_value):
8882         Likewise.
8883         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
8884         (re_node_set_compare):
8885         Return bool, not int. All callers changed.
8886         * lib/regexec.c (check_halt_node_context, check_dst_limits):
8887         (build_trtable, check_node_accept): Likewise.
8888         * lib/regex_internal.h: Include stdbool.h.
8889
8890         Fix bugs uncovered when converting to bool.
8891         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
8892         failure instead of charging ahead blindly.
8893         * lib/regex_internal.c (register_state): Likewise.
8894         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
8895         for freeing internal storage.
8896         (group_nodes_into_DFA_states): Use unsigned int, not int, for
8897         bitset pieces used as boolean, to avoid undefined behavior
8898         on hosts that do int overflow checking.
8899
8900 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8901
8902         * config/srclist.txt: Add glibc bugs 1285-1287.
8903
8904 2005-09-01  Jim Meyering  <jim@meyering.net>
8905
8906         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
8907         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
8908         Require gl_STAT_MACROS, too.
8909
8910 2005-09-01  Bruno Haible  <bruno@clisp.org>
8911
8912         * gnulib-tool (import): In the first-use case, provide defaults.
8913
8914 2005-09-01  Bruno Haible  <bruno@clisp.org>
8915
8916         * gnulib-tool (func_import): Remove the .tmp files.
8917
8918 2005-09-01  Bruno Haible  <bruno@clisp.org>
8919
8920         * gnulib-tool (func_import): Fix handling of symbolic links.
8921
8922 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8923
8924         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
8925         old glibc regex code mishandles strings longer than 2**31 bytes.
8926         This patch fixes this when the regex code is used in gnulib
8927         (i.e., outside glibc).
8928
8929         This patch should not affect the use of the regex code inside
8930         glibc.  No doubt this problem also needs to be handled for glibc
8931         as well, but the result will be an incompatible change to the
8932         glibc ABI, and the old ABI will have to be supported too.  That
8933         can be the the subject for another patch.
8934
8935         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
8936         governing whether the rest of this patch is active.  By default,
8937         the macro is disabled and the patch has no effect.
8938         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
8939         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
8940         (struct re_pattern_buffer, re_search, re_search_2, re_match):
8941         (re_match_2, re_set_registers): Use the new types.
8942         * lib/regex_internal.h (Idx, re_hashval_t): New types.
8943         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
8944         New macros.
8945         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
8946         (re_string_context_at, bin_tree_t, re_dfastate_t):
8947         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
8948         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
8949         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
8950         (re_string_char_size_at, re_string_wchar_at):
8951         (re_string_elem_size_at):
8952         Use the new types and macros to port to 64-bit hosts.
8953         Use unsigned types for internal values, so that the code
8954         mostly works even for arrays larger than SSIZE_MAX.
8955         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
8956         (search_duplicated_node, calc_eclosure_iter, fetch_number):
8957         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
8958         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
8959         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
8960         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
8961         (calc_inveclosure, parse_dup_op, build_range_exp):
8962         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
8963         (fetch_number, create_token_tree, mark_opt_subexp):
8964         Likewise.
8965         * lib/regex_internal.c (re_string_construct_common,
8966         create_ci_newstate):
8967         (create_cd_newstate, re_string_allocate, re_string_construct):
8968         (re_string_realloc_buffers, build_wcs_upper_buffer):
8969         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
8970         (re_string_reconstruct, re_string_peek_byte_case):
8971         (re_string_fetch_byte_case, re_string_context_at):
8972         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
8973         (re_node_set_init_copy, re_node_set_add_intersect):
8974         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
8975         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
8976         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
8977         (re_acquire_state, re_acquire_state_context, register_state):
8978         Likewise.
8979         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
8980         search_cur_bkref_entry):
8981         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
8982         (re_search_internal, re_search_2_stub, re_search_stub)
8983         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
8984         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
8985         (update_cur_sifted_state, check_dst_limits):
8986         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
8987         (check_subexp_limits, sift_states_bkref, merge_state_array):
8988         (check_subexp_matching_top, get_subexp, get_subexp_sub):
8989         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
8990         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
8991         (expand_bkref_cache, check_node_accept_bytes):
8992         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
8993         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
8994         (acquire_init_state_context, check_halt_node_context):
8995         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
8996         (sift_states_backward, clean_state_log_if_needed):
8997         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
8998         (find_recover_state, transit_state_sb, transit_state_mb):
8999         (transit_state_bkref, build_trtable, match_ctx_clean):
9000         Likewise.
9001         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
9002         to work around an assumption that REG_MISSING is negative.
9003
9004         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
9005         (seek_collating_symbol_entry) [defined _LIBC]:
9006         (lookup_collation_sequence_value) [defined _LIBC]:
9007         (build_range_exp, build_collating_symbol) [defined _LIBC]:
9008         Use prototypes rather than old-style function definitions.
9009         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
9010         (transit_state_sb) [0]:
9011         (find_collation_sequence_value) [defined _LIBC]: Likewise.
9012
9013         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
9014         rm_eo.
9015
9016         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
9017         (optimize_subexps, lower_subexp):
9018         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
9019         since the signed shift might overflow.  Use 1u<<31 instead.
9020         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
9021         Likewise.
9022         * lib/regexec.c (check_dst_limits_calc_pos_1,
9023         check_subexp_matching_top): Likewise.
9024
9025         * lib/regcomp.c (optimize_subexps, lower_subexp):
9026         Use CHAR_BIT rather than 8, for clarity.
9027         * lib/regexec.c (check_dst_limits_calc_pos_1):
9028         (check_subexp_matching_top): Likewise.
9029         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
9030         have to worry about portability issues when shifting it left.
9031         Remove no-longer-needed test for table_size > 0.
9032         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
9033         in a word, as the resulting behavior is undefined.
9034         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
9035         in one case, a <= should have been an <, and in another case the
9036         whole test was missing.
9037         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
9038         the standard name CHAR_BIT.
9039         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
9040         this is not true on one's complement and signed-magnitude hosts.
9041
9042         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
9043         next_last_offset.
9044         (struct re_dfa_t): Remove unused member states_alloc.
9045         * lib/regcomp.c (init_dfa): Don't initialize unused members.
9046
9047 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9048
9049         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
9050         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
9051         and large-file glibc and in 32-bit large-file Solaris.
9052
9053 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9054
9055         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
9056         lengths fit in regoff_t; this isn't true if regoff_t is the same
9057         width as size_t.
9058         * lib/regex.c (re_search_internal): 5th arg is LAST_START
9059         (= START + RANGE) instead of RANGE.  This avoids overflow
9060         problems when regoff_t is the same width as size_t.
9061         All callers changed.
9062         (re_search_2_stub): Check for overflow when adding the
9063         sizes of the two strings.
9064         (re_search_stub): Check for overflow when adding START
9065         to RANGE; if it occurs, substitute the extreme value.
9066
9067 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9068
9069         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
9070
9071 2005-08-31  Jim Meyering  <jim@meyering.net>
9072
9073         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
9074         a pointer-to-const.
9075         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
9076         (register_state): Likewise.
9077         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
9078         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
9079         (group_nodes_into_DFAstates): Likewise.
9080
9081 2005-08-31  Jim Meyering  <jim@meyering.net>
9082
9083         * check-module: Add a FIXME comment.
9084
9085 2005-08-31  Eric Blake  <ebb9@byu.net>
9086
9087         * modules/unistd-safer (Files): Add unistd--.h.
9088         * modules/stdio-safer (Files): Add stdio--.h.
9089
9090 2005-08-31  Derek Price  <derek@ximbiot.com>
9091
9092         * lib/getdelim.c (getdelim): Return EOF on EOF.
9093         Reported by Larry Jones <lawrence.jones@ugs.com>.
9094
9095 2005-08-31  Bruno Haible  <bruno@clisp.org>
9096
9097         Avoid unnecessary diffs in the generated lib/Makefile.am.
9098         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
9099         the generated files.
9100         (func_import): Don't set cmd.
9101
9102 2005-08-31  Bruno Haible  <bruno@clisp.org>
9103
9104         * lib/strstr.c: Include <stddef.h>, for NULL.
9105         * lib/strcasestr.c: Likewise.
9106         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
9107
9108 2005-08-31  Bruno Haible  <bruno@clisp.org>
9109
9110         * gnulib-tool: New option --macro-prefix.
9111         (func_import): Use macro_prefix.
9112         (import): Handle option --macro-prefix.
9113
9114 2005-08-31  Bruno Haible  <bruno@clisp.org>
9115
9116         * gnulib-tool (import): Rename most ac_* variables to cached_*.
9117         Also use new variables cached_lgpl, cached_libtool.
9118
9119 2005-08-31  Bruno Haible  <bruno@clisp.org>
9120
9121         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
9122         always instantiating them.
9123
9124 2005-08-31  Bruno Haible  <bruno@clisp.org>
9125
9126         * gnulib-tool (func_import): Read the previous cached settings
9127         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
9128         earlier added by gnulib but are now dropped. Warn when a gnulib file
9129         overwrites a non-gnulib file.
9130
9131 2005-08-31  Bruno Haible  <bruno@clisp.org>
9132
9133         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
9134         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
9135         projects that don't keep autogenerated files in CVS. Put into
9136         actioncmd only the specified modules, not the transitive closure.
9137
9138 2005-08-31  Bruno Haible  <bruno@clisp.org>
9139
9140         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
9141         Create directories that shall be filled.
9142         (import): Don't look for gl_* macros in configure.ac. Recurse across
9143         all directories containing a gnulib-cache.m4 files, if meaningful.
9144
9145 2005-08-31  Bruno Haible  <bruno@clisp.org>
9146
9147         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
9148         (import): Set seen_libtool when we see gl_LIBTOOL.
9149
9150 2005-08-31  Bruno Haible  <bruno@clisp.org>
9151
9152         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
9153         declaration macro definitions from generated gnulib.m4.
9154
9155 2005-08-30  "Oskar Liljeblad" <oskar@osk.mine.nu>
9156
9157         * lib/iconvme.h: Add prototype for iconv_alloc.
9158
9159 2005-08-29  Simon Josefsson  <jas@extundo.com>
9160
9161         * lib/iconvme.c: Fix errno.
9162
9163 2005-08-29  Bruno Haible  <bruno@clisp.org>
9164
9165         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
9166         that it works when the directory contains spaces.
9167
9168 2005-08-29  Bruno Haible  <bruno@clisp.org>
9169
9170         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
9171
9172 2005-08-29  Bruno Haible  <bruno@clisp.org>
9173
9174         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
9175         Emit more advice.
9176
9177 2005-08-29  Bruno Haible  <bruno@clisp.org>
9178         and Stepan Kasal  <kasal@ucw.cz>
9179
9180         * check-module: If more parameters are given, check each of them
9181         separately; add more exceptions, as noted by Jim Meyering.
9182         (check_module): New procedure.
9183         (%exempt_header): Now contains all exceptions.
9184
9185 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
9186
9187         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
9188
9189 2005-08-29  "Oskar Liljeblad" <oskar@osk.mine.nu>
9190
9191         * lib/iconvme.c: Split iconv_string into iconv_alloc.
9192
9193 2005-08-28  Bruno Haible  <bruno@clisp.org>
9194
9195         * m4/gnulib-tool.m4: New file.
9196
9197 2005-08-27  Jim Meyering  <jim@meyering.net>
9198
9199         * modules/unistd-safer (Files): Add pipe-safer.c.
9200         * modules/fcntl-safer (Files): Add creat-safer.c.
9201
9202 2005-08-27  Jim Meyering  <jim@meyering.net>
9203
9204         * m4/stdlib-safer.m4: New file.  From coreutils.
9205         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
9206         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
9207         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
9208         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
9209         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
9210
9211 2005-08-27  Jim Meyering  <jim@meyering.net>
9212
9213         * lib/fopen-safer.c: Merge minor changes from coreutils.
9214         * lib/dup-safer.c: Likewise.
9215         * lib/fd-safer.c: Likewise.
9216
9217         Merge from coreutils.
9218         * lib/stdio--.h: New file.
9219         * lib/stdlib--.h: New file.
9220         * lib/mkstemp-safer.c: New file.
9221
9222         GNU tar needs these.
9223         * lib/pipe-safer.c: New file.
9224         * lib/creat-safer.c: New file.
9225         * lib/fcntl--.h (creat): Define to creat_safer.
9226         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
9227         * lib/unistd--.h (pipe): Define to pipe_safer.
9228         * lib/unistd-safer.h: Declare pipe_safer.
9229
9230 2005-08-26  Simon Josefsson  <jas@extundo.com>
9231
9232         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
9233         Haible <bruno@clisp.org>.
9234
9235 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
9236
9237         * lib/regex_internal.h: Remove all references to
9238         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
9239         or better.
9240         (bitset_not, bitset_merge, bitset_not_merge):
9241         (bitset_mask, re_string_allocate, re_string_construct):
9242         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
9243         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
9244         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
9245         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
9246         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
9247         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
9248         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
9249         (re_acquire_state_context):
9250         Remove unnecessary forward decls.
9251         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
9252         Put __attribute at function definition,
9253         now that the function decl has been removed.
9254         * lib/regex_internal.c (re_string_peek_byte_case):
9255         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
9256         Likewise.
9257
9258 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
9259
9260         * m4/regex.m4: Add AC_PREREQ(2.50).
9261         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
9262
9263 2005-08-25  Simon Josefsson  <jas@extundo.com>
9264
9265         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
9266         __fsetlocking.
9267
9268 2005-08-25  Simon Josefsson  <jas@extundo.com>
9269
9270         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
9271         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
9272         GLIBC specific code.
9273
9274 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9275
9276         Make regex safe for g++.  This fixes one real bug (an "err"
9277         that should have been "*err").  g++ problem reported by
9278         Sam Steingold.
9279         * lib/regex_internal.h (re_calloc): New macro, consistent with
9280         re_malloc etc.  All callers of calloc changed to use re_calloc.
9281         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
9282         not int.  All callers changed.
9283         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
9284         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
9285         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
9286         (find_recover_state): Change "err" to "*err"; this fixes what
9287         appears to be a real bug.
9288         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
9289         versus int.
9290
9291 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9292
9293         * modules/regex (Depends-on): Add malloc, since the code
9294         assumes that !malloc(0) means failure.
9295
9296 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9297
9298         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
9299
9300         alloca modernization/simplification for regex.
9301         * lib/regex.c: Remove portability cruft for alloca.  This no longer
9302         needs to be at the start of the file, and can be moved into
9303         regex_internal.h and simplified.
9304         * lib/regex_internal.h: Include <alloca.h>.
9305         (__libc_use_alloca) [!defined _LIBC]: New macro.
9306         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
9307         now works outside glibc.
9308
9309 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9310
9311         * config/srclist.txt: Add glibc bugs 1241, 1245.
9312
9313 2005-08-25  Jim Meyering  <jim@meyering.net>
9314
9315         * lib/open-safer.c: Include <config.h>.
9316         Otherwise, we'd lose LARGEFILE support in any file using
9317         e.g. "fcntl--.h"
9318
9319 2005-08-25  Bruno Haible  <bruno@clisp.org>
9320
9321         * m4/minmax.m4: Require autoconf 2.52.
9322         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
9323         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
9324         alternatives of translit over the alphabet.
9325         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
9326
9327 2005-08-24  Simon Josefsson  <jas@extundo.com>
9328
9329         * tests/test-getpass.c: New file.
9330
9331 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9332
9333         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
9334         for GNU regex features.
9335
9336 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9337
9338         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
9339         * lib/regex.h (regerror): Likewise.
9340
9341         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
9342         requires this.  (The code never needed it.)
9343
9344         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
9345         All uses of recently-renamed identifiers changed to use the new,
9346         POSIX-compliant names.  The code will build and run just fine
9347         without these changes, but it's better to eat our own dog food
9348         and use the standard-conforming names.
9349
9350         * lib/regex.h: Fix a multitude of POSIX name space violations.
9351         These changes have an effect only for programs that define
9352         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
9353         do not change anything for programs compiled in the normal way.
9354         Also, there is no effect on the ABI.
9355
9356         (_REGEX_SOURCE): New macro.
9357         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
9358         defined and _GNU_SOURCE is not; this fixes a name space violation.
9359
9360         Rename the following macros to obey POSIX requirements.
9361         The old names are still visible as macros if _REGEX_SOURCE is defined.
9362         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
9363         RE_BACKSLASH_ESCAPE_IN_LISTS.
9364         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
9365         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
9366         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
9367         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
9368         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
9369         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
9370         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
9371         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
9372         (REG_INTERVALS): renamed from RE_INTERVALS.
9373         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
9374         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
9375         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
9376         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
9377         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
9378         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
9379         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
9380         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
9381         RE_UNMATCHED_RIGHT_PAREN_ORD.
9382         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
9383         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
9384         (REG_DEBUG): renamed from RE_DEBUG.
9385         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
9386         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
9387         unusual, since we can't clash with the POSIX REG_ICASE.
9388         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
9389         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
9390         (REG_NO_SUB): renamed from RE_NO_SUB.
9391         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
9392         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
9393         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
9394         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
9395         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
9396         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
9397         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
9398         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
9399         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
9400         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
9401         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
9402         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
9403         RE_SYNTAX_POSIX_MINIMAL_BASIC.
9404         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
9405         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
9406         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
9407         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
9408         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
9409         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
9410         (REG_FIXED): Renamed from REGS_FIXED.
9411         (REG_NREGS): Renamed from RE_NREGS.
9412
9413         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
9414         of other REG_* macros, since POSIX says the user is allowed to
9415         #undef these macros selectively.
9416
9417         (reg_errcode_t): Update comment stating what other tables need
9418         to be consistent.
9419
9420         Rename the following enum values to obey POSIX requirements.
9421         The old names are still visible as macros.
9422         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
9423         is not defined, since GNU is supposed to be a superset of POSIX as
9424         much as possible, and since we want reg_errcode_t to be a signed
9425         type for implementation consistency.
9426         (_REG_NOERROR): Renamed from REG_NOERROR.
9427         (_REG_NOMATCH): Renamed from REG_NOMATCH.
9428         (_REG_BADPAT): Renamed from REG_BADPAT.
9429         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
9430         (_REG_ECTYPE): Renamed from REG_ECTYPE.
9431         (_REG_EESCAPE): Renamed from REG_EESCAPE.
9432         (_REG_ESUBREG): Renamed from REG_ESUBREG.
9433         (_REG_EBRACK): Renamed from REG_EBRACK.
9434         (_REG_EPAREN): Renamed from REG_EPAREN.
9435         (_REG_EBRACE): Renamed from REG_EBRACE.
9436         (_REG_BADBR): Renamed from REG_BADBR.
9437         (_REG_ERANGE): Renamed from REG_ERANGE.
9438         (_REG_ESPACE): Renamed from REG_ESPACE.
9439         (_REG_BADRPT): Renamed from REG_BADRPT.
9440         (_REG_EEND): Renamed from REG_EEND.
9441         (_REG_ESIZE): Renamed from REG_ESIZE.
9442         (_REG_ERPAREN): Renamed from REG_ERPAREN.
9443         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
9444         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
9445         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
9446         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
9447
9448         (_REG_RE_NAME, _REG_RM_NAME): New macros.
9449         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
9450         changed.  But support the old name if the new one is not defined
9451         and if _REGEX_SOURCE.
9452
9453         Change the following member names in struct re_pattern_buffer.
9454         The old names are still supported if !_REGEX_SOURCE.
9455         The new names are always supported, regardless of _REGEX_SOURCE.
9456         (re_buffer): Renamed from buffer.
9457         (re_allocated): Renamed from allocated.
9458         (re_used): Renamed from used.
9459         (re_syntax): Renamed from syntax.
9460         (re_fastmap): Renamed from fastmap.
9461         (re_translate): Renamed from translate.
9462         (re_can_be_null): Renamed from can_be_null.
9463         (re_regs_allocated): Renamed from regs_allocated.
9464         (re_fastmap_accurate): Renamed from fastmap_accurate.
9465         (re_no_sub): Renamed from no_sub.
9466         (re_not_bol): Renamed from not_bol.
9467         (re_not_eol): Renamed from not_eol.
9468         (re_newline_anchor): Renamed from newline_anchor.
9469
9470         Change the following member names in struct re_registers.
9471         The old names are still supported if !_REGEX_SOURCE.
9472         The new names are always supported, regardless of _REGEX_SOURCE.
9473         (rm_num_regs): Renamed from num_regs.
9474         (rm_start): Renamed from start.
9475         (rm_end): Renamed from end.
9476
9477         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
9478         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
9479         Prepend __ to parameter names.
9480
9481         Undo yesterday's changes.
9482
9483 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9484
9485         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
9486         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
9487         lib/regex.c.
9488
9489 2005-08-24  Jim Meyering  <jim@meyering.net>
9490
9491         Sync from coreutils.
9492         * m4/fcntl-safer.m4: New file.
9493
9494         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
9495         and object files for this module.
9496
9497 2005-08-24  Jim Meyering  <jim@meyering.net>
9498
9499         Sync from coreutils.
9500         * lib/fcntl--.h, fcntl-safer.h, open-safer.c: New files.
9501
9502 2005-08-24  Jim Meyering  <jim@meyering.net>
9503
9504         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
9505         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
9506
9507 2005-08-24  Jim Meyering  <jim@meyering.net>
9508
9509         * modules/fcntl-safer: New module.
9510         * modules/fts (Depends-on): Add fcntl-safer.
9511         * MODULES.html.sh (File descriptor based Input/Output):
9512         Add fcntl-safer.
9513
9514 2005-08-24  Bruno Haible  <bruno@clisp.org>
9515
9516         Support for unit test modules.
9517         * modules/README: Mention tests modules.
9518         * modules/TEMPLATE-TESTS: New file.
9519         * gnulib-tool: New options --extract-tests-module, --with-tests and
9520         --tests-base (unused for the moment).
9521         (testsbase, inctests): New variables.
9522         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
9523         (func_verify_module): Exclude TEMPLATE-TESTS.
9524         (func_verify_nontests_module, func_verify_tests_module): New functions.
9525         (func_get_dependencies): Add implicit dependency for tests modules.
9526         (func_get_tests_module): New function.
9527         (func_modules_transitive_closure): When --with-tests was specified,
9528         include the unit tests as well, unless explicitly avoided.
9529         (func_emit_lib_Makefile_am): Ignore the tests modules here.
9530         (func_emit_tests_Makefile_am): New function.
9531         (func_create_testdir): When --with-tests was specified, emit a
9532         tests/ directory.
9533         * MODULES.html.sh (Future developments): Update.
9534
9535 2005-08-24  Bruno Haible  <bruno@clisp.org>
9536
9537         * modules/tls-tests: New file.
9538         * tests/test-tls.c: New file, from GNU gettext.
9539
9540 2005-08-24  Bruno Haible  <bruno@clisp.org>
9541
9542         * modules/lock-tests: New file.
9543         * tests/test-lock.c: New file, from GNU gettext.
9544
9545 2005-08-24  Bruno Haible  <bruno@clisp.org>
9546
9547         * lib/lock.h: Add multiple inclusion guard.
9548         * lib/tls.h: Add multiple inclusion guard.
9549
9550 2005-08-24  Bruno Haible  <bruno@clisp.org>
9551
9552         * gnulib-tool: Add support for the --aux-dir option to
9553         --create-testdir, --create-megatestdir, --test, --megatest.
9554         (func_create_testdir, func_create_megatestdir): Optionally emit a
9555         AC_CONFIG_AUX_DIR directive.
9556         (create-testdir, create-megatestdir, test, megatest): Provide a
9557         default value for $auxdir.
9558
9559 2005-08-24  Bruno Haible  <bruno@clisp.org>
9560
9561         * gnulib-tool (import): Use compound statement instead of subshell
9562         where possible.
9563
9564 2005-08-24  Bruno Haible  <bruno@clisp.org>
9565
9566         * gnulib-tool (import): Change --aux-dir default to "build-aux".
9567
9568 2005-08-24  Bruno Haible  <bruno@clisp.org>
9569
9570         * gnulib-tool (func_version): Update.
9571
9572 2005-08-24  Bruno Haible  <bruno@clisp.org>
9573
9574         * gnulib-tool (func_import, func_create_testdir,
9575         func_create_megatestdir): Quote all autoconf macro arguments.
9576
9577 2005-08-24  Bruno Haible  <bruno@clisp.org>
9578
9579         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
9580         option --force, because --force causes the aclocal.m4 of each
9581         subdirectory to be newer than the corresponding config.h.in.
9582
9583 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9584
9585         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
9586         All contents moved to gl_REGEX.
9587         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
9588         assume that it does.
9589
9590 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9591
9592         * lib/regex.h (REG_NOSYS)
9593         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
9594         Define, since POSIX requires it as of 2001.
9595         (_REG_ENOSYS)
9596         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
9597         New private symbol, used to keep the enum signed in all cases.
9598         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
9599         Youngman in
9600         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
9601
9602         * lib/regex_internal.c (re_string_skip_chars, register_state):
9603         (calc_state_hash):
9604         Remove forward decls; no longer needed now that we use prototypes.
9605         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
9606         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
9607         (clean_state_log_if_needed): Likewise.
9608
9609 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9610
9611         * config/srclist.txt: Add glibc bugs 1231-1233.
9612
9613 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9614
9615         Fix problems reported by Sam Steingold in
9616         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
9617         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
9618         assumed that reg_errcode_t is a signed type, which is not
9619         necessarily true if _XOPEN_SOURCE is not defined.
9620         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
9621         since some compilers warn about it otherwise.
9622
9623 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9624
9625         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
9626         (init_word_char, create_initial_state, duplicate_node_closure):
9627         (fetch_token, peek_token_bracket, build_range_exp):
9628         (build_collating_symbol): Remove forward decls; no longer needed
9629         now that we use prototypes.
9630
9631         * lib/regcomp.c:
9632         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
9633         (re_compile_fastmap_iter, regcomp, regerror, regfree):
9634         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
9635         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
9636         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
9637         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
9638         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
9639         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
9640         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
9641         (build_range_exp, build_collating_symbol, parse_bracket_exp):
9642         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
9643         (build_charclass, build_charclass_op, fetch_number, create_tree):
9644         (create_token_tree, mark_opt_subexp, duplicate_tree):
9645         Use prototypes rather than old-style definitions.
9646
9647         * lib/regex_internal.c:
9648         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
9649         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
9650         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
9651         (re_string_reconstruct, re_string_peek_byte_case):
9652         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
9653         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
9654         (re_node_set_init_copy, re_node_set_add_intersect):
9655         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
9656         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
9657         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
9658         (re_acquire_state, re_acquire_state_context, register_state):
9659         (create_ci_newstate, create_cd_newstate, free_state):
9660         Likewise.
9661         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
9662         re_search_2):
9663         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
9664         (re_search_internal, prune_impossible_nodes):
9665         (acquire_init_state_context, check_matching, static):
9666         (check_halt_node_context, check_halt_state_context, proceed_next_node):
9667         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
9668         (update_regs, sift_states_backward, build_sifted_states):
9669         (clean_state_log_if_needed, merge_state_array):
9670         (update_cur_sifted_state, add_epsilon_src_nodes):
9671         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
9672         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
9673         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
9674         (find_recover_state, check_subexp_matching_top, transit_state_mb):
9675         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
9676         (check_arrival, check_arrival_add_next_nodes):
9677         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
9678         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
9679         (check_node_accept_bytes, check_node_accept, extend_buffers):
9680         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
9681         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
9682         (sift_ctx_init):
9683         Likewise.
9684
9685         * lib/regex_internal.h:
9686         (re_string_allocate, re_string_construct, re_string_reconstruct):
9687         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
9688         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
9689         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
9690         (re_string_context_at, re_string_peek_byte_case):
9691         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
9692         is defined, since we now use prototypes always.
9693
9694         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
9695         C89 or better.  All uses removed.
9696
9697 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9698
9699         * config/srclist.txt: Add glibc bugs 1220-1227.
9700
9701 2005-08-20  Jim Meyering  <jim@meyering.net>
9702
9703         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
9704         of unused local, dfa.
9705
9706 2005-08-20  Bruno Haible  <bruno@clisp.org>
9707
9708         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
9709
9710 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9711
9712         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
9713         (re_node_set_insert_last, re_dfa_add_node):
9714         Rename local variables to avoid GCC shadowing warnings.
9715
9716 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9717
9718         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
9719         [defined lint]: Suppress bogus uninitialized-variable warnings.
9720
9721         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
9722         and let the caller return REG_ESPACE if out of space.  This
9723         removes an uninitialied-variable warning with GCC 4.0.1, and also
9724         avoids taking the address of a local variable.  All callers
9725         changed.
9726
9727 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9728
9729         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
9730         $LIBCSRC/posix/regexec.c.
9731         Add glibc bug 1217 for regcomp.c.
9732
9733 2005-08-19  Jim Meyering  <jim@meyering.net>
9734
9735         * lib/regexec.c (proceed_next_node): Redo local variables to
9736         avoid GCC shadowing warnings.
9737
9738 2005-08-18  Bruno Haible  <bruno@clisp.org>
9739
9740         * lib/strstr.c (strstr): Fix return value in multibyte case.
9741         * lib/strcasestr.c (strcasestr): Likewise.
9742
9743 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9744
9745         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
9746
9747 2005-08-17  Jim Meyering  <jim@meyering.net>
9748
9749         Make the %s format (seconds since the epoch) work for a negative
9750         number and when used with a zero-padded field width, e.g. %015s.
9751
9752         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
9753         label so that it precedes the code to set `digits'.  Otherwise,
9754         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
9755         print `00-22'.  Now, it prints `-0022', as it should.
9756
9757 2005-08-17  Bruno Haible  <bruno@clisp.org>
9758
9759         * modules/strstr (Files): Add m4/mbrtowc.m4.
9760         (Depends-on): Add mbuiter.
9761
9762 2005-08-17  Bruno Haible  <bruno@clisp.org>
9763
9764         * modules/strcasestr: New file.
9765         * MODULES.html.sh (String handling, based on ANSI C 89): Add
9766         strcasestr.
9767
9768 2005-08-17  Bruno Haible  <bruno@clisp.org>
9769
9770         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
9771
9772 2005-08-17  Bruno Haible  <bruno@clisp.org>
9773
9774         * modules/mbuiter: New file.
9775         * MODULES.html.sh (Extended multibyte and wide character utilities):
9776         Add mbuiter.
9777
9778 2005-08-17  Bruno Haible  <bruno@clisp.org>
9779
9780         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
9781         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
9782
9783 2005-08-17  Bruno Haible  <bruno@clisp.org>
9784
9785         * m4/strcasestr.m4: New file.
9786
9787 2005-08-17  Bruno Haible  <bruno@clisp.org>
9788
9789         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
9790         * lib/strstr.c: Completely rewritten, with multibyte locale support.
9791
9792 2005-08-17  Bruno Haible  <bruno@clisp.org>
9793
9794         * lib/strcasestr.h: New file.
9795         * lib/strcasestr.c: New file.
9796
9797 2005-08-17  Bruno Haible  <bruno@clisp.org>
9798
9799         * lib/strcasecmp.c: Use mbuiter.h.
9800
9801 2005-08-17  Bruno Haible  <bruno@clisp.org>
9802
9803         * lib/mbuiter.h: New file.
9804
9805 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
9806
9807         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
9808         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
9809         and gl_GETOPT are both invoked via different paths (as happens
9810         with GNU tar CVS because it uses both argp and getopt), the former
9811         wins.
9812
9813 2005-08-16  Bruno Haible  <bruno@clisp.org>
9814
9815         * modules/tls: New file.
9816         * MODULES.html.sh (Multithreading): Add tls.
9817
9818 2005-08-16  Bruno Haible  <bruno@clisp.org>
9819
9820         * modules/strnlen1: New file.
9821         * MODULES.html.sh (String handling): Add strnlen1.
9822
9823 2005-08-16  Bruno Haible  <bruno@clisp.org>
9824
9825         * modules/strcase (Files): Add m4/mbrtowc.m4.
9826         (Depends-on): Add strnlen1, mbchar.
9827
9828 2005-08-16  Bruno Haible  <bruno@clisp.org>
9829
9830         * modules/mbiter: New file.
9831         * MODULES.html.sh (Extended multibyte and wide character utilities):
9832         Add mbiter.
9833
9834 2005-08-16  Bruno Haible  <bruno@clisp.org>
9835
9836         * modules/mbfile: New file.
9837         * MODULES.html.sh (Extended multibyte and wide character utilities):
9838         Add mbfile.
9839
9840 2005-08-16  Bruno Haible  <bruno@clisp.org>
9841
9842         * modules/mbchar: New file.
9843         * MODULES.html.sh (Extended multibyte and wide character utilities):
9844         New section.
9845
9846 2005-08-16  Bruno Haible  <bruno@clisp.org>
9847
9848         * m4/tls.m4: New file, from GNU gettext.
9849
9850 2005-08-16  Bruno Haible  <bruno@clisp.org>
9851
9852         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
9853         always.
9854         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
9855
9856 2005-08-16  Bruno Haible  <bruno@clisp.org>
9857
9858         * m4/mbiter.m4: New file.
9859
9860 2005-08-16  Bruno Haible  <bruno@clisp.org>
9861
9862         * m4/mbfile.m4: New file.
9863
9864 2005-08-16  Bruno Haible  <bruno@clisp.org>
9865
9866         * m4/mbchar.m4: New file.
9867
9868 2005-08-16  Bruno Haible  <bruno@clisp.org>
9869
9870         * lib/tls.h: New file, from GNU gettext.
9871         * lib/tls.c: New file, from GNU gettext.
9872
9873 2005-08-16  Bruno Haible  <bruno@clisp.org>
9874
9875         * lib/strnlen1.h: New file.
9876         * lib/strnlen1.c: New file.
9877
9878 2005-08-16  Bruno Haible  <bruno@clisp.org>
9879
9880         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
9881         (mbi_init): Update.
9882         (mbi_avail, mbi_advance): Let the iteration end before the terminating
9883         NUL byte, not after it.
9884
9885 2005-08-16  Bruno Haible  <bruno@clisp.org>
9886
9887         * lib/strcase.h (strcasecmp): Add note in comments.
9888         * lib/strncasecmp.c: Use code from strcasecmp.c.
9889         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
9890         (strcasecmp): Work correctly in multibyte locales.
9891
9892 2005-08-16  Bruno Haible  <bruno@clisp.org>
9893
9894         * lib/mbiter.h: New file.
9895
9896 2005-08-16  Bruno Haible  <bruno@clisp.org>
9897
9898         * lib/mbfile.h: New file.
9899
9900 2005-08-16  Bruno Haible  <bruno@clisp.org>
9901
9902         * lib/mbchar.h: New file.
9903         * lib/mbchar.c: New file.
9904
9905 2005-08-16  Bruno Haible  <bruno@clisp.org>
9906
9907         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
9908         the valid ones. Makes the comparison operations transitive:
9909         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
9910         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
9911
9912 2005-08-15  Simon Josefsson  <jas@extundo.com>
9913
9914         * modules/ssize_t (License): Change to 'unlimited'.
9915
9916         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
9917
9918 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9919
9920         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
9921         Add comments for each pending glibc patch.
9922
9923 2005-08-15  Bruno Haible  <bruno@clisp.org>
9924
9925         * lib/regex.h (__restrict_arr): Don't define to __restrict if
9926         __cplusplus is defined.
9927
9928 2005-08-14  Jim Meyering  <jim@meyering.net>
9929
9930         Sync from coreutils.
9931
9932         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
9933         Use the hash-table-based cycle-detection code not just when
9934         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
9935         Reported by James Youngman in
9936         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
9937         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
9938         FTS_TIGHT_CYCLE_CHECK.
9939         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
9940         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
9941         once again.
9942         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
9943         * lib/fts.c (fd_safer): Remove decl.
9944         Include fcntl--.h rather than unistd-safer.h
9945         (fts_safe_changedir): Don't call fd_safer; no longer needed
9946         now that we include fcntl--.h.
9947
9948 2005-08-12  Simon Josefsson  <jas@extundo.com>
9949
9950         * modules/getndelim2: Use ssize_t module.
9951         * modules/getnline: Likewise.
9952         * modules/safe-read: Likewise.
9953         * modules/xreadlink: Likewise.
9954
9955         * modules/ssize_t: New file.
9956
9957 2005-08-12  Simon Josefsson  <jas@extundo.com>
9958
9959         * m4/readline.m4: Look for termcap, curses or ncurses if required.
9960
9961 2005-08-12  Simon Josefsson  <jas@extundo.com>
9962
9963         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
9964         ssize_t.
9965
9966 2005-08-12  Simon Josefsson  <jas@extundo.com>
9967
9968         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
9969         readline, getdelim and check_version.
9970         (Support for systems lacking ISO C 99: Sizes of integer types):
9971         Add size_max.
9972
9973 2005-08-12  Bruno Haible  <bruno@clisp.org>
9974
9975         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
9976
9977 2005-08-11  Simon Josefsson  <jas@extundo.com>
9978
9979         * modules/readline: New file.
9980
9981         * modules/strnlen (Files): Add strnlen.h.
9982
9983 2005-08-11  Simon Josefsson  <jas@extundo.com>
9984
9985         * m4/readline.m4: New file.
9986
9987 2005-08-11  Simon Josefsson  <jas@extundo.com>
9988
9989         * lib/readline.h, readline.c: New file.
9990
9991 2005-08-11  Simon Josefsson  <jas@extundo.com>
9992
9993         * doc/gnulib.texi (Initial import, Finishing touches): Mention
9994         gl_AVOID.
9995
9996 2005-08-11  Bruno Haible  <bruno@clisp.org>
9997
9998         * lib/strnlen.h (strnlen): Change parameter name to match comment.
9999
10000 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
10001
10002         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
10003
10004 2005-08-10  Simon Josefsson  <jas@extundo.com>
10005
10006         * tests/test-iconvme.c: New file.
10007
10008 2005-08-10  Simon Josefsson  <jas@extundo.com>
10009
10010         * m4/strnlen.m4: New file.
10011
10012         * m4/strndup.m4: Don't check for strnlen declaration, done in
10013         strnlen.m4.
10014
10015 2005-08-10  Simon Josefsson  <jas@extundo.com>
10016
10017         * lib/strndup.c: Use strnlen.h.
10018
10019         * lib/strnlen.h: New file.
10020
10021 2005-08-08  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>  (tiny change)
10022
10023         * README: Typos.
10024
10025 2005-08-02  Simon Josefsson  <jas@extundo.com>
10026
10027         * modules/readline: New file.
10028
10029 2005-08-02  Simon Josefsson  <jas@extundo.com>
10030
10031         * modules/getdelim: New file.
10032
10033         * modules/getline: Rewrite, don't use getndelim2.
10034
10035 2005-08-02  Simon Josefsson  <jas@extundo.com>
10036
10037         * m4/getline.m4: Separate out getdelim stuff into separate module.
10038
10039         * m4/getdelim.m4: New file.
10040
10041 2005-08-02  Simon Josefsson  <jas@extundo.com>
10042
10043         * lib/getline.h, getline.c: Rewrite.
10044
10045         * lib/getdelim.h, getdelim.c: New files, ported from glibc.
10046
10047 2005-07-31  Bruno Haible  <bruno@clisp.org>
10048
10049         * lib/lock.h (gl_lock_initializer): New macro.
10050         (gl_lock_define_initialized): Use it.
10051         (gl_rwlock_initializer): New macro.
10052         (gl_rwlock_define_initialized): Use it.
10053         (gl_recursive_lock_initializer): New macro.
10054         (gl_recursive_lock_define_initialized): Use it.
10055
10056 2005-07-30  Karl Berry  <karl@gnu.org>
10057
10058         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
10059         Report from Ben Pfaff, regarding getopt.
10060
10061 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
10062
10063         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
10064         normal way.
10065         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
10066         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
10067         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
10068         (gl_GETOPT): Use the new macros.  Most of the implementation
10069         is moved to the new macros.  This is for programs like Emacs
10070         that don't want all the functionality of gl_GETOPT.
10071
10072 2005-07-26  Bruno Haible  <bruno@clisp.org>
10073
10074         * m4/lock.m4: Update from GNU gettext.
10075
10076 2005-07-26  Bruno Haible  <bruno@clisp.org>
10077
10078         * lib/lock.h: Update from GNU gettext.
10079         * lib/lock.c: Update from GNU gettext.
10080
10081 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
10082
10083         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
10084         obsolescent AC_TRY_RUN.  Include the default includes files, for
10085         'exit'.
10086
10087 2005-07-24  Bruno Haible  <bruno@clisp.org>
10088
10089         * modules/visibility: New file.
10090         * MODULES.html.sh (Misc): Add visibility.
10091
10092 2005-07-24  Bruno Haible  <bruno@clisp.org>
10093
10094         * m4/visibility.m4: New file.
10095
10096 2005-07-24  Bruno Haible  <bruno@clisp.org>
10097
10098         * doc/visibility.texi: New file.
10099
10100 2005-07-22  Bruno Haible  <bruno@clisp.org>
10101
10102         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
10103         $(ALLOCA_H), redundant through BUILT_SOURCES.
10104         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
10105         redundant through BUILT_SOURCES.
10106         * modules/byteswap (Makefile.am): Remove explicit dependency on
10107         $(BYTESWAP_H), redundant through BUILT_SOURCES.
10108         * modules/fnmatch (Makefile.am): Remove explicit dependency on
10109         $(FNMATCH_H), redundant through BUILT_SOURCES.
10110         * modules/getopt (Makefile.am): Remove explicit dependency on
10111         $(GETOPT_H), redundant through BUILT_SOURCES.
10112         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
10113         redundant through BUILT_SOURCES.
10114         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
10115         redundant through BUILT_SOURCES.
10116         * modules/stdbool (Makefile.am): Remove explicit dependency on
10117         $(STDBOOL_H), redundant through BUILT_SOURCES.
10118         * modules/stdint (Makefile.am): Remove explicit dependency on
10119         $(STDINT_H), redundant through BUILT_SOURCES.
10120         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
10121         Remove explicit dependency on $(SYSEXITS_H).
10122         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
10123
10124 2005-07-18  Simon Josefsson  <jas@extundo.com>
10125
10126         * lib/check-version.c (check_version): Accept identical versions too.
10127
10128 2005-07-18  Bruno Haible  <bruno@clisp.org>
10129
10130         * modules/lock: New file.
10131         * MODULES.html.sh (Multithreading): New section.
10132
10133 2005-07-18  Bruno Haible  <bruno@clisp.org>
10134
10135         * m4/lock.m4: New file, from GNU gettext.
10136
10137 2005-07-18  Bruno Haible  <bruno@clisp.org>
10138
10139         * lib/lock.h: New file, from GNU gettext.
10140         * lib/lock.c: New file, from GNU gettext.
10141
10142 2005-07-18  Bruno Haible  <bruno@clisp.org>
10143
10144         * lib/lock.h (gl_once_t): New type.
10145         (gl_once_define, gl_once): New macros.
10146         * lib/lock.c (fresh_once): New variable.
10147         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
10148         functions.
10149
10150 2005-07-16  Simon Josefsson  <jas@extundo.com>
10151
10152         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
10153         workaround, suggested by Bruno.
10154
10155 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
10156
10157         * modules/xalloc (Depends-on): Add xalloc-die.
10158         * modules/xvasprintf (Depends-on): Add xalloc-die.
10159
10160 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
10161
10162         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
10163         with a minor change.
10164
10165 2005-07-15  Bruno Haible  <bruno@clisp.org>
10166
10167         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
10168         When using lib/poll.c, define poll as rpl_poll.
10169
10170 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
10171
10172         * modules/argp (Depends-on): Remove unlocked-io.
10173
10174 2005-07-14  Derek Price  <derek@ximbiot.com>
10175
10176         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
10177         for glob symlink bug.
10178
10179 2005-07-14  Bruno Haible  <bruno@clisp.org>
10180
10181         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
10182         Instead, test for *_unlocked function declarations directly.
10183
10184 2005-07-11  Simon Josefsson  <jas@extundo.com>
10185
10186         * modules/size_max: New file.
10187
10188         * modules/xsize: Depend on size_max module for size_max.m4.
10189
10190 2005-07-11  Simon Josefsson  <jas@extundo.com>
10191
10192         * lib/size_max.h: New file.
10193
10194 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
10195
10196         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
10197         copyright symbol and the year.
10198         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
10199         (version_etc_va): Use parameterized copyright notice.
10200         Reword to conform to the current GNU coding standards.
10201
10202 2005-07-11  Karl Berry  <karl@gnu.org>
10203
10204         * doc/gnulib.texi (Quoting): new node.
10205         (Initial import): more info, from Patrice.
10206
10207 2005-07-11  Bruno Haible  <bruno@clisp.org>
10208
10209         * gnulib-tool (func_usage): Document option --avoid.
10210         (Command line options): Handle --avoid.
10211         (func_acceptable): New function.
10212         (func_modules_transitive_closure): Use it.
10213
10214 2005-07-11  Bruno Haible  <bruno@clisp.org>
10215
10216         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
10217         Reported by Jim Meyering.
10218
10219 2005-07-10  Bruno Haible  <bruno@clisp.org>
10220
10221         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
10222         Needed when size_t is smaller than 'unsigned int'.
10223         Reported by Paul Eggert.
10224
10225 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10226
10227         * modules/argp (Depends-on): Add unlocked-io
10228
10229 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10230
10231         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
10232         block of defines.
10233
10234 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
10235
10236         * config/srclist.txt: Comment out regcomp.c, since we have a porting
10237         fix now.
10238
10239 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
10240         and Paul Eggert  <eggert@cs.ucla.edu>
10241
10242         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
10243         in wint_t, not wchar_t.  Remove now-unnecessary cast.
10244
10245 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
10246
10247         * modules/regex (Files): Add lib/regex_internal.c,
10248         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
10249         (Depends-on): Add extensions.
10250         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
10251
10252 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
10253
10254         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
10255         pathconf.
10256         * m4/same.m4 (gl_SAME): Likewise.
10257         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
10258
10259         * m4/regex.m4: Adjust to new libc regex implementation.
10260         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
10261         all the .c and .h parts of (the new) regex.
10262         Quote the m4 stuff better.
10263         Check for RE_ICASE bug of old gnulib.
10264         Check for REG_STARTEND of recent libc.
10265         Rename local variables from jm_* to gl_*.
10266         Quote operand of "test -f".
10267         Say "recent enough" version of libc, not "version 2".
10268         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
10269         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
10270         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
10271         Remove check for btowc, isascii.
10272         Require AM_LANGINFO_CODESET.
10273
10274 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
10275
10276         * lib/regex.c, regex.h: Sync from libc.
10277         * lib/regcomp.c, regexec_internal.c, regex_internal.h, regexec.c:
10278         New files, synced from libc, except that regex_internal.h
10279         currently has a small porting fix.
10280
10281 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
10282
10283         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
10284         regex_internal.c, regexec.c.
10285         Add regex_internal.h too, but as a comment, since the libc version
10286         is currently broken in gnulib mode.
10287
10288 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10289
10290         Support programs like Emacs that use gnulib but not gettext.
10291         * MODULES.html.sh (Internationalization functions): Add gettext-h.
10292         * modules/gettext-h: New file.
10293         * modules/gettext (Files): Remove lib/gettext.h.
10294         (Depends-on): Add gettext-h.
10295         (Makefile.am): Remove lib_SOURCES.
10296         * modules/argmatch, modules/c-stack, modules/closeout:
10297         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
10298         * modules/execute, modules/file-type, modules/getaddrinfo:
10299         * modules/getopt, modules/human, modules/javacomp:
10300         * modules/javaexec, modules/mkdir-p, modules/obstack:
10301         * modules/openat, modules/pagealign_alloc, modules/pipe:
10302         * modules/quotearg, modules/regex, modules/rpmatch:
10303         * modules/unicodeio, modules/userspec, modules/version-etc:
10304         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
10305         * modules/xsetenv:
10306         Depend on gettext-h, not gettext.
10307
10308 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
10309
10310         * gnulib-tool (func_import): Add support for 'public domain' license.
10311         * modules/alloca, modules/atexit, modules/memmove:
10312         Now public domain, not GPL.
10313         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
10314         * modules/realloc, modules/strerror, modules/strtod:
10315         Now LGPL, not GPL.
10316
10317 2005-07-05  Bruno Haible  <bruno@clisp.org>
10318
10319         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
10320         autoconf CVS. Needed for mingw.
10321
10322 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10323
10324         Remove the dependency of the strftime module on the tzset module.
10325         * modules/strftime (Depends-on): Remove dependency on tzset.
10326
10327 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10328
10329         Remove the dependency of the strftime module on the tzset module.
10330         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
10331         gl_FUNC_TZSET_CLOBBER.
10332
10333 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10334
10335         Remove the dependency of the strftime module on the tzset module.
10336         * lib/strftime.c (my_strftime)
10337         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
10338         Copy the input structure, to work around some of the bug with
10339         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
10340         Solaris releases, you should also use the tzset module, but we won't
10341         require it as a dependency any more since we don't want LGPLed code
10342         to depend on GPLed code.
10343
10344 2005-07-02  Jim Meyering  <jim@meyering.net>
10345
10346         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
10347         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
10348         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
10349         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
10350
10351 2005-07-02  Jim Meyering  <jim@meyering.net>
10352
10353         * lib/backupfile.c (backup_args): Change a `0' to NULL.
10354
10355 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10356
10357         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
10358         declares only 'struct timespec;' (!).
10359
10360 2005-07-01  Jim Meyering  <jim@meyering.net>
10361
10362         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
10363         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
10364         * lib/save-cwd.c, tempname.c:
10365         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10366         and don't include <sys/file.h>).
10367
10368 2005-06-29  Jim Meyering  <jim@meyering.net>
10369
10370         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
10371         type name.  Use the variable name instead.
10372         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
10373         Likewise.
10374
10375 2005-06-28  Simon Josefsson  <jas@extundo.com>
10376
10377         * modules/check-version (Files): Add check-version.m4.
10378
10379 2005-06-28  Simon Josefsson  <jas@extundo.com>
10380
10381         * m4/check-version.m4: New file, suggested by Jim Meyering
10382         <jim@meyering.net>.
10383
10384 2005-06-28  Simon Josefsson  <jas@extundo.com>
10385
10386         * lib/check-version.h, check-version.c: New files.
10387
10388 2005-06-28  Simon Josefsson  <jas@extundo.com>
10389
10390         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
10391         collision with global variable.  Better indentation.  Don't
10392         increment buffer pointer beyond buffer end.  Based on comments
10393         from Paul Eggert <eggert@cs.ucla.edu>.
10394
10395         * lib/base64.h: Indent.
10396
10397 2005-06-28  Simon Josefsson  <jas@extundo.com>
10398
10399         * doc/gnulib.texi (Library version handling): New section.
10400
10401 2005-06-28  Jim Meyering  <jim@meyering.net>
10402
10403         * check-module (find_included_lib_files): Hard-code another
10404         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
10405         but modules/fts-lgpl (correctly) does not list those files.
10406
10407         * modules/canonicalize (Files): Add lib/pathmax.h.
10408
10409 2005-06-25  Simon Josefsson  <jas@extundo.com>
10410
10411         * modules/check-version: New file.
10412
10413 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
10414
10415         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
10416         initializer of struct addrinfo, as an indication that we don't
10417         care how many members the structure has.
10418
10419 2005-06-24  Derek Price  <derek@ximbiot.com>
10420         and Bruno Haible  <bruno@clisp.org>
10421
10422         Remove stat module & update lstat.
10423         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
10424         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
10425         * m4/stat.m4: Remove this file.
10426
10427 2005-06-24  Derek Price  <derek@ximbiot.com>
10428         and Bruno Haible  <bruno@clisp.org>
10429
10430         Remove stat module & update lstat.
10431         * lib/stat.c: Remove this file...
10432         (slash_aware_lstat): ...moving this content and its support...
10433         * lib/lstat.c (rpl_lstat): ...into here.
10434         * lib/lstat.h: New file.
10435
10436 2005-06-24  Derek Price  <derek@ximbiot.com>
10437         and Bruno Haible  <bruno@clisp.org>
10438
10439         Remove stat module & update lstat.
10440         * config/srclist.txt (libc sources): Remove stat.
10441
10442 2005-06-24  Derek Price  <derek@ximbiot.com>
10443         and Bruno Haible  <bruno@clisp.org>
10444
10445         Remove stat module & update lstat.
10446         * MODULES.html.sh (stat): Remove.
10447         * MODULES.html: Regenerated.
10448         * modules/lstat (Description): Correct function name.
10449         (Files): Add "lstat.h".
10450         (Depends-on): Remove stat, add xalloc, stat-macros.
10451         * modules/stat: Remove this file.
10452         (Include): Add "lstat.h", remove <sys/stat.h>.
10453
10454 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
10455
10456         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
10457         (ranged_convert): Don't save conversion in a temporary struct.
10458         This causes a warning with GCC 4.0.0, and anyway in the typical
10459         case it's not worth the extra 100 bytes or so of code.
10460         (ranged_convert, __mktime_internal): When calling a function via a
10461         pointer P, use P () rather than (*P) (), as we now assume C89 or
10462         better.
10463
10464 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
10465
10466         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
10467         "who -r" failed to give output.  Problem reported by Tim Waugh.
10468
10469         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
10470         (xcalloc): Use it to avoid needless tests.
10471         Problem reported by Jim Meyering.
10472
10473 2005-06-20  Derek Price  <derek@ximbiot.com>
10474
10475         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
10476         unnecessary for Autoconfs > 2.59c.
10477
10478 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
10479
10480         * lib/argp.h (__option_is_short): Check upper limit of
10481         __key. Isprint() requires its argument to have the value
10482         of an unsigned char or EOF.
10483
10484 2005-06-16  Jim Meyering  <jim@meyering.net>
10485
10486         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
10487         when either N or S is zero.
10488
10489 2005-06-16  Derek Price  <derek@ximbiot.com>
10490
10491         * m4/bison.m4: Declare YACC & YFLAGS precious.
10492
10493 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
10494
10495         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
10496         multibyte string or pattern, fall back on unibyte matching.
10497         Problem reported by James Youngman.
10498
10499 2005-06-08  Bruno Haible  <bruno@clisp.org>
10500
10501         * modules/csharpcomp: New file.
10502         * MODULES.html.sh (C#): Add csharpcomp.
10503
10504 2005-06-08  Bruno Haible  <bruno@clisp.org>
10505
10506         * m4/csharpcomp.m4: New file, from GNU gettext.
10507
10508 2005-06-08  Bruno Haible  <bruno@clisp.org>
10509
10510         * lib/csharpcomp.h: New file, from GNU gettext.
10511         * lib/csharpcomp.c: New file, from GNU gettext.
10512         * lib/csharpcomp.sh.in: New file, from GNU gettext.
10513
10514 2005-06-08  Bruno Haible  <bruno@clisp.org>
10515
10516         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
10517         warning on mingw.
10518
10519 2005-06-07  Derek Price  <derek@ximbiot.com>
10520
10521         Sync from CVS.
10522         * lib/glob_.h: Indent nested #ifdef.
10523
10524 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
10525
10526         Sync from coreutils.
10527         Use "file name" when talking about file names, instead of "filename"
10528         or "path", as per the GNU coding standards.
10529         * lib/mkdir-p.c: Renamed from makepath.c.
10530         (make_dir_parents): Renamed from make_path.  All callers changed.
10531         * lib/mkdir-p.h: Likewise.  All includers changed.
10532         * lib/filenamecat.c: Renamed from path-concat.c.
10533         (file_name_concat): Renamed from path_concat.  All callers changed.
10534         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
10535         * lib/filenamecat.h: Likewise.  All includers changed.
10536         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
10537         in comments or local variable names.
10538         * lib/basename.c: Likewise.
10539         * lib/canonicalize.c, canonicalize.h: Likewise.
10540         * lib/dirname.c, dirname.h: Likewise.
10541         * lib/euidaccess.c: Likewise.
10542         * lib/exclude.c: Likewise
10543         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
10544         * lib/fsusage.c, fsuage.h: Likewise.
10545         * lib/fts.c, fts_.h: Likewise.
10546         * lib/getcwd.c: Likewise.
10547         * lib/getloadavg.c: Likewise.
10548         * lib/mkstemp.c: Likewise.
10549         * lib/mountlist.c, mountlist.h: Likewise.
10550         * lib/openat.c, openat.h: Likewise.
10551         * lib/readlink-stub.c: Likewise.
10552         * lib/readutmp.c, readutmp.h: Likewise.
10553         * lib/rename.c: Likewise.
10554         * lib/rmdir.c: Likewise.
10555         * lib/same.c: Likewise.
10556         * lib/savedir.c: Likewise.
10557         * lib/stripslash.c: Likewise.
10558         * lib/tempname.c: Likewise.
10559         * lib/xreadlink.c: Likewise.
10560         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
10561         All uses changed.
10562         * lib/exclude.h: Likewise.
10563
10564         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
10565         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
10566         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
10567         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
10568         * lib/pathmax.h: Include <limits.h> unconditionally, since other
10569         files have been getting away with it for years (MORE/BSD 4.3
10570         is extinct now).
10571         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
10572         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
10573
10574         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
10575         Define to 256, not 255, as per modern POSIX.
10576
10577 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
10578
10579         Sync from coreutils.
10580         Use "file name" when talking about file names, instead of "filename"
10581         or "path", as per the GNU coding standards.
10582         * MODULES.html.sh: mkdir-p renamed from makepath.
10583         filenamecat renamed from path-concat.
10584         * modules/filenamecat: Renamed from modules/path-concat.
10585         (Files): filenamecat.h and filenamecat.c renamed from
10586         path-concat.h and path-concat.c.
10587         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
10588         (Include): filenamecat.h, not path-concat.h.
10589         * modules/mkdir-p: Renamed from modules/makepath.
10590         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
10591         makepath.c.
10592         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
10593         (Include): mkdir-p.h, not makepath.h.
10594
10595 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
10596
10597         Sync from coreutils.
10598         * m4/mkdir-p.m4: Renamed from makepath.m4.
10599         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
10600         Rename files from makepath.c to mkdir-p.c, and from
10601         makepath.h to mkdir-p.h.
10602         * m4/filenamecat.m4: Renamed from path-concat.m4.
10603         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
10604         Rename files from path-concat.c to filenamecat.c,
10605         and from path-concat.h to filenamecat.h.
10606         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
10607         "file name" in local variables or comments.
10608         * m4/rename.m4: Likewise.
10609
10610 2005-06-01  Bruno Haible  <bruno@clisp.org>
10611
10612         * modules/csharpexec: New file.
10613         * MODULES.html.sh (C#): New section.
10614
10615 2005-06-01  Bruno Haible  <bruno@clisp.org>
10616
10617         * m4/csharp.m4: New file, from GNU gettext.
10618         * m4/csharpexec.m4: New file, from GNU gettext.
10619
10620 2005-06-01  Bruno Haible  <bruno@clisp.org>
10621
10622         * lib/csharpexec.h: New file, from GNU gettext.
10623         * lib/csharpexec.c: New file, from GNU gettext.
10624         * lib/csharpexec.sh.in: New file, from GNU gettext.
10625
10626 2005-05-31  Derek Price  <derek@ximbiot.com>
10627             Paul Eggert  <eggert@cs.ucla.edu>
10628
10629         Sync from cvs.
10630         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
10631
10632 2005-05-31  Derek Price  <derek@ximbiot.com>
10633             Paul Eggert  <eggert@cs.ucla.edu>
10634
10635         Sync from cvs.
10636         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
10637
10638 2005-05-29  Derek Price  <derek@ximbiot.com>
10639
10640         * config/srclist.txt (glob_.h, glob.c): Add these files.
10641
10642 2005-05-29  Derek Price  <derek@ximbiot.com>
10643
10644         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
10645         * modules/glob: New file.
10646         * modules/getlogin_r: Add link to POSIX spec in description.
10647
10648 2005-05-29  Derek Price  <derek@ximbiot.com>
10649             Paul Eggert  <eggert@cs.ucla.edu>
10650
10651         * m4/glob.m4: New file.
10652
10653 2005-05-29  Derek Price  <derek@ximbiot.com>
10654             Paul Eggert  <eggert@cs.ucla.edu>
10655
10656         * lib/glob_.h, glob.c: New files.
10657
10658 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
10659
10660         * modules/fts (Files): Remove m4/inttypes-pri.m4.
10661         * modules/fts-lgpl (Depends-on): Remove gettext.
10662
10663 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
10664
10665         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
10666         and don't require gt_INTTYPES_PRI.
10667
10668 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
10669
10670         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
10671
10672         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
10673         the configuration hassle isn't worth it.
10674         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
10675         (LONGEST_MODIFIER, PRIuMAX): Remove.
10676
10677 2005-05-27  Bruno Haible  <bruno@clisp.org>
10678
10679         * lib/getlogin_r.h: Remove second include of <stddef.h>.
10680
10681 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
10682
10683         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
10684         _POSIX_PTHREAD_SEMANTICS for Solaris.
10685
10686 2005-05-25  Derek Price  <derek@ximbiot.com>
10687
10688         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
10689
10690 2005-05-25  Derek Price  <derek@ximbiot.com>
10691             Paul Eggert  <eggert@cs.ucla.edu>
10692
10693         * modules/getlogin_r: New files.
10694
10695 2005-05-25  Derek Price  <derek@ximbiot.com>
10696             Paul Eggert  <eggert@cs.ucla.edu>
10697
10698         * m4/getlogin_r.m4: New files.
10699
10700 2005-05-25  Derek Price  <derek@ximbiot.com>
10701             Paul Eggert  <eggert@cs.ucla.edu>
10702
10703         * lib/getlogin_r.c, getlogin_r.h: New files.
10704
10705 2005-05-25  Bruno Haible  <bruno@clisp.org>
10706             Derek Price  <derek@ximbiot.com>
10707
10708         * lib/getlogin_r.h: Simplify API documentation.
10709
10710 2005-05-23  Derek Price  <derek@ximbiot.com>
10711
10712         * modules/minmax (Files): Add m4/minmax.m4.
10713         (configure.ac): Add gl_MINMAX.
10714
10715 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
10716
10717         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
10718         so that unistd-safer.h (GPL'ed code) need not be included.
10719
10720 2005-05-22  Bruno Haible  <bruno@clisp.org>
10721
10722         * m4/minmax.m4: New file.
10723         Based on a patch by Derek Price <derek@ximbiot.com>.
10724
10725 2005-05-22  Bruno Haible  <bruno@clisp.org>
10726
10727         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
10728         (INT64_MIN): Fix definition.
10729         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
10730
10731         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
10732         NEED_SIGNED_INT_TYPES.
10733
10734         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
10735         HAVE_SYSTEM_INTTYPES.
10736
10737 2005-05-22  Bruno Haible  <bruno@clisp.org>
10738
10739         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
10740         Also include <sys/param.h> if it defines MIN, MAX.
10741         Based on a patch by Derek Price <derek@ximbiot.com>.
10742
10743 2005-05-21  Jim Meyering  <jim@meyering.net>
10744
10745         * modules/fts (Files): Add m4/inttypes-pri.m4.
10746         (Depends-on): Add lstat and remove gettext.  Alphabetize.
10747
10748 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
10749
10750         New fts module.
10751         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
10752         (setup_dir, free_dir): New functions.
10753         (enter_dir, leave_dir): Define trivial
10754         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
10755         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
10756         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
10757         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
10758         Move to fts-cycle.c.
10759         (fts_open): Use setup_dir.
10760         (fts_close): Use free_dir.
10761         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
10762         This adds a label and some gotos, but the alternatives were messier.
10763         Check for memory allocation failure when entering a dir.
10764         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
10765         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
10766         (FTS): New member fts_cycle, that is a union that contains the
10767         old active_dir_ht and cycle_state.  All uses changed to mention
10768         fts_cycle.ht and fts_cycle.state.
10769         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
10770         fts.c, with the following changes:
10771         (setup_dir, free_dir): New functions.
10772         (enter_dir): Now returns bool.  Return true if successful, false
10773         if memory exhausted.  All callers changed.
10774         Do not bother partly cleaning up on
10775         memory allocation failure; that is free_dir's job.
10776         However, free ad if hash_insert fails, to avoid memory leak.
10777         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
10778         fts->fts_options to see which union member to use.
10779
10780 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
10781
10782         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
10783         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
10784
10785 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
10786
10787         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
10788
10789 2005-05-20  Jim Meyering  <jim@meyering.net>
10790
10791         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
10792         Now a macro, to pacify GCC.
10793
10794 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
10795
10796         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
10797         of -1.
10798
10799 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
10800
10801         * lib/chown.c (rpl_chown): Return -1 on failure.
10802
10803 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
10804
10805         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
10806         Don't check for stddef.h.
10807         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
10808         don't use its results.
10809         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
10810         since we include them unconditionally.  Don't require
10811         AM_STDBOOL_H, since stdbool is a prerequisite.
10812         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
10813         since we assume C89 or better.
10814         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
10815         as we don't use their results.
10816         Don't check for fchdir, memmove, memset, strrchr, as we use
10817         them unconditionally.
10818         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
10819         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
10820
10821 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
10822
10823         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
10824         Include <stddef.h> unconditionally, since we assume C89 now.
10825         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
10826         * lib/fts.c: Include fts_.h first, to check interface.
10827         Do not include intprops.h; no longer needed.
10828         Include cycle-check.h and hash.h, since fts_.h no longer does.
10829         Remove unnecessary casts of closedir to void.
10830         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
10831         decide whether to decrement nlinks.
10832         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
10833         (FTS): Use struct hash_table * instead of Hash_table, so that
10834         we no longer need to include hash.h here.
10835
10836 2005-05-18  Jim Meyering  <jim@meyering.net>
10837
10838         * modules/dirfd (License): Change to LGPL.  Most of the code
10839         is already in the public domain.
10840
10841 2005-05-18  Jim Meyering  <jim@meyering.net>
10842
10843         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
10844         Reported by Yoann Vandoorselaere.
10845
10846 2005-05-17  Jim Meyering  <jim@meyering.net>
10847
10848         * m4/fts.m4: New file, from coreutils.
10849
10850 2005-05-17  Jim Meyering  <jim@meyering.net>
10851
10852         * lib/fts.c, fts_.h: New files, from coreutils.
10853
10854 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10855
10856         Sync from coreutils.
10857         * m4/unlinkdir.m4: New file.
10858
10859 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10860
10861         Sync from coreutils.
10862         * lib/unlinkdir.c, unlinkdir.h: New files.
10863         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
10864         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
10865         White space changes only.
10866         * lib/makepath.c (make_path): Port to hosts where leading "//" is
10867         special.
10868         * lib/yesno.c: Include getline.h, not ctype.h.
10869         (yesno): Don't remove leading white space; POSIX doesn't allow it.
10870         Use getline to remove arbitrary restriction on response length.
10871
10872 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10873
10874         * config/srclist-update: Spell out "Street" in FSF postal
10875         mail address; this is the style the FSF seems to prefer.
10876
10877         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
10878         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
10879         this updates FSF postal mail address.
10880
10881         Sync from coreutils.
10882         * modules/unlinkdir: New file.
10883         * modules/yesno (Depends-on): Add getline.
10884         * MODULES.html.sh (File system functions): Add unlinkdir.
10885
10886 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
10887
10888         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
10889         lib/strsep.h:
10890         Change the initial comment to refer to GPL, not LGPL.
10891         gnulib-tool will change it to LGPL as needed.
10892
10893         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
10894         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
10895         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
10896         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
10897         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
10898         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
10899         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
10900         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
10901         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
10902         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
10903         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
10904         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
10905         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
10906         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
10907         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
10908         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
10909         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
10910         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
10911         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
10912         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
10913         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
10914         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
10915         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
10916         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
10917         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
10918         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
10919         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
10920         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
10921         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
10922         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
10923         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
10924         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
10925         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
10926         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
10927         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
10928         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
10929         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
10930         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
10931         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
10932         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
10933         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
10934         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
10935         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
10936         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
10937         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
10938         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
10939         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
10940         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
10941         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
10942         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
10943         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
10944         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
10945         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
10946         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
10947         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
10948         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
10949         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
10950         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
10951         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
10952         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
10953         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
10954         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
10955         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
10956         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
10957         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
10958         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
10959         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
10960         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
10961         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
10962         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
10963         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
10964         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
10965         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
10966         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
10967         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
10968         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
10969         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
10970         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
10971         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
10972         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
10973         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
10974         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
10975         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
10976         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
10977         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
10978         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
10979         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
10980         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
10981         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
10982         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
10983         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
10984         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
10985         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
10986         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
10987         lib/yesno.c, lib/yesno.h:
10988         Update FSF postal mail address.
10989
10990 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
10991
10992         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
10993         tests/test-memmem.c, tests/test-stpncpy.c:
10994         Update FSF postal mail address.
10995
10996 2005-05-13  Bruno Haible  <bruno@clisp.org>
10997
10998         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
10999         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
11000         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
11001         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
11002         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
11003         Add support for 64-bit integers in the MSVC compiler.
11004
11005 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11006
11007         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
11008
11009 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
11010
11011         * gnulib-tool (func_import): Sort and uniquify recommended includes.
11012
11013 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
11014
11015         * doc/getdate.texi (General date syntax): Don't say that date
11016         date --iso-8601=ns generates acceptable dates; it doesn't yet.
11017         Problem reported by Nic Ferrier.
11018
11019 2005-05-10  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
11020
11021         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
11022         specified in ai_socktype. Fix invalid ai_protocol
11023         check. ai_protocol is usually set to 0 or depending on
11024         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
11025         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
11026         ai_socktype / ai_protocol in the returned addrinfo structure.
11027
11028 2005-05-10  Simon Josefsson  <jas@extundo.com>
11029
11030         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
11031         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11032
11033 2005-05-10  Karl Berry  <karl@gnu.org>
11034
11035         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
11036         (from http://www.gnu.org/licenses).
11037         * doc/COPYING.LIB: also rename to COPYING.LESSER.
11038         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
11039         fdl.texi suffices.
11040
11041 2005-05-10  Karl Berry  <karl@gnu.org>
11042
11043         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
11044         (COPYING.DOC): remove.
11045
11046         * config/srclist-update: new FSF address.
11047
11048 2005-05-10  Derek Price  <derek@ximbiot.com>
11049
11050         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
11051         possible.
11052
11053 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
11054             Bruno Haible  <bruno@clisp.org>
11055
11056         * modules/inet_ntop: New file.
11057         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11058         inet_ntop.
11059
11060 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
11061             Bruno Haible  <bruno@clisp.org>
11062
11063         * m4/inet_ntop.m4: New file.
11064
11065 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
11066             Bruno Haible  <bruno@clisp.org>
11067
11068         * lib/inet_ntop.h: New file.
11069         * lib/inet_ntop.c: New file, from glibc with modifications.
11070
11071 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
11072
11073         * modules/time_r (License): Change to LGPL.
11074         * modules/extensions (License): Change to LGPL.  Actually,
11075         the license is more permissive than that, but currently gnulib-tool
11076         doesn't know how to handle more-permissive licenses.
11077
11078         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
11079         Problem reported by Dave Love.
11080
11081 2005-05-08  Jim Meyering  <jim@meyering.net>
11082
11083         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
11084         blank.
11085
11086 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
11087
11088         * modules/argmatch (Depends-on): Add stdbool.
11089         * modules/backupfile (Depends-on): Likewise.
11090         * modules/chdir-long (Depends-on): Likewise.
11091         * modules/closeout (Depends-on): Likewise.
11092         * modules/cycle-check (Depends-on): Likewise.
11093         * modules/dirname (Depends-on): Likewise.
11094         * modules/fnmatch (Depends-on): Likewise.
11095         * modules/fsusage (Depends-on): Likewise.
11096         * modules/fwriteerror (Depends-on): Likewise.
11097         * modules/getcwd (Depends-on): Likewise.
11098         * modules/getloadavg (Depends-on): Likewise.
11099         * modules/hard-locale (Depends-on): Likewise.
11100         * modules/makepath (Depends-on): Likewise.
11101         * modules/mountlist (Depends-on): Likewise.
11102         * modules/nanosleep (Depends-on): Likewise.
11103         * modules/posixtm (Depends-on): Likewise.
11104         * modules/quotearg (Depends-on): Likewise.
11105         * modules/readtokens (Depends-on): Likewise.
11106         * modules/readtokens0 (Depends-on): Likewise.
11107         * modules/readutmp (Depends-on): Likewise.
11108         * modules/save-cwd (Depends-on): Likewise.
11109         * modules/strftime (Depends-on): Likewise.
11110         * modules/userspec (Depends-on): Likewise.
11111         * modules/utimecmp (Depends-on): Likewise.
11112         * modules/xgetcwd (Depends-on): Likewise.
11113         * modules/xnanosleep (Depends-on): Likewise.
11114         * modules/xstrtod (Depends-on): Likewise.
11115         * modules/yesno (Depends-on): Likewise.
11116
11117 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
11118
11119         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
11120         needless checks.
11121
11122 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11123
11124         Merge from coreutils.  Among other things,
11125         add bulletproofing for cases where stdin, stdout, or stderr are closed.
11126         * lib/fd-safer.c: New file.
11127         * lib/fcntl-safer.h, open-safer.c: Remove.
11128         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
11129         * lib/dup-safer.c: Include unistd-safer.h first.
11130         Don't include errno.h.
11131         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
11132         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
11133         * lib/file-type.c: Rely on file-type.h change.
11134         * lib/getloadavg.c: Include unistd-safer.h.
11135         (getloadavg): Use safer open.
11136         * lib/getusershell.c: Include "stdio-safer.h".
11137         (getusershell): Use safer fopen.
11138         * lib/long-options.c (long_options): Use NULL rather than 0.
11139         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
11140         'free'.
11141         * lib/modechange.c: Likewise.
11142         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
11143         (MODE_DONE): New constant.
11144         (struct mode_change): Remove 'next' member.
11145         (make_node_op_equals): New function; like the old one of the
11146         same name, except it allocates an array.
11147         (mode_compile, mode_create_from_ref): Use it.
11148         (mode_compile): Allocate result as an array, not a linked list.
11149         Parse octal string ourself, so that we catch mistakes like "+0".
11150         (mode_adjust): Arg is an array, not a linked list.
11151         * lib/modechange.c: Include stat-macros.h, xalloc.h.
11152         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
11153         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
11154         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
11155         Remove.  This is now stat-macros.h's job.
11156         (talloc): Remove.  All callers replaced by xalloc, so that
11157         our invokers don't have to worry about reporting memory failures.
11158         (make_node_op_equals): Remove.
11159         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
11160         New constants.
11161         (struct mode_change): Moved here from modechange.h.
11162         (mode_append_entry): Remove.
11163         (mode_compile): Remove MASKED_OPS arg, since it encouraged
11164         apps to have incorrect behavior.  Use simpler algorithm for head
11165         and tail.  Don't futz with umask; that's now the job of mode_adjust.
11166         Detect more invalid usages rather than having somewhat-random behavior.
11167         Don't insert an "a=" action, as that leads to incorrect behavior.
11168         (mode_compile, mode_create_from_ref): Return NULL on error instead
11169         of an enum, since now there's only one way to have an error.  All
11170         callers changed.
11171         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
11172         at the correct time.  Simplify calculation of "+u" and its ilk.
11173         Don't mishandle "+X".
11174         (mode_free): Remove "register" and localize decls.
11175         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
11176         (struct mode_change): Move to modechange.c; callers don't
11177         need to see this stuff.
11178         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
11179         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
11180         (mode_change, mode_adjust): Reflect the new signatures noted above.
11181         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
11182         that might redefine system include files.
11183         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
11184         (my_usleep): Use NULL rather than (void *) 0.
11185         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
11186         Use siginterrupt to specify that system calls should be interrupted.
11187         (rpl_nanosleep): Move initialization of suspended closer to call of
11188         my_usleep.
11189         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
11190         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
11191         (desirable_utmp_entry): New function.
11192         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
11193         using x2nrealloc, to simplify logic.
11194         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
11195         size calculation.  Do not assume utmp file is a regular file.
11196         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
11197         (READ_UTMP_CHECK_PIDS): New constant.
11198         * lib/save-cwd.c: Include unistd-safer.h.
11199         (save_cwd): Use fd_safer.
11200         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
11201         [!_LIBC] Include "stat-macros.h" instead.
11202         * lib/unistd-safer.h (fd_safer): New decl.
11203
11204 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11205
11206         * modules/getloadavg (Depends-on): Add unistd-safer.
11207         * modules/getusershell (Depends-on): Add stdio-safer.
11208         * modules/lstat (Depends-on): Remove xalloc.
11209         * modules/mkstemp (Depends-on): Add stat-macros.
11210         * modules/modechange (Depends-on): Remove xstrtol.
11211         Add stat-macros, xalloc.
11212         * modules/save-cwd (Depends-on): Add unistd-safer.
11213         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
11214         * modules/unistd-safer (Files): Add lib/fd-safer.c
11215         (Makefile.am): Remove lib_SOURCES.
11216
11217         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
11218         Remove fcntl-safer; unistd-safer supersedes it.
11219
11220 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11221
11222         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
11223         AC_HEADER_STAT.
11224         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
11225         (gl_PREREQ_CHOWN): Remove.
11226         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
11227         it.  Don't require AC_HEADER_STAT.
11228         (gl_PREREQ_LSTAT): Remove.
11229         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
11230         Don't require AC_HEADER_STAT.
11231         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
11232         (gl_PREREQ_RMDIR): Remove.
11233         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
11234         mention stat-macros.h or AC_HEADER_STAT, since we'll make
11235         the stat-macros module a prerequisite.
11236         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
11237         * m4/filemode.m4 (gl_FILEMODE): Likewise.
11238         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
11239         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
11240         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
11241         variable names.
11242         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
11243         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
11244         variable prefixes.
11245         * m4/fcntl-safer.m4: Remove.
11246         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
11247         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
11248         Invoke gl_PREREQ_FD_SAFER.
11249         (gl_PREREQ_FD_SAFER): New macro.
11250         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
11251         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
11252         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
11253         Remove duplicate call to AC_LIBOBJ(readutmp).
11254         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
11255
11256         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
11257         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
11258
11259 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11260
11261         * MODULES.html.sh (Misc): Add byteswap.
11262
11263 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
11264
11265         * modules/getcwd (Depends-on): Add extensions.
11266         * modules/openat (Depends-on): Likewise.
11267
11268 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
11269
11270         * modules/byteswap: New file.
11271
11272 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
11273
11274         * m4/byteswap.m4: New file.
11275
11276 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
11277
11278         * lib/byteswap_.h: New file.
11279
11280 2005-04-25  Karl Berry  <karl@gnu.org>
11281
11282         * m4/gettext.m4: Update from GNU gettext 0.14.4.
11283
11284 2005-04-25  Albert Chin  <china@thewrittenword.com>
11285
11286         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
11287         Toolkit C bug.
11288
11289 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
11290
11291         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
11292         (func_ln_if_changed) Remove forcibly for no error message
11293         in case file does not exist.
11294
11295 2005-04-19  Simon Josefsson  <jas@extundo.com>
11296
11297         * gnulib-tool (Options): Make --symlink mean --symbolic.
11298
11299 2005-04-18  Oskar Liljeblad <oskar@osk.mine.nu>
11300
11301         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
11302
11303 2005-04-16  Simon Josefsson  <jas@extundo.com>
11304
11305         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
11306
11307 2005-04-15  Simon Josefsson  <jas@extundo.com>
11308
11309         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
11310
11311 2005-04-15  Simon Josefsson  <jas@extundo.com>
11312
11313         * gnulib-tool: Rename --symlink to --symbolic.
11314
11315 2005-04-15  Oskar Liljeblad <oskar@osk.mine.nu>
11316
11317         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
11318         symbolic links to files instead of copying/moving.  Add --aux-dir,
11319         specifying directory relative --dir where auxiliary build tools
11320         are placed.
11321
11322 2005-04-14  Bruno Haible  <bruno@clisp.org>
11323
11324         * modules/allocsa (License): Change to LGPL.
11325         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
11326
11327 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
11328
11329         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
11330         that "UTC +1 second" continues to work.  Problem reported
11331         by Dmitry V. Levin.
11332         (relunit_snumber): New rule.
11333         (relunit): Use it.
11334
11335 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
11336
11337         * lib/getdate.y (universal_time_zone_table): New constant.
11338         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
11339         universal_time_zone_table.
11340         (lookup_zone): Prefer universal_time_zone_table to
11341         local_time_zone_table, so that "GMT" time stamps are allowed in
11342         London during the summer.  Problem reported by Ian Abbott.
11343
11344 2005-04-12  Jim Meyering  <jim@meyering.net>
11345
11346         * lib/human.c (humblock): Set *options even when returning due to
11347         xstrtoumax conversion failure.  Thanks to a used-uninitialized
11348         warning from gcc-4.
11349
11350 2005-04-09  Jim Meyering  <jim@meyering.net>
11351
11352         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
11353         -Wuninitialized: initialize tm0.tm_year.
11354
11355 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
11356
11357         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
11358         count, since there's no maximum.  All uses changed.
11359         Add member dsts_seen.
11360         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
11361         not being INT_MAX.
11362         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
11363         Use pc_rels_seen to decide whther a date is absolute.
11364
11365         * lib/getdate.y (number): Don't overwrite year.
11366         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
11367         check.
11368
11369 2005-04-02  Simon Josefsson  <jas@extundo.com>
11370
11371         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
11372         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
11373
11374 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
11375
11376         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
11377         where no absolute path name can be longer than PATH_MAX.
11378
11379 2005-03-27  Jim Meyering  <jim@meyering.net>
11380
11381         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
11382
11383 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
11384
11385         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
11386         "one's complement" -> "ones' complement" in comment, as per Knuth.
11387         "value of type" -> "type or expression" in comment.
11388         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
11389
11390 2005-03-26  Jim Meyering  <jim@meyering.net>
11391
11392         Comment nits.
11393         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
11394         Correct typos: s/or/of/.
11395
11396 2005-03-26  Jim Meyering  <jim@meyering.net>
11397
11398         * modules/check-include-files: Move to ../ and rename to...
11399         * check-module: ...this.
11400
11401 2005-03-25  Jim Meyering  <jim@meyering.net>
11402
11403         * modules/xvasprintf (Files): Add xalloc.h.
11404
11405 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
11406
11407         * modules/gettext (Files): config/config.rpath ->
11408         build-aux/config.rpath
11409         * modules/iconv (Files): Likewise.
11410         Problem reported by Oskar Liljeblad.
11411
11412 2005-03-23  Jim Meyering  <jim@meyering.net>
11413
11414         * modules/check-include-files: New script to check for
11415         missing dependencies, multiple includes, etc.
11416
11417         * modules/c-strtold (Depends-on): Add xalloc.
11418         * modules/c-strtod (Depends-on): Add xalloc.
11419         * modules/hash (Depends-on): Add xalloc.
11420         (Files): Remove lib/xalloc.h.
11421
11422         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
11423         * modules/userspec (Files): Add lib/inttostr.h.
11424
11425 2005-03-23  Jim Meyering  <jim@meyering.net>
11426
11427         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
11428
11429 2005-03-22  Jim Meyering  <jim@meyering.net>
11430
11431         * modules/stat-macros: New module.
11432         * modules/canonicalize, modules/euidaccess, modules/file-type,
11433         * modules/filemode, modules/lchown, modules/makepath,
11434         * modules/rmdir, modules/stat: Depend on new stat-macros module
11435         rather than listing lib/stat-macros.h manually.
11436         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
11437
11438 2005-03-22  Jim Meyering  <jim@meyering.net>
11439
11440         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
11441
11442 2005-03-22  Bruno Haible  <bruno@clisp.org>
11443
11444         * config/srclist.txt: Replace target directory 'config' with
11445         'build-aux'.
11446         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
11447         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
11448         ../build-aux/.
11449
11450 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
11451
11452         * modules/chdir-long (Depends-on): Add mempcpy.
11453
11454         * modules/acl, modules/backupfile, modules/c-strtod,
11455         modules/c-strtold, modules/canon-host, modules/canonicalize,
11456         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
11457         modules/exclude, modules/exitfail, modules/file-type,
11458         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
11459         modules/getdate, modules/getline, modules/getpagesize,
11460         modules/getpass, modules/getugroups, modules/group-member,
11461         modules/hard-locale, modules/hash, modules/human, modules/idcache,
11462         modules/inttostr, modules/long-options, modules/makepath,
11463         modules/md5, modules/memcasecmp, modules/memcoll,
11464         modules/modechange, modules/mountlist, modules/path-concat,
11465         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
11466         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
11467         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
11468         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
11469         modules/strftime, modules/strndup, modules/strverscmp,
11470         modules/timespec, modules/unlocked-io, modules/userspec,
11471         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
11472         modules/yesno:
11473         Remove lib_SOURCES line from Makefile.am section, as this is now
11474         done automatically by the corresponding Autoconf macro.
11475
11476 2005-03-21  Jim Meyering  <jim@meyering.net>
11477
11478         Changes imported from coreutils.
11479
11480         * lib/cycle-check.c: Don't include xalloc.h.
11481
11482         * lib/path-concat.c: Don't include assert.h.
11483         (path_concat): Remove assertion that would have triggered
11484         for ABASE starting with more than one slash.
11485         Reported by Andreas Schwab.
11486
11487         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
11488         properly when ABASE is an absolute file name.
11489         Correct the description of this function.
11490         Include <assert.h>.
11491         Add an assertion and a test driver.
11492         This fixes a bug introduced on 2004-07-02.
11493         Andreas Schwab reported the resulting failure of cp --parents:
11494         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
11495
11496 2005-03-21  Jim Meyering  <jim@meyering.net>
11497
11498         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
11499         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
11500
11501 2005-03-21  Jim Meyering  <jim@meyering.net>
11502         and  Paul Eggert  <eggert@cs.ucla.edu>
11503
11504         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
11505         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
11506         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
11507         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
11508         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
11509         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
11510         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
11511         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
11512         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
11513         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
11514         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
11515         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
11516         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
11517         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
11518         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
11519         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
11520         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
11521         for these modules.
11522
11523 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
11524
11525         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
11526         (which shouldn't happen), generate nothing instead of returning 0
11527         immediately, so that nstrftime (NULL, ...) doesn't return 0.
11528
11529 2005-03-16  Bruno Haible  <bruno@clisp.org>
11530
11531         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
11532         HAVE_LONGLONG_64BIT.
11533
11534 2005-03-16  Bruno Haible  <bruno@clisp.org>
11535
11536         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
11537         HAVE_LONGLONG_64BIT.
11538
11539 2005-03-16  Bruno Haible  <bruno@clisp.org>
11540
11541         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
11542         HAVE_LONGLONG_64BIT.
11543
11544 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
11545
11546         * lib/strftime.c (my_strftime): Prepend space to format so that we can
11547         reliably distinguish strftime failure from empty output on POSIX
11548         hosts.
11549
11550 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
11551
11552         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
11553         (iconv_string): Don't guess a size-zero buffer, as that might cause
11554         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
11555         result would be 'too large', where 'too large' is (heuristically)
11556         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
11557         overflow concerns.  This will prevent some unwanted malloc failures
11558         when the inputs are very large.
11559
11560 2005-03-15  Karl Berry  <karl@gnu.org>
11561
11562         * config/srclist.txt (config.rpath): from gettext.
11563         * config/config.rpath: update.
11564
11565 2005-03-15  Bruno Haible  <bruno@clisp.org>
11566
11567         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
11568         to 'negate'.
11569
11570         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
11571         variable.
11572
11573         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
11574         results.
11575
11576 2005-03-14  Simon Josefsson  <jas@extundo.com>
11577
11578         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
11579         <fx@gnu.org>.
11580
11581 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
11582
11583         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
11584         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
11585         intprops.h.
11586         * lib/strtol.c: Likewise.
11587
11588 2005-03-14  Jim Meyering  <jim@meyering.net>
11589
11590         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
11591         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
11592         to be nonzero so that we (and caller) can detect the difference
11593         between a valid zero-length expansion and an error return, even
11594         when the underlying strftime fails before writing anything into
11595         that location.
11596
11597 2005-03-14  Bruno Haible  <bruno@clisp.org>
11598
11599         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
11600         Update from GNU gettext 0.14.3.
11601
11602 2005-03-10  Jim Meyering  <jim@meyering.net>
11603
11604         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
11605
11606 2005-03-10  Jim Meyering  <jim@meyering.net>
11607
11608         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
11609         so that this module works on systems without fchdir.
11610
11611 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
11612
11613         Factor int-properties macros into a single file, except for
11614         glibc-related files.
11615         * lib/intprops.h: New file.
11616         * lib/getloadavg.c: Include it instead of limits.h.
11617         (INT_STRLEN_BOUND): Remove.
11618         * lib/human.c: Include intprops.h.
11619         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
11620         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
11621         302/1000.
11622         * lib/inttostr.h: Include intprops.h instead of limits.h.
11623         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
11624         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
11625         for consistency with intprops.h.
11626         (time_t_is_integer, twos_complement_arithmetic): Use them.
11627         * lib/sig2str.h: Include <signal.h>, intprops.h.
11628         (INT_STRLEN_BOUND): Remove.
11629         * lib/strftime.c (TYPE_SIGNED): Remove.
11630         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
11631         * lib/strtol.c: Adjust comments to match intprops.h.
11632         * lib/userspec.c: Include intprops.h.
11633         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
11634         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
11635         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
11636         instead of rolling our own expressions.
11637         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
11638
11639         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
11640         instead of int.
11641         (my_strftime): Do not mishandle years close to INT_MAX, by doing
11642         the right thing even if adding 1900 would overflow.  Similarly
11643         for tm_mon + 1 and tm_yday + 1.
11644         Make %Y always equivalent to %C%y, and similarly for %G and %g.
11645         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
11646         (DO_SIGNED_NUMBER): New macro.
11647         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
11648
11649 2005-03-07  Bruno Haible  <bruno@clisp.org>
11650
11651         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
11652
11653 2005-03-07  Bruno Haible  <bruno@clisp.org>
11654
11655         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
11656
11657 2005-03-04  Derek R. Price  <derek@ximbiot.com>
11658
11659         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
11660         (func_import): Only replace files via --import when they have actually
11661         changed.
11662
11663 2005-03-03  Derek R. Price  <derek@ximbiot.com>
11664
11665         * m4/mmap-anon.m4: New file.
11666         * m4/pagealign_alloc.m4: New file.
11667
11668 2005-03-03  Derek R. Price  <derek@ximbiot.com>
11669             Bruno Haible  <bruno@clisp.org>
11670
11671         * modules/pagealign_alloc: New file.
11672         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
11673
11674 2005-03-03  Derek R. Price  <derek@ximbiot.com>
11675             Bruno Haible  <bruno@clisp.org>
11676
11677         * lib/pagealign_alloc.h: New file.
11678         * lib/pagealign_alloc.c: New file.
11679
11680 2005-03-03  Bruno Haible  <bruno@clisp.org>
11681
11682         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
11683         Use an all-permissive copyright notice, recommended by RMS.
11684
11685 2005-03-02  Bruno Haible  <bruno@clisp.org>
11686
11687         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
11688         of AIX, the replacement has to be done only after <string.h> is
11689         included, therefore not in config.h. stpncpy.h does the replacement,
11690         and stpncpy.c uses it.
11691
11692 2005-03-02  Bruno Haible  <bruno@clisp.org>
11693
11694         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
11695         stpncpy.c uses it.
11696
11697 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11698
11699         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
11700         The workaround isn't strictly needed for POSIX conformance, and
11701         it's too much of a pain to configure and maintain.  We'll ask
11702         people to fix their kernels instead.
11703         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
11704         (NANOSLEEP_BUG_WORKAROUND): Remove.
11705         (xnanosleep): Remove the workaround.
11706
11707 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11708
11709         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
11710         Reported by Derek Price.
11711         (Include): Add "timespec.h".
11712
11713         * modules/xnanosleep (Depends-on): Remove gethrxtime.
11714
11715 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11716
11717         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
11718         to detect nanosleep bug.
11719
11720 2005-03-01  Bruno Haible  <bruno@clisp.org>
11721
11722         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
11723
11724 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
11725
11726         * modules/gethrxtime: New file.
11727         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
11728         (Depends-on): Add gethrxtime.
11729         (configure.ac): Add gl_XNANOSLEEP.
11730         (Makefile.am): Remove lib_SOURCES line.
11731
11732 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
11733
11734         * m4/gethrxtime.m4, xnanosleep.m4: New files.
11735         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
11736
11737 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
11738
11739         * lib/gethrxtime.h, gethrxtime.c, xtime.h: New files.
11740         * lib/timespec.h (gettime): Return void, since it always
11741         succeeds now.  All uses changed.
11742         * lib/gettime.c (gettime) Likewise.
11743         [HAVE_NANOTIME]: Prefer nanotime.
11744         Assume gettimeofday succeeds, as POSIX requires.
11745         Assime time () succeeds, since other code already does.
11746         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
11747         (timespec_subtract): Remove.
11748         (NANOSLEEP_BUG_WORKAROUND): New constant.
11749         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
11750         things considerably.  Use it only on GNU/Linux hosts, since the
11751         workaround shouldn't be needed elsewhere.
11752
11753 2005-02-24  Bruno Haible  <bruno@clisp.org>
11754
11755         * modules/gettext (Files): Add m4/glibc2.m4.
11756
11757 2005-02-24  Bruno Haible  <bruno@clisp.org>
11758
11759         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
11760         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
11761         * m4/progtest.m4:
11762         Update from GNU gettext 0.14.2.
11763         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
11764
11765 2005-02-24  Bruno Haible  <bruno@clisp.org>
11766
11767         * lib/localcharset.c: Update from GNU gettext 0.14.2.
11768         * lib/config.charset: Update from GNU gettext 0.14.2.
11769
11770 2005-02-24  Bruno Haible  <bruno@clisp.org>
11771
11772         * lib/gettext.h: Update from GNU gettext 0.14.2.
11773
11774 2005-02-23  Simon Josefsson  <jas@extundo.com>
11775
11776         * m4/iconvme.m4: New file.
11777
11778 2005-02-23  Jim Meyering  <jim@meyering.net>
11779
11780         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
11781         change.
11782         Thanks to Bruno Haible for catching it.
11783
11784 2005-02-22  Simon Josefsson  <jas@extundo.com>
11785
11786         * modules/iconvme: New file.
11787
11788         * MODULES.html.sh: Add iconvme.
11789
11790 2005-02-22  Simon Josefsson  <jas@extundo.com>
11791
11792         * lib/iconvme.h, iconvme.c: New files, from libc.
11793
11794 2005-02-22  Simon Josefsson  <jas@extundo.com>
11795
11796         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
11797
11798 2005-02-22  Jim Meyering  <jim@meyering.net>
11799
11800         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
11801         s/ifndef/ifdef/.
11802
11803 2005-02-20  Neil Conway  <neilc@samurai.com>
11804
11805         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
11806         returned by OSX/Darwin if the specified buffer is not large
11807         enough for the hostname.
11808
11809 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11810
11811         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
11812         pass it to _help, otherwise the latter coredumps trying to
11813         dereference state.root_argp.
11814
11815 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
11816
11817         * modules/chdir-long (Depends-on): Add memrchr.
11818         * modules/memrchr (Files): Add lib/memrchr.h.
11819         (Include): "memrchr.h".
11820
11821 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
11822
11823         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
11824
11825 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
11826
11827         * lib/memrchr.h: New file.
11828         * lib/chdir-long.c: Include it.
11829         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
11830         Don't bother including stddef.h.
11831
11832 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
11833
11834         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
11835         inclusion.
11836         Include <sys/types.h>, for dev_t.
11837         (ME_DUMMY, ME_REMOTE): Move from here....
11838         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
11839         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
11840         Dmitry V. Levin.
11841         Include mountlist.h first, to test the interface.
11842
11843 2005-01-29  Bruno Haible  <bruno@clisp.org>
11844
11845         * lib/progname.c (program_name): Initialize.
11846         Needed when linking statically on MacOS X.
11847
11848 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
11849
11850         Sync from coreutils.
11851         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
11852         (Depends-on): Add c-strtod.
11853         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
11854
11855 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
11856
11857         Sync from coreutils.
11858         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
11859
11860         Remove files that are specific to coreutils.
11861         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
11862
11863 2005-01-28  Bruno Haible  <bruno@clisp.org>
11864
11865         * modules/javacomp: New file.
11866         * MODULES.html.sh (Java): Add javacomp.
11867
11868 2005-01-28  Bruno Haible  <bruno@clisp.org>
11869
11870         * m4/javacomp.m4: New file, from GNU gettext.
11871
11872 2005-01-28  Bruno Haible  <bruno@clisp.org>
11873
11874         * lib/javacomp.sh.in: New file, from GNU gettext.
11875         * lib/javacomp.h: New file, from GNU gettext.
11876         * lib/javacomp.c: New file, from GNU gettext.
11877
11878 2005-01-26  Simon Josefsson  <jas@extundo.com>
11879
11880         * lib/gai_strerror.c: Use GPL in header.
11881
11882 2005-01-26  Bruno Haible  <bruno@clisp.org>
11883
11884         * modules/javaexec: New file.
11885         * MODULES.html.sh (Java): Add javaexec.
11886
11887 2005-01-26  Bruno Haible  <bruno@clisp.org>
11888
11889         * m4/javaexec.m4: New file, from GNU gettext.
11890
11891 2005-01-26  Bruno Haible  <bruno@clisp.org>
11892
11893         * lib/javaexec.sh.in: New file, from GNU gettext.
11894         * lib/javaexec.h: New file, from GNU gettext.
11895         * lib/javaexec.c: New file, from GNU gettext.
11896
11897 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11898
11899         * modules/lchown (Depends-on): Remove lchown.h
11900
11901 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11902
11903         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
11904         must be defined if the header file was not found, in order
11905         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
11906
11907 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11908
11909         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
11910         initializers for struct pentry_state.
11911         (__argp_error): Check return value of __asprintf
11912         (__argp_failure): Translate error message
11913
11914         * lib/argp-parse.c: Removed braces around the expansion of N_()
11915
11916 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11917
11918         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
11919         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
11920         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
11921         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
11922         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
11923         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
11924         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
11925         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
11926         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
11927         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
11928         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
11929         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
11930         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
11931         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
11932         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
11933         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
11934         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
11935         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
11936         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
11937         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
11938         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
11939         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
11940         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
11941         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
11942         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
11943         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
11944         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
11945         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
11946         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
11947         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
11948         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
11949         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
11950         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
11951         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
11952         xstrtol.m4, xstrtoumax.m4, yesno.m4:
11953         Use an all-permissive copyright notice, recommended by RMS.
11954
11955 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
11956
11957         * modules/chdir-long (Depends-on): Remove mempcpy.
11958
11959 2005-01-21  Jim Meyering  <jim@meyering.net>
11960
11961         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
11962         same value as for Solaris 9.
11963
11964         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
11965         component length.  This included changing the parameter to be
11966         of type `char *' rather than `char const *'.
11967         * lib/chdir-long.h (chdir_long): Update prototype.
11968
11969         * lib/openat.c (fdopendir, fstatat): New functions.
11970         * lib/openat.h: Include headers required for use of DIR and struct
11971         stat.
11972         [AT_SYMLINK_NOFOLLOW]: Define.
11973         (fdopendir, fstatat): Add prototypes.
11974
11975 2005-01-21  Bruno Haible  <bruno@clisp.org>
11976
11977         * modules/classpath: New file.
11978         * MODULES.html.sh (Java): Add classpath.
11979
11980 2005-01-21  Bruno Haible  <bruno@clisp.org>
11981
11982         * lib/classpath.h: New file, from GNU gettext.
11983         * lib/classpath.c: New file, from GNU gettext.
11984
11985 2005-01-20  Simon Josefsson  <jas@extundo.com>
11986
11987         * modules/version-etc-fsf: New file.
11988
11989 2005-01-20  Simon Josefsson  <jas@extundo.com>
11990
11991         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
11992         * lib/version-etc.c: Remove version_etc_copyright.
11993         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
11994         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
11995
11996 2005-01-20  Simon Josefsson  <jas@extundo.com>
11997
11998         * lib/base64.h (isbase64): Add.
11999
12000         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
12001         using a unsigned prototype, don't inline.
12002         (base64_decode): Use it.
12003
12004 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12005
12006         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
12007         it.
12008
12009 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12010
12011         * lib/save-cwd.c (save_cwd): Remove code to support the case
12012         where fchdir is missing or flaky.
12013
12014 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12015
12016         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
12017
12018 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
12019
12020         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
12021         AC_LIBSOURCES now does this.
12022         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
12023         with new ullong_max module.
12024
12025 2005-01-19  Bruno Haible  <bruno@clisp.org>
12026
12027         * modules/sh-quote: New file.
12028         * MODULES.html.sh (Executing programs): Add sh-quote.
12029
12030 2005-01-19  Bruno Haible  <bruno@clisp.org>
12031
12032         * lib/sh-quote.h: New file, from GNU gettext.
12033         * lib/sh-quote.c: New file, from GNU gettext.
12034
12035 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12036
12037         Merge from coreutils.
12038         * m4/ullong_max.m4: New file.
12039         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
12040         (gl_MACROS): Assume localeconv exists.
12041
12042 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12043
12044         Merge changes from coreutils, as described below in several
12045         changelogs dated today.
12046
12047         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
12048         (O_DIRECTORY): Remove; not needed here, since "." must be
12049         a directory.  All uses removed.
12050         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
12051         universal on Suns, and we also need to test for IRIX.
12052         Revamp code to use 'if' rather than '#if'.
12053         Avoid unnecessary comparison of cwd->desc to 0.
12054
12055         * lib/utimens.c (futimens): Robustify the previous patch, by checking
12056         for known valid error numbers rather than observed invalid ones.
12057
12058 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12059
12060         * modules/ullong_max: New file.
12061
12062         * modules/chdir-long, modules/openat: New files.
12063         * modules/save-cwd (Depends-on): Depend on chdir-long.
12064         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
12065
12066 2005-01-18  Jim Meyering  <jim@meyering.net>
12067
12068         Merge from coreutils.
12069         * m4/chdir-long.m4, openat.m4: New files.
12070         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
12071         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
12072         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
12073         is sane and DOES follow symlinks.  Besides, testing 20 different
12074         systems found no broken chown implementations.
12075         Prompted by a change in rsync's copy of this macro.
12076         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
12077
12078         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
12079
12080         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
12081         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
12082         NULL-means-set-to-current-time semantics.
12083         Remove temporary file immediately, rather than waiting
12084         for configure's at-exit trap code to do it.
12085
12086 2005-01-18  Jim Meyering  <jim@meyering.net>
12087
12088         * lib/version-etc.c (version_etc_copyright): Update copyright date.
12089
12090         * lib/utimens.c (futimens): Account for the fact that futimes
12091         can also fail with errno == ENOSYS or errno == ENOENT.
12092         Patch from Dmitry V. Levin.
12093
12094         Change the name of the robust chdir function from chdir to chdir_long.
12095         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
12096         (restore_cwd): Use chdir_long, not chdir.
12097         * lib/chdir-long.c: Renamed from chdir.c.
12098         * lib/chdir-long.h: Renamed from chdir.h.
12099         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
12100         Hurd.
12101
12102 2005-01-18  Bruno Haible  <bruno@clisp.org>
12103
12104         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
12105         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
12106         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
12107         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
12108         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
12109         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
12110         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
12111         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
12112         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
12113         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
12114         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
12115         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
12116         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
12117         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
12118         Use an all-permissive copyright notice, recommended by RMS.
12119
12120 2005-01-18  Bob Proulx  <bob@proulx.com>
12121
12122         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
12123         simplify offsetof() macro construct to avoid compile failure with
12124         native HP-UX 11.0 ANSI C compiler.
12125
12126 2005-01-17  Bruno Haible  <bruno@clisp.org>
12127
12128         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
12129         redundant because stpncpy.m4 takes care of it.
12130
12131 2005-01-17  Bruno Haible  <bruno@clisp.org>
12132
12133         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
12134
12135 2005-01-17  Bruno Haible  <bruno@clisp.org>
12136
12137         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
12138         used.
12139
12140 2005-01-17  Bruno Haible  <bruno@clisp.org>
12141
12142         * lib/fwriteerror.h (fwriteerror): Change specification to include
12143         fclose.
12144         * lib/fwriteerror.c: Include <stdbool.h>.
12145         (fwriteerror): At the end, close the file stream. Record whether
12146         stdout was already closed.
12147
12148 2005-01-17  Bruno Haible  <bruno@clisp.org>
12149
12150         * lib/execute.c (environ): Declare if needed.
12151         * lib/pipe.c (environ): Likewise.
12152         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
12153
12154 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12155
12156         * modules/argp: Depend on vsnprintf
12157
12158 2005-01-10  Jim Meyering  <jim@meyering.net>
12159
12160         * modules/closeout (Depends-on): Add atexit.
12161
12162 2005-01-06  Bruno Haible  <bruno@clisp.org>
12163
12164         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
12165
12166 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
12167
12168         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
12169         definitions to be after all include files, to avoid collisions.
12170         Problem reported by Bob Proulx.
12171
12172 2005-01-04  Jim Meyering  <jim@meyering.net>
12173
12174         Changes imported from coreutils.
12175         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
12176         as the mkstemp template, use a temporary directory and an
12177         8.3-friendly template to avoid trouble on systems like DJGPP.
12178         Reported by Juan M. Guerrero via Stepan Kasal.
12179         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
12180         close. Remove the temporary directory right away, rather than waiting
12181         for configure's at-exit trap code to do it.
12182         Suggestion from Stepan Kasal.
12183
12184 2005-01-01  Simon Josefsson  <jas@extundo.com>
12185
12186         * gnulib-tool: Print #include directives when --import'ing.
12187
12188 2004-12-28  Simon Josefsson  <jas@extundo.com>
12189
12190         * tests/test-base64.c: Include required header files.  Remove
12191         unused variables.
12192
12193 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
12194
12195         * modules/error (Depends-on): Remove gettext.
12196
12197 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
12198
12199         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
12200         not needed.  This removes a dependency on the gettext module.
12201         [defined _LIBC]: Do not include <libintl.h>; not needed.
12202
12203 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
12204
12205         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
12206         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
12207
12208 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
12209
12210         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
12211         HAVE_DECL_STRTOLD.
12212
12213 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
12214
12215         * modules/getdate (Depends-on): Remove alloca-opt.
12216
12217 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
12218
12219         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
12220
12221 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
12222
12223         * lib/argp-parse.c: Include <stddef.h>.
12224         (alignof, alignto): New macros.
12225         (parser_init): Don't assume that void * is aligned sufficiently
12226         for struct option.
12227
12228         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
12229         need to extend the stack.
12230         (YYINITDEPTH): New macro, so that the initial stack isn't overly
12231         large.
12232
12233 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12234
12235         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
12236
12237 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
12238
12239         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
12240         (2004-10-24) change.  Apparently this was a false alarm.
12241
12242         * modules/getdate: Depend on alloca-opt, not alloca.
12243
12244 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
12245
12246         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
12247         Remove now-obsolete comment about AIX.
12248         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
12249         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
12250         (YYMAXDEPTH): New macro.
12251
12252 2004-12-18  Simon Josefsson  <jas@extundo.com>
12253
12254         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
12255
12256 2004-12-18  Bruno Haible  <bruno@clisp.org>
12257
12258         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
12259
12260 2004-12-18  Bruno Haible  <bruno@clisp.org>
12261
12262         * lib/fatal-signal.c (fatal_signals): Make non-const.
12263         (init_fatal_signals): New function.
12264         (uninstall_handlers, install_handlers): Ignore signals that were set to
12265         SIG_IGN.
12266         (at_fatal_signal): Call init_fatal_signals.
12267         (init_fatal_signal_set): Likewise. Ignore signals that were set to
12268         SIG_IGN.
12269         Reported by Paul Eggert.
12270
12271 2004-12-18  Bruno Haible  <bruno@clisp.org>
12272
12273         * doc/alloca.texi: New file.
12274         * doc/alloca-opt.texi: New file.
12275
12276 2004-12-17  Jim Meyering  <jim@meyering.net>
12277
12278         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
12279         Otherwise, install-sh could exit with improper exit status when
12280         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
12281
12282 2004-12-16  Simon Josefsson  <jas@extundo.com>
12283
12284         * tests/test-base64.c: Add license.
12285
12286 2004-12-15  Stepan Kasal  <address@hidden>
12287
12288         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
12289
12290 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
12291
12292         * modules/getcwd (Files): Add m4/d-ino.m4.
12293         Suggested by Mark D. Baushke.
12294
12295 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
12296
12297         * lib/getdate.y (textint): New member "negative".
12298         (time_zone_hhmm): New function.
12299         Expect 14 shift-reduce conflicts, not 13.
12300         (o_colon_minutes): New rule.
12301         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
12302         (yylex): Set the "negative" member of signed numbers.
12303
12304 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
12305
12306         * doc/getdate.texi (Time of day items, Time zone items):
12307         Describe new formats +00:00, UTC+00:00.
12308
12309 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
12310
12311         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
12312         spurious "-l"s.  Problem reported by Stepan Kasal.
12313
12314 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
12315
12316         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
12317         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
12318
12319 2004-12-04  Simon Josefsson  <jas@extundo.com>
12320
12321         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
12322         Vandoorselaere <yoann@prelude-ids.org>.
12323
12324 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
12325
12326         Changes imported from coreutils.
12327         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
12328         exist.
12329         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
12330
12331 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
12332
12333         Changes imported from coreutils.
12334         * lib/hard-locale.c: Assume <locale.h> exists.
12335         Include "strdup.h".
12336         (GLIBC_VERSION): New macro.
12337         (hard_locale): Assume setlocale exists.
12338         Rewrite to avoid #ifdef.
12339         Use strdup rather than malloc + strcpy.
12340         * lib/human.c: Assume <locale.h> exists.
12341         (human_readable): Assume localeconv exists.
12342
12343 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
12344
12345         * modules/hard-locale (Depends-on): Add strdup.
12346
12347 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
12348
12349         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
12350         convert T2, not T.  (Imported from libc.)
12351
12352 2004-11-30  Simon Josefsson  <jas@extundo.com>
12353
12354         * modules/restrict (License): Change to LGPL.
12355
12356 2004-11-30  Simon Josefsson  <jas@extundo.com>
12357
12358         * m4/restrict.m4: Add copyright and copying conditions.
12359
12360 2004-11-30  Simon Josefsson  <jas@extundo.com>
12361
12362         * m4/base64.m4: New file.
12363
12364 2004-11-30  Simon Josefsson  <jas@extundo.com>
12365
12366         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
12367         base64.
12368
12369         * tests/test-base64.c: New file.
12370
12371         * modules/base64: New file.
12372
12373 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
12374
12375         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
12376         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
12377
12378         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
12379
12380 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
12381
12382         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
12383         (__getcwd.c): Don't restore errno; glibc doesn't.
12384         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
12385         first, falling back to our code only if its results look suspicious.
12386         Ensure that the resulting buffer is only as large as necessary.
12387
12388         * lib/readutmp.c: Include readutmp.h first.
12389         Include <errno.h>, since readutmp.h no longer does that.
12390         * lib/readutmp.h: Don't include <errno.h>,
12391         <sys/param.h>, <time.h>; not needed to establish interface.
12392         (errno): Remove decl.
12393         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
12394         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
12395         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
12396
12397 2004-11-28  Simon Josefsson  <jas@extundo.com>
12398
12399         * lib/base64.h, base64.c: New file.
12400
12401 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
12402
12403         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
12404
12405 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
12406
12407         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
12408         (Depends-on): Remove pathmax, same.  Add mempcpy.
12409         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
12410         (Makefile.am): Append getcwd.h to lib_SOURCES.
12411         (Include): Add getcwd.h.
12412         (Maintainer): Change from Jim Meyering to "all, glibc",
12413         since getdate now uses intended-for-glibc code.
12414         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
12415         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
12416
12417 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
12418
12419         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
12420         HP's ANSI C compiler.
12421         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
12422         Declaring int functions causes warnings on some modern systems and
12423         shouldn't be needed to compile on ancient ones.
12424         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
12425         defined.
12426
12427         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
12428         with the following changes.
12429         (__set_errno): Parenthesize properly.
12430         Include <stdbool.h>.
12431         (MIN, MAX, MATCHING_INO): New macros.
12432         (__getcwd): Define with prototype, not K&R form.
12433         Use heuristics to allocate default buffer on stack if possible.
12434         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
12435         behavior, and to avoid the PATH_MAX limit when computing
12436         ../../../../...
12437         Use MATCHING_INO to compare inode number to file.
12438         Check for arithmetic overflow in size calculations.
12439         Fix bug in reallocation of dot array that caused getcwd to fail
12440         on directories nested deeper than 75.
12441         Be more careful about saving errno on error.
12442         Do not use realloc; use only free+malloc, as this is a bit
12443         more flexible and avoids a needless copy operation.
12444         Do not inspect st_dev and st_ino for symbolic links; POSIX
12445         doesn't specify the latter.
12446         Check for closedir errors.
12447         Avoid needless casts.
12448         Use "#ifdef weak_alias" around weak_alias, to be like other
12449         glibc code.
12450         The following changes to getcwd.c have effect only when used in
12451         gnulib; they have no effect inside glibc proper.
12452         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
12453         as alloca isn't used.
12454         (alloca, __alloca): Likewise.
12455         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
12456         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
12457         unconditionally, as gnulib assumes C89 or better.
12458         Do not include <sys/param.h>.
12459         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
12460         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
12461         better.
12462         (NULL) [!defined NULL]: Remove; we assume C89 or better.
12463         Include <dirent.h> in a way that is compatible with modern Autoconf.
12464         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
12465         New macros, if not already defined.
12466         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
12467         Use "_LIBC", not "defined _LIBC", for consistency.
12468         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
12469         a mempcpy module.
12470         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
12471         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
12472         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
12473         credit only to Jim Meyering and adjust the copyright dates.
12474         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
12475         <stdlib.h>, <unistd.h>, "pathmax.h".
12476         Instead, include "xgetcwd.h" (first) and "getcwd.h".
12477         (INITIAL_BUFFER_SIZE): Remove.
12478         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
12479
12480 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
12481
12482         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
12483         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
12484         Use the _ONCE methods, for efficiency.
12485         Check for fcntl.h.  In test program, include <errno.h>
12486         and <fcntl.h> if available.  Remove old K&R cruft from
12487         test program.  Check for common errors in GNU/Linux,
12488         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
12489         don't do AC_LIBOBJ, as that's getcwd.m4's job.
12490         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
12491         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
12492         name accordingly.
12493         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
12494         accommodate new getcwd.c.
12495         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
12496         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
12497         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
12498         that's all we need now.
12499
12500 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12501
12502         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
12503         argp-parse.c depends on getopt internals, that means we should
12504         always use our getopt, to be on the safe side.
12505         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
12506         order not to spoil the result of an eventual previous invocation
12507         of gl_GETOPT_SUBSTITUTE.
12508
12509 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12510
12511         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
12512         redefinition warnings. To avoid them, include the defines
12513         in `#if !defined __need_getopt ... #endif'. The only place
12514         where __getopt_argv_const is used is in definitions
12515         of getopt_long and getopt_long_only below, which are as well
12516         protected by `#ifndef __need_getopt'.
12517         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
12518         __need_getopt after including <stdio.h> and <unistd.h> These
12519         headers might have defined it.
12520
12521 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
12522
12523         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
12524
12525 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
12526
12527         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
12528         (futimens): New function, which uses futimes if available.
12529         (futimens, utimens): Support timespec==NULL, with same semantics
12530         as utime and utimens.
12531         * lib/utimens.h (futimens): New decl.
12532
12533 2004-11-23  Jim Meyering  <jim@meyering.net>
12534
12535         * lib/getopt_.h: Remove trailing blanks.
12536
12537 2004-11-23  Jim Meyering  <jim@meyering.net>
12538
12539         * lib/__fpending.c: Add comment.
12540
12541 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
12542
12543         * modules/canonicalize (Depends-on): Add xreadlink.
12544         Problem reported by James Youngman.
12545
12546 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
12547
12548         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
12549         New macros.
12550         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
12551         optopt): Use them instead of invoking ## directly; otherwise, the
12552         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
12553
12554 2004-11-19  Bruno Haible  <bruno@clisp.org>
12555
12556         * lib/strtok_r.c: Move comments from here...
12557         * lib/strtok_r.h: ... to here.
12558
12559 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
12560
12561         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
12562         implementations that mishandle size_t overflow.
12563
12564 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
12565
12566         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
12567         might fail.  Problem reported by Yoann Vandoorselaere.
12568         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
12569         implementations that mishandle size_t overflow.
12570
12571 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12572
12573         * modules/canon-host (Depends-on): Add strdup.
12574
12575 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12576
12577         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
12578
12579 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12580
12581         * lib/canon-host.c: Include "strdup.h".
12582         (canon_host): Use getaddrinfo if available, so that IPv6 works.
12583         Use strdup instead of malloc/strcpy to duplicate strings.
12584
12585         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
12586         (human_space_before_unit): New constant.
12587         * lib/human.c (human_readable): Support it.
12588
12589         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
12590         (xgetcwd): Set errno correctly when failing.
12591         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
12592         the failure is actually due to a PATH_MAX problem.
12593
12594         Further getopt changes to make it more likely that glibc will
12595         buy the changes back.
12596         * lib/getopt.c (POSIXLY_CORRECT): New constant.
12597         (getopt): Use it, so to preserve glibc semantic
12598         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
12599         when compiling for libc.
12600         * lib/getopt_.h (__getopt_argv_const): Bring it back.
12601         (getopt_long, getopt_long_only): Use it.
12602
12603         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
12604         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
12605         (getopt): Argv is now char * const *, as per standard.
12606         (_getopt_internal_r, _getopt_internal): Argv is now char **,
12607         not char *__getopt_argv_const *.
12608         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
12609         _getopt_long_only_r): Likewise.
12610         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
12611         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
12612         _getopt_long_r, _getopt_long_only_r): Likewise.
12613         * lib/getopt_.h (__getopt_argv_const): Remove.
12614         (getopt): Argv is now char * const *, as per standard.
12615
12616         * lib/getdate.y (tORDINAL): New token.
12617         (day, relunit): Allow it for relative times.
12618         (relative_time_table): Use tORDINAL for ordinals.
12619
12620 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12621
12622         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
12623         Document that "second" isn't allowed as an ordinal number.
12624
12625 2004-11-16  Jim Meyering  <jim@meyering.net>
12626
12627         * modules/closeout (Depends-on): Add fpending.
12628
12629 2004-11-15  Jim Meyering  <jim@meyering.net>
12630
12631         * lib/closeout.c: Include "__fpending.h" once again.
12632         Include <stdbool.h>.
12633         (close_stdout): Don't fail just because stdout was closed initially,
12634         since some programs don't write to stdout in the normal course of
12635         operation (other than --version and --help), and we don't want this
12636         function to make e.g. `touch file >&-' fail.
12637         But do fail if it was closed and someone has tried to write to it.
12638         E.g., `printf foo >&-' must fail.
12639
12640 2004-11-13  Jim Meyering  <jim@meyering.net>
12641
12642         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
12643
12644 2004-11-12  Simon Josefsson  <jas@extundo.com>
12645
12646         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
12647         small doc fix is still pending.
12648
12649 2004-11-11  Simon Josefsson  <jas@extundo.com>
12650
12651         * modules/strtok_r: New file.
12652
12653         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12654         strtok_r.
12655
12656 2004-11-11  Simon Josefsson  <jas@extundo.com>
12657
12658         * m4/strtok_r.m4: New file.
12659
12660         * m4/getopt.m4: Replace opterr.
12661
12662 2004-11-11  Simon Josefsson  <jas@extundo.com>
12663
12664         * lib/strtok_r.h, strtok_r.c: New file.
12665
12666 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
12667
12668         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
12669         of replacing opterr, getopt, etc.  This should handle the
12670         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
12671
12672 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
12673
12674         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
12675         we can stop lying to compilers about the constness of argv when we
12676         are compiled outside glibc.
12677         (getopt, getopt_long, getopt_long_only): Use it.
12678         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
12679         _getopt_internal, getopt): Likewise.
12680         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
12681         _getopt_long_only_r): Likewise.
12682         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
12683         _getopt_long_r, _getopt_long_only_r): Likewise.
12684
12685         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
12686         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
12687         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
12688         the other external symbols.
12689         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
12690         declaration, since the above renaming now works around collisions.
12691
12692 2004-11-11  Jim Meyering  <jim@meyering.net>
12693
12694         * lib/linebreak.c: Remove trailing blanks.
12695         * lib/alloca_.h: Likewise.
12696         * lib/acosl.c: Likewise.
12697         * lib/euidaccess.c: Likewise.
12698         * lib/allocsa.h: Likewise.
12699
12700 2004-11-10  Simon Josefsson  <jas@extundo.com>
12701
12702         * m4/getaddrinfo.m4: New file.
12703
12704 2004-11-10  Simon Josefsson  <jas@extundo.com>
12705
12706         * lib/getaddrinfo.h, getaddrinfo.c: New files.
12707
12708 2004-11-10  Simon Josefsson  <jas@extundo.com>
12709
12710         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12711         getaddrinfo.
12712
12713         * modules/getaddrinfo: New file.
12714
12715 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12716
12717         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
12718
12719 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12720
12721         * lib/mktime.c (SHR): New macro, which is a portable
12722         substitute for >> that should work even on Crays.
12723         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
12724         Problem reported by Mark D. Baushke in
12725         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
12726         * lib/getdate.y (SHR): Likewise.
12727         (tm_diff): Use it.
12728         * lib/strftime.c (SHR): Likewise.
12729         (tm_diff): Use it.
12730         * lib/quotearg.c (struct quoting_options): Use unsigned int for
12731         quote_these_too, so that right shifts are well defined.  All uses
12732         changed.
12733
12734 2004-11-10  Jim Meyering  <jim@meyering.net>
12735
12736         Ensure that no close failure goes unreported.
12737         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
12738         return early when it seems there's nothing to flush.
12739         Don't include __fpending.h.
12740
12741 2004-11-10  Jim Meyering  <jim@meyering.net>
12742
12743         * modules/closeout (Depends-on): Remove fpending.
12744
12745 2004-11-10  Jim Meyering  <jim@meyering.net>
12746
12747         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
12748
12749 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
12750
12751         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
12752         gl_FUNC_STRFTIME.
12753         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
12754         and AC_REQUIRE when possible, to avoid duplicate checks.
12755         Check for <wchar.h>.
12756
12757 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
12758
12759         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
12760
12761 2004-11-09  Bruno Haible  <bruno@clisp.org>
12762
12763         * m4/sockpfaf.m4: New file.
12764
12765 2004-11-05  Bruno Haible  <bruno@clisp.org>
12766
12767         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
12768         Reported by Mark D. Baushke <mdb@cvshome.org>.
12769
12770 2004-11-04  Bruno Haible  <bruno@clisp.org>
12771
12772         2004-09-11  Bruno Haible  <bruno@clisp.org>
12773                 * allocsa.valgrind: New file.
12774         2004-02-06  Bruno Haible  <bruno@clisp.org>
12775                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
12776                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
12777                 Reported by Christopher Seip <chris.seip@hp.com>.
12778
12779 2004-11-04  Bruno Haible  <bruno@clisp.org>
12780
12781         * modules/allocsa (Files): Add lib/allocsa.valgrind.
12782         (Makefile.am): Distribute it.
12783
12784 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
12785
12786         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
12787         with errno == ERANGE if the buffer is too small.
12788         Problem reported by Mark D. Baushke.
12789
12790 2004-11-03  Albert Chin <china@thewrittenword.com>
12791             Paul Eggert  <eggert@cs.ucla.edu>
12792
12793         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
12794         equivalent, substitute $ac_type for equivalent type rather than
12795         blindly using uint32_t *always* which won't work if uint32_t is not
12796         available.  Define _UINT32_T to work around typedef of uint32_t if
12797         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
12798         2.5.1.
12799
12800 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
12801
12802         * m4/jm-macros.m4: Sync from coreutils.
12803         (gl_MACROS): Check for mbrlen, for pathchk.
12804         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
12805
12806 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
12807
12808         * lib/xreadlink.c (MAXSIZE): New macro.
12809         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
12810         size does not exceed MAXSIZE.  Avoid cast.
12811         As suggested by Mark D. Baushke in
12812         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
12813         if readlink fails with buffer size just under MAXSIZE, try again
12814         with MAXSIZE.
12815
12816 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
12817
12818         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
12819
12820 2004-11-02  Derek R. Price  <derek@ximbiot.com>
12821         and  Paul Eggert  <eggert@cs.ucla.edu>
12822
12823         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
12824         (get_date): Overparenthesize to avoid GCC warning.
12825
12826 2004-11-02  Bruno Haible  <bruno@clisp.org>
12827
12828         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
12829         returns void.
12830
12831 2004-11-02  Bruno Haible  <bruno@clisp.org>
12832
12833         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
12834         function returns void.
12835
12836 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
12837
12838         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
12839         fflush_unlocked, flockfile, funlockfile, funlockfile,
12840         fputs_unlocked, putc_unlocked.
12841
12842 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
12843
12844         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
12845         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
12846         already declared.
12847
12848 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12849
12850         * modules/getdate (Files): Add doc/getdate.texi.
12851         (Depends-on): Add setenv, xalloc.
12852
12853 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12854
12855         * lib/getdate.y: Add support for TZ="foo" within a date string.
12856         Fix some bugs near time_t boundaries.  Reject dates with
12857         out-of-range components, e.g., "Sept 31".
12858         Include <stdlib.h>, "setenv.h", "xalloc.h".
12859         (ISDIGIT_LOCALE): Remove; unused.
12860         Note that the TZ and time functions used here are not reentrant.
12861         (mktime_ok, get_tz): New functions.
12862         (TZBUFSIZE): New constant.
12863         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
12864         This requires that we sometimes generate our own TZ="XXX..." setting.
12865
12866 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12867
12868         * doc/getdate.texi: New file, from coreutils with modifications for
12869         the new TZ parsing.
12870
12871 2004-10-27  Derek R. Price  <derek@ximbiot.com>
12872
12873         * lib/mktime.c (not_equal_tm): Remove redundant check.
12874
12875 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
12876
12877         * modules/regex (lib_SOURCES): Add regex.c.
12878         Reported by James Youngman in
12879         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
12880
12881 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
12882
12883         * lib/getdate.y: Use Bison 1.875 features, and some minor
12884         code cleanups.  This change does not affect semantics.
12885         Don't include <stdlib.h>; no longer needed.
12886         Don't include unlocked-io.h; only the "#if TEST" code uses
12887         stdio, and performance isn't crucial there.
12888         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
12889         Bison 1.875 features as described below.
12890         All uses of "PC." replaced by "pc->".
12891         (YYSTYPE): Add a forward declaration.
12892         (yylex, yyerror): Use full prototypes in forward decls.
12893         Use "%pure-parser" rather than obsolescent "%pure_parser".
12894         Use %parse-param and %lex-param instead of obsolescent
12895         YYPARSE_PARAM and YYLEX_PARAM.
12896         (meridian_table, month_and_day_table, time_units_table,
12897         relative_time_table, time_zone_table, military_table,
12898         lookup_zone, lookup_word, get_date):
12899         Use NULL instead of 0 where appropriate.
12900         (to_hour): Avoid abort (), to avoid a dependency on
12901         stdlib.h.
12902         (yyerror, yylex): Now accepts parser_control * arg.
12903         (main) [TEST]: Use '\0' rather than 0 for char.
12904
12905 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
12906
12907         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
12908
12909 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
12910
12911         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
12912         It's now the caller's responsibility to handle the case where
12913         !HAVE_GETPAGESIZE && !defined getpagesize.
12914
12915         * lib/mktime.c (leapyear): Arg is long int, not int.
12916
12917 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
12918
12919         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
12920
12921 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
12922
12923         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
12924         missing.  Problem reported by James Youngman.
12925
12926 2004-10-16  Simon Josefsson  <jas@extundo.com>
12927
12928         * gnulib-tool: Fix comments.  Fix parse problem.
12929         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
12930
12931 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
12932
12933         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
12934         implementation of getopt_long.  Problem reported by Alexander Taler in:
12935         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
12936
12937 2004-10-15  Bruno Haible  <bruno@clisp.org>
12938
12939         * gnulib-tool: Untabify. Initialize supplied_libname.
12940         (func_usage): More homogenous output.
12941         (func_modules_transitive_closure, func_modules_to_filelist,
12942         func_emit_lib_Makefile_am): New functions.
12943         (func_import): New function, extracted from big case statement. Use
12944         func_get_license, func_modules_transitive_closure,
12945         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
12946         opt_lgpl. Don't use test -a, as it's not portable.
12947         (func_create_testdir): Use func_modules_transitive_closure,
12948         func_modules_to_filelist, func_emit_lib_Makefile_am.
12949
12950 2004-10-15  Bruno Haible  <bruno@clisp.org>
12951
12952         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
12953
12954 2004-10-15  Bruno Haible  <bruno@clisp.org>
12955
12956         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
12957         the portions belonging to each module.
12958         Suggested by Derek Robert Price <derek@ximbiot.com>.
12959
12960 2004-10-12  Simon Josefsson  <jas@extundo.com>
12961
12962         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
12963         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
12964         to real functions.
12965
12966 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
12967
12968         * modules/vsnprintf: New file.
12969
12970 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
12971
12972         * m4/vsnprintf.m4: New file.
12973
12974 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
12975
12976         * lib/vsnprintf.h: New file.
12977         * lib/vsnprintf.c: New file.
12978
12979 2004-10-11  Bruno Haible  <bruno@clisp.org>
12980
12981         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
12982         vsnprintf.
12983
12984 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
12985
12986         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
12987
12988 2004-10-07  Bruno Haible  <bruno@clisp.org>
12989
12990         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
12991         fits into the provided buffer.
12992
12993 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
12994
12995         * lib/diacrit.c, diacrit.h: Add GPL notice.
12996
12997         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
12998         notice.
12999         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
13000         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
13001         This avoids a potential constant-folding bug.
13002
13003 2004-10-05  Bruno Haible  <bruno@clisp.org>
13004
13005         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
13006         for the declaration of strsep.
13007
13008 2004-10-05  Bruno Haible  <bruno@clisp.org>
13009
13010         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
13011
13012 2004-10-04  Simon Josefsson  <jas@extundo.com>
13013
13014         * modules/memmem: New file.
13015         * tests/test-memmem.c: New file.
13016         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
13017
13018 2004-10-04  Simon Josefsson  <jas@extundo.com>
13019
13020         * m4/memmem.m4: New file.
13021
13022 2004-10-04  Simon Josefsson  <jas@extundo.com>
13023
13024         * lib/memmem.h: New file.
13025         * lib/memmem.c: New file, taken from glibc.
13026
13027 2004-10-04  Simon Josefsson  <jas@extundo.com>
13028
13029         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
13030         '#ifdef USE_UNLOCKED_IO'.
13031
13032 2004-10-04  Simon Josefsson  <jas@extundo.com>
13033
13034         * config/srclist.txt: Add memmem from glibc.
13035
13036 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13037
13038         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
13039
13040         * modules/argmatch, modules/argp, modules/closeout, modules/error,
13041         modules/exclude, modules/getdate, modules/getline,
13042         modules/getndelim2, modules/getpass, modules/getpass-gnu,
13043         modules/getusershell, modules/linebuffer, modules/md5,
13044         modules/mountlist, modules/posixtm, modules/readtokens,
13045         modules/readutmp, modules/regex, modules/sha1,
13046         modules/version-etc, modules/yesno:
13047         Remove dependency on unlocked-io.
13048
13049 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13050
13051         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
13052
13053         * m4/unlocked-io.m4: Add copyright notice.
13054         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
13055
13056 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13057
13058         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
13059         * lib/xmalloc.c (xmemdup): Likewise.
13060         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
13061         XFREE): Remove these long-obsolescent macros.
13062         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
13063         * lib/xstrdup.c: Remove.
13064
13065         * lib/regex.c (re_comp): Cast gettext return value to char *,
13066         Problem reported by Martin Neitzel via Mark D. Baushke.
13067
13068 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13069
13070         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
13071         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
13072         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
13073         regex.c, sha1.c, version-etc.c, yesno.c:
13074         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
13075         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
13076         the includer's responsibility.
13077
13078         Sync from coreutils.
13079
13080         * lib/modechange.c (mode_compile): Don't decrement a pointer that
13081         points to the start of a string, as the C Standard says the
13082         resulting behavior is undefined.
13083
13084         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
13085         simple -> simple_backups, numbered_existing ->
13086         numbered_existing_backups, numbered -> numbered_backups
13087         to avoid shadowing problems.  All uses changed.
13088         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
13089         * lib/backupfile.c (check_extension, numbered_backup):
13090         Rename locals to avoid shadowing 'basename'.
13091         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
13092         once.
13093
13094         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
13095         * lib/.cvsignore: Add getopt.h.
13096
13097 2004-10-04  Bruno Haible  <bruno@clisp.org>
13098
13099         * modules/README: New file.
13100         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
13101         not a module.
13102
13103 2004-10-02  Jim Meyering  <jim@meyering.net>
13104
13105         * lib/dirfd.h, getpagesize.h: Add copyright notice.
13106
13107 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
13108
13109         * modules/strsep: New file.
13110
13111 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
13112
13113         * m4/strsep.m4: New file.
13114
13115 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
13116
13117         * lib/strsep.h: New file.
13118         * lib/strsep.c: New file.
13119
13120 2004-10-01  Simon Josefsson  <jas@extundo.com>
13121
13122         * lib/snprintf.c (snprintf): Handle size==0.
13123
13124 2004-10-01  Simon Josefsson  <jas@extundo.com>
13125             Bruno Haible  <bruno@clisp.org>
13126
13127         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
13128         (snprintf): Declare 'args'.
13129
13130 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
13131
13132         * lib/snprintf.c: Remove comments as to why each header is needed.
13133
13134 2004-10-01  Bruno Haible  <bruno@clisp.org>
13135
13136         * MODULES.html.sh: Add strsep.
13137
13138 2004-09-30  Simon Josefsson  <jas@extundo.com>
13139
13140         * modules/snprintf: New file.
13141
13142 2004-09-30  Simon Josefsson  <jas@extundo.com>
13143
13144         * m4/snprintf.m4: New file.
13145
13146 2004-09-30  Simon Josefsson  <jas@extundo.com>
13147
13148         * lib/snprintf.h, snprintf.c: New files.
13149
13150 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13151
13152         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
13153         (hol_entry_help): Never translate an empty string.
13154         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
13155         * lib/argp.h (OPTION_NO_TRANS): New option.
13156
13157 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13158
13159         * modules/argp (Maintainer): Replace Simon Josefsson
13160         by Sergey Poznyakoff.
13161
13162 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13163
13164         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
13165         changes merged back into glibc.
13166
13167 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13168
13169         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
13170
13171 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
13172
13173         * lib/xvasprintf.c: Include xalloc.h.
13174         (xvasprintf): Use xalloc_die, not xmalloc_die.
13175
13176 2004-09-29  Bruno Haible  <bruno@clisp.org>
13177
13178         * modules/alloca-opt: New file, derived from modules/alloca.
13179         * modules/allocsa: Depend on alloca-opt instead of alloca.
13180         * modules/setenv: Likewise.
13181         * modules/vasnprintf: Likewise.
13182         * MODULES.html.sh: Add alloca-opt.
13183
13184 2004-09-28  Simon Josefsson  <jas@extundo.com>
13185
13186         * gnulib-tool: New parameter --lgpl, to asseert that modules are
13187         LGPL, and to replace license template from GPL to LGPL.
13188
13189 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
13190
13191         * modules/dummy: Change license to LGPL.
13192
13193 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
13194
13195         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
13196
13197 2004-09-24  Simon Josefsson  <jas@extundo.com>
13198
13199         * modules/minmax (License): Change from GPL to LGPL.
13200
13201 2004-09-23  Simon Josefsson  <jas@extundo.com>
13202
13203         * gnulib-tool (--import): Typo.
13204
13205 2004-09-23  Simon Josefsson  <jas@extundo.com>
13206
13207         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
13208
13209 2004-09-22  Bruno Haible  <bruno@clisp.org>
13210
13211         * modules/*: Add 'License' field.
13212         * gnulib-tool: Accept --extract-license option.
13213         (func_get_license): New function.
13214
13215 2004-09-21  Bruno Haible  <bruno@clisp.org>
13216
13217         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
13218         Reported by Simon Josefsson.
13219
13220 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
13221
13222         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
13223         gl_AC_TYPE_LONG_LONG.
13224
13225 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
13226
13227         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
13228
13229 2004-09-18  Simon Josefsson  <jas@extundo.com>
13230         and  Paul Eggert  <eggert@cs.ucla.edu>
13231
13232         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
13233         calls with autoreconf.  Define GL_LIB.
13234
13235 2004-09-14  Karl Berry  <karl@gnu.org>
13236
13237         * config/srclist.txt: unsync setenv.c, sigh.
13238
13239 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
13240
13241         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
13242         Problem reported by Bruno Haible in:
13243         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
13244
13245 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
13246
13247         * config/srclist.txt: Comment out argp-pvh.c.
13248
13249 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
13250
13251         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
13252         in case some system header has #define'd it.  Problem reported by
13253         Soeren D. Schulze in
13254         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
13255
13256 2004-09-09  Karl Berry  <karl@gnu.org>
13257
13258         * regex.[ch]: delete from the root.  These were supposed to be
13259                 synced with emacs cvs, but this has not happened for about
13260                 a year, and anyway nothing else uses emacs regex.[ch].
13261                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
13262                 lib/regex[.ch] is untouched.
13263
13264 2004-09-09  Bruno Haible  <bruno@clisp.org>
13265
13266         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
13267
13268 2004-09-09  Bruno Haible  <bruno@clisp.org>
13269
13270         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
13271         modifications.
13272         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
13273
13274 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
13275
13276         * modules/xvasprintf: New file.
13277         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
13278
13279 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
13280
13281         * lib/xvasprintf.h: New file.
13282         * lib/xvasprintf.c: New file.
13283         * lib/xasprintf.c: New file.
13284
13285 2004-09-08  Bruno Haible  <bruno@clisp.org>
13286
13287         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
13288
13289 2004-09-08  Bruno Haible  <bruno@clisp.org>
13290
13291         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
13292         length is > INT_MAX.
13293         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
13294         more.
13295
13296 2004-09-08  Bruno Haible  <bruno@clisp.org>
13297
13298         * lib/stdint_.h: New file, taken from GNU clisp.
13299
13300 2004-09-08  Bruno Haible  <bruno@clisp.org>
13301             Oskar Liljeblad  <oskar@osk.mine.nu>
13302
13303         * modules/stdint: New file.
13304         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
13305
13306 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13307
13308         Import from coreutils.
13309         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
13310         strings on unbounded length.  alloca's performance benefits aren't
13311         that important here.
13312         (V_STRDUP): Remove.
13313         (parse_with_separator): New function, with most of the internals
13314         of the old parse_user_spec.  Allow user to omit both user and group,
13315         for compatibility with FreeBSD.
13316         Clone only the user name, not the entire spec.
13317         Do not set *uid, *gid unless entirely successful.
13318         Avoid memory leak in some failing cases.
13319         Fix regression for USER.GROUP reported by Dmitry V. Levin in
13320         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
13321         (parse_user_spec): Rewrite to use parse_with_separator.
13322
13323 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13324
13325         * modules/userspec: Don't depend on alloca.
13326
13327 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13328
13329         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
13330
13331 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13332
13333         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
13334         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
13335         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
13336
13337 2004-08-16  Simon Josefsson  <jas@extundo.com>
13338
13339         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
13340         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
13341         Add --dry-run for --import.
13342         Let user provided command line parameters override configure.ac
13343         settings.
13344
13345 2004-08-12  Simon Josefsson  <jas@extundo.com>
13346
13347         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
13348         as discussed with Paul Eggert in threads rooted at
13349         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
13350         and
13351         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
13352         Before, the test was empty, and relied on ELIDE_CODE in source
13353         code.)
13354         (gl_PREREQ_GETOPT): New macro.
13355         (gl_GETOPT): Use them.
13356
13357 2004-08-12  Simon Josefsson  <jas@extundo.com>
13358
13359         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
13360         * lib/getopt_.h: Renamed from getopt.h.
13361
13362 2004-08-12  Simon Josefsson  <jas@extundo.com>
13363
13364         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
13365         Change default library name from libfoo to libgnu.
13366         Now, if you have a configure.ac that says:
13367                 gl_SOURCE_BASE(gl)
13368                 gl_M4_BASE(gl/m4)
13369                 gl_MODULES(error getopt etcetera)
13370                 gl_INIT
13371         you can import all you need by running:
13372                 ../gnulib/gnulib-tool --import
13373
13374         * modules/getopt (Files): Rename getopt.h to getopt_.h.
13375         (Makefile.am): Rewrite, use logic from argz.
13376         (Include): Use <getopt.h> instead of "getopt.h".
13377
13378 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13379
13380         * modules/argp (Files): Add m4/unlocked-io.m4.
13381         (Depends-on): Add extensions.
13382
13383 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13384
13385         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
13386         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
13387         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
13388         Check for program_invocation_name, program_invocation_short_name,
13389         flockfile, funlockfile, features.h, _getopt_long_only_r.
13390
13391 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13392
13393         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
13394         its complicated substitute.
13395         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
13396         and program_invocation_name.
13397         (__argp_basename) [!_LIBC]: Remove; the only use was
13398         replaced by its body.
13399         (__argp_short_program_name): Change condition from
13400         !defined __argp_short_program_name to
13401         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
13402         to match argp-namefrob.h.
13403         (__argp_failure): Don't assume strerror_r returns char *.
13404         * lib/argp-parse.c (N_): Define unconditionally.
13405         (argp_default_options): Fill out initializers with 0 to avoid
13406         gcc warnings.
13407
13408 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13409
13410         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
13411         getopt1.c.
13412
13413 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13414
13415         Merge from coreutils.
13416
13417         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
13418
13419         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
13420         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
13421
13422 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13423
13424         Merge from coreutils.
13425
13426         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
13427         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
13428         for Reliant Unix 5.43.
13429
13430         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
13431         (union fooround): Use uintmax_t, not long int.
13432         The rest is a merge from libc:
13433         [defined _LIBC]: Include <shlib-compat.h>.
13434         (_obstack) [defined _LIBC]: Remove after 2.3.4.
13435
13436         * lib/settime.c (settime): Recode to avoid warning with
13437         Sun Forte C 6U2.
13438
13439         * lib/strverscmp.c: Convert to UTF-8.
13440
13441 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13442
13443         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
13444         m4/uintmax_t.m4.
13445
13446 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13447
13448         * modules/xalloc-die: New file.
13449         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
13450
13451         * modules/md5 (Files): Add m4/uint32_t.m4.
13452         * modules/sha1: Renamed from modules/sha.
13453         (Files):
13454         Rename lib/sha.h to lib/sha1.h.
13455         Rename lib/sha.c to lib/sha1.c.
13456         Rename m4/sha.m4 to m4/sha1.m4.
13457         (lib_SOURCES): Likewise.
13458         (configure.ac): Rename gl_SHA to gl_SHA1.
13459         (Include): sha.h -> sha1.h.
13460
13461 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13462
13463         * m4/uint32_t.m4, uintptr_t.m4: New files.
13464         * m4/sha1.m4: Renamed from sha.m4.
13465         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
13466
13467 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13468
13469         * lib/obstack.h (obstack_empty_p):
13470         Don't assume that chunk->contents is suitably aligned.
13471         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
13472         Likewise. Problem reported by Benno in
13473         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
13474
13475         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
13476         readable.  This could be improved further but it'd take some work.
13477
13478 2004-08-08  Simon Josefsson  <jas@extundo.com>
13479
13480         * modules/xgethostname (Depends-on): Remove exit and error (not
13481         used).
13482
13483         * modules/getpass-gnu: Add getpass.h.
13484         (Depends-on): Add stdbool.
13485         * modules/getpass: Add getpass.h.
13486
13487 2004-08-08  Simon Josefsson  <jas@extundo.com>
13488
13489         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
13490         Check getpass declaration.
13491
13492 2004-08-08  Simon Josefsson  <jas@extundo.com>
13493
13494         * lib/xgethostname.c: Don't include error.h (not used).
13495
13496         * lib/getpass.h: Add.
13497         * lib/getpass.c: Include getpass.h first.
13498
13499 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
13500
13501         * lib/xalloc-die.c: New files.
13502         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
13503         All uses removed.
13504         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
13505         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
13506         xalloc-die.c.
13507         (_, N_, xalloc_die): Move to xalloc-die.c.
13508         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
13509         so that we needn't mess with xalloc_msg_memory_exhausted.
13510
13511         * lib/sha1.h: Renamed from sha.h.
13512         (SHA1_H): Renamed from _SHA_H.
13513         (sha1_ctx): Renamed from sha_ctx.
13514         (sha1_init_ctx): Renamed from sha_init_ctx.
13515         (sha1_process_block): Renamed from sha_process_block.
13516         (sha1_process_bytes): Renamed from sha_process_bytes.
13517         (sha1_finish_ctx): Renamed from sha_finish_ctx.
13518         (sha1_read_ctx): Renamed from sha_read_ctx.
13519         (sha1_stream): Renamed from sha_stream.
13520         (sha1_buffer): Renamed from sha_buffer.
13521         * lib/sha1.c: Likewise; renamed from sha.c.
13522         Do not include <sys/types.h>.
13523         Include <stddef.h> rather than <stdlib.h>.
13524
13525 2004-08-08  Bruno Haible  <bruno@clisp.org>
13526
13527         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
13528         FILESYSTEM_PREFIX_LEN.
13529         * lib/progreloc.c: Likewise.
13530         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
13531
13532 2004-08-06  Simon Josefsson  <jas@extundo.com>
13533
13534         * modules/progname (Depends-on): Don't depend on stdbool.
13535
13536 2004-08-06  Simon Josefsson  <jas@extundo.com>
13537
13538         * modules/getsubopt: New file.
13539         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13540         getsubopt.
13541
13542 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
13543
13544         More merge from coreutils.
13545
13546         * m4/utimens.m4, utimecmp.m4: New files.
13547         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
13548         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
13549         prereq.m4, sha.m4: Import changes from coreutils.
13550
13551 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
13552
13553         More merge from coreutils.
13554         * modules/raise, modules/readtokens0, modules/utimens,
13555         modules/utimecmp, module/xnanosleep: New files.
13556         * modules/strftime: Add lib/strftime.h.
13557         Change include from <time.h> to "strftime.h".
13558         * modules/yesno: Add lib/yesno.h.
13559         * modules/backupfile: Remove lib/addext.c.
13560         * modules/euidaccess: Add stat-macros.h.
13561         * modules/canonicalize, modules/euidaccess,
13562         modules/filemode, modules/lchown, modules/makepath,
13563         modules/rmdir, modules/stat: Likewise.
13564
13565 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
13566
13567         Merge from tar.
13568         * lib/argp-help.c (make_hol, hol_append): Don't assume that
13569         SIZE_MAX is a valid preprocessor constant.
13570         (__argp_basename): Change from "#ifndef _LIBC"
13571         to "#ifndef __argp_short_program_name", so that
13572         we don't compile these functions for tar.
13573
13574         More merges from coreutils.
13575         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h,
13576         lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c,
13577         lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
13578         * lib/addext.c: Remove; no longer needed.
13579         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
13580         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
13581         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
13582         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
13583         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
13584         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
13585         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
13586         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
13587         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
13588         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13589         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
13590         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
13591         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
13592         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
13593         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
13594         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
13595         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
13596         Import changes from coreutils.
13597
13598 2004-08-05  Simon Josefsson  <jas@extundo.com>
13599
13600         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
13601
13602 2004-08-05  Simon Josefsson  <jas@extundo.com>
13603
13604         * m4/getsubopt.m4: New file.
13605
13606 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
13607
13608         Merge from coreutils.
13609
13610         * m4/c-strtod.m4, canonicalize.m4, fcntl-safer.m4, getcwd-path-max.m4:
13611         New files.
13612
13613         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
13614         FILESYSTEM_PREFIX_LEN ->
13615         FILE_SYSTEM_PREFIX_LEN.
13616         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
13617         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
13618         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
13619         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
13620
13621         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
13622         prerequisite modules now handle the DOS stuff.
13623         Don't check for unistd.h.
13624
13625 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
13626
13627         Merge from coreutils.
13628
13629         * lib/.gdb-history: Remove; this doesn't belong here.
13630
13631         * lib/c-strtod.c, c-strtod.h, c-strtold.c, cycle-check.c,
13632         cycle-check.h, dev-ino.h, canonicalize.h, canonicalize.c,
13633         fcntl-safer.h, fcntl-safer.c, getcwd.c: New files.
13634
13635         * lib/dirname.h: Include <stdbool.h>.
13636         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
13637         for consistency with POSIX terminology.  All uses changed.
13638         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
13639         (strip_trailing_slashes): Use bool for booleans.
13640         * lib/stripslash.c (strip_trailing_slashes): Likewise.
13641
13642         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
13643         sometimes returns a positive errno value even when it succeeds.
13644         (print_errno_message) [!LIBC]: Fall back on strerror if
13645         __strerror_r fails.
13646
13647         * lib/path-concat.c (mempcpy): Don't define if a system header defines
13648         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
13649         (longest_relative_suffix): New function.
13650         (path_concat): Use it.  Assume first argument is not NULL.
13651         Port to DOS.  Omit redundant separators.
13652         Report an error instead of returning NULL.
13653         Use mempcpy instead of memcpy.
13654         (xpath_concat): Remove: not declared or used.
13655
13656         * lib/same.h: Include <stdbool.h>
13657         (same_name): Return bool, not int.
13658         * lib/same.c (same_name): Likewise.
13659         (errno): Don't declare; we assume C89 or better now.
13660
13661         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
13662         if not already defined.
13663
13664         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
13665         * lib/dup-safer.c (errno): Likewise.
13666
13667 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
13668
13669         Merge from coreutils.
13670         * modules/c-strtod, modules/c-strtold, modules/canonicalize,
13671         modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
13672         * modules/path-concat: Don't depend on strdup.
13673
13674 2004-08-03  Simon Josefsson  <jas@extundo.com>
13675
13676         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
13677         * lib/progname.h: Don't include stdbool.h.
13678
13679 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
13680
13681         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
13682         * MODULES.html.sh (func_all_modules): Remove fatal.
13683
13684 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
13685
13686         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
13687
13688 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
13689
13690         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
13691         working.
13692
13693 2004-08-02  Simon Josefsson  <jas@extundo.com>
13694
13695         * lib/getsubopt.h: New file, with comments from Bruno Haible.
13696         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
13697         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
13698
13699 2004-08-01  Simon Josefsson  <jas@extundo.com>
13700
13701         * lib/xgetdomainname.c: Include stdlib.h, for free().
13702
13703 2004-07-19  Bruno Haible  <bruno@clisp.org>
13704
13705         * MODULES.html.sh (func_all_modules): Add dummy.
13706
13707 2004-07-16  Simon Josefsson  <jas@extundo.com>
13708
13709         * modules/dummy: New file.
13710
13711 2004-07-16  Simon Josefsson  <jas@extundo.com>
13712
13713         * lib/dummy.c: New file.
13714
13715 2004-07-16  Bruno Haible  <bruno@clisp.org>
13716
13717         * lib/backupfile.h: Add extern "C" for C++.
13718         * lib/closeout.h: Likewise.
13719         * lib/copy-file.h: Likewise.
13720         * lib/findprog.h: Likewise.
13721         * lib/full-write.h: Likewise.
13722         * lib/pathname.h: Likewise.
13723         * lib/progname.h: Likewise.
13724         * lib/stpcpy.h: Likewise.
13725         * lib/stpncpy.h: Likewise.
13726         * lib/strcase.h: Likewise.
13727         * lib/strstr.h: Likewise.
13728         * lib/xalloc.h: Likewise.
13729
13730         * lib/mbswidth.h: Add extern "C" for C++.
13731         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
13732
13733 2004-07-13  Robert Millan  <robertmh@gnu.org>
13734
13735         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
13736
13737 2004-07-09  Simon Josefsson  <jas@extundo.com>
13738
13739         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
13740         failed without this.)
13741
13742 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13743
13744         * modules/chown (Files): Add lib/fchown-stub.c, since
13745         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
13746
13747 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13748
13749         * lib/fchown-stub.c: New file.
13750
13751 2004-06-24  Jim Meyering  <jim@meyering.net>
13752
13753         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
13754
13755 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13756
13757         * modules/argz: Omit "#include".
13758
13759         * MODULES.html.sh (func_all_modules): Add calloc, to match
13760         2004-06-01 addition of calloc module.
13761
13762 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13763
13764         * m4/argz.m4: New file, which is autoupdated from libtool.
13765
13766 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13767
13768         * lib/argz.c, argz_.h: New files, which are autoupdated from libtool.
13769
13770 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13771
13772         * config/srclist-update: Don't insist on "USA." before the
13773         close-comment, as libtool omits the period and puts the */ on a
13774         separate line.
13775         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
13776         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
13777
13778 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
13779
13780         * modules/argz: New file.
13781         * MODULES.html.sh (func_all_modules): Add argz.
13782
13783 2004-06-12  Jim Meyering  <jim@meyering.net>
13784         and  Paul Eggert  <eggert@cs.ucla.edu>
13785
13786         * modules/hash (Files): Add lib/xalloc.h.
13787         * modules/pipe (Depends-on): Add wait-process.
13788         * modules/stat (Depends-on): Add xalloc.
13789         * modules/userspec (Files): Add lib/userspec.h.
13790         * modules/xstrto
13791
13792         Upgrade from gettext-0.13.
13793         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
13794         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
13795         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
13796
13797 2004-06-10  Jim Meyering  <jim@meyering.net>
13798
13799         * lib/calloc.c: New file.
13800
13801 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
13802
13803         * lib/getdate.y (yylex): Allow space between sign and number.
13804         Problem reported by Dan Jacobson.
13805
13806 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
13807
13808         Merge from coreutils CVS.
13809
13810         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
13811         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
13812         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
13813         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
13814         xstrtol.m4: Fix copyright date and/or serial number.
13815
13816         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
13817         See if we need an fchown replacement.
13818         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
13819         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
13820         and use the replacement function if we detect either defect.
13821
13822         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
13823         gl_UTIMECMP.
13824
13825 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
13826         and  Jim Meyering  <jim@meyering.net>
13827
13828         Merge from coreutils CVS.
13829
13830         * lib/stat-macros.h: New file, with contents from file-type.h
13831         and coreutils' system.h.
13832         * lib/file-type.c: Include "stat-macros.h".
13833         * lib/file-type.h (file_type): Move all macro definitions to new file,
13834         stat-macros.h.
13835
13836         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
13837         Wrap old code with this conditional.
13838         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
13839         function that does not dereference symlinks.
13840         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
13841
13842         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
13843         dependency problems.
13844         (xreadlink): Accept new arg SIZE, for efficiency.
13845         All decls and uses changed.
13846         * lib/xreadlink.h: Include <stddef.h>, for size_t.
13847
13848         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
13849         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
13850
13851         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
13852         sysexits.h.
13853
13854 2004-06-01  Jim Meyering  <jim@meyering.net>
13855
13856         * m4/calloc.m4: New file.
13857
13858 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
13859
13860         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
13861         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
13862         Also, fix a typo in a diagnostic.
13863
13864 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
13865
13866         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
13867         or AC_FUNC_REALLOC.
13868
13869 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
13870
13871         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
13872         macros to be defined.
13873         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
13874         the allocator returns NULL because the requested size is zero.
13875
13876 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13877
13878         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
13879         var.  Add comment explaining why libc still defines it.  This
13880         merges the following patch from glibc:
13881         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
13882
13883 2004-05-20  Andreas Schwab  <schwab@suse.de>
13884
13885         * m4/free.m4: Replace free if it not known to work, not the other
13886         way round.
13887
13888 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
13889
13890         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
13891         present in glibc since revision 1.1 of this file.
13892         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
13893         obstack_alignment_mask, obstack_alloc, obstack_base,
13894         obstack_blank, obstack_blank_fast, obstack_chunk_size,
13895         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
13896         obstack_grow0, obstack_init, obstack_int_grow,
13897         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
13898         obstack_next_free, obstack_object_size, obstack_ptr_grow,
13899         obstack_ptr_grow_fast, obstack_room): Remove declarations of
13900         nonexistent functions.
13901
13902 2004-05-18  Karl Berry  <karl@gnu.org>
13903
13904         * config/srclist.txt: break link for vasnprintf.c.
13905
13906 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
13907
13908         Port obstack to the AS/400, where pointers are 16 bytes wide and
13909         you cannot cast an integer to a valid pointer.  This patch is
13910         currently waiting to be integrated into glibc; see
13911         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
13912
13913         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
13914         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
13915         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
13916         (struct obstack): temp member is now a union of a pointer and
13917         an integer, instead of an integer.  All integer uses changed.
13918         This does not affect the physical layout of struct obstack,
13919         except on hosts (like the AS/400) where the size or alignment of
13920         void * is greater than that of ptrdiff_t.
13921         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
13922         __STDC__)]: Store temporary in pointer member of union, not
13923         integer member.
13924         * lib/obstack.c: Include <stddef.h>, for offsetof.
13925         (struct fooalign): Remove; it doesn't need a name.
13926         (union fooround): Change double to long double, and add void *.
13927         (DEFAULT_ALIGNMENT): Use offsetof to compute.
13928         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
13929         not a macro.  Hence the values are always int; so remove all
13930         casts-to-int in uses.
13931
13932 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
13933
13934         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
13935         we can get this patch merged into glibc.
13936
13937 2004-05-17  Derek R. Price  <derek@ximbiot.com>
13938             Paul Eggert  <eggert@cs.ucla.edu>
13939
13940         * m4/argp: Depend on alloca.
13941
13942 2004-05-17  Derek R. Price  <derek@ximbiot.com>
13943             Paul Eggert  <eggert@cs.ucla.edu>
13944
13945         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
13946         freecoding.
13947
13948 2004-05-17  Bruno Haible  <bruno@clisp.org>
13949
13950         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
13951         precision that consists of a '.' followed by an empty digit string.
13952         Patch by Tor Lillqvist <tml@iki.fi>.
13953
13954 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
13955
13956         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
13957         for backward compatibility with older code.  We need our own
13958         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
13959         it under some other name, and our alloca.h will define it.
13960
13961 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
13962             Derek Price  <derek@ximbiot.com>
13963
13964         * lib/alloca.c: Include <alloca.h>, to get our interface.
13965         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
13966         include <alloca.h> first.  Use C89 prototype for alloca; this
13967         requires including <stddef.h> for size_t.  Use extern "C" if C++.
13968         Use #elif for simplicity, since we can assume C89 now.
13969         Don't try to source the system alloca.h since it will not be found
13970         and to prevent recursively including its replacement.
13971         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
13972         * lib/regex.c: Likewise.
13973
13974 2004-05-16  Derek Price  <derek@ximbiot.com>
13975             Paul Eggert  <eggert@cs.ucla.edu>
13976
13977         getline cleanup.  This changes the getndelim2 API: both order of
13978         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
13979         no delimiter).
13980
13981         * lib/getline.c: Don't include stddef.h or stdio.h, since our
13982         interface does that.
13983         (getline): Always use getdelim, so that we don't have two
13984         copies of this code.
13985         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
13986         if available.
13987         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
13988         (GETNDELIM2_MAXIMUM): New macro.
13989         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
13990         instead of the old practice of delim2==0.  All callers changed.
13991         Return -1 on overflow, instead of returning junk.
13992         Do not set *linesize unless allocation succeeds.
13993         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
13994         that we include sys/types.h.
13995         * lib/getnline.h: Likewise.
13996         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
13997         (getndelim2): Reorder arguments.
13998         * lib/getnline.c (getnline, getndelim):
13999         Don't discard the NMAX argument.
14000         (getnline): Invoke getndelim, to avoid code duplication.
14001         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
14002         of (size_t) -1 by callers of the getnline family.
14003
14004 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14005
14006         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
14007         Check for gettimeofday.
14008         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
14009         Check for settimeofday, stime.
14010
14011 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14012
14013         * lib/nanosleep.c (suspended): Change its type from int to
14014         sig_atomic_t volatile.
14015         (first_call): Make it private to rpl_nanosleep, and have it
14016         be zero initially as that's a bit faster.
14017         (my_usleep): Round up fractional times instead of truncating them,
14018         as this is the usual meaning for 'sleep'.
14019
14020         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
14021         doesn't work.
14022         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
14023         (ENOSYS): Define if not defined.
14024         (settime): Fall back on stime if it exists and settimeofday fails.
14025         But don't bother with fallbacks if a method fails with errno == EPERM.
14026
14027 2004-05-11  Jim Meyering  <jim@meyering.net>
14028
14029         Prior to this change, the save_cwd caller required read access to the
14030         current directory on most systems (ones with the fchdir function).
14031
14032         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
14033         fails, try write-only, and finally, resort to using xgetcwd.
14034
14035 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14036
14037         * lib/obstack.c, obstack.h: Import changes from libc.
14038
14039 2004-04-28  Bruno Haible  <bruno@clisp.org>
14040
14041         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
14042         also implicitly appends .exe to executables.
14043         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
14044         accepts Windows pathnames.
14045         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14046         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14047         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14048         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14049         Reported by Derek Robert Price <derek@ximbiot.com>.
14050
14051 2004-04-21  Karl Berry  <karl@gnu.org>
14052
14053         * config/srclist.txt (localcharset.c): break sync.
14054
14055 2004-04-20  Paul Eggert  <eggert@twinsun.com>
14056
14057         * m4/host-os.m4: Add a copyright notice.
14058
14059 2004-04-20  Jim Meyering  <jim@meyering.net>
14060
14061         Change UTILS_ to gl_ in AC_DEFINE'd names.
14062         Change utils_- and jm_-prefixed variables, too.
14063         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
14064         UTILS_FUNC_MKDIR_TRAILING_SLASH.
14065         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
14066
14067         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
14068         Don't emit trailing blanks.
14069         Also rename jm_-prefixed variables to have gl_ prefix.
14070
14071         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
14072         Also rename jm_-prefixed variables to have gl_ prefix.
14073
14074         * m4/jm-macros.m4: Reflect the renamings.
14075         * m4/prereq.m4: Likewise.
14076
14077 2004-04-20  Jim Meyering  <jim@meyering.net>
14078
14079         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
14080         memory.
14081
14082 2004-04-20  Jim Meyering  <jim@meyering.net>
14083             Bruno Haible  <bruno@clisp.org>
14084
14085         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
14086         memory when realloc fails.
14087
14088 2004-04-19  Jim Meyering  <jim@meyering.net>
14089
14090         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
14091         now that readutmp.c may call `free (0)'.
14092
14093 2004-04-19  Bruno Haible  <bruno@clisp.org>
14094
14095         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
14096         * m4/inttypes_h.m4: Likewise.
14097         * m4/stdint_h.m4: Likewise.
14098         * m4/intmax_t.m4: Likewise.
14099         * m4/uintmax_t.m4: Likewise.
14100
14101 2004-04-18  Jim Meyering  <jim@meyering.net>
14102
14103         * m4/prereq.m4: Don't forbid jm_ prefix.
14104
14105         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
14106         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
14107         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
14108         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
14109         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
14110         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
14111         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
14112         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
14113         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
14114         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
14115         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
14116         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
14117         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
14118         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
14119         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
14120         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
14121         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
14122         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
14123         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
14124
14125 2004-04-18  Jim Meyering  <jim@meyering.net>
14126
14127         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
14128         failure, don't leak memory and do call END_UTMP_ENT.
14129
14130 2004-04-16  Jim Meyering  <jim@meyering.net>
14131
14132         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
14133         coreutils' stat program.
14134         (gl_PREREQ): Don't require jm_PREREQ_STAT.
14135
14136 2004-04-11  Paul Eggert  <eggert@twinsun.com>
14137
14138         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
14139         C89.
14140         (CHAR_BIT): Remove, since we assume C89.
14141         Include <stdint.h> if available, as per current Autoconf CVS advice.
14142
14143 2004-03-31  Jim Meyering  <jim@meyering.net>
14144
14145         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
14146         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
14147         * m4/xalloc.m4: Likewise.
14148
14149 2004-03-30  Paul Eggert  <eggert@twinsun.com>
14150
14151         Merge from coreutils.
14152
14153         * m4/inttostr.m4: New file.
14154         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
14155         Require AM_STDBOOL_H and gl_TIMESPEC instead.
14156         Require gl_CLOCK_TIME.
14157         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
14158
14159 2004-03-30  Paul Eggert  <eggert@twinsun.com>
14160
14161         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
14162         not bool, to be more consistent with Unix conventions.
14163         Suggested by Bruno Haible.
14164
14165         Merge from coreutils.
14166
14167         * lib/imaxtostr.c, inttostr.c, inttostr.h, offtostr.c, umaxtostr.c:
14168         New files.
14169
14170         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
14171         the usual <time.h> dance.
14172         (get_date): Change signature to support fractional time stamps.
14173         All callers changed.
14174         * lib/getdate.y: Include "getdate.h" first, as we can now
14175         assume C89 and don't need to worry about 'const'.
14176         Similarly, include "unlocked-io.h" near start, not in middle.
14177         Include <limits.h>.
14178         (textint.value): Use long int rather than int.
14179         (textint.digits): Use size_t rather than int.
14180         (BILLION, LOG10_BILLION): New constants.
14181         (parser_control): New member rel_ns.  Members day_ordinal,
14182         time_zone, month, day, hour, minutes, rel_year, rel_month,
14183         rel_day, rel_hour, rel_minutes, rel_seconds
14184         are now long int, not int.  Member seconds is now struct timespec,
14185         not int.  New member timespec_seen.  Members dates_seen, days_seen,
14186         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
14187         not int.
14188         (%union.intval): Now long int, not int.
14189         New member timespec.
14190         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
14191         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
14192         (spec): Now is a timespec or an item list.
14193         (timespec, items): New nonterminals.
14194         (time, rel, relunit, number, get_date):
14195         Add support for fractional seconds.
14196         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
14197         (gmtime, localtime, mktime): Remove decls; not needed with C89.
14198         (to_hour): First arg is now long int, not int.
14199         (to_year): Returns long int, not int.
14200         Don't treat year -70 like 70.
14201         (tm_diff): Returns long int, not int.
14202         (lookup_word): Use bool instead of int when appropriate.
14203         (yylex): Use size_t for count, not int.
14204         Detect overflow when parsing large integer constants.
14205         Add support for fractions.
14206         (get_date): Make pointers 'const' if possible.
14207         Use more-portable code to detect integer overflow.
14208         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
14209         Don't use ctime; it's not reliable if the year has >4 digits.
14210
14211         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
14212         This is for compatibility with BSD.
14213
14214         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
14215         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
14216         From coreutils' system.h.
14217
14218         * lib/userspec.c: Don't include "posixver.h".
14219         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
14220         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
14221         compatible extension.  Simplify code by removing a boolean int
14222         that was always nonzero if a string was nonnull.
14223
14224 2004-03-30  Jim Meyering  <jim@meyering.net>
14225
14226         Merge from coreutils.
14227
14228         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
14229         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
14230         on some systems one must include <grp.h> before it.
14231         Reported by Christian Krackowizer.
14232
14233 2004-03-30  Jim Meyering  <jim@meyering.net>
14234
14235         Merge from coreutils.
14236
14237         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
14238
14239         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
14240         an empty input stream.
14241
14242         * lib/readtokens.c: Include <stdbool.h>.
14243         (readtoken): Use `size_t' rather than int/long.
14244         All callers adjusted.
14245         Use `bool' rather than `int' where appropriate.
14246         Use memset rather than an explicit loop.
14247         Use x2nrealloc rather than xrealloc.
14248         Allow the use of `\0' as a delimiter.
14249         (readtokens): Likewise.
14250         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
14251
14252 2004-03-30  Jim Meyering  <jim@meyering.net>
14253
14254         * m4/realloc.m4: Remove file, since now it does no more than
14255         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
14256         the `configure.ac' section of module/realloc.
14257         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
14258
14259 2004-03-30  Bruno Haible  <bruno@clisp.org>
14260
14261         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
14262         nonnull.
14263
14264 2004-03-29  Paul Eggert  <eggert@twinsun.com>
14265
14266         Merge changes to getloadavg.c from coreutils and Emacs.
14267
14268         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
14269         Define to an expression, not to the empty string.
14270         Include cloexec.h and xalloc.h.
14271         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
14272         Use set_cloexec_flag rather than rolling our own.
14273         * lib/cloexec.c, cloexec.h: New files.
14274
14275 2004-03-29  Paul Eggert  <eggert@twinsun.com>
14276
14277         * m4/cloexec.m4: New file.
14278
14279 2004-03-18  Paul Eggert  <eggert@twinsun.com>
14280
14281         * lib/getopt.h: Sync with libc CVS.
14282
14283 2004-03-18  Paul Eggert  <eggert@twinsun.com>
14284             Bruno Haible  <bruno@clisp.org>
14285
14286         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
14287         mbswidth.
14288
14289 2004-03-18  Paul Eggert  <eggert@twinsun.com>
14290             Bruno Haible  <bruno@clisp.org>
14291
14292         * lib/mbswidth.h: Include <wchar.h> only if
14293         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
14294         <wchar.h>.
14295         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
14296
14297 2004-03-09  Paul Eggert  <eggert@twinsun.com>
14298
14299         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
14300         Sync with libc CVS.
14301         * lib/getopt_int.h: New file, also synced from libc.
14302
14303 2004-03-09  Paul Eggert  <eggert@twinsun.com>
14304
14305         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
14306         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
14307         Bring back getopt.c, getopt.h, getopt1.c.
14308
14309 2004-03-07  Paul Eggert  <eggert@twinsun.com>
14310
14311         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
14312         All uses changed.  Check for sa_sigaction member; this fixes
14313         a bug first reported by Jason Andrade in
14314         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
14315
14316 2004-03-07  Paul Eggert  <eggert@twinsun.com>
14317
14318         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
14319         '#if' expressions.  Unlike the code it replaces, it does not
14320         depend on (defined _SC_PAGESIZE).  However, it does depend on
14321         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
14322         first reported by Jason Andrade in
14323         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
14324
14325 2004-02-25  Simon Josefsson  <jas@extundo.com>
14326
14327         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
14328
14329 2004-02-25  Simon Josefsson  <jas@extundo.com>
14330
14331         * lib/strdup.h: New file.
14332         * lib/strdup.c: Include it.
14333         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
14334         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
14335
14336 2004-02-23  Karl Berry  <karl@gnu.org>
14337
14338         * doc/maintain.texi, standards.texi, make-stds.texi: new files
14339         (from fencepost.gnu.org:/gd/gnuorg).
14340
14341 2004-02-23  Karl Berry  <karl@gnu.org>
14342
14343         * config/srclistvars.sh (GNUORG) [karl]: redefine.
14344         * config/srclist.txt: add maintain/standards documents.
14345
14346 2004-02-18  Bruno Haible  <bruno@clisp.org>
14347
14348         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
14349         Reported by Derek Robert Price <derek@ximbiot.com>.
14350
14351 2004-02-16  Karl Berry  <karl@gnu.org>
14352
14353         * config/mkinstalldirs, install-sh: update from automake.
14354
14355 2004-02-06  Karl Berry  <karl@gnu.org>
14356
14357         * m4/po.m4: update from gettext 0.14.1.
14358
14359 2004-02-06  Karl Berry  <karl@gnu.org>
14360
14361         * lib/config.charset: update from gettext 0.14.1.
14362
14363 2004-02-05  Paul Eggert  <eggert@twinsun.com>
14364
14365         Add comments and code, prompted by suggestions from Bruno Haible
14366         for sh-quote.
14367         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
14368         describing the enum quoting_style values.
14369         * lib/quotearg.c (quotearg_alloc): New function.
14370         (quotearg_buffer_restyled): Treat lone { and } as special.
14371         Treat = as special.  Work around bug with older shells
14372         that "see" a '\' that is really the 2nd byte of a multibyte char.
14373         Quote empty string with shell_quoting_style.
14374
14375 2004-02-03  Bruno Haible  <bruno@clisp.org>
14376
14377         * m4/pipe.m4: New file, from GNU gettext.
14378
14379 2004-02-03  Bruno Haible  <bruno@clisp.org>
14380
14381         * lib/pipe.h: New file, from GNU gettext.
14382         * lib/pipe.c: New file, from GNU gettext.
14383
14384 2004-01-27  Bruno Haible  <bruno@clisp.org>
14385
14386         * m4/execute.m4: New file, from GNU gettext.
14387
14388 2004-01-27  Bruno Haible  <bruno@clisp.org>
14389
14390         * lib/execute.h: New file, from GNU gettext.
14391         * lib/execute.c: New file, from GNU gettext.
14392         * lib/w32spawn.h: New file, from GNU gettext.
14393
14394 2004-01-24  Paul Eggert  <eggert@twinsun.com>
14395
14396         Merge from diffutils.
14397
14398         * lib/file-type.c (file_type): Add typed memory objects.
14399         * lib/file-type.h (S_TYPEISTMO): New macro.
14400
14401         * lib/c-stack.h (c_stack_action): Remove argv argument.
14402         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
14403         (die): Don't calculate message unless segv_action returns.
14404         (get_stack_location, min_address_from_argv, max_address_from_argv,
14405         volatile stack_base, volatile_stack_size): Remove.
14406         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
14407         that every segmentation violation is a stack overflow.  (Ouch!)
14408         See Debian bug 136249 (still outstanding) for more info about why
14409         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
14410
14411 2004-01-24  Paul Eggert  <eggert@twinsun.com>
14412
14413         Exit-status fix from coreutils.
14414
14415         Use exit_failure consistently in place of EXIT_FAILURE,
14416         so that program exit statuses are consistent on failure.
14417
14418         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
14419         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
14420         * lib/argmatch.h: Comment fix to match the above.
14421         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
14422         Now a macro referring to exit_failure, instead of a separate
14423         variable.  Include "exitfail.h" to get it.
14424         * lib/xstrtol.h: Include "exitfail.h".
14425         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
14426
14427         * lib/long-options.c (parse_long_options): Use prototype
14428         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
14429         for clarity.
14430
14431 2004-01-21  Jim Meyering  <jim@meyering.net>
14432
14433         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
14434         so as not to conflict with a different-sized __mktime_internal
14435         function in GNU libc.
14436         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
14437         Problem building statically-linked `ls' reported by Michael Brunnbauer.
14438
14439 2004-01-20  Karl Berry  <karl@gnu.org>
14440
14441         * config/config.guess: update from config.
14442
14443         * config/srclistvars.sh: GNUWWWLICENSES for karl.
14444
14445 2004-01-20  Bruno Haible  <bruno@clisp.org>
14446
14447         Safer stack allocation.
14448         * lib/setenv.c: Include allocsa.h.
14449         (alloca): Remove fallback definition.
14450         (freea): Remove macro.
14451         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
14452         instead of freea.
14453
14454 2004-01-20  Bruno Haible  <bruno@clisp.org>
14455
14456         * m4/eealloc.m4: New file, from GNU gettext.
14457
14458 2004-01-20  Bruno Haible  <bruno@clisp.org>
14459
14460         * m4/allocsa.m4: New file, from GNU gettext.
14461
14462 2004-01-20  Bruno Haible  <bruno@clisp.org>
14463
14464         * lib/xallocsa.h: New file, from GNU gettext.
14465         * lib/xallocsa.c: New file, from GNU gettext.
14466
14467 2004-01-20  Bruno Haible  <bruno@clisp.org>
14468
14469         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
14470
14471 2004-01-20  Bruno Haible  <bruno@clisp.org>
14472
14473         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
14474         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
14475         specially.
14476
14477 2004-01-20  Bruno Haible  <bruno@clisp.org>
14478
14479         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
14480         patch.
14481
14482 2004-01-20  Bruno Haible  <bruno@clisp.org>
14483
14484         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
14485
14486 2004-01-20  Bruno Haible  <bruno@clisp.org>
14487
14488         * lib/eealloc.h: New file.
14489
14490 2004-01-20  Bruno Haible  <bruno@clisp.org>
14491
14492         * lib/binary-io.h: Avoid warnings on Cygwin.
14493
14494 2004-01-20  Bruno Haible  <bruno@clisp.org>
14495
14496         * lib/allocsa.h: New file, from GNU gettext.
14497         * lib/allocsa.c: New file, from GNU gettext.
14498
14499 2004-01-18  Karl Berry  <karl@gnu.org>
14500
14501         * doc/gpl.texi, lgpl.texi: new files.
14502
14503 2004-01-18  Karl Berry  <karl@gnu.org>
14504
14505         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
14506         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
14507
14508 2004-01-15  Paul Eggert  <eggert@twinsun.com>
14509
14510         Merge from coreutils.
14511
14512         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
14513         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
14514         (gl_DEFAULT_POSIX2_VERSION): Move
14515         the documentation from 'configure' into 'config.hin',
14516         so that 'configure --help' isn't burdened by it and
14517         we don't have to worry about its formatting there.
14518         Reword the documentation so that it's more succinct
14519         and can be run together into a single paragraph.
14520         * m4/same.m4 (gl_SAME): Check for pathconf.
14521
14522 2004-01-15  Paul Eggert  <eggert@twinsun.com>
14523
14524         Merge from coreutils.
14525
14526         * lib/posixver.c: Include posixver.h.
14527
14528         * lib/same.c: Include <stdbool.h>, <limits.h>.
14529         (_POSIX_NAME_MAX): Define if not defined.
14530         (MIN): New macro.
14531         (same_name): If file names are silently truncated, report
14532         that the file names are the same if they are the same after
14533         the silent truncation.
14534
14535         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
14536         conversion function.
14537         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
14538         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
14539         longer needed.
14540
14541 2004-01-15  Jim Meyering  <jim@meyering.net>
14542
14543         Merge from coreutils.
14544
14545         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
14546         if no library is required.
14547         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
14548         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
14549         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
14550         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
14551         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
14552         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
14553         value, $ac_cv_search_crypt, if it's "none required".
14554         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
14555         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
14556         not gl_FUNC_GETLOADAVG.
14557         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
14558         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
14559
14560 2004-01-15  Jim Meyering  <jim@meyering.net>
14561
14562         Merge from coreutils.
14563
14564         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
14565         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
14566         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
14567
14568         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
14569         optional configure-time default.
14570
14571         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14572
14573         * lib/xreadlink.c (xreadlink): Correct outdated comment.
14574
14575 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
14576
14577         Merge from coreutils.
14578
14579         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
14580         value, $ac_cv_search_nanosleep, if it's "none required".
14581
14582 2004-01-14  Paul Eggert  <eggert@twinsun.com>
14583
14584         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
14585         with like-named macro in fnmatch.c.
14586         (EXT): Use an internal constant instead.
14587
14588         Merge fnmatch patches from glibc.
14589         * lib/fnmatch.c (mbsinit): Remove define.
14590         Add libc_hidden_ver (__fnmatch, fnmatch).
14591         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
14592         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
14593
14594 2004-01-14  Karl Berry  <karl@gnu.org>
14595
14596         * config/install-sh: update from automake.
14597
14598 2004-01-13  Karl Berry  <karl@gnu.org>
14599
14600         * config/install-sh: update from automake.
14601
14602 2004-01-09  Karl Berry  <karl@gnu.org>
14603
14604         * config/install-sh: update from automake.
14605
14606 2004-01-05  Karl Berry  <karl@gnu.org>
14607
14608         * config/config.{sub,guess}: update from config.
14609
14610 2003-12-31  Karl Berry  <karl@gnu.org>
14611
14612         * config/depcomp: update from automake.
14613
14614 2003-12-14  Karl Berry  <karl@gnu.org>
14615
14616         * lib/config.charset: update from gettext-runtime.
14617
14618 2003-12-03  Paul Eggert  <eggert@twinsun.com>
14619
14620         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
14621         Bug reported by Alfred M. Szmidt.
14622
14623 2003-12-03  Bruno Haible  <bruno@clisp.org>
14624
14625         * m4/gettext.m4: Upgrade from gettext-0.13.
14626         * m4/po.m4: Upgrade from gettext-0.13.
14627         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
14628         * m4/intmax.m4: New file, from gettext-0.13.
14629         * m4/printf-posix.m4: New file, from gettext-0.13.
14630
14631 2003-11-29  Karl Berry  <karl@gnu.org>
14632
14633         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
14634
14635 2003-11-25  Paul Eggert  <eggert@twinsun.com>
14636             Bruno Haible  <bruno@clisp.org>
14637
14638         * lib/printf-parse.h: Don't include sys/types.h.
14639         (ARG_NONE): New macro.
14640         (char_directive): Change type of *arg_index fields to size_t.
14641         * lib/printf-parse.c: Don't include sys/types.h.
14642         (SSIZE_MAX): Remove macro.
14643         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
14644         Remove unnecessary overflow check.
14645         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
14646         fields.
14647
14648 2003-11-25  Bruno Haible  <bruno@clisp.org>
14649
14650         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
14651
14652 2003-11-25  Bruno Haible  <bruno@clisp.org>
14653
14654         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
14655         gt_TYPE_SSIZE_T.
14656
14657 2003-11-24  Paul Eggert  <eggert@twinsun.com>
14658
14659         * modules/alloca: Remove dependency on xalloc.
14660
14661 2003-11-24  Paul Eggert  <eggert@twinsun.com>
14662
14663         * lib/alloca.c: Remove dependency on xalloc module.
14664         (xalloc_die): Remove.
14665         (memory_full) [!defined emacs]: New macro.
14666         [!defined emacs]: Don't include xalloc.h.
14667         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
14668         address arithmetic overflows.  Change datatypes a bit to avoid
14669         unnecessary casts.
14670
14671 2003-11-22  Jim Meyering  <jim@meyering.net>
14672
14673         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
14674         s/size/size_t/.
14675
14676 2003-11-21  Karl Berry  <karl@gnu.org>
14677
14678         * config/config.{sub,guess}: update from config.
14679
14680 2003-11-18  Karl Berry  <karl@gnu.org>
14681
14682         * config/config.{sub,guess}: update from config.
14683
14684         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
14685
14686 2003-11-17  Paul Eggert  <eggert@twinsun.com>
14687
14688         * README: Mention that S+T cannot overflow if S is the size of
14689         an existing object and T is sufficiently small.
14690
14691 2003-11-17  Jim Meyering  <jim@meyering.net>
14692
14693         On systems without utime and without a utimes function capable of
14694         dealing with a NULL struct utimbuf* argument, this utime replacement
14695         could -- in unusual circumstances -- leak a file descriptor.
14696         * lib/utime.c: Include <unistd.h> and <errno.h>.
14697         (utime_null): Be sure to close `fd' and to preserve errno.
14698         Reported by Geoff Collyer via Arnold Robbins.
14699
14700 2003-11-17  Bruno Haible  <bruno@clisp.org>
14701
14702         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
14703         (Depends-on): Add xsize.
14704
14705 2003-11-17  Bruno Haible  <bruno@clisp.org>
14706
14707         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
14708
14709 2003-11-17  Bruno Haible  <bruno@clisp.org>
14710
14711         * lib/vasnprintf.c (alloca): Remove fallback definition.
14712         (freea): Remove definition.
14713         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
14714         Reported by Paul Eggert.
14715
14716 2003-11-16  Paul Eggert  <eggert@twinsun.com>
14717             Bruno Haible  <bruno@clisp.org>
14718
14719         Protect against address arithmetic overflow.
14720         * lib/printf-args.h: Include stddef.h.
14721         (arguments): Change type of field 'count' to size_t.
14722         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
14723         'unsigned int' where appropriate.
14724         * lib/printf-parse.h: Include sys/types.h.
14725         (char_directive): Change type of *arg_index fields to ssize_t.
14726         (char_directives): Change type of fields 'count', max_*_length to
14727         size_t.
14728         * lib/printf-parse.c: Include sys/types.h and xsize.h.
14729         (SSIZE_MAX): Define fallback value.
14730         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
14731         instead of 'int' where appropriate. Check a_allocated, d_allocated
14732         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
14733         * lib/vasnprintf.c: Include xsize.h.
14734         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
14735         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
14736         overflow. Avoid wraparound when converting a width or precision from
14737         decimal to binary.
14738
14739 2003-11-16  Bruno Haible  <bruno@clisp.org>
14740
14741         Update from GNU gettext.
14742         * lib/printf-parse.c: Generalize to it can be compiled for wide
14743         strings.
14744         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
14745         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
14746         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
14747         SNPRINTF): New macros.
14748         Don't include <alloca.h> if the file is used inside libintl.
14749         (local_wcslen): New function, for Solaris 2.5.1.
14750         (VASNPRINTF): Use it instead of wcslen.
14751
14752 2003-11-16  Bruno Haible  <bruno@clisp.org>
14753
14754         * lib/xsize.h (xmax): New function.
14755         (xsum, xsum3, xsum4): Declare as "pure" functions.
14756
14757 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14758
14759         * modules/xalloc (Files): Undo latest change, since xalloc.h
14760         no longer needs SIZE_MAX or PTRDIFF_MAX.
14761
14762 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14763
14764         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
14765         gl_PTRDIFF_MAX.
14766
14767 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14768
14769         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
14770         "return", to pacify some unknown compiler.  Problem reported
14771         by Joerg Schilling.
14772
14773 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14774
14775         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
14776         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
14777         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
14778         heuristic is just as accurate as far as we know, and it removes a
14779         dependency on size_max.m4 and ptrdiff_max.m4.
14780
14781 2003-11-11  Bruno Haible  <bruno@clisp.org>
14782
14783         * modules/xsize (Files): Add m4/size_max.m4.
14784         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
14785
14786 2003-11-11  Bruno Haible  <bruno@clisp.org>
14787
14788         * m4/size_max.m4: New file.
14789         * m4/ptrdiff_max.m4: New file.
14790         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
14791         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
14792         (gl_XALLOC): Invoke it.
14793
14794 2003-11-11  Bruno Haible  <bruno@clisp.org>
14795
14796         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
14797         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
14798         defined.
14799
14800 2003-11-10  Paul Eggert  <eggert@twinsun.com>
14801
14802         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
14803         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
14804         rejected some allocations of exactly SIZE_MAX - 2 bytes.
14805         From Bruno Haible.
14806         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
14807         not (size_t) -1, since it's defined here.
14808
14809 2003-11-09  Karl Berry  <karl@gnu.org>
14810
14811         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
14812
14813 2003-11-06  Paul Eggert  <eggert@twinsun.com>
14814
14815         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
14816         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
14817         Reject sizes of exactly SIZE_MAX bytes.
14818         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
14819         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
14820
14821 2003-11-05  Bruno Haible  <bruno@clisp.org>
14822
14823         * lib/xsize.h: Include limits.h, to avoid a possible collision with
14824         SIZE_MAX defined in <limits.h> on Solaris.
14825
14826 2003-11-04  Jim Meyering  <jim@meyering.net>
14827
14828         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
14829         variable names, rather than @VAR@.
14830         * modules/poll: Likewise.
14831
14832 2003-11-04  Bruno Haible  <bruno@clisp.org>
14833
14834         * modules/xsize: New file.
14835         * modules/linebreak: Depend on xsize.
14836         * MODULES.html.sh (func_all_modules): Add xsize.
14837
14838 2003-11-04  Bruno Haible  <bruno@clisp.org>
14839
14840         * m4/xsize.m4: New file.
14841
14842 2003-11-04  Bruno Haible  <bruno@clisp.org>
14843
14844         * lib/xsize.h: New file.
14845         * lib/linebreak.c: Include xsize.h.
14846         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
14847         argument for overflow.
14848         Suggested by Paul Eggert.
14849
14850 2003-11-03  Karl Berry  <karl@gnu.org>
14851
14852         * config/config.{guess,sub}: update from config.
14853
14854 2003-11-03  Jim Meyering  <jim@meyering.net>
14855
14856         * modules/userspec (lib_SOURCES): Add userspec.h.
14857         (Include): Add "userspec.h".
14858         Improve description.
14859
14860 2003-11-03  Jim Meyering  <jim@meyering.net>
14861
14862         * lib/userspec.c: Include "userspec.h".
14863         * lib/userspec.h: New file.
14864
14865 2003-11-03  Bruno Haible  <bruno@clisp.org>
14866
14867         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
14868
14869 2003-11-03  Bruno Haible  <bruno@clisp.org>
14870
14871         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
14872         available, to avoid (extremely rare) race condition.
14873         Suggested by Paul Eggert.
14874
14875 2003-11-02  Karl Berry  <karl@gnu.org>
14876
14877         * config/srclist.txt (vasprintf.c): sync broken, sigh.
14878
14879 2003-10-31  Paul Eggert  <eggert@twinsun.com>
14880
14881         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
14882         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
14883         (read_filesystem_list): Set and use me_type_malloced.
14884         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
14885         whatever the type happens to be), for brevity and consistency.
14886         Check for size calculation overflow on Alphas running OSF/1.
14887
14888 2003-10-31  Jim Meyering  <jim@meyering.net>
14889
14890         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
14891
14892         * lib/linebuffer.c: Include <string.h> for declaration of memset.
14893
14894 2003-10-30  Paul Eggert  <eggert@twinsun.com>
14895             Bruno Haible  <bruno@clisp.org>
14896
14897         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
14898         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
14899
14900 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
14901
14902         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
14903         netbsd*-gnu*.  Suggested by Robert Millan.
14904
14905 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14906
14907         * modules/group-member: Depend on stdbool.
14908
14909 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14910
14911         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
14912
14913 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14914
14915         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
14916         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
14917         after the 'gnu' in these cases.  This fixes some bugs in the
14918         previous change, and is based on suggestions by Robert Millan.
14919
14920 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14921
14922         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
14923         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
14924         no longer needed.
14925         * lib/quotearg.c (quotearg_n_options): Use it.
14926         * lib/group-member.c: Include <stdbool.h>.
14927         (free_group_info): Arg is now const *; don't free arg.
14928         (get_group_info): Now returns bool and accepts struct group_info *,
14929         rather than returning a malloc'ed struct group_info *.
14930         All uses changed.  Check for overflow in internal size calculation.
14931
14932         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
14933         rather than xmalloc/xrealloc.
14934         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
14935         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
14936         conformance bug: the old code used a pointer after freeing the
14937         storage that it addressed.
14938         * lib/hash.c (hash_initialize): Simplify the code by using
14939         xalloc_oversized rather than doing it by hand.
14940         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
14941         the buffer preserved.  Use free and xmalloc instead.
14942         * lib/quotearg.c (quotearg_n_options): Likewise.
14943         Use a simpler test for size overflow.  Don't use xalloc_oversized
14944         because unsigned int might be wider than size_t (!); this suggests
14945         that we should switch from unsigned int to size_t for slot numbers.
14946
14947 2003-10-28  Paul Eggert  <eggert@twinsun.com>
14948
14949         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
14950         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
14951         NetBSD kernels.  Requested by Richard Stallman.
14952
14953 2003-10-27  Paul Eggert  <eggert@twinsun.com>
14954
14955         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
14956         to allocate the returned structure.  Do not allocate a subarray,
14957         as x2nrealloc will do that.
14958         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
14959         instead of xnrealloc.
14960         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
14961
14962 2003-10-27  Bruno Haible  <bruno@clisp.org>
14963
14964         * lib/stdbool_.h: Better support for BeOS.
14965
14966 2003-10-26  Paul Eggert  <eggert@twinsun.com>
14967
14968         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
14969         now uses inline.
14970
14971 2003-10-26  Paul Eggert  <eggert@twinsun.com>
14972
14973         * lib/xalloc.h (xalloc_oversized): New static inline function, for
14974         callers that want to do their own size-overflow checking.  Include
14975         <stdbool.h>, since xalloc_oversized returns bool.
14976         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
14977         to use xalloc_oversized.
14978
14979         Add two functions x2realloc, x2nrealloc, for programs that grow
14980         arrays dynamically by doubling their sizes.
14981         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
14982         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
14983         New functions.
14984
14985         Port to C99 semantics for 'inline' of external functions.
14986         Bug reported by Bruno Haible.
14987         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
14988         with the old contents of xnmalloc.
14989         (xnmalloc, xmalloc): Use it.
14990         (xnrealloc_inline): New static inline function,
14991         with the old contents of xnrealloc.
14992         (xnrealloc, xrealloc): Use it.
14993
14994         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
14995         that.
14996
14997 2003-10-26  Karl Berry  <karl@gnu.org>
14998
14999         * config/srclist.txt (COPYING.DOC): no longer available from
15000         /gd/gnuorg; don't know where the ultimate source is.
15001
15002 2003-10-25  Paul Eggert  <eggert@twinsun.com>
15003
15004         Fix several address-calculation bugs in the hash modules,
15005         plus some minor code cleanup.
15006
15007         * lib/hash.h: Include <stdbool.h>, for bool.
15008         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
15009         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
15010         hash_get_n_entries, hash_get_max_bucket_length,
15011         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
15012         hash_rehash): Use size_t rather than unsigned.
15013         * lib/hash.c (struct hash_table, hash_get_n_buckets,
15014         hash_get_n_buckets_used, hash_get_n_entries,
15015         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
15016         hash_get_entries, hash_do_for_each, hash_string, is_prime,
15017         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
15018         Likewise.
15019         (SIZE_MAX): Define if not defined.
15020         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
15021         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
15022         hash_print):
15023         Use const * when possible.
15024         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
15025         (check_tuning): Fix bug: if tuning parameters were very close to
15026         0 or 1, rounding errors could have caused subscript violations.
15027         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
15028         (hash_initialize): Add 'fail:' label
15029         to free table and return NULL, and use it to simplify code.
15030         Use calloc rather than clearing the storage ourself.
15031         (hash_initialize, hash_rehash): Check for arithmetic overflow in
15032         buffer size calculations.
15033         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
15034         Include <stddef.h>, for size_t.
15035         * lib/hash-pjw.c (hash_pjw): Likewise.
15036         Switch to method described by Bruno Haible.
15037         Include <limits.h>, for CHAR_BIT.
15038         (SIZE_BITS): New macro.
15039
15040 2003-10-23  Paul Eggert  <eggert@twinsun.com>
15041
15042         * m4/getline.m4 (AM_FUNC_GETLINE):
15043         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
15044         hosts.  Problem reported by Derek Robert Price in
15045         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
15046         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
15047         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
15048
15049 2003-10-21  Paul Eggert  <eggert@twinsun.com>
15050
15051         * lib/getndelim2.c (getndelim2): When size calculation overflows,
15052         ceiling the allocation at NMAX bytes rather than silently
15053         discarding input bytes before NMAX is reached.  This makes
15054         a difference only if NMAX exceeds SIZE_MAX / 2.
15055
15056         * lib/obstack.c: Merge from glibc.
15057         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
15058         Add libc_hidden_def (_obstack_newchunk).
15059         (_obstack_free) [! defined _LIBC]: Remove.
15060         [defined _LIBC]: Make a strong alias from obstack_free, rather than
15061         a clone of the function body.
15062         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
15063         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
15064
15065         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
15066         glibc.
15067         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
15068         arg to memcpy.
15069
15070         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
15071         (obstack_ptr_grow_fast, obstack_int_grow_fast):
15072         Don't use lvalue casts, as GCC plans to remove support for them
15073         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
15074         was also present in the non-GCC version, indicating that this
15075         code had always been buggy and had never been widely used.
15076         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
15077         Use the fast variant of each macro, rather than copying the
15078         definiens of the fast variant; that way, we'll be more likely to
15079         catch future bugs in the fast variants.
15080
15081 2003-10-20  Bruno Haible  <bruno@clisp.org>
15082
15083         * modules/wait-process: New file.
15084         * MODULES.html.sh (func_all_modules): Add wait-process.
15085
15086 2003-10-20  Bruno Haible  <bruno@clisp.org>
15087
15088         * m4/wait-process.m4: New file.
15089
15090 2003-10-20  Bruno Haible  <bruno@clisp.org>
15091
15092         * lib/wait-process.h: New file, from GNU gettext.
15093         * lib/wait-process.c: New file, from GNU gettext.
15094
15095 2003-10-19  Jim Meyering  <jim@meyering.net>
15096
15097         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
15098         HPUX 10.20.
15099
15100 2003-10-18  Karl Berry  <karl@gnu.org>
15101
15102         * config/config.guess: update from config.
15103
15104 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15105
15106         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
15107         (getgroups): First arg is int, not size_t.
15108         Don't let 'free' mangle errno.
15109
15110 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15111
15112         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
15113
15114 2003-10-16  Karl Berry  <karl@gnu.org>
15115
15116         * config/config.{guess,sub}: update from config.
15117
15118 2003-10-16  Jim Meyering  <jim@meyering.net>
15119
15120         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
15121         memcpy.
15122
15123 2003-10-15  Paul Eggert  <eggert@twinsun.com>
15124
15125         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
15126         (SIZE_MAX): Remove.
15127         (new_exclude, add_exclude_file): Initial size no longer needs to
15128         be a power of 2.
15129         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
15130         our own address arithmetic overflow checking.
15131
15132         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
15133         (fnmatch): Do not alloca more than 2000 wide characters;
15134         instead, use malloc for large buffers.
15135         Check for address arithmetic overflow, and return -1
15136         with errno set to ENOMEM in that case.
15137         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
15138         (NEW_PATTERN): Do not alloca more than 8000 bytes;
15139         instead, return -1.  Check for address arithmetic overflow.
15140
15141 2003-10-14  Paul Eggert  <eggert@twinsun.com>
15142
15143         Handle invalid suffixes and overflow independently, so that
15144         callers can treat them independently as needed.  Fix some bugs in
15145         suffix handling, e.g., "100k@" was not diagnosed as an invalid
15146         suffix for a human-readable blocksize.  The major caller-visible
15147         change is the addition of a new
15148         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
15149         that both overflow and suffix chars were found.
15150
15151         * lib/human.c (humblock): Don't check separately for invalid suffix
15152         char; that is xstrtoumax's job (now that its bug is fixed).
15153         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
15154         INTMAX_MAX]: New macros.
15155         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
15156         TYPE_MAXIMUM): New macros.
15157         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
15158         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
15159         if overflow occurs, as it's what __strtol does and it's more useful
15160         in practice.
15161         (__xstrtol): If __strtol reports some error other than ERANGE,
15162         reflect it to the caller as LONGINT_INVALID.  If it reports
15163         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
15164         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
15165         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
15166         value.
15167         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
15168         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
15169         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
15170         [defined UINTMAX_MAX]: New macros.
15171
15172 2003-10-14  Bruno Haible  <bruno@clisp.org>
15173
15174         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
15175
15176 2003-10-14  Bruno Haible  <bruno@clisp.org>
15177
15178         * m4/sig_atomic_t: New file, from GNU gettext.
15179         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
15180
15181 2003-10-14  Bruno Haible  <bruno@clisp.org>
15182
15183         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
15184         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
15185         Also use volatile where needed.
15186
15187 2003-10-12  Paul Eggert  <eggert@twinsun.com>
15188
15189         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
15190         Change maintainer from Bruno Haible to 'all'.
15191
15192 2003-10-12  Paul Eggert  <eggert@twinsun.com>
15193
15194         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
15195
15196 2003-10-12  Paul Eggert  <eggert@twinsun.com>
15197
15198         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
15199         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
15200         and define in terms of the other primitives.
15201         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
15202         (SIZE_MAX): Define if not already defined.
15203         (array_size_overflow): New function.
15204         (xalloc_die): Abort instead of exiting if 'error' returns.
15205         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
15206         (xmalloc, xrealloc): Use them.
15207         (xcalloc): Check for address arithmetic overflow.
15208         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
15209         a bit faster than strcpy.
15210
15211 2003-10-10  Simon Josefsson  <jas@extundo.com>
15212
15213         * modules/argp (Depends-on): Add restrict and strcase.
15214
15215 2003-10-10  Simon Josefsson  <jas@extundo.com>
15216
15217         * m4/argp.m4: Add AC_C_INLINE.
15218
15219 2003-10-08  Paul Eggert  <eggert@twinsun.com>
15220
15221         Merge getpass from libc, plus a few fixes.
15222
15223         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
15224         Include <stdbool.h>.
15225         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
15226         __fsetlocking to empty.
15227         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
15228         do include <bits/libc-lock.h>.
15229         Do not include <fcntl.h>; not needed.
15230         [_LIBC]: Include <wchar.h>.
15231         (NOTCANCEL_MODE): New macro.
15232         (flockfile, funlockfile) [_LIBC]: New macros.
15233         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
15234         [!_LIBC]: New macros.
15235         (call_fclose): New function.
15236         (getpass): Use it.  Save tty stream separately; this simplifies the
15237         code and makes it more reliable if stdin happens to equal stdout.
15238         Invoke __fsetlocking on tty.
15239         Handle thread cancellation if needed.
15240         Namespace cleanup (use __tcgetattr, __getline).
15241         Use bool for Booleans.
15242         [USE_IN_LIBIO]: Handle wide streams.
15243         [!_LIBC]: Unconditionally do the fseek, since we don't know what
15244         stream might go where.
15245
15246         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
15247         doesn't have to include <stdio.h> before us.
15248         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
15249         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
15250         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
15251         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
15252         if not declared, so that we can use getpass.c code from libc without
15253         rewriting it.
15254         (flockfile, ftrylockfile, funlockfile): New macros.
15255
15256 2003-10-08  Paul Eggert  <eggert@twinsun.com>
15257
15258         * modules/getpass: Depend on stdbool.
15259
15260 2003-10-08  Paul Eggert  <eggert@twinsun.com>
15261
15262         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
15263
15264 2003-10-07  Karl Berry  <karl@gnu.org>
15265
15266         * config/config.{guess,sub}: update from config.
15267
15268 2003-10-06  Jim Meyering  <jim@meyering.net>
15269             Bruno Haible  <bruno@clisp.org>
15270
15271         This lets translators provide better translations for the
15272         "Written by ..." part of --version output.
15273         * lib/version-etc.h: Include stdarg.h.
15274         (version_etc_copyright): Declare as readonly.
15275         (version_etc): Make this function variadic with a NULL-terminated list
15276         of author name strings.
15277         (version_etc_va): New declaration.
15278         * lib/version-etc.c: Include stdarg.h, stdlib.h.
15279         (version_etc_copyright): Declare as readonly.
15280         (version_etc_va): New function. Provide a different translatable string
15281         for each possible number of authors < 10. Abbreviate when there are 10
15282         authors or more.
15283         (version_etc): Make this function variadic. Call version_etc_va.
15284         Suggestion from Gary V. Vaughan.
15285
15286         * lib/long-options.h (parse_long_options): Change prototype: the
15287         authors string is moved to the end and becomes variadic.
15288         * lib/long-options.c: Include stdarg.h.
15289         (parse_long_options): Make this function variadic, too.
15290         Call version_etc_va, not version_etc.
15291
15292 2003-10-06  Bruno Haible  <bruno@clisp.org>
15293
15294         * modules/version-etc-2: Remove file.
15295         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
15296
15297 2003-10-06  Bruno Haible  <bruno@clisp.org>
15298
15299         * modules/fatal-signal: New file.
15300         * MODULES.html.sh (func_all_modules): Add fatal-signal.
15301
15302 2003-10-06  Bruno Haible  <bruno@clisp.org>
15303
15304         * m4/fatal-signal.m4: New file.
15305         * m4/signalblocking.m4: New file, from GNU gettext.
15306
15307 2003-10-06  Bruno Haible  <bruno@clisp.org>
15308
15309         * lib/version-etc-2.h: Remove file.
15310         * lib/version-etc-2.c: Remove file.
15311
15312 2003-10-06  Bruno Haible  <bruno@clisp.org>
15313
15314         * lib/fatal-signal.h: New file, from GNU gettext.
15315         * lib/fatal-signal.c: New file, from GNU gettext.
15316
15317 2003-10-05  Paul Eggert  <eggert@twinsun.com>
15318
15319         * README: Rework advice for preventing empty .o files.
15320         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
15321         not <sys/types.h>.
15322
15323 2003-10-04  Karl Berry  <karl@gnu.org>
15324
15325         * lib/argp*: update from libc.
15326
15327 2003-10-04  Karl Berry  <karl@gnu.org>
15328
15329         * config/config.{guess,sub}: update from config.
15330
15331 2003-10-02  Bruno Haible  <bruno@clisp.org>
15332
15333         * modules/lchown (Include): Add lchown.h.
15334         * modules/time_r (Include): Use "..." syntax.
15335         * modules/xgetdomainname (Include): Add xgetdomainname.h.
15336
15337 2003-10-01  Simon Josefsson  <jas@extundo.com>
15338
15339         * MODULES.html.sh (func_all_modules): Move gethostname from section
15340         'based on' to section 'lacking' POSIX:2001.
15341
15342 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
15343
15344         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
15345         to output mode on the same stream.
15346
15347 2003-09-29  Paul Eggert  <eggert@twinsun.com>
15348
15349         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
15350         Fix arg typo in previous patch.
15351
15352 2003-09-28  Jim Meyering  <jim@meyering.net>
15353
15354         * lib/error.c: Correct cpp indentation.
15355
15356 2003-09-27  Paul Eggert  <eggert@twinsun.com>
15357
15358         * modules/free: New file.
15359
15360 2003-09-27  Paul Eggert  <eggert@twinsun.com>
15361
15362         * m4/free.m4: New file.
15363
15364 2003-09-27  Paul Eggert  <eggert@twinsun.com>
15365
15366         * lib/minmax.h (MIN, MAX)
15367         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
15368         Omit the special code that used __typeof__, since we worry that
15369         it could be more trouble than it's worth.  See:
15370         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
15371         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
15372
15373         * lib/free.c: New file.
15374
15375 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
15376
15377         Trivial fixes to Makefile.am parts of module listings.
15378         * modules/strstr: Append strstr.h to lib_SOURCES.
15379         * modules/strcase: Likewise, for strcase.h.
15380
15381 2003-09-27  Karl Berry  <karl@gnu.org>
15382
15383         * config/mkinstalldirs: update from automake.
15384
15385 2003-09-26  Paul Eggert  <eggert@twinsun.com>
15386
15387         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
15388         (error_tail): Do not loop, reallocating temporary buffer, since
15389         the output cannot contain more wide characters than the input
15390         contains bytes, the size must be big enough already.  This avoids
15391         one potential size overflow calculation.  Check for size overflow
15392         when calculating temporary buffer size.  Free temporary buffer
15393         when done, if it was allocated with malloc; this plugs a memory
15394         leak.  Remove casts from void * to pointers, that are no longer
15395         needed now that we're assuming C89 or better.
15396
15397         Merge error changes from glibc.
15398
15399         * lib/error.c, error.h: Update copyright notice header to match glibc.
15400         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
15401         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
15402         Disable cancellation while printing error.
15403         * lib/error.h: Prepend __ to parameter names.
15404
15405 2003-09-26  Jim Meyering  <jim@meyering.net>
15406
15407         * lib/error.c (error_tail): Move some declarations
15408         into inner scope where the local variables are used.
15409
15410 2003-09-26  Bruno Haible  <bruno@clisp.org>
15411
15412         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
15413         stpncpy().
15414         Don't define stpncpy through config.h; it's now done through stpncpy.h.
15415
15416 2003-09-26  Bruno Haible  <bruno@clisp.org>
15417
15418         * lib/stpncpy.h (gnu_stpncpy): New declaration.
15419         (stpncpy): Define as alias for gnu_stpncpy.
15420         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
15421
15422 2003-09-25  Simon Josefsson  <jas@extundo.com>
15423
15424         * lib/xgetdomainname.h: New file.
15425         * lib/xgetdomainname.c: New file.
15426
15427 2003-09-25  Simon Josefsson  <jas@extundo.com>
15428             Bruno Haible  <bruno@clisp.org>
15429
15430         * modules/getdomainname: New file.
15431         * modules/xgetdomainname: New file.
15432         * MODULES.html.sh (func_all_modules): Add getdomainname,
15433         xgetdomainname.
15434
15435 2003-09-25  Simon Josefsson  <jas@extundo.com>
15436             Bruno Haible  <bruno@clisp.org>
15437
15438         * m4/getdomainname.m4: New file.
15439
15440 2003-09-25  Simon Josefsson  <jas@extundo.com>
15441             Bruno Haible  <bruno@clisp.org>
15442
15443         * lib/getdomainname.h: New file.
15444         * lib/getdomainname.c: New file.
15445
15446 2003-09-25  Karl Berry  <karl@gnu.org>
15447
15448         * lib/argp-fmtstream.c, argp-help.c: update from libc.
15449
15450 2003-09-25  Karl Berry  <karl@gnu.org>
15451
15452         * config/install-sh: update from automake.
15453
15454 2003-09-25  Bruno Haible  <bruno@clisp.org>
15455
15456         * modules/version-etc-2: New file, from modules/version-etc with
15457         modifications.
15458         * MODULES.html.sh (func_all_modules): Add version-etc-2.
15459
15460 2003-09-25  Bruno Haible  <bruno@clisp.org>
15461
15462         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
15463         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
15464
15465 2003-09-24  Simon Josefsson  <jas@extundo.com>
15466
15467         * modules/xgethostname: Add xgethostname.h.
15468
15469 2003-09-24  Paul Eggert  <eggert@twinsun.com>
15470
15471         * lib/linebuffer.c (freebuffer): Don't free the argument, just
15472         the buffer associated with the argument.  Bug reported by
15473         Simon Josefsson.
15474
15475 2003-09-24  Paul Eggert  <eggert@twinsun.com>
15476
15477         * README: Document assumptions that 'int' is at least 32 bits
15478         wide, that integer arithmetic is 2's complement without overflow,
15479         that there are no holes in integer values, that adding sizes of
15480         two nonoverlapping objects can't overflow, and that all-bits-zero
15481         yields scalar zero.  Fix spelling and capitalization typos.
15482
15483 2003-09-19  Karl Berry  <karl@gnu.org>
15484
15485         * lib/argp.h: update from libc.
15486
15487 2003-09-17  Paul Eggert  <eggert@twinsun.com>
15488
15489         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
15490         to avoid spurious warnings like "AC_RUN_IFELSE was called before
15491         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
15492
15493 2003-09-17  Paul Eggert  <eggert@twinsun.com>
15494
15495         * gnulib-tool: Use "test -h", not "test -L", for portability
15496         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
15497         (tags_regexp): Remove, since \| doesn't conform to POSIX.
15498         (sed_extract_prog): Issue s commands one-by-one, rather than
15499         using \| in one s command.
15500
15501 2003-09-16  Paul Eggert  <eggert@twinsun.com>
15502
15503         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
15504         input error, instead of returning NULL the next time we are called
15505         (and therefore losing track of errno).
15506
15507 2003-09-16  Bruno Haible  <bruno@clisp.org>
15508
15509         * gnulib-tool (func_create_testdir): Warn about duplicated
15510         dependencies.
15511
15512 2003-09-15  Paul Eggert  <eggert@twinsun.com>
15513
15514         * modules/argmatch, modules/fatal, modules/obstack,
15515         modules/xalloc, modules/xgethostname: Sort dependencies by
15516         importance, not alphabetically.
15517
15518 2003-09-15  Paul Eggert  <eggert@twinsun.com>
15519
15520         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
15521         fails, so that the caller gets the proper errno.
15522
15523         * lib/readutmp.c (read_utmp): Likewise.
15524         Check for fstat error.  Close stream and free storage
15525         when failing.
15526
15527 2003-09-14  Karl Berry  <karl@gnu.org>
15528
15529         * config/srclist.txt (strdup.c): disable for c89 changes.
15530
15531 2003-09-14  Jim Meyering  <jim@meyering.net>
15532
15533         * lib/getloadavg.c: Correct cpp indentation.
15534         * lib/strdup.c: Likewise.
15535         * lib/vasnprintf.c: Likewise.
15536
15537 2003-09-14  Bruno Haible  <bruno@clisp.org>
15538
15539         * modules/fwriteerror: New file.
15540         * MODULES.html.sh (func_all_modules): Add fwriteerror.
15541
15542 2003-09-14  Bruno Haible  <bruno@clisp.org>
15543
15544         * lib/fwriteerror.h: New file.
15545         * lib/fwriteerror.c: New file.
15546
15547 2003-09-12  Paul Eggert  <eggert@twinsun.com>
15548
15549         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
15550         modules/xgethostname, modules/xalloc: Depend on exit.
15551
15552 2003-09-12  Paul Eggert  <eggert@twinsun.com>
15553
15554         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
15555
15556         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
15557         and AC_MINIX, too, so that their extensions are available.
15558
15559         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
15560         This macro has been superseded by gl_BACKUPFILE.
15561
15562         More patches to assume C89 or better.
15563
15564         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
15565
15566         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
15567         unconditionally.
15568         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
15569         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
15570         Include <string.h>, <stdlib.h> unconditionally.
15571         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
15572         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
15573         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
15574         headers or for string.h.
15575         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
15576         or strtoul.
15577
15578         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
15579         headers.
15580         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
15581         * m4/userspec.m4 (gl_USERSPEC): Likewise.
15582         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
15583         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
15584         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
15585         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
15586         memcpy, memset.
15587         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
15588         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
15589         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
15590         strtol.
15591         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
15592         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
15593         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
15594         strtoul.
15595
15596 2003-09-12  Paul Eggert  <eggert@twinsun.com>
15597
15598         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
15599         * lib/obstack.c [!defined _LIBC]: Likewise.
15600         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
15601         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
15602         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
15603
15604         More changes to assume C89 or better.
15605
15606         * lib/error.c (error_tail): Assume vprintf.
15607
15608         * lib/argmatch.c (getenv): Remove decl.
15609         * lib/progreloc.c (get_full_program_name): Define via prototype.
15610         * lib/setenv.c (clearenv): Likewise.
15611         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
15612         needed.
15613         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
15614         (malloc, memcpy): Remove decls.
15615         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
15616         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
15617         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
15618         (memcpy): Remove macro.
15619         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
15620         (__P): Remove.  All uses removed.
15621         (PTR): Remove.  All uses changed to void *.
15622         (CHAR_BIT, NULL): Remove.
15623         (spaces, zeros, memset_space, memset_zero)
15624         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
15625         Remove.
15626         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
15627         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
15628         Define with prototype.
15629         Remove now-unnecessary prototype decl.
15630         (extra_args_spec): Assume ANSI C.  All uses changed.
15631         (extra_args_spec_iso): Remove.
15632         (my_strftime, emacs_strftimeu): Define via prototype.
15633         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
15634         unconditionally.
15635         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
15636         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
15637         (strtoul, strtol): Remove decls.
15638         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
15639         LONG_MAX): Remove.
15640         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
15641         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
15642         (LOCALE_PARAM_PROTO): New macro.
15643         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
15644         (INTERNAL (strtol), strtol): Define with a prototype.
15645         (PARAMS): Remove.  All uses removed.
15646         * lib/tempname.c: Include <string.h> unconditionally.
15647         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
15648         * lib/xgethostname.c (main): Define with a prototype.
15649         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
15650         Include <stdlib.h> unconditionally.
15651         (calloc, malloc, realloc, free): Remove decls.
15652         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
15653         Include <stdlib.h> unconditionally.  Sort include file names.
15654         (strtod): Remove.
15655         (xstrtod): Define with a prototype.
15656         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
15657         (strtol, strtoul): Remove decls.
15658
15659 2003-09-11  Paul Eggert  <eggert@twinsun.com>
15660
15661         More patches to assume C89 or better.
15662         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
15663         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
15664         string.h, memchr, STDC_HEADERS.
15665
15666 2003-09-11  Paul Eggert  <eggert@twinsun.com>
15667
15668         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
15669         Include <stdlib.h>, <string.h> unconditionally.
15670         Remove now-unnecessary cast to char *.
15671         * lib/strnlen.c: Include <string.h> unconditionally.
15672         * lib/yesno.c (yesno): Define with a prototype.
15673
15674 2003-09-11  Bruno Haible  <bruno@clisp.org>
15675
15676         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
15677
15678 2003-09-10  Jim Meyering  <jim@meyering.net>
15679
15680         * lib/error.c: Correct indentation of cpp directives.
15681
15682 2003-09-10  Bruno Haible  <bruno@clisp.org>
15683
15684         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
15685         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
15686         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
15687         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
15688         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
15689         <stdlib.h> and <string.h> checks.
15690         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
15691         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
15692
15693 2003-09-10  Bruno Haible  <bruno@clisp.org>
15694
15695         * lib/strcspn.c: Include <string.h> unconditionally.
15696         * lib/strpbrk.c: Include <string.h> unconditionally.
15697         * lib/strstr.c: Include <string.h> unconditionally.
15698         * lib/unicodeio.c: Include <string.h> unconditionally.
15699         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
15700         * lib/unsetenv.c: Likewise.
15701         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
15702         * lib/yesno.c: Include <stdlib.h> unconditionally.
15703         (rpmatch): Add prototype.
15704
15705 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15706
15707         More patches to assume C89 or better.
15708         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
15709         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
15710         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
15711         or for string.h.
15712         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
15713         stdlib.h.
15714         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
15715         C headers.
15716         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
15717         string.h.
15718         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
15719         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
15720         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
15721         or for string.h.
15722         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
15723         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
15724         C headers.
15725         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
15726         memcpy.
15727         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
15728         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
15729         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
15730         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
15731         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
15732         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
15733         string.h, free.
15734         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
15735         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
15736         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
15737         C headers, or for string.h.
15738         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
15739         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
15740         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
15741         headers, memory.h, stdlib.h, string.h, strings.h.
15742         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
15743         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
15744         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
15745         strchr.
15746         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
15747         headers, memory.h, string.h.
15748         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
15749         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
15750         free.
15751         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
15752         headers.
15753         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
15754         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
15755         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
15756         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
15757         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
15758
15759 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15760
15761         More K&R removal.
15762
15763         * lib/acosl.c (main): Use a prototype.
15764         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
15765         tanl.c: Likewise.
15766
15767         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
15768
15769         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
15770         (getopt, etopt_long, getopt_long_only, _getopt_internal)
15771         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
15772         with a prototype.
15773         * lib/getopt.c (const): Remove macro.
15774         Include <string.h> unconditionally.
15775         (my_index): Remove; all uses changed to strchr.
15776         (strlen): Remove decl.
15777         (exchange): Remove forward decl; no longer needed.
15778         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
15779         Define with prototype.
15780         * lib/getopt1.c (const): Remove macro.
15781         (getopt_long, getopt_long_only, main): Define with prototype.
15782
15783         * lib/getugroups.c: Include <string.h> unconditionally.
15784
15785         * lib/getusershell.c: Include <stdlib.h> unconditionally.
15786         (getusershell, setusershell, endusershell, readname, main):
15787         Define with prototypes.
15788
15789         * lib/group-member.c: Include group-member.h first.
15790         Include <stdlib.h> unconditionally.
15791
15792         * lib/hard-locale.c: Include hard-locale.h first.
15793         Include <stdlib.h>, <string.h> unconditionally.
15794
15795         * lib/hash.c (free, malloc): Remove decls.
15796         Include <stdlib.h> unconditionally.
15797
15798         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
15799         (getenv): Do not declare.
15800
15801         * lib/idcache.c: Include <string.h> unconditionally.
15802
15803         * lib/long-options.c: Include long-options.h first, to test interface.
15804         Include <stdlib.h> unconditionally.
15805
15806         * lib/makepath.c: Include makepath.h first, to test interface.
15807         Include <stdlib.h> and <string.h> unconditionally.
15808
15809         * lib/linebuffer.c: Include <stdlib.h>.
15810         (free): Remove decl.
15811
15812         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
15813         stddef.h. rpl_malloc returns void *, not char *.
15814         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
15815         prototype.
15816
15817         * lib/md5.h: Include <limits.h> unconditionally.
15818         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
15819         (__P): Remove; all uses removed.
15820         * lib/md5.c: Include "md5.h" first.
15821         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
15822         md5_buffer, md5_process_bytes, md5_process_block):
15823         Define with prototypes.
15824         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
15825         * lib/sha.c: Include "sha.h" first.
15826         Include <stdlib.h>, <string.h> unconditionally.
15827
15828         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
15829         * lib/memcmp.c (__ptr_t): Likewise.
15830         * lib/memrchr.c (__ptr_t): Likewise.
15831         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
15832         Include <string.h> unconditionally.
15833         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
15834         * lib/memchr.c: Include <stdlib.h> unconditionally.
15835         * lib/memchr.c (LONG_MAX): Remove.
15836         * lib/memrchr.c (LONG_MAX): Likewise.
15837         * lib/memchr.c (__memchr): Define via a prototype.
15838         * lib/memrchr.c (__memrchr): Likewise.
15839         * lib/memcmp.c (__P): Remove, and remove all uses.
15840         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
15841         Remove forward decls; no longer needed.
15842         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
15843         Use types required by C89 in prototype.
15844
15845         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
15846         * lib/savedir.c: Likewise.
15847         * lib/mkdir.c (free): Remove decl.
15848         * lib/rmdir.c (rmdir): Define with a prototype.
15849         * lib/savedir.c: Include savedir.h first, to test interface.
15850
15851         * lib/mktime.c (STDC_HEADERS): Remove.
15852         Include <stdlib.h>, <string.h> unconditionally.
15853
15854         * lib/modechange.c: Include <stdlib.h> unconditionally.
15855         (malloc): Remove decl.
15856
15857         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
15858         (free): Remove decl.
15859
15860         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
15861         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
15862         (This type really should be intptr_t, but that's a C99ism.)
15863         (_obstack_memcpy): Remove: all uses changed to memcpy.
15864         Include <string.h> unconditionally.
15865         (struct obstack): Assume __STDC__ for types of members
15866         chunkfun, freefun, extra_arg.
15867         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
15868         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
15869         obstack_begin, obstack_specify_allocation,
15870         obstack_specify_allocation_with_arg, obstack_chunkfun,
15871         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
15872         Remove unprototyped decls and the macros that use them.
15873         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
15874         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
15875         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
15876         (defined __STDC__ && __STDC__)]:
15877         Remove nonprototyped code.
15878         Include <stdlib.h> unconditionally.
15879         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
15880         _obstack_allocated_p, _obstack_free, obstack_free,
15881         _obstack_memory_used, print_and_abort):
15882         Define using prototypes.
15883         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
15884         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
15885         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
15886         obstack_next_free, obstack_object_size, obstack_room) [0]:
15887         Remove unused, unprototyped code.
15888
15889         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
15890
15891         * lib/physmem.c (physmem_total, physmem_available, main): Define
15892         with prototypes.
15893
15894         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
15895         (main): Define with a prototype.
15896
15897         * lib/posixver.c (getenv): Remove decl.
15898
15899         * lib/putenv.c (malloc): Returns void *, not char *.
15900         Include <string.h> unconditionally.
15901         (strchr, memcpy, NULL): Do not define.
15902
15903         * lib/readtokens.c: Include readtokens.h first, to test interface.
15904         Include <stdlib.h>, <string.h> unconditionally.
15905         (init_tokenbuffer): Define with a prototype.
15906
15907         * lib/regex.c (PARAMS): Remove.  All uses removed.
15908         All uses of _RE_ARGS removed, too.
15909         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15910         unconditionally.
15911         (bzero): Assume memset exists.
15912         (memcmp, memcpy, NULL): Remove.
15913         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
15914         char, or assignments to local vars of type signed char.
15915         (init_syntax_once, PREFIX(extract_number_and_incr),
15916         PREFIX(print_partial_compiled_pattern),
15917         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
15918         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
15919         PREFIX(regex_grow_registers), PREFIX(regex_compile),
15920         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
15921         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
15922         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
15923         wcs_compile_range, byte_compile_range, truncate_wchar,
15924         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
15925         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
15926         count_mbs_length, wcs_re_match_2_internal,
15927         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
15928         PREFIX(alt_match_null_string_p),
15929         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
15930         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
15931         regfree, PREFIX(extract_number)): Define with prototype.  Remove
15932         now-unnecessary declaration, if any.
15933         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
15934         regcomp, regexec):
15935         Remove now-unnecessary casts among pointer types.
15936         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
15937
15938         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
15939         (free): Remove decl.
15940
15941         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
15942
15943         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
15944         (free): Remove decl.
15945
15946         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
15947         * lib/xgetcwd.c: Likewise.
15948
15949         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
15950         (free): Remove decl.
15951
15952         * lib/strchrnul.c (strchrnul): Define with a prototype.
15953         Fix bug: c_in was not converted to char before searching.
15954
15955         The following changes are not K&R related:
15956
15957         * lib/group-member.h: Include <sys/types.h>, so that this file is
15958         self-contained.
15959         * lib/makepath.h: Likewise.
15960
15961         * lib/getusershell.c (readname, default_index, line_size, readname):
15962         Use size_t, not int, for sizes.
15963         (readname): If the size overflows, report an error instead of
15964         looping forever.
15965
15966 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15967
15968         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
15969         libc.
15970
15971 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15972
15973         * README: New section: portability guidelines.
15974
15975 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
15976
15977         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
15978         C89 spec.
15979
15980 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
15981
15982         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
15983
15984 2003-09-08  Paul Eggert  <eggert@twinsun.com>
15985
15986         Assume C89 or better; remove K&R cruft.
15987         A few of these changes were first proposed by Derek Robert Price
15988         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
15989
15990         * lib/addext.c: Include <string.h> unconditionally.
15991         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
15992         Don't declare getenv or malloc.
15993
15994         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
15995         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
15996         (NULL): Remove.
15997         (find_stack_direction, alloca): Use prototypes.
15998
15999         * lib/atexit.c (atexit): Define using a prototype.
16000
16001         * lib/basename.c, dirname.c, stripslash.c:
16002         Include <string.h> unconditionally.
16003
16004         * lib/bcopy.c: Include <stddef.h>.
16005         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
16006
16007         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
16008
16009         * lib/error.h (error, error_at_line, error_print_progname)
16010         [! (defined (__STDC__) && __STDC__)]: Remove decls.
16011         * lib/error.c: Include error.h first, to check interface.
16012         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16013         (VA_START): Remove; all uses changeed to va_start.
16014         (exit, strerror): Remove decls.
16015         (error_print_progname): Prototype uncondionally.
16016         Don't include <errno.h>; no longer needed.
16017         (private_strerror): Remove.
16018         (error_tail): Always define.
16019         (error, error_at_line): Assume C89 or better; always use prototypes.
16020         * lib/fatal.c: Include "fatal.h" first, to test interface.
16021         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16022         (VA_START): Remove; all uses changed to va_start.
16023         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
16024         this case.
16025         (exit): Remove decl.
16026         (fatal): Prototype unconditionally.  Assume va_start works.
16027         Abort at end, to pacify gcc.
16028
16029         * lib/euidaccess.c (main): Define with a prototype.
16030
16031         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
16032
16033         * lib/exitfail.c: Include <stdlib.h> unconditionally.
16034
16035         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
16036         prototypes.
16037         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
16038         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
16039         (getenv): Remove decl.
16040         (fnmatch): Define using a prototype.
16041         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
16042         (FCT): Define using a prototype.
16043
16044         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
16045
16046         * lib/gethostname.c: Include <stddef.h>.
16047         (gethostname): Define with prototype.  Length is size_t, not int.
16048
16049 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16050
16051         Assume C89 or better; remove K&R cruft.
16052         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
16053         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
16054         string.h, getenv, malloc.
16055         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
16056         headers.
16057         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
16058         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
16059         do not check for strerror.
16060         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
16061         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
16062         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
16063         do not check for doprnt or vprintf.
16064         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
16065         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
16066
16067 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16068
16069         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
16070         getversion.c should have been removed then, but was accidentally
16071         preserved.
16072
16073         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
16074         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
16075
16076 2003-09-08  Karl Berry  <karl@gnu.org>
16077
16078         * config/config.sub, config.guess, srclistvars.sh: update from savannah
16079                 config, forget about prep.
16080
16081         * config/depcomp, missing: update from automake.
16082
16083 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16084
16085         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
16086         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16087
16088 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16089
16090         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
16091         copy_tm_result.  Bug reported by Simon Josefsson in
16092         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16093
16094 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16095
16096         * m4/time_r.m4: New file.
16097         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
16098         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
16099         is. Check for timegm declaration.
16100         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
16101         Do not check for gmtime_r.
16102         Replace mktime if __mktime_internal does not exist and if mktime
16103         hasn't been replaced already.
16104
16105 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16106
16107         * lib/time_r.c, time_r.h: New files.
16108
16109         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
16110         __localtime_r.
16111         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
16112         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
16113
16114         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
16115         __gmtime_r.
16116         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
16117         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
16118         Include <time_r.h>.
16119
16120         * lib/timegm.c: Switch to glibc implementation, with the following
16121         changes:
16122         [defined HAVE_CONFIG_H]: Include <config.h>.
16123         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
16124         (__mktime_internal) [!defined _LIBC]: New decl.
16125         (__gmtime_r) [!defined _LIBC]: New macro and function.
16126         (timegm): Use a prototype, since gnulib assumes C89.
16127         Do not bother declaring tmp to be const, as it's not really usefu.
16128         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
16129         (timegm): Declare only if HAVE_DECL_TIMEGM.
16130
16131 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16132
16133         * MODULES.html.sh (func_all_modules): Add time_r.
16134         * modules/time_r: New file.
16135         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
16136         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
16137
16138 2003-09-03  Paul Eggert  <eggert@twinsun.com>
16139
16140         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
16141         Bug reported by Lute Kamstra in
16142         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
16143
16144         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
16145         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
16146         course with correspondingly smaller numbers for tomorrow and
16147         yesterday.  From Tadayoshi Funaba.  Originally installed into
16148         sh-utils on 1999-08-07, but the patch got lost (I guess during the
16149         coreutils merge?).
16150
16151 2003-08-31  Simon Josefsson  <jas@extundo.com>
16152
16153         * modules/timegm: New file.
16154         * MODULES.html.sh (func_all_modules): Add timegm.
16155
16156 2003-08-31  Simon Josefsson  <jas@extundo.com>
16157
16158         * m4/timegm.m4: New file.
16159
16160 2003-08-31  Simon Josefsson  <jas@extundo.com>
16161
16162         * lib/timegm.h: New file.
16163         * lib/timegm.c: New file.  Based on
16164         wget-1.8.2/src/http.c:mktime_from_utc.
16165
16166 2003-08-31  Karl Berry  <karl@gnu.org>
16167
16168         * lib/argp.h: update from libc.
16169
16170 2003-08-28  Bruno Haible  <bruno@clisp.org>
16171
16172         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
16173         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
16174         followed by '#define fnmatch fnmatch_posix' gives an error.
16175
16176 2003-08-28  Bruno Haible  <bruno@clisp.org>
16177
16178         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
16179         warning on QNX, which defines O_BINARY to 000000.
16180
16181 2003-08-27  Jim Meyering  <jim@meyering.net>
16182
16183         * m4/mkstemp.m4: Require that the system mkstemp be able to create
16184         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
16185         would fail after 32.  Reported by Danny Levinson.  Details here:
16186         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
16187
16188 2003-08-24  Bruno Haible  <bruno@clisp.org>
16189
16190         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
16191         MSVC7 <stdio.h> is included later.
16192
16193 2003-08-22  Simon Josefsson  <jas@extundo.com>
16194
16195         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
16196
16197 2003-08-20  Karl Berry  <karl@gnu.org>
16198
16199         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
16200
16201 2003-08-20  Bruno Haible  <bruno@clisp.org>
16202
16203         * modules/progname: New file.
16204         * MODULES.html.sh (func_all_modules): Add progname.
16205
16206 2003-08-20  Bruno Haible  <bruno@clisp.org>
16207
16208         * lib/progname.h: New file, from GNU gettext.
16209         * lib/progname.c: New file, from GNU gettext.
16210         * lib/progreloc.c: New file, from GNU gettext.
16211
16212 2003-08-19  Jim Meyering  <jim@meyering.net>
16213
16214         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
16215         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
16216
16217 2003-08-19  Bruno Haible  <bruno@clisp.org>
16218
16219         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
16220         more.
16221
16222 2003-08-19  Bruno Haible  <bruno@clisp.org>
16223
16224         * lib/xstrdup.c: Assume <string.h> exists.
16225
16226 2003-08-18  Paul Eggert  <eggert@twinsun.com>
16227
16228         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
16229         in makefile rules.
16230
16231 2003-08-18  Jim Meyering  <jim@meyering.net>
16232
16233         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
16234         * m4/lib-ld.m4: Likewise.
16235
16236 2003-08-18  Jim Meyering  <jim@meyering.net>
16237
16238         * lib/setenv.h: Indent nested cpp directive.
16239         * lib/vasnprintf.c: Remove trailing blanks.
16240
16241 2003-08-17  Simon Josefsson  <jas@extundo.com>
16242
16243         * modules/xstrndup: New file.
16244         * MODULES.html.sh (func_all_modules): Add xstrndup.
16245
16246 2003-08-17  Simon Josefsson  <jas@extundo.com>
16247
16248         * modules/argp: Fix autoconf macro name. Add more dependencies.
16249
16250 2003-08-17  Simon Josefsson  <jas@extundo.com>
16251
16252         * m4/xstrndup.m4: New file.
16253
16254 2003-08-17  Simon Josefsson  <jas@extundo.com>
16255
16256         * m4/argp.m4: New file.
16257
16258 2003-08-17  Simon Josefsson  <jas@extundo.com>
16259             Bruno Haible  <bruno@clisp.org>
16260
16261         * lib/xstrndup.h: New file.
16262         * lib/xstrndup.c: New file.
16263
16264 2003-08-17  Bruno Haible  <bruno@clisp.org>
16265
16266         * modules/strndup (Files, Include): Add lib/strndup.h.
16267
16268 2003-08-17  Bruno Haible  <bruno@clisp.org>
16269
16270         * modules/euidaccess (Files): Add lib/euidaccess.h.
16271
16272 2003-08-17  Bruno Haible  <bruno@clisp.org>
16273
16274         * lib/strndup.h: New file.
16275
16276 2003-08-17  Bruno Haible  <bruno@clisp.org>
16277
16278         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
16279         like AC_GNU_SOURCE.
16280         * modules/extensions (configure.ac): Comment out the invocation of
16281         gl_USE_SYSTEM_EXTENSIONS.
16282
16283 2003-08-16  Paul Eggert  <eggert@twinsun.com>
16284
16285         Merges from coreutils, etc.
16286         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
16287         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
16288         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
16289         fixing a typo.
16290         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
16291         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
16292
16293 2003-08-16  Paul Eggert  <eggert@twinsun.com>
16294
16295         Document merge from coreutils.
16296         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
16297         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
16298         * modules/utime: Add m4/utimes-null.m4.
16299
16300 2003-08-16  Paul Eggert  <eggert@twinsun.com>
16301
16302         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
16303         space, undoing this 2003-08-12 change:
16304         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
16305
16306 2003-08-16  Paul Eggert  <eggert@twinsun.com>
16307
16308         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
16309         strtoul.c from libc, undoing this 2003-08-12 change:
16310         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
16311
16312 2003-08-16  Jim Meyering  <jim@meyering.net>
16313
16314         Merges from coreutils.
16315         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
16316         prefix.  Adjust cache variables similarly.  Create 500 rather than
16317         just 300 files, to exercise bug on Darwin6.5, too.
16318         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
16319         $missing_dir.
16320         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
16321         AM_SYS_POSIX_TERMIOS.
16322         Reported by mkc@mathdogs.com.
16323         Also change use of $am_cv_sys_posix_termios
16324         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
16325         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
16326         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
16327         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
16328         in /proc/mounts until it finds one with matching device number.  This
16329         is unnecessary when the FILE argument *is* a mount point.  No stat call
16330         is necessary in that case.  So, disable the statvfs-testing code on
16331         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
16332         as RedHat bug# 84846.
16333         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
16334         to 1MB, so as not to render systems with no stack size limit (e.g.,
16335         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
16336         Include <unistd.h>.  On some systems,
16337         it is required for the definition of _SC_PAGESIZE.
16338
16339 2003-08-16  Jim Meyering  <jim@meyering.net>
16340
16341         Merge from coreutils.
16342         * lib/xstrtoimax.c: #else #if -> #elif.
16343         * lib/xstrtoumax.c: Likewise.
16344
16345 2003-08-16  Jim Meyering  <jim@meyering.net>
16346
16347         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
16348         * m4/utimes.m4: Removed.
16349         * m4/utimes-null.m4: Renamed from utimes.m4.
16350
16351         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
16352         to 1MB, so as not to render systems with no stack size limit (e.g.,
16353         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
16354         Include <unistd.h>.  On some systems,
16355         it is required for the definition of _SC_PAGESIZE.
16356
16357 2003-08-16  Jim Meyering  <jim@meyering.net>
16358         and Paul Eggert  <eggert@cs.ucla.edu>
16359
16360         Merges from coreutils, etc.
16361
16362         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
16363         using the latest version from cvs.  This avoids problems with #line
16364         directives using a vendor (Sun) compiler.
16365         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
16366         Don't set GETGROUPS_LIB here; now it's
16367         done via getgroups.m4's wrapper function.
16368         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
16369         rather than just in sh-util/configure.in, so that the
16370         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
16371         same.
16372         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
16373         AC_FUNC_GETLOADAVG where to find getloadavg.c.
16374         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
16375         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
16376         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
16377         Remove code that is now done by the newly-required macros.
16378         Append $(EXEEXT) to DF_PROG.
16379         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
16380         Do not invoke or require the following here,
16381         since prereq.m4 or some gnulib .m4 now does this for us:
16382         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
16383         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
16384         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
16385         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
16386         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
16387         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
16388         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
16389         AC_FUNC_OBSTACK.
16390         Do not replace the following functions, as this is now the job
16391         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
16392         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
16393         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
16394         atexit getpass, strdup, getpagesize.
16395         Replace 'raise'.
16396         Do not check for the following functions, as this is now the job
16397         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
16398         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
16399         setregid.
16400         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
16401         Check for sys/sysctl.h.
16402         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
16403         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
16404         of checking for ssize_t ourselves.
16405
16406         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
16407         Require every macro that gnulib/modules/* suggests for us.
16408         (jm_PREREQ_ADDEXT): New macro.
16409         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
16410         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
16411
16412         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
16413         (gl_PHYSMEM): Use it.
16414         Also check for `table' function.
16415         Check for new headers and functions.
16416         Add check for sys/sysmp.h.
16417         With suggestions from Kaveh Ghazi.
16418         Ignore headers that are present but cannot be compiled.  This
16419         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
16420         C 5.4.
16421
16422 2003-08-15  Paul Eggert  <eggert@twinsun.com>
16423
16424         Document merge from coreutils.
16425         * modules/userspec: Depend on posixver.
16426         * modules/strftime: Depend on tzset.
16427
16428 2003-08-15  Paul Eggert  <eggert@twinsun.com>
16429
16430         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
16431         rather than tab, after '#' in shell-script copyright notices.
16432         Suggested by Bruno Haible.
16433
16434 2003-08-15  Paul Eggert  <eggert@twinsun.com>
16435
16436         * config/srclist-update: Use three spaces, rather than tab, after '#'
16437         in shell-script copyright notices.  Suggested by Bruno Haible.
16438         Remove unnecessary parenthesization in regular expression.
16439
16440 2003-08-15  Jim Meyering  <jim@meyering.net>
16441
16442         Merge from coreutils.
16443         * lib/xgethostname.c: Include <stdlib.h>.
16444         (xghostname): Don't exit for anything other than memory-related
16445         failure; just return NULL.
16446         * lib/userspec.c: Include "posixver.h".
16447         (parse_user_spec): Accept `.' as a separator only
16448         in pre-POSIX-200112 mode.
16449         * lib/strtoimax.c: Use #elif rather than #else #if.
16450         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
16451         Remove function, now that we can rely on a working tzset function.
16452         [!_LIBC]: Ensure that the required autoconf test has been run.
16453         [!defined _NL_CURRENT && HAVE_STRFTIME]:
16454         Use underlying_strftime for %r.
16455         * lib/sha.c: Merge in some clean-up and optimization changes from
16456         glibc.
16457         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
16458         Ensure that it is a multiple of 64.
16459         Rearrange loop exit tests so as to avoid performing an
16460         additional fread after encountering an error or EOF.
16461         * lib/realloc.c: Update copyright date.
16462
16463 2003-08-15  Jim Meyering  <jim@meyering.net>
16464         and Paul Eggert  <eggert@twinsun.com>
16465
16466         Merge from coreutils.
16467         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
16468         member but strut utmpx does not.  Needed for AIX 4.3.3.
16469         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
16470
16471 2003-08-15  Jim Meyering  <jim@meyering.net>
16472         and Paul Eggert  <eggert@cs.ucla.edu>
16473
16474         Merges from coreutils, etc.
16475         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
16476         Require gl_FUNC_TZSET_CLOBBER.
16477         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
16478         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
16479         members.
16480
16481 2003-08-14  Paul Eggert  <eggert@twinsun.com>
16482
16483         Help the merge from coreutils.
16484         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
16485         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
16486         * m4/tzset.m4: Use it too.
16487
16488 2003-08-14  Paul Eggert  <eggert@twinsun.com>
16489
16490         * modules/tzset: New file.
16491
16492 2003-08-14  Jim Meyering  <jim@meyering.net>
16493
16494         Merges from coreutils.
16495         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
16496         variable names, rather than @FNMATCH_H@.
16497         * modules/alloca: Likewise for $(ALLOCA_H).
16498
16499         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
16500         the three copies of the literal target, `fnmatch.h'.
16501         * modules/alloca (alloca.h): Likewise.
16502
16503 2003-08-14  Jim Meyering  <jim@meyering.net>
16504
16505         Merge from coreutils.
16506         * m4/tzset.m4: New file.
16507         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
16508         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
16509         otherwise, AIX 5.1 systems would end up using the latter.
16510         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
16511         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
16512         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
16513         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
16514
16515 2003-08-14  Jim Meyering  <jim@meyering.net>
16516
16517         Merge from coreutils.
16518         * lib/obstack.h: Whitespace changes.
16519         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
16520         and xcalloc return values.
16521         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
16522         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
16523         hang on OSF/1 5.1 for DIR on both local and remote file systems.
16524         Reported by (and fix confirmed by) Nelson H. F. Beebe.
16525         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
16526         error from mntctl.
16527         Use mntctl's return value to drive the entry-processing loop, since
16528         we can't rely on the value of the vmt_length member in the last
16529         entry.  On some systems doing so could result in exhausting
16530         virtual memory.  Based in part on a patch from Mike Jetzer.
16531
16532 2003-08-14  Jim Meyering  <jim@meyering.net>
16533         and Paul Eggert  <eggert@twinsun.com>
16534
16535         Merges from coreutils, plus other fixes.
16536         * lib/physmem.c: Merge in portability changes from gcc/libiberty
16537         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
16538         for credits and details.  Thanks to Kaveh Ghazi for helping
16539         to keep these files in sync.
16540         (ARRAY_SIZE): Define it.
16541         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
16542         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
16543         (memcasecmp): Don't assume size_t fits in unsigned int.
16544         Remove casts and duplicate code.
16545         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
16546         (memcpy): Remove definition.
16547         Merge in some clean-up and optimization changes from glibc.
16548         [BLOCKSIZE]: Move definition to top of file.
16549         Ensure that it is a multiple of 64.
16550         Rearrange loop exit tests so as to avoid performing an
16551         additional fread after encountering an error or EOF.
16552         * lib/md5.h (md5_uintptr): Define.
16553         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
16554         return to the initial working directory.  Preserve errno
16555         for caller.
16556         * lib/idcache.c: Include "xalloc.h".
16557         (xmalloc, xrealloc): Remove decls.
16558         (getuser): Remove casts no longer required in C89.
16559         * lib/human.c: Include stdio.h, for sprintf.
16560         * lib/group-member.c: Include "xalloc.h".
16561         (xmalloc, xrealloc): Remove decls.
16562         (get_group_info): Remove casts no longer required in C89.
16563         * lib/getusershell.c (readname): Remove casts no longer required in
16564         C89.
16565         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
16566         * lib/getline.c: Whitespace fix, from coreutils.
16567
16568 2003-08-13  Paul Eggert  <eggert@twinsun.com>
16569
16570         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
16571         Check for isascii.
16572
16573         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
16574         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
16575         Undo previous (whitespace-only) change.
16576
16577 2003-08-13  Paul Eggert  <eggert@twinsun.com>
16578
16579         * lib/exclude.c: Include <ctype.h>
16580         (IN_CTYPE_DOMAIN): New macro.
16581         (is_space): New fn.
16582         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
16583         and empty lines.
16584
16585         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
16586         Undo previous (whitespace-only) change.
16587
16588 2003-08-13  Paul Eggert  <eggert@twinsun.com>
16589
16590         * config/srclist-update: Change update back to the old behavior,
16591         leaving whitespace alone.  Use one 'sed' command rather than a
16592         pipeline.
16593         (fixlicense): Now a variable, not a function.
16594         (remove_trailing_blanks): Remove.
16595         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
16596         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
16597         Undo previous (whitespace-only) change.
16598
16599 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16600
16601         Merge from coreutils.
16602         * modules/euidaccess: Add lib_SOURCES, include for new
16603         file euidaccess.h
16604
16605 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16606
16607         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
16608         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
16609         Normalize leading white space and remove trailing white space.
16610
16611         Merge from coreutils
16612         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
16613
16614         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
16615         0.12.1.  These files are now being upgraded automatically by
16616         ../config/srclist-update.
16617
16618 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16619
16620         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
16621         Normalize leading white space and remove trailing white space.
16622         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
16623         notice, as per ../config/srclist-update.
16624
16625         Merge from coreutils.
16626         * lib/euidaccess.h: New file.
16627         * lib/euidaccess.c: Include it.
16628         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
16629         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
16630         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
16631
16632 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16633
16634         * config/srclist-update: Add copyright notice.
16635         (remove_id_lines, remove_trailing_blanks): New constants.
16636         (fixfile): Use them to normalize spacing a bit in copied files.
16637         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
16638         Normalize leading white space and remove trailing white space.
16639
16640         * config/texinfo.tex: Sync with texinfo.
16641
16642         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
16643         strtoul.c from libc, to merge coreutils whitespace changes.
16644
16645         * config/srclist.txt: Get the following m4 files from gettext:
16646         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
16647         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
16648         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
16649         wint_t.m4.
16650
16651 2003-08-12  Karl Berry  <karl@gnu.org>
16652
16653         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
16654         been made.
16655
16656 2003-08-11  Paul Eggert  <eggert@twinsun.com>
16657
16658         * modules/gnu-source, m4/gnu-source.m4:
16659         Remove; we're assuming Autoconf 2.54 or later now.
16660         Suggested by Bruno Haible.
16661         * MODULES.html.sh (func_all_modules): Remove gnu-source.
16662
16663 2003-08-11  Bruno Haible  <bruno@clisp.org>
16664
16665         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
16666
16667 2003-08-11  Bruno Haible  <bruno@clisp.org>
16668
16669         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
16670         (vasnprintf): Use it instead of wcslen.
16671
16672 2003-08-11  Bruno Haible  <bruno@clisp.org>
16673
16674         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
16675         value to ensure that _Bool promotes to int. Use #define for _Bool when
16676         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
16677
16678 2003-08-10  Karl Berry  <karl@gnu.org>
16679
16680         * lib/regex.h: update from libc (whitespace fix).
16681
16682 2003-08-09  Paul Eggert  <eggert@twinsun.com>
16683
16684         Merge some files from coreutils.  These changes were
16685         originally made by Jim Meyering.
16686         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
16687         many older Unixes require this.
16688         * lib/alloca.c (alloca): Remove cast to argument of free;
16689         no longer needed in C89.
16690         * lib/alloca_.h, regex.h: Fix white space to match
16691         what GNU indent does.
16692
16693 2003-08-09  Paul Eggert  <eggert@twinsun.com>
16694
16695         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
16696         apparently Emacs's Unicode mode got confused before my 2003-08-05
16697         checkin.
16698
16699 2003-08-08  Paul Eggert  <eggert@twinsun.com>
16700
16701         * m4/extensions.m4: New file.
16702         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
16703         Require gl_USE_SYSTEM_EXTENSIONS.
16704         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
16705         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
16706
16707 2003-08-08  Paul Eggert  <eggert@twinsun.com>
16708
16709         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
16710         * modules/extensions, modules/gnu-source: New files.
16711         * modules/timespec, modules/unlocked-io: Depend on extensions.
16712
16713 2003-08-07 Paul Eggert  <eggert@twinsun.com>
16714
16715         * modules/restrict: New file.
16716         * MODULES.html.sh (func_all_modules): Add restrict.
16717         * modules/regex: Depend on restrict.
16718
16719 2003-08-07  Paul Eggert  <eggert@twinsun.com>
16720
16721         * m4/restrict.m4: New file.
16722         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
16723
16724 2003-08-07  Bruno Haible  <bruno@clisp.org>
16725
16726         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
16727         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
16728
16729 2003-08-07  Bruno Haible  <bruno@clisp.org>
16730
16731         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
16732         makes the module 'getndelim2' compatible with the module 'getline'.
16733
16734 2003-08-05  Paul Eggert  <eggert@twinsun.com>
16735
16736         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
16737         byte with "\201" to avoid glitches when editing that source file
16738         with multi-gnome-terminal.
16739
16740 2003-08-05  Paul Eggert  <eggert@twinsun.com>
16741
16742         * lib/bumpalloc.h: Remove.
16743
16744 2003-08-05  Paul Eggert  <eggert@twinsun.com>
16745
16746         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
16747         * modules/bumpalloc: Remove.
16748
16749 2003-08-04  Paul Eggert  <eggert@twinsun.com>
16750
16751         * lib/getloadavg.c: Change copyright notice and spacing to conform to
16752         GNU coding style.
16753
16754         Merge from coreutils.
16755         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
16756         1. From glibc.
16757         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
16758         from Karl Berry, implemented by Jim Meyering.
16759         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
16760         from Dmitry V. Levin.
16761         Remove anachronistic cast of xrealloc.
16762         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
16763         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
16764         type. Otherwise, it wouldn't compile with at least /bin/cc on
16765         ymp-cray-unicos9.0.2.X.
16766         Combine two mostly-identical uses of alloca into one.
16767         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
16768
16769 2003-08-04  Dave Love <d.love@dl.ac.uk>
16770
16771         [From Emacs.]
16772
16773         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
16774         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
16775         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
16776         obsolete NLIST_NAME_UNION.
16777         [__GNU__]: Undef BSD and FSCALE.
16778         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
16779
16780 2003-08-03  Paul Eggert  <eggert@twinsun.com>
16781
16782         * lib/stdbool_.h (_Bool): Make it signed char, instead of
16783         an enum type, so that it's guaranteed to promote to int.  See:
16784         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
16785
16786 2003-08-03  Karl Berry  <karl@gnu.org>
16787
16788         * config/depcomp: update from automake.
16789
16790 2003-07-31  Paul Eggert  <eggert@twinsun.com>
16791
16792         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
16793         (strerror): Don't assume that a printable int fits in 14 bytes.
16794
16795 2003-07-31  Bruno Haible  <bruno@clisp.org>
16796
16797         * modules/getpass-gnu: New file.
16798         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
16799
16800 2003-07-31  Bruno Haible  <bruno@clisp.org>
16801
16802         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
16803
16804 2003-07-24  Karl Berry  <karl@gnu.org>
16805
16806         * config/missing: update from automake.
16807
16808 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
16809             Bruno Haible  <bruno@clisp.org>
16810
16811         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
16812         * lib/getline.c (getline, getdelim): Likewise.
16813         Remove _GNU_SOURCE define; now it's defined in config.h through
16814         m4/getline.m4.
16815
16816 2003-07-23  Karl Berry  <karl@gnu.org>
16817
16818         * config/config.sub: update from prep.
16819
16820 2003-07-22  Paul Eggert  <eggert@twinsun.com>
16821
16822         * modules/xalloc (Depends-on): Add exitfail.
16823         * modules/xmemcoll: Likewise.
16824
16825 2003-07-22  Paul Eggert  <eggert@twinsun.com>
16826
16827         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
16828         over-parenthesization in macros.
16829
16830         Sync with coreutils.
16831
16832         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
16833         required by C99.
16834
16835         Use `exit_failure' for xalloc and xmemcoll instead of their own
16836         private exit-failure variables.
16837         * lib/xalloc.h (xalloc_exit_failure): Remove.
16838         * lib/xmalloc.c: Likewise.  Include exitfail.h.
16839         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
16840         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
16841         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
16842         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
16843
16844 2003-07-20  Jim Meyering  <jim@meyering.net>
16845
16846         * modules/closeout (Depends-on): Add exitfail.
16847         Suggestion from Bruno Haible.
16848
16849 2003-07-19  Karl Berry  <karl@gnu.org>
16850
16851         * config/config.sub: update from prep.
16852
16853 2003-07-18  Paul Eggert  <eggert@twinsun.com>
16854
16855         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
16856         Remove.
16857         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
16858         to test that it can stand by itself.  Include "exitfail.h".
16859         Clients should set exit_failure instead.
16860         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
16861
16862 2003-07-18  Bruno Haible  <bruno@clisp.org>
16863
16864         * modules/getndelim2: New file.
16865         * modules/getline: Share files with module getndelim2.
16866         * modules/getnline: Depend on getndelim2 instead of sharing files with
16867         it. Add getnline.c to lib_SOURCES.
16868         * MODULES.html.sh (func_all_modules): Add getndelim2.
16869
16870 2003-07-18  Bruno Haible  <bruno@clisp.org>
16871
16872         * m4/getndelim2.m4: New file.
16873         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
16874         invoke gl_PREREQ_GETNDELIM2.
16875         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
16876         gl_PREREQ_GETNDELIM2.
16877         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
16878         gl_GETNDELIM2.
16879
16880 2003-07-18  Bruno Haible  <bruno@clisp.org>
16881
16882         * lib/getndelim2.h: New file.
16883         * lib/getndelim2.c: Make into a module of its own. Include config.h,
16884         getndelim2.h.
16885         (getndelim2): Make non-static. Change return type to ssize_t.
16886         * lib/getline.h: Change argument names.
16887         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
16888         * lib/getnline.c: Include getndelim2.h.
16889
16890 2003-07-18  Andreas Schwab  <schwab@suse.de>
16891
16892         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
16893
16894 2003-07-17  Karl Berry  <karl@gnu.org>
16895
16896         * config/config.sub: update from prep.
16897
16898 2003-07-17  Bruno Haible  <bruno@clisp.org>
16899
16900         * modules/getnline: New file.
16901         * modules/getline: Add lib/getndelim2.c to source file list.
16902         * MODULES.html.sh (func_all_modules): Add getnline.
16903
16904 2003-07-17  Bruno Haible  <bruno@clisp.org>
16905
16906         * m4/getnline.m4: New file.
16907
16908 2003-07-17  Bruno Haible  <bruno@clisp.org>
16909
16910         * m4/Makefile.am.in: Remove file.
16911         * m4/Makefile.am: Remove file.
16912         * m4/Makefile.in: Remove file.
16913
16914 2003-07-17  Bruno Haible  <bruno@clisp.org>
16915
16916         * lib/getnline.h: New file.
16917         * lib/getnline.c: New file.
16918         * lib/getndelim2.c: New file, extracted from getline.c.
16919         (getndelim2): Renamed from getdelim2, with added nmax argument.
16920         * lib/getline.c: Include getndelim2.c.
16921         (getdelim2): Moved out to getndelim2.c.
16922         (getline, getdelim): Update.
16923
16924 2003-07-17  Bruno Haible  <bruno@clisp.org>
16925
16926         * lib/Makefile.am: Remove file.
16927         * lib/Makefile.in: Remove file.
16928
16929 2003-07-17  Bruno Haible  <bruno@clisp.org>
16930
16931         * configure.in: Remove file.
16932         * Makefile.in: Remove file.
16933
16934 2003-07-17  Bruno Haible  <bruno@clisp.org>
16935
16936         * MODULES.html.sh: Put the </BODY> right before </HTML>.
16937
16938 2003-07-16  Karl Berry  <karl@gnu.org>
16939
16940         * config/srclist-update: was running fixlicense twice, which caused
16941                 texinfo.tex to be nullified for some reason.  Simplify,
16942                 $gplsrc is no longer needed as far as I can see?
16943
16944 2003-07-16  Jim Meyering  <jim@meyering.net>
16945
16946         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
16947
16948 2003-07-15  Paul Eggert  <eggert@twinsun.com>
16949
16950         * config/srclist.txt: Get the following files from gettext-runtime/intl
16951         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
16952         ref-del.sin.  From Bruno Haible.
16953         * config/srclist-update (fixfile): Change grep pattern again, since the
16954         previous fix didn't work (there was another trailing $).  Use
16955         '[$]' to escape the $s.
16956
16957 2003-07-15  Karl Berry  <karl@gnu.org>
16958
16959         * lib/vasnprintf.c: update from gettext.
16960
16961 2003-07-15  Karl Berry  <karl@gnu.org>
16962
16963         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
16964         gets expanded when surrounded by '$'.
16965
16966 2003-07-15  Jim Meyering  <jim@meyering.net>
16967
16968         * modules/save-cwd: Don't depend on error.  From Derek Price.
16969
16970 2003-07-15  Jim Meyering  <jim@meyering.net>
16971
16972         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
16973
16974 2003-07-14  Simon Josefsson  <jas@extundo.com>
16975
16976         * modules/mempcpy: New file.
16977         * MODULES.html.sh (func_all_modules): Add mempcpy.
16978
16979 2003-07-14  Simon Josefsson  <jas@extundo.com>
16980
16981         * m4/mempcpy.m4: New file.
16982
16983 2003-07-14  Simon Josefsson  <jas@extundo.com>
16984
16985         * lib/mempcpy.h: New file.
16986         * lib/mempcpy.c: New file.
16987
16988 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16989
16990         * modules/getdate, modules/posixtm: Depend on mktime.
16991
16992 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16993
16994         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
16995         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
16996         unicodeio.c, unicodeio.h, unlocked-io.h:
16997         Switch from LGPL to GPL.
16998
16999 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17000
17001         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
17002         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
17003         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
17004         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
17005         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
17006         updated automatically by ../config/srclist-update.  This changes
17007         their license from LPGL to GPL.
17008
17009 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17010
17011         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
17012         assumed to refer to the root of the most recent stable gettext version.
17013         * config/srclistvars.sh: Add defaults for eggert.
17014         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
17015         Match "This program" as well as "The program".  This is needed
17016         for gettext.
17017
17018 2003-07-14  Jim Meyering  <jim@meyering.net>
17019
17020         Don't emit diagnostics.  Let callers do that.
17021         * lib/save-cwd.c: Don't include "error.h".
17022         (save_cwd): Don't call error.  Ensure that errno is valid
17023         when returning nonzero.
17024
17025         * lib/save-cwd.h (restore_cwd): Update prototype.
17026         * lib/save-cwd.c (restore_cwd): Remove two parameters.
17027         Simplify.  Don't call error upon failure.  Let callers do that.
17028         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
17029         when auditing is enabled.  But don't bother updating the #if.
17030
17031 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
17032
17033         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
17034         it breaks C++ compilation.
17035         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
17036
17037 2003-07-10  Simon Josefsson  <jas@extundo.com>
17038
17039         * modules/strchrnul (Makefile.am): Add strchrnul.h.
17040
17041 2003-07-10  Jim Meyering  <jim@meyering.net>
17042
17043         * m4/clock_time.m4: Remove trailing blank.
17044         * m4/intmax_t.m4: Likewise.
17045
17046 2003-07-10  Jim Meyering  <jim@meyering.net>
17047
17048         * lib/vasnprintf.c: Remove trailing blanks.
17049         Make cpp indentation consistent.
17050
17051 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17052
17053         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
17054         posixver.c, strftime.c, strnlen.c, strverscmp.c:
17055         Switch from LGPL to GPL.
17056
17057 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17058
17059         * config/srclist.txt: Sort sublists.  Add
17060         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
17061         that differ from gnulib for one reason or another; we'd like this list
17062         to be smaller but for now let's document what we have.
17063
17064 2003-07-08  Paul Eggert  <eggert@twinsun.com>
17065
17066         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
17067         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
17068         and sweeter "eval x=$x".
17069         * config/srclist.txt: Get lib/argp* from glibc.
17070
17071 2003-07-07  Paul Eggert  <eggert@twinsun.com>
17072
17073         * lib/mktime.c: Fix some boundary cases and remove need for floating
17074         point.
17075
17076         Issue a compile-time diagnostic if time_t is floating point, or if
17077         two's complement arithmetic is not in effect, or if arithmetic
17078         right shift does not propagate the sign.  These assumptions were
17079         all in the original code but they weren't checked.
17080
17081         (TIME_T_MIDPOINT, verify): New macros.
17082         (__isleap): Remove; it has integer overflow problems.
17083         (leapyear): New function, without those problems.
17084         (ydhms_tm_diff): Remove; splitting into two parts.
17085         (ydhms_diff): New function, containing the arithmetic part of
17086         the old ydhms_tm_diff function.  Issue a compile-time
17087         diagnostic if we are not using C99 integer division.
17088         Avoid casts when possible.
17089         (guess_time_tm): New function, containing the checking part of
17090         the old ydhms_tm_diff function.  Return the new value, rather than
17091         the difference between it and the old.  Accept a new argument T
17092         so that *T specifies the old value.  Check for overflow in the result.
17093
17094         (__mktime_internal): Use a time_t offset, not a long int offset.
17095         This undoes the 2003-06-04 change, which is no longer needed now
17096         that we have better overflow checking.
17097         (localtime_offset): Likewise.
17098
17099         (__mktime_internal): Avoid harmful overflow on hosts where time_t
17100         and long are 64-bit but int is only 32-bit.
17101         (ydhms_diff): Use long int to store year1 and yday1.
17102         Issue a compile-time diagnostic if long int is not wide enough.
17103
17104         (__mktime_internal): Use long int to store adjusted year and yday.
17105         Use plain C rather than preprocessor commands, if that doesn't
17106         affect efficiency.
17107         Check for overflow (and try to repair) after each probe
17108         rather than checking only at the very end.  This avoids some bugs
17109         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
17110         does not equal GMT offset at maximum time).
17111         Use integer to check for overflow rather than floating point; this
17112         is more portable to non-IEEE hosts, and is a tad faster.
17113         When we detect that we are oscillating between two values,
17114         don't check whether tm_isdst has the requested value, since
17115         we already know the answer.  When tm_isdst has the wrong value,
17116         use a different heuristic to find the right one, based on the
17117         extreme values actually observed in practice in tz2003a,
17118         rather than the (overly optimistic) "previous 3 calendar quarters".
17119
17120         (not_equal_tm, print_tm, check_result): Use "const T" rather than
17121         "T const" to accommodate glibc style.
17122         (check_result): Use less-confusing report format.  "long" -> "long int.
17123         (main): Likewise.
17124         Don't loop if the iteration overflows time_t.
17125         Allow a negative step in the iteration.
17126
17127 2003-07-06  Karl Berry  <karl@gnu.org>
17128
17129         * config/depcomp: update from automake.
17130         * config/config.sub: update from prep.
17131
17132 2003-07-03  Karl Berry  <karl@gnu.org>
17133
17134         * config/config.guess: update from prep.
17135
17136 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17137
17138         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
17139         xreadlink.c now includes it unconditionally.
17140
17141 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17142
17143         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
17144         having it depend on HAVE_SYS_TYPES_H.
17145
17146 2003-07-01  Bruno Haible  <bruno@clisp.org>
17147
17148         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
17149         <sys/types.h> should be sufficient.
17150         Reported by Paul Eggert.
17151
17152 2003-06-26  Karl Berry  <karl@gnu.org>
17153
17154         * config/depcomp: update from automake.
17155
17156 2003-06-26  Bruno Haible  <bruno@clisp.org>
17157
17158         * modules/human: Depend on module stdbool.
17159
17160 2003-06-25  Bruno Haible  <bruno@clisp.org>
17161
17162         * modules/readlink: New file.
17163         * modules/xreadlink: Depend on it.
17164         * MODULES.html.sh (func_all_modules): Add readlink.
17165
17166 2003-06-25  Bruno Haible  <bruno@clisp.org>
17167
17168         * m4/readlink.m4: New file.
17169
17170 2003-06-25  Bruno Haible  <bruno@clisp.org>
17171
17172         * lib/readlink.c: New file.
17173
17174 2003-06-22  Karl Berry  <karl@gnu.org>
17175
17176         * config/srclist.txt: update mkinstalldirs from automake.
17177         * config/mkinstalldirs: update.
17178
17179 2003-06-22  Bruno Haible  <bruno@clisp.org>
17180
17181         Portability to mingw32.
17182         * m4/ssize_t.m4: New file, from GNU gettext.
17183         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
17184         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
17185
17186 2003-06-22  Bruno Haible  <bruno@clisp.org>
17187
17188         * modules/safe-read: Add m4/ssize_t.m4.
17189         * modules/xreadlink: Add m4/ssize_t.m4.
17190
17191 2003-06-20  Bruno Haible  <bruno@clisp.org>
17192
17193         Assume C89, so PARAMS isn't needed.
17194         * lib/unicodeio.h (PARAMS): Remove.
17195         * lib/unicodeio.c: Don't use PARAMS.
17196
17197 2003-06-18  Karl Berry  <karl@gnu.org>
17198
17199         * config/config.{guess,sub}: update from prep.
17200
17201 2003-06-18  Jim Meyering  <jim@meyering.net>
17202
17203         Merge changes from coreutils.
17204         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
17205         Remove explicit declarations of xmalloc and realloc.
17206         Include xalloc.h.
17207         (read_utmp): Remove anachronistic cast of xmalloc.
17208
17209 2003-06-17  Paul Eggert  <eggert@twinsun.com>
17210
17211         Assume C89, so PARAMS isn't needed.
17212         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
17213         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
17214         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
17215         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
17216         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
17217         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
17218         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
17219         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
17220         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
17221         lib/xstrtod.h, lib/xstrtol.h: Likewise.
17222         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
17223         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
17224         no longer needed. Anyway, config.h should always be included before any
17225         other file.
17226
17227 2003-06-11  Simon Josefsson  <jas@extundo.com>
17228
17229         * modules/sysexits: New file.
17230         * MODULES.html.sh (func_all_modules): Add sysexits.
17231
17232 2003-06-11  Simon Josefsson  <jas@extundo.com>
17233
17234         * lib/sysexit_.h: New file.
17235
17236 2003-06-11  Derek Price  <derek@ximbiot.com>
17237
17238         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
17239         necessary.
17240
17241 2003-06-11  Bruno Haible  <bruno@clisp.org>
17242
17243         * m4/sysexits.m4: New file.
17244
17245 2003-06-10  Simon Josefsson <jas@extundo.com>
17246
17247         * lib/argp.h: New file, from glibc.
17248         * lib/argp-ba.c: New file, from glibc.
17249         * lib/argp-eexst.c: New file, from glibc.
17250         * lib/argp-fmtstream.c: New file, from glibc.
17251         * lib/argp-fmtstream.h: New file, from glibc.
17252         * lib/argp-fs-xinl.c: New file, from glibc.
17253         * lib/argp-help.c: New file, from glibc.
17254         * lib/argp-namefrob.h: New file, from glibc.
17255         * lib/argp-parse.c: New file, from glibc.
17256         * lib/argp-pv.c: New file, from glibc.
17257         * lib/argp-pvh.c: New file, from glibc.
17258         * lib/argp-xinl.c: New file, from glibc.
17259
17260 2003-06-10  Simon Josefsson  <jas@extundo.com>
17261
17262         * modules/strchrnul: New file.
17263
17264 2003-06-10  Simon Josefsson  <jas@extundo.com>
17265
17266         * modules/argp: New file.
17267
17268 2003-06-10  Simon Josefsson  <jas@extundo.com>
17269
17270         * m4/strchrnul.m4: New file.
17271
17272 2003-06-10  Simon Josefsson  <jas@extundo.com>
17273
17274         * lib/strchrnul.h: New file.
17275         * lib/strchrnul.c: New file.
17276
17277 2003-06-10  Bruno Haible  <bruno@clisp.org>
17278
17279         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
17280
17281 2003-06-07  Karl Berry  <karl@gnu.org>
17282
17283         * config/config.{guess,sub}: update from prep.
17284
17285 2003-06-07  Jim Meyering  <jim@meyering.net>
17286
17287         * modules/strtod: Use $(...) notation, not @...@ for
17288         AC_REPLACE'd variables.
17289         * modules/localcharset: Likewise.
17290
17291 2003-06-07  Jim Meyering  <jim@meyering.net>
17292
17293         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
17294         in place of my name in the copyright comment.
17295         Remove definition and uses of __P.
17296
17297         From coreutils.
17298         * lib/stat.c: Don't declare xmalloc explicitly.
17299         Instead, include "xalloc.h".
17300         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
17301         xrealloc, and xcalloc return values.
17302         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
17303         Improve comment.
17304         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
17305
17306 2003-06-07  Bruno Haible  <bruno@clisp.org>
17307
17308         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
17309         avoid AC_CONFIG_LINKS.
17310         * modules/fnmatch (Makefile.am): Use explicit creation rule for
17311         fnmatch.h, to avoid AC_CONFIG_LINKS.
17312         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
17313
17314 2003-06-07  Bruno Haible  <bruno@clisp.org>
17315
17316         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
17317         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
17318         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
17319         directory.
17320         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
17321         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
17322         directory.
17323
17324 2003-06-06  Jim Meyering  <jim@meyering.net>
17325
17326         Merge from coreutils.
17327         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
17328         Consolidate declarations and initializations of *_base* locals.
17329
17330         Merge from coreutils.
17331         This avoids a core dump on systems without GNU putenv,
17332         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
17333         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
17334         (unsetenv): New static function, from GNU libc.
17335         (rpl_putenv): Use it.
17336
17337         * lib/modechange.c: Remove trailing blanks.
17338
17339         Merge from coreutils.
17340         * lib/fsusage.c: Remove declaration of statfs.
17341         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
17342
17343         * lib/posixtm.c: Include <stdbool.h> unconditionally.
17344
17345 2003-06-06  Jim Meyering  <jim@meyering.net>
17346
17347         * lib/stdbool_.h: Renamed from stdbool.h.in.
17348
17349 2003-06-06  Jim Meyering  <jim@meyering.net>
17350             Bruno Haible  <bruno@clisp.org>
17351
17352         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
17353         Adjust Makefile.am snippet not to redirect directly to target.
17354         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
17355
17356 2003-06-05  Paul Eggert  <eggert@twinsun.com>
17357
17358         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
17359         mismatch, look in future quarters as well as past.  This fixes a
17360         bug when processing fall-backwards gaps immediately after a long
17361         period of daylight-saving time.
17362
17363         * lib/mktime.c: Assume freestanding C89 or better.
17364         (HAVE_LIMITS_H): Remove.  Assume it's 1.
17365         (__P): Remove; not used.
17366         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
17367         (mktime, not_equal_tm, print_tm, check_result,
17368         main): Use prototypes.  Use const * where appropriate.
17369         (main): Fix typo in testing code that uncovered by above changes.
17370         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
17371
17372 2003-06-04  Paul Eggert  <eggert@twinsun.com>
17373
17374         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
17375         locale.h, localeconv.  This merges changes from coreutils.
17376
17377         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
17378         It can be removed after the next Autoconf is released.
17379         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
17380         needed.
17381
17382 2003-06-04  Paul Eggert  <eggert@twinsun.com>
17383
17384         * lib/mktime.c: Fix Debian bug 177940
17385         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
17386         (localtime_offset): Now long int, not time_t, because we want it
17387         to be guaranteed to be signed.  All uses changed.
17388         (__mktime_internal): If overflow would occur when adding offset,
17389         don't add it.
17390
17391         Merge 'human' changes from coreutils.  Rewrite to support
17392         locale-specific notations like thousands separators.
17393         * lib/human.c: Simplify authorship notice.
17394         Include human.h immediately after config.h.
17395         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
17396         <limits.h>: Do not include, since human.h does.
17397         (SIZE_MAX, UINTMAX_MAX): New macros.
17398         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
17399         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
17400         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
17401         (power_letter): Renamed from suffixes.
17402         (generate_suffix_backwards): Remove.
17403         (adjust_value): Now takes int style (because of human.h changes)
17404         and long double value (for greater precision on some platforms).
17405         (group_number): New function.
17406         (human_readable): Use it.  Use integer options, not enum.
17407         Put the options before the sizes in the arg list.
17408         Support all the new options.
17409         The old human_readable function has been removed;
17410         use inttostr.h instead.
17411         (human_readable, default_block_size, humblock):
17412         Use uintmax_t, not int, for block sizes.
17413         (human_readable_inexact, block_size_types): Remove.
17414         (block_size_opts): New constant.
17415         (human_options): Renamed from human_block_size, with new signature
17416         that allows block sizes up to UINTMAX_MAX.  All callers changed.
17417         * lib/human.h: Add copyright and authorship notice.
17418         Include <limits.h> and <stdbool.h> unconditionally.
17419         (PARAMS): Remove.  All uses removed.
17420         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
17421         (enum human_inexact_style): Remove tag; now a nameless enum.
17422         (human_floor, human_ceiling, human_round_to_even): Now have
17423         values 2, 0, 1 rather than -1, 1, 0.
17424         (human_group_digits, human_suppress_point_zero, human_autoscale,
17425         human_base_1024, human_SI, human_B): New constants.
17426         (human_readable_inexact, human_block_size): Remove.
17427         (human_readable): Size args are now uintmax_t, not int.
17428         (human_options): New decl.
17429
17430         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
17431         unnecessary now that we assume C89 or better.  This change
17432         imported from coreutils.
17433
17434         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
17435         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
17436         in the 2003-05-30 sync from glibc.
17437
17438         .h files should stand alone, but we shouldn't include <sys/types.h>
17439         if we can get away with just <stddef.h>.
17440
17441         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
17442         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
17443         rather than <sys/types.h>, as we merely need size_t.
17444         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
17445         to get size_t.
17446         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
17447         Include <stdio.h>, to get FILE.
17448         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
17449         memcasecmp.h has included <stddef.h> and all we need is size_t.
17450         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
17451         our interface, instead of including <sys/types.h>
17452
17453 2003-06-04  Paul Eggert  <eggert@twinsun.com>
17454
17455         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
17456         now, as glibc mktime is buggy on non-glibc systems.
17457
17458 2003-06-03  Karl Berry  <karl@gnu.org>
17459
17460         * config/config.sub: update from prep.
17461
17462 2003-06-02  Paul Eggert  <eggert@twinsun.com>
17463
17464         [from coreutils]
17465         Fix some minor time-related bugs with POSIX time arguments.
17466         Some valid time stamps were being rejected (notably -1, and
17467         time stamps before 1900 on 64-bit hosts).  And some invalid
17468         time stamps were being accepted, e.g. September 31.
17469
17470         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
17471         that we can return (time_t) -1 successfully.
17472         * lib/posixtm.c: Likewise.
17473         [HAVE_STDBOOL_H]: Include <stdbool.h>.
17474         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
17475         (t): Remove static var.
17476         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
17477         of static var.  All uses changed.
17478         (year): Do not reject years before 1900; they can occur with
17479         64-bit time_t.
17480         (posix_time_parse): Do not check for out-of-range components;
17481         that is now the caller's responsibility, since our checks were
17482         only approximations.
17483         (posixtime): Use mktime to check for out-of-range components,
17484         since it knows them exactly.
17485         If mktime returns (time_t) -1, check whether an error actually occurred
17486         by invoking localtime on -1.
17487         (main) [TEST_POSIXTIME]: Check for input data errors, and report
17488         posixtime failures better.
17489         Improve the test data (in comments only).
17490
17491 2003-06-02  Karl Berry  <karl@gnu.org>
17492
17493         * config/mkinstalldirs (version): new variable.
17494         (--version): new option.
17495         (usage): improve message.
17496
17497 2003-05-30  Karl Berry  <karl@gnu.org>
17498
17499         * lib/mktime.c: update from libc.
17500
17501 2003-05-30  Bruno Haible  <bruno@clisp.org>
17502
17503         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
17504         * config/config.rpath: Upgrade to gettext-0.12.1.
17505
17506 2003-05-30  Bruno Haible  <bruno@clisp.org>
17507
17508         * m4/gettext.m4: Upgrade to gettext-0.12.1.
17509         * m4/nls.m4: New file, from gettext-0.12.1.
17510         * m4/po.m4: New file, from gettext-0.12.1.
17511         * m4/progtest.m4: Upgrade to gettext-0.12.1.
17512
17513 2003-05-30  Bruno Haible  <bruno@clisp.org>
17514
17515         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
17516         * lib/localcharset.h: Likewise.
17517         * lib/localcharset.c: Likewise.
17518
17519 2003-05-29  Karl Berry  <karl@gnu.org>
17520
17521         * config/config.rpath: update from gettext.
17522
17523 2003-05-28  Paul Eggert  <eggert@twinsun.com>
17524
17525         Assume the headers required for C89 freestanding compilers.
17526         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
17527         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
17528         * m4/human.m4 (gl_HUMAN): Likewise.
17529         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
17530         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
17531         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17532         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
17533         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17534         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
17535
17536 2003-05-28  Paul Eggert  <eggert@twinsun.com>
17537
17538         Assume the headers required for C89 freestanding compilers.
17539         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
17540         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
17541         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
17542         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
17543         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
17544         define, since <limits.h> is guaranteed to do that.
17545         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
17546         * lib/exclude.c: Include <stdbool.h> unconditionally.
17547         * lib/tempname.c: Include <stddef.h> unconditionally.
17548         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
17549         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
17550         <stddef.h> does that.
17551         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
17552         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
17553         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
17554         needed.
17555         * lib/xstrtol.c: Likewise.
17556         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
17557         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
17558
17559         * lib/addext.c (addext): Use assignment rather than cast, to avoid
17560         warnings on some platforms.
17561
17562         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
17563         arbitrarily.
17564
17565 2003-05-26  Jim Meyering  <jim@meyering.net>
17566
17567         Merge in a change from coreutils:
17568         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
17569         that is guaranteed to be `no'.  Use `no_such_member' to indicate
17570         that condition, rather than `-1' which is slightly misleading.
17571         Change the name of the cache variable to have the gl_ prefix.
17572         Prompted by a patch from Richard Dawe for DJGPP.
17573
17574 2003-05-24  Karl Berry  <karl@gnu.org>
17575
17576         * config/config.guess: update from prep.
17577
17578 2003-05-22  Karl Berry  <karl@gnu.org>
17579
17580         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
17581
17582 2003-05-20  Karl Berry  <karl@gnu.org>
17583
17584         * config/config.guess: update from prep.
17585
17586 2003-05-18  Karl Berry  <karl@gnu.org>
17587
17588         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
17589         might actually be set by the user.
17590
17591         * config/depcomp, install-sh, mdate-sh: update from automake.
17592
17593 2003-05-17  Bruno Haible  <bruno@clisp.org>
17594
17595         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
17596         invalid expansion for AC_EGREP_CPP.
17597         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
17598         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
17599         Suggested by Akim Demaille <akim@epita.fr> in
17600         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
17601
17602 2003-05-12  Jim Meyering  <jim@meyering.net>
17603
17604         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
17605         the space-padded-by-default conversion specifiers, %e, %k, %l.
17606
17607 2003-05-12  Bruno Haible  <bruno@clisp.org>
17608
17609         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
17610         the string is longer than 4 KB.
17611
17612 2003-05-11  Karl Berry  <karl@gnu.org>
17613
17614         * config/config.{guess,sub}: update from prep.
17615
17616 2003-05-09  Bruno Haible  <bruno@clisp.org>
17617
17618         * modules/error: Add m4/strerror_r.m4 to file list.
17619
17620 2003-05-03  Bruno Haible  <bruno@clisp.org>
17621
17622         Upgrade to Unicode-4.0.
17623         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
17624         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
17625         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
17626         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
17627         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
17628         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
17629         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
17630         Change width of U+E0100..U+E01EF from 1 to 0.
17631
17632 2003-04-25  Jim Meyering  <jim@meyering.net>
17633
17634         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
17635         of type size_t, not int.
17636
17637 2003-04-25  Bruno Haible  <bruno@clisp.org>
17638
17639         * lib/copy-file.c: Include <stddef.h>, for size_t.
17640
17641 2003-04-21  Paul Eggert  <eggert@twinsun.com>
17642
17643         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
17644         code which expansion is under static control.  Patch imported from
17645         Akim Demaille's patch to Bison; see
17646         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
17647
17648 2003-04-14  Bruno Haible  <bruno@clisp.org>
17649
17650         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
17651
17652 2003-04-11  Jim Meyering  <jim@meyering.net>
17653
17654         Merge changes from Coreutils.
17655
17656         2003-03-22  Jim Meyering  <jim@meyering.net>
17657
17658         * lib/strftime.c (widen): Cast alloca return value to proper type.
17659
17660         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
17661
17662         From GNU libc.
17663         * lib/strftime.c (my_strftime): Handle very large width
17664         specifications for numeric values correctly.  Improve checks for
17665         overflow.
17666
17667         2003-01-19  Jim Meyering  <jim@meyering.net>
17668
17669         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
17670         definitions.
17671         (nl_get_alt_digit) [! defined my_strftime]: Define.
17672         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
17673         _nl_get_alt_digit and _nl_get_walt_digit.
17674
17675         * lib/strftime.c (my_strftime): Merge in locale-related changes from
17676         libc. These changes have no effect outside of _LIBC.
17677
17678 2003-04-10  Bruno Haible  <bruno@clisp.org>
17679
17680         * modules/findprog: New file.
17681         * MODULES.html.sh (func_all_modules): Add it.
17682
17683 2003-04-10  Bruno Haible  <bruno@clisp.org>
17684
17685         * m4/findprog.m4: New file.
17686         * m4/eaccess.m4: New file.
17687
17688 2003-04-10  Bruno Haible  <bruno@clisp.org>
17689
17690         * lib/findprog.h: New file, from GNU gettext.
17691         * lib/findprog.c: New file, from GNU gettext.
17692
17693 2003-04-05  Jim Meyering  <jim@meyering.net>
17694
17695         Merge changes from Coreutils.
17696
17697         * lib/exclude.h (PARAMS): Remove definition and uses.
17698         * lib/exclude.c: Remove uses of `PARAMS'.
17699
17700         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
17701         Add test-cases for DOS filenames. Declare program_name.
17702         (main): Set up program_name.  Patch by Rich Dawe.
17703
17704         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
17705         error from mntctl.
17706         Use mntctl's return value to drive the entry-processing loop, since
17707         we can't rely on the value of the vmt_length member in the last
17708         entry.  On some systems doing so could result in exhausting
17709         virtual memory.  Based in part on a patch from Mike Jetzer.
17710
17711 2003-04-04  Bruno Haible  <bruno@clisp.org>
17712
17713         * modules/linebreak: New file.
17714         * MODULES.html.sh (func_all_modules): Add it.
17715
17716 2003-04-04  Bruno Haible  <bruno@clisp.org>
17717
17718         * m4/linebreak.m4: New file.
17719
17720 2003-04-04  Bruno Haible  <bruno@clisp.org>
17721
17722         * lib/linebreak.h: New file, from GNU gettext.
17723         * lib/linebreak.c: New file, from GNU gettext with slight
17724         modifications.
17725         * lib/lbrkprop.h: New file, from GNU gettext.
17726
17727 2003-04-03  Bruno Haible  <bruno@clisp.org>
17728
17729         * modules/utf8-ucs4: New file.
17730         * modules/utf16-ucs4: New file.
17731         * modules/ucs4-utf8: New file.
17732         * modules/ucs4-utf16: New file.
17733         * MODULES.html.sh (func_all_modules): Add them.
17734
17735 2003-04-03  Bruno Haible  <bruno@clisp.org>
17736
17737         * m4/utf-ucs4.m4: New file.
17738         * m4/ucs4-utf.m4: New file.
17739
17740 2003-04-03  Bruno Haible  <bruno@clisp.org>
17741
17742         * lib/utf8-ucs4.h: New file, from GNU gettext.
17743         * lib/utf16-ucs4.h: New file, from GNU gettext.
17744         * lib/ucs4-utf8.h: New file, from GNU gettext.
17745         * lib/ucs4-utf16.h: New file, from GNU gettext.
17746
17747 2003-04-02  Bruno Haible  <bruno@clisp.org>
17748
17749         * modules/binary-io: New file.
17750         * MODULES.html.sh (func_all_modules): Add it.
17751
17752 2003-04-02  Bruno Haible  <bruno@clisp.org>
17753
17754         * lib/binary-io.h: New file, from GNU gettext.
17755
17756 2003-04-01  Bruno Haible  <bruno@clisp.org>
17757
17758         * modules/pathname: New file.
17759         * MODULES.html.sh (func_all_modules): Add it.
17760
17761 2003-04-01  Bruno Haible  <bruno@clisp.org>
17762
17763         * lib/pathname.h: New file, from GNU gettext.
17764         * lib/concatpath.c: New file, from GNU gettext.
17765
17766 2003-03-30  Bruno Haible  <bruno@clisp.org>
17767
17768         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
17769
17770 2003-03-30  Bruno Haible  <bruno@clisp.org>
17771
17772         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
17773         function chown() doesn't exist.
17774
17775 2003-03-28  Bruno Haible  <bruno@clisp.org>
17776
17777         * modules/copy-file: New file.
17778         * MODULES.html.sh (func_all_modules): Add it.
17779
17780 2003-03-28  Bruno Haible  <bruno@clisp.org>
17781
17782         * m4/copy-file.m4: New file.
17783
17784 2003-03-28  Bruno Haible  <bruno@clisp.org>
17785
17786         * lib/copy-file.h: New file, from GNU gettext.
17787         * lib/copy-file.c: New file, from GNU gettext.
17788
17789 2003-03-18  Jim Meyering  <jim@meyering.net>
17790
17791         * lib/quote.c (quote_n): Fix typo in comment.
17792
17793 2003-03-18  Bruno Haible  <bruno@clisp.org>
17794
17795         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
17796         checking.
17797         * m4/onceonly_2_57.m4: Likewise.
17798
17799 2003-03-17  Bruno Haible  <bruno@clisp.org>
17800
17801         * m4/onceonly.m4: Require autoconf 2.54 or newer.
17802         (m4_quote): Remove macro.
17803         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
17804
17805 2003-03-14  Jim Meyering  <jim@meyering.net>
17806
17807         Merge changes from Coreutils.
17808         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
17809         to be const, in order to avoid warnings.
17810         (obstack_room): Likewise.
17811         (obstack_empty_p): Likewise.
17812
17813 2003-03-14  Bruno Haible  <bruno@clisp.org>
17814
17815         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
17816         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
17817
17818 2003-03-13  Paul Eggert  <eggert@twinsun.com>
17819
17820         Merge changes from Bison.
17821         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
17822         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
17823         when compiling Bison 1.875's `bitset bset = obstack_alloc
17824         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
17825         * lib/hash.c: Include <stdbool.h> unconditionally.
17826
17827 2003-03-13  Paul Eggert  <eggert@twinsun.com>
17828
17829         * m4/onceonly.m4 (m4_quote): New macro.
17830         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
17831         Quote AC_FOREACH variable-expansions properly.
17832
17833 2003-03-13  Paul Eggert  <eggert@twinsun.com>
17834
17835         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
17836
17837 2003-03-09  Paul Eggert  <eggert@twinsun.com>
17838
17839         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
17840         Reported by Bruce Becker; see:
17841         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
17842
17843 2003-03-03  Paul Eggert  <eggert@twinsun.com>
17844             Bruno Haible  <bruno@clisp.org>
17845
17846         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
17847         Reported by John Hughes, see
17848         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
17849
17850 2003-02-20  Bruno Haible  <bruno@clisp.org>
17851
17852         * MODULES.html.sh (func_all_modules): Add poll.
17853
17854 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
17855
17856         * modules/poll: New file.
17857
17858 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
17859
17860         * lib/poll_.h: New file.
17861         * lib/poll.c: New file.
17862
17863 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
17864
17865         * m4/poll.m4: New file.
17866
17867 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
17868
17869         * modules/mathl: New file.
17870
17871 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
17872
17873         * lib/mathl.h: New file.
17874         * lib/acosl.c: New file.
17875         * lib/asinl.c: New file.
17876         * lib/atanl.c: New file.
17877         * lib/ceill.c: New file.
17878         * lib/cosl.c: New file.
17879         * lib/expl.c: New file.
17880         * lib/floorl.c: New file.
17881         * lib/frexpl.c: New file.
17882         * lib/ldexpl.c: New file.
17883         * lib/logl.c: New file.
17884         * lib/sincosl.c: New file.
17885         * lib/sinl.c: New file.
17886         * lib/sqrtl.c: New file.
17887         * lib/tanl.c: New file.
17888         * lib/trigl.c: New file.
17889         * lib/trigl.h: New file.
17890
17891 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
17892
17893         * m4/mathl.m4: New file.
17894
17895 2003-02-18  Bruno Haible  <bruno@clisp.org>
17896
17897         * MODULES.html.sh (func_all_modules): Add mathl.
17898
17899 2003-02-17  Bruno Haible  <bruno@clisp.org>
17900
17901         * modules/mkdtemp: New module.
17902         * MODULES.html.sh (func_all_modules): Add it.
17903
17904 2003-02-17  Bruno Haible  <bruno@clisp.org>
17905
17906         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
17907
17908 2003-02-17  Bruno Haible  <bruno@clisp.org>
17909
17910         * lib/mkdtemp.h: New file, from GNU gettext.
17911         * lib/mkdtemp.c: New file, from GNU gettext.
17912
17913 2003-02-02  Jim Meyering  <jim@meyering.net>
17914
17915         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
17916         e.g. glibc-2.2.93.
17917
17918 2003-01-31  Bruno Haible  <bruno@clisp.org>
17919
17920         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
17921         'rpl_rename'.
17922         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
17923         'rpl_strnlen'.
17924         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
17925         'rpl_strtod'.
17926         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
17927         'rpl_utime'.
17928
17929 2003-01-31  Bruno Haible  <bruno@clisp.org>
17930
17931         * lib/rename.c: #undef rename before defining rpl_rename.
17932         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
17933
17934 2003-01-30  Bruno Haible  <bruno@clisp.org>
17935
17936         * modules/vasnprintf, modules/vasprintf: New modules.
17937         * MODULES.html.sh (func_all_modules): Add them.
17938
17939 2003-01-30  Bruno Haible  <bruno@clisp.org>
17940
17941         * m4/signed.m4: New file, from GNU gettext.
17942         * m4/longdouble.m4: New file, from GNU gettext.
17943         * m4/wchar_t.m4: New file, from GNU gettext.
17944         * m4/wint_t.m4: New file, from GNU gettext.
17945         * m4/vasnprintf.m4: New file.
17946         * m4/vasprintf.m4: New file.
17947
17948 2003-01-30  Bruno Haible  <bruno@clisp.org>
17949
17950         * lib/printf-args.h: New file, from GNU gettext.
17951         * lib/printf-args.c: New file, from GNU gettext.
17952         * lib/printf-parse.h: New file, from GNU gettext.
17953         * lib/printf-parse.c: New file, from GNU gettext.
17954         * lib/vasnprintf.h: New file, from GNU gettext.
17955         * lib/vasnprintf.c: New file, from GNU gettext.
17956         * lib/asnprintf.c: New file, from GNU gettext.
17957         * lib/vasprintf.h: New file, from GNU gettext with modifications.
17958         * lib/vasprintf.c: New file, from GNU gettext.
17959         * lib/asprintf.c: New file, from GNU gettext.
17960
17961 2003-01-29  Bruno Haible  <bruno@clisp.org>
17962
17963         * modules/stpncpy: New module.
17964         * MODULES.html.sh (func_all_modules): Add it.
17965
17966 2003-01-29  Bruno Haible  <bruno@clisp.org>
17967
17968         * m4/stpncpy.m4: New file.
17969
17970 2003-01-29  Bruno Haible  <bruno@clisp.org>
17971
17972         * lib/stpncpy.h: New file, from GNU gettext with modifications.
17973         * lib/stpncpy.c: New file, from GNU gettext with modifications.
17974
17975 2003-01-28  Bruno Haible  <bruno@clisp.org>
17976
17977         * modules/c-ctype: New module.
17978         * MODULES.html.sh (func_all_modules): Add it.
17979
17980 2003-01-28  Bruno Haible  <bruno@clisp.org>
17981
17982         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
17983         Paul Eggert.
17984         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
17985         Paul Eggert.
17986
17987 2003-01-27  Bruno Haible  <bruno@clisp.org>
17988
17989         * modules/xsetenv: New module.
17990         * MODULES.html.sh (func_all_modules): Add it.
17991
17992 2003-01-27  Bruno Haible  <bruno@clisp.org>
17993
17994         * lib/xsetenv.h: New file, from GNU gettext.
17995         * lib/xsetenv.c: New file, from GNU gettext.
17996
17997 2003-01-23  Jim Meyering  <jim@meyering.net>
17998
17999         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
18000         from working on systems without dirfd (at least Irix and OSF1/Tru64).
18001
18002 2003-01-23  Bruno Haible  <bruno@clisp.org>
18003
18004         * modules/minmax: New module.
18005         * MODULES.html.sh (func_all_modules): Add it.
18006
18007 2003-01-23  Bruno Haible  <bruno@clisp.org>
18008
18009         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
18010         Eggert.
18011
18012 2003-01-22  Bruno Haible  <bruno@clisp.org>
18013
18014         * modules/exit: New module.
18015         * MODULES.html.sh (func_all_modules): Add it.
18016
18017 2003-01-22  Bruno Haible  <bruno@clisp.org>
18018
18019         * lib/exit.h: New file, from GNU gettext.
18020
18021 2003-01-19  Bruno Haible  <bruno@clisp.org>
18022
18023         * gnulib-tool: Recognize option --extract-maintainer.
18024         (func_get_maintainer): New function.
18025         * modules/*: Add Maintainer entry.
18026
18027 2003-01-16  Jim Meyering  <jim@meyering.net>
18028
18029         * m4/regex.m4: The `regex' struct is both input and output.
18030         Initialize it before each use.  Patch by Tim Waugh.
18031
18032 2003-01-16  Bruno Haible  <bruno@clisp.org>
18033
18034         * MODULES.html.sh: Add a table of contents. Add the module name as
18035         leftmost column. Add hyperlinks.
18036
18037 2003-01-15  Bruno Haible  <bruno@clisp.org>
18038
18039         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
18040
18041 2003-01-15  Bruno Haible  <bruno@clisp.org>
18042
18043         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
18044         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
18045         suffix.
18046
18047 2003-01-15  Bruno Haible  <bruno@clisp.org>
18048
18049         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
18050
18051 2003-01-15  Bruno Haible  <bruno@clisp.org>
18052
18053         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
18054         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
18055
18056 2003-01-14  Jim Meyering  <jim@meyering.net>
18057
18058         * lib/same.c (same_name): Tweak a comment.
18059
18060 2003-01-14  Bruno Haible  <bruno@clisp.org>
18061
18062         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
18063         when a string comparison is sufficient.
18064
18065 2003-01-14  Bruno Haible  <bruno@clisp.org>
18066
18067         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
18068         'unsigned int'.
18069
18070 2003-01-14  Bruno Haible  <bruno@clisp.org>
18071
18072         * lib/hash-pjw.c: Add comment about low quality of this function.
18073
18074 2003-01-13  Bruno Haible  <bruno@clisp.org>
18075
18076         * modules/stpcpy: Distribute lib/stpcpy.h.
18077         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
18078
18079 2003-01-13  Bruno Haible  <bruno@clisp.org>
18080
18081         * modules/*: Add a description.
18082         * modules/strpbrk: Fix Makefile.am snippet.
18083         * modules/strtoimax: Fix dependencies.
18084         * modules/strtoumax: Likewise.
18085
18086 2003-01-13  Bruno Haible  <bruno@clisp.org>
18087
18088         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
18089         * modules/alloca (Makefile.am): All object files depend on alloca.h.
18090         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
18091
18092 2003-01-13  Bruno Haible  <bruno@clisp.org>
18093
18094         * gnulib-tool (func_create_testdir): Store config/* files in the main
18095         directory.
18096         * config.rpath: Move to ...
18097         * config/config.rpath: ... here.
18098         * modules/gettext: Contains config/config.rpath, not config.rpath.
18099         * modules/iconv: Likewise.
18100
18101 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18102
18103         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18104         to avoid collisions with libcurses and libreadline.
18105
18106         * m4/getstr.m4: Remove.
18107         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
18108
18109 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18110
18111         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18112         to avoid collisions with libcurses and libreadline.
18113
18114         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
18115         * lib/getstr.h, getstr.c: Remove.
18116         * lib/getline.c: Include "getline.h", to check interface.
18117         Move body of old getstr.c here: this defines MIN_CHUNK and
18118         declares getdelim2, which is renamed from getstr.
18119         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
18120
18121         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
18122         All uses changed.
18123         * lib/linebuffer.h: Likewise.
18124         (readline): Remove backward-compatibility macro.
18125
18126 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18127
18128         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18129         to avoid collisions with libcurses and libreadline.
18130         * getstr: Remove.
18131         * MODULES.html.sh: Remove getstr.
18132         * modules/getline: Depend on unlocked-io, not getstr.
18133
18134 2003-01-12  Jim Meyering  <jim@meyering.net>
18135
18136         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
18137
18138 2003-01-10  Bruno Haible  <bruno@clisp.org>
18139
18140         * modules/alloca: Change Makefile.am requirements. Simplify Include
18141         requirements. Add lib/alloca_.h to file list.
18142
18143 2003-01-10  Bruno Haible  <bruno@clisp.org>
18144
18145         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
18146
18147 2003-01-10  Bruno Haible  <bruno@clisp.org>
18148
18149         * lib/alloca_.h: New file.
18150         * lib/getdate.y: Unconditionally include alloca.h.
18151         * lib/makepath.c: Likewise.
18152         * lib/setenv.c: Likewise.
18153         * lib/userspec.c: Likewise.
18154
18155 2003-01-09  Karl Berry  <karl@gnu.org>
18156
18157         * MODULES.html.sh: include `dirname $0` in PATH, to find
18158         gnulib-tool.
18159
18160 2003-01-09  Bruno Haible  <bruno@clisp.org>
18161
18162         * modules/stdbool: Change configure.ac, Makefile.am requirements.
18163         Simplify Include requirements. Add lib/stdbool.h.in to file list.
18164
18165 2003-01-09  Bruno Haible  <bruno@clisp.org>
18166
18167         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
18168
18169 2003-01-09  Bruno Haible  <bruno@clisp.org>
18170
18171         * lib/stdbool.h.in: New file.
18172
18173 2003-01-09  Bruno Haible  <bruno@clisp.org>
18174
18175         * gnulib-tool (func_all_modules): Ignore files ending in ~.
18176         * MODULES.html.sh: Likewise.
18177
18178 2003-01-08  Jim Meyering  <jim@meyering.net>
18179
18180         * lib/full-write.c: Undefine and define-away `const' after inclusion
18181         of errno.h, not before.  Suggestion from Bruno Haible.
18182
18183 2003-01-08  Bruno Haible  <bruno@clisp.org>
18184
18185         * modules/full-read: Depend on full-write.
18186
18187 2003-01-08  Bruno Haible  <bruno@clisp.org>
18188
18189         * lib/safe-read.c: Include specification header first, to ensure its
18190         selfcontainedness.
18191         * lib/full-write.c: Likewise.
18192
18193 2003-01-07  Jim Meyering  <jim@meyering.net>
18194
18195         * lib/full-write.c: Rework so that it may serve to define full_read,
18196         too.
18197         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
18198
18199 2003-01-07  Bruno Haible  <bruno@clisp.org>
18200
18201         * lib/strtoimax.c: Include <stdint.h> as an alternative to
18202         <inttypes.h>.
18203         * lib/xstrtol.h: Likewise.
18204         * lib/xstrtoimax.c: Likewise.
18205         * lib/xstrtoumax.c: Likewise.
18206         * lib/human.h: Likewise.
18207
18208         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
18209         on systems that have <inttypes.h> but not <stdint.h>.
18210
18211 2003-01-07  Bruno Haible  <bruno@clisp.org>
18212
18213         * MODULES.html.sh: Add copyright notice.
18214         (missed_files): Omit CVS directory entries.
18215         (func_module): Make it work with sed-3.02.
18216         * MODULES.txt: Remove file.
18217
18218 2003-01-06  Jim Meyering  <jim@meyering.net>
18219
18220         * lib/version-etc.c: Update year in translatable copyright string.
18221
18222 2003-01-03  Karl Berry  <karl@gnu.org>
18223
18224         * config/config.{guess,sub}: update from prep.
18225
18226 2003-01-02  Karl Berry  <karl@gnu.org>
18227
18228         * doc/COPYING.DOC: belatedly updated to 1.2.
18229
18230 2003-01-01  Karl Berry  <karl@gnu.org>
18231
18232         * gnulib-tool (func_verify_module): report module name $module in
18233         error message, not $1.
18234         * gnulib-tool (create-testdir): don't complain if destdir couldn't
18235         be created, only if it doesn't exist.
18236         * gnulib-tool (last_checkin_date): don't expand the $Date here.
18237
18238 2002-12-31  Paul Eggert  <eggert@twinsun.com>
18239
18240         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
18241
18242 2002-12-31  Paul Eggert  <eggert@twinsun.com>
18243
18244         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
18245         memcmp if strcoll doesn't work.
18246
18247 2002-12-31  Bruno Haible  <bruno@clisp.org>
18248
18249         * lib/utime.c (utime_null): No need to call ftruncate if the file was
18250         nonempty.
18251
18252 2002-12-31  Bruno Haible  <bruno@clisp.org>
18253
18254         * lib/memcoll.c (STRCOLL): New macro.
18255         (memcoll): Use it.
18256
18257 2002-12-31  Bruno Haible  <bruno@clisp.org>
18258
18259         * lib/localcharset.h: New file.
18260         * lib/localcharset.c: Include it.
18261         * lib/unicodeio.c: Likewise.
18262
18263 2002-12-31  Bruno Haible  <bruno@clisp.org>
18264
18265         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
18266         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
18267
18268 2002-12-31  Bruno Haible  <bruno@clisp.org>
18269
18270         * lib/getline.h: Include <stddef.h>, for size_t.
18271
18272         * lib/unicodeio.h: Include <stddef.h>, for size_t.
18273         * lib/unicodeio.c: Don't include <stddef.h>.
18274
18275 2002-12-31  Bruno Haible  <bruno@clisp.org>
18276
18277         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
18278         HAVE_TM_ZONE.
18279
18280 2002-12-24  Karl Berry  <karl@gnu.org>
18281
18282         * config/config.guess: update from prep.
18283
18284 2002-12-24  Bruno Haible  <bruno@clisp.org>
18285
18286         General infrasructure.
18287         * m4/README: Rewritten.
18288         * m4/onceonly.m4: New file.
18289         * m4/onceonly_2_57.m4: New file.
18290
18291         Module atexit.
18292         * m4/atexit.m4: New file.
18293
18294         Module strtod.
18295         * m4/strtod.m4: New file.
18296
18297         Module strtol.
18298         * m4/strtol.m4: New file.
18299
18300         Module strtoul.
18301         * m4/strtoul.m4: New file.
18302
18303         Module memchr.
18304         * m4/memchr.m4: New file.
18305
18306         Module memcmp.
18307         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
18308         (jm_FUNC_MEMCMP): Invoke it.
18309
18310         Module memcpy.
18311         * m4/memcpy.m4: New file.
18312
18313         Module memmove.
18314         * m4/memmove.m4: New file.
18315
18316         Module memset.
18317         * m4/memset.m4: New file.
18318
18319         Module strcspn.
18320         * m4/strcspn.m4: New file.
18321
18322         Module strpbrk.
18323         * m4/strpbrk.m4: New file.
18324
18325         Module strstr.
18326         * m4/strstr.m4: New file.
18327
18328         Module strerror.
18329         * m4/strerror.m4: New file.
18330
18331         Module mktime.
18332         * m4/mktime.m4: Renamed from jm-mktime.m4.
18333         (gl_PREREQ_MKTIME): New macro.
18334         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
18335
18336         Module malloc.
18337         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
18338         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
18339         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
18340
18341         Module realloc.
18342         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
18343         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
18344         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
18345
18346         Module strftime.
18347         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
18348         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
18349         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
18350         gl_TM_GMTOFF.
18351         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
18352
18353         Module xalloc.
18354         * m4/xalloc.m4: New file.
18355
18356         Module alloca.
18357         * m4/alloca.m4: New file.
18358
18359         Module putenv.
18360         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
18361         (jm_FUNC_PUTENV): Invoke it.
18362
18363         Module setenv.
18364         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
18365         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
18366         when invoked twice.
18367         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
18368         gt_FUNC_SETENV.
18369
18370         Module memrchr.
18371         * m4/memrchr.m4: New file.
18372
18373         Module stpcpy.
18374         * m4/stpcpy.m4: New file.
18375
18376         Module strcase.
18377         * m4/strcase.m4: New file.
18378
18379         Module strdup.
18380         * m4/strdup.m4: New file.
18381
18382         Module strnlen.
18383         * m4/strnlen.m4: New file.
18384
18385         Module strndup.
18386         * m4/strndup.m4: New file.
18387
18388         Module xstrtod.
18389         * m4/xstrtod.m4: New file.
18390
18391         Module xstrtol.
18392         * m4/xstrtol.m4: New file.
18393
18394         Module getdate.
18395         * m4/getdate.m4: New file.
18396
18397         Module unlocked-io.
18398         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
18399         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
18400         * m4/jm-glibc-io.m4n: Remove file.
18401
18402         Module long-options.
18403         * m4/long-options.m4: New file.
18404
18405         Module md5.
18406         * m4/md5.m4: New file.
18407
18408         Module sha.
18409         * m4/sha.m4: New file.
18410
18411         Module getstr.
18412         * m4/getstr.m4: New file.
18413
18414         Module getline.
18415         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
18416         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
18417         <sys/types.h>, for size_t. Use the function name gnu_getline, not
18418         simply getline. Infoke gl_PREREQ_GETLINE.
18419
18420         Module obstack.
18421         * m4/obstack.m4: New file.
18422
18423         Module hash.
18424         * m4/hash.m4: New file.
18425
18426         Module readtokens.
18427         * m4/readtokens.m4: New file.
18428
18429         Module strverscmp.
18430         * m4/strverscmp.m4: New file.
18431
18432         Module stdbool.
18433         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
18434         OSF/1.
18435
18436         Module strtoll.
18437         * m4/strtoll.m4: New file.
18438
18439         Module strtoull.
18440         * m4/strtoull.m4: New file.
18441
18442         Module strtoimax.
18443         * m4/strtoimax.m4: New file.
18444
18445         Module strtoumax.
18446         * m4/strtoumax.m4: New file.
18447
18448         Module xstrtoimax.
18449         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
18450         jm_AC_PREREQ_XSTRTOIMAX.
18451         Moved the strtol prerequisites to strtol.m4.
18452         Moved the strtoll prerequisites to strtoll.m4.
18453         Moved the strtoimax prerequisites to strtoimax.m4.
18454
18455         Module xstrtoumax.
18456         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
18457         jm_AC_PREREQ_XSTRTOUMAX.
18458         Moved the strtoul prerequisites to strtoul.m4.
18459         Moved the strtoull prerequisites to strtoull.m4.
18460         Moved the strtoumax prerequisites to strtoumax.m4.
18461
18462         Module chown.
18463         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
18464         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
18465
18466         Module dup2.
18467         * m4/dup2.m4: New file.
18468
18469         Module ftruncate.
18470         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
18471         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
18472
18473         Module getgroups.
18474         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
18475         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
18476
18477         Module gettimeofday.
18478         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
18479         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
18480         gl_PREREQ_GETTIMEOFDAY.
18481
18482         Module mkdir.
18483         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
18484         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
18485
18486         Module mkstemp.
18487         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
18488         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
18489         jm_AC_TYPE_UINTMAX_T.
18490         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
18491
18492         Module stat.
18493         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
18494         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
18495
18496         Module lstat.
18497         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
18498         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
18499
18500         Module timespec.
18501         * m4/timespec.m4 (gl_TIMESPEC): New macro.
18502         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
18503         * m4/st_mtim.m4: Indentation.
18504
18505         Module nanosleep.
18506         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
18507         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
18508         gl_PREREQ_NANOSLEEP.
18509
18510         Module regex.
18511         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
18512         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
18513         (gl_REGEX): New macro.
18514
18515         Module rename.
18516         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
18517         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
18518
18519         Module rmdir.
18520         * m4/rmdir.m4: New file.
18521
18522         Module utime.
18523         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
18524         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
18525         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
18526
18527         Module dirname.
18528         * m4/dirname.m4: New file.
18529
18530         Module getopt.
18531         * m4/getopt.m4: New file.
18532
18533         Module unistd-safer.
18534         * m4/unistd-safer.m4: New file.
18535
18536         Module fnmatch.
18537         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
18538         declaration.
18539         (gl_PREREQ_FNMATCH_EXTRA): New macro.
18540         (gl_FUNC_FNMATCH_POSIX): New macro.
18541         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
18542         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
18543         simply fnmatch.
18544
18545         Module exclude.
18546         * m4/exclude.m4: New file.
18547
18548         Module human.
18549         * m4/human.m4: New file.
18550
18551         Module acl.
18552         * m4/acl.m4: Nop.
18553
18554         Module backupfile.
18555         * m4/backupfile.m4: New file.
18556         * m4/d-ino.m4: Indentation.
18557
18558         Module fsusage.
18559         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
18560         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
18561         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
18562
18563         Module dirfd.
18564         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
18565         requirements.
18566
18567         Module euidaccess.
18568         * m4/euidaccess.m4: New file.
18569
18570         Module file-type.
18571         * m4/file-type.m4: New file.
18572
18573         Module fileblocks.
18574         * m4/fileblocks.m4: New file.
18575
18576         Module filemode.
18577         * m4/filemode.m4: New file.
18578
18579         Module isdir.
18580         * m4/isdir.m4: New file.
18581
18582         Module lchown.
18583         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
18584         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
18585
18586         Module makepath.
18587         * m4/makepath.m4: New file.
18588
18589         Module modechange.
18590         * m4/modechange.m4: New file.
18591
18592         Module mountlist.
18593         * m4/mountlist.m4: New file.
18594         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
18595         Indentation.
18596
18597         Module path-concat.
18598         * m4/path-concat.m4: New file.
18599
18600         Module pathmax.
18601         * m4/pathmax.m4: New file.
18602
18603         Module same.
18604         * m4/same.m4: New file.
18605
18606         Module save-cwd.
18607         * m4/save-cwd.m4: New file.
18608
18609         Module savedir.
18610         * m4/savedir.m4: New file.
18611
18612         Module xgetcwd.
18613         * m4/xgetcwd.m4: New file.
18614         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
18615
18616         Module xreadlink.
18617         * m4/xreadlink.m4: New file.
18618
18619         Module safe-read.
18620         * m4/safe-read.m4: New file.
18621
18622         Module safe-write.
18623         * m4/safe-write.m4: New file.
18624
18625         Module closeout.
18626         * m4/closeout.m4: New file.
18627
18628         Module stdio-safer.
18629         * m4/stdio-safer.m4: New file.
18630
18631         Module getpass.
18632         * m4/getpass.m4: New file.
18633
18634         Module getugroups.
18635         * m4/getugroups.m4: New file.
18636
18637         Module group-member.
18638         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
18639         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
18640
18641         Module idcache.
18642         * m4/idcache.m4: New file.
18643
18644         Module userspec.
18645         * m4/userspec.m4: New file.
18646
18647         Module gettime.
18648         * m4/clock_time.m4: New file.
18649         * m4/gettime.m4: New file.
18650
18651         Module settime.
18652         * m4/settime.m4: New file.
18653
18654         Module posixtm.
18655         * m4/posixtm.m4: New file.
18656
18657         Module gethostname.
18658         * m4/gethostname.m4: New file.
18659
18660         Module canon-host.
18661         * m4/canon-host.m4: New file.
18662
18663         Module gettext.
18664         * m4/codeset.m4: New file, from gettext-0.11.5.
18665         * m4/gettext.m4: New file, from gettext-0.11.5.
18666         * m4/glibc21.m4: New file, from gettext-0.11.5.
18667         * m4/iconv.m4: New file, from gettext-0.11.5.
18668         * m4/intdiv0.m4: New file, from gettext-0.11.5.
18669         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
18670         * m4/inttypes.m4: New file, from gettext-0.11.5.
18671         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
18672         * m4/isc-posix.m4: New file, from gettext-0.11.5.
18673         * m4/lcmessage.m4: New file, from gettext-0.11.5.
18674         * m4/lib-ld.m4: New file, from gettext-0.11.5.
18675         * m4/lib-link.m4: New file, from gettext-0.11.5.
18676         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
18677         * m4/progtest.m4: New file, from gettext-0.11.5.
18678         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
18679         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
18680         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
18681
18682         Module localcharset.
18683         * m4/localcharset.m4: New file.
18684
18685         Module hard-locale.
18686         * m4/hard-locale.m4: New file.
18687
18688         Module mbswidth.
18689         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
18690         onceonly macros.
18691         * m4/mbrtowc.m4: Add comment.
18692
18693         Module memcasecmp.
18694         * m4/memcasecmp.m4: New file.
18695
18696         Module memcoll.
18697         * m4/memcoll.m4: New file.
18698
18699         Module unicodeio.
18700         * m4/unicodeio.m4: New file.
18701
18702         Module rpmatch.
18703         * m4/rpmatch.m4: New file.
18704
18705         Module yesno.
18706         * m4/yesno.m4: New file.
18707
18708         Module exitfail.
18709         * m4/exitfail.m4: New file.
18710
18711         Module c-stack.
18712         * m4/c-stack.m4 (gl_C_STACK): New macro.
18713         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
18714
18715         Module error.
18716         * m4/error.m4 (gl_ERROR): New macro.
18717         (jm_PREREQ_ERROR): Use onceonly macros.
18718
18719         Module fatal.
18720         * m4/fatal.m4: New file.
18721
18722         Module getloadavg.
18723         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
18724         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
18725
18726         Module getpagesize.
18727         * m4/getpagesize.m4: New file.
18728
18729         Module getusershell.
18730         * m4/getusershell.m4: New file.
18731
18732         Module physmem.
18733         * m4/physmem.m4: New file.
18734
18735         Module posixver.
18736         * m4/posixver.m4: New file.
18737
18738         Module quotearg.
18739         * m4/quotearg.m4: New file.
18740
18741         Module quote.
18742         * m4/quote.m4: New file.
18743
18744         Module readutmp.
18745         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
18746
18747         Module sig2str.
18748         * m4/sig2str.m4: New file.
18749
18750         Other.
18751         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
18752         ulonglong.m4.
18753         * m4/intmax_t.m4: New file.
18754         * m4/d-type.m4: Indentation.
18755         * m4/jm-macros.m4: Update.
18756         * m4/prereq.m4 (jm_PREREQ): Update.
18757         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
18758         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
18759         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
18760         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
18761         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
18762         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
18763         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
18764         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
18765         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
18766         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
18767         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
18768         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
18769         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
18770         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
18771         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
18772         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
18773         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
18774         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
18775         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
18776
18777 2002-12-24  Bruno Haible  <bruno@clisp.org>
18778
18779         * MODULES.txt: Update according to m4/ changes.
18780
18781         Module gettext.
18782         * config.rpath: New file, from gettext-0.11.5.
18783
18784         * modules/*: New module descriptions.
18785         * gnulib-tool: New file.
18786         * MODULES.html.sh: New file.
18787
18788 2002-12-21  Karl Berry  <karl@gnu.org>
18789
18790         * doc/fdl.texi: update to version 1.2.
18791
18792 2002-12-19  Karl Berry  <karl@gnu.org>
18793
18794         * config/config.guess: update from prep.
18795
18796 2002-12-18  Bruno Haible  <bruno@clisp.org>
18797
18798         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
18799         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
18800
18801 2002-12-17  Bruno Haible  <bruno@clisp.org>
18802
18803         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
18804         stdlib.h, string.h.
18805
18806 2002-12-17  Bruno Haible  <bruno@clisp.org>
18807
18808         * lib/canon-host.c (strdup): Remove unused declaration.
18809
18810         * lib/fsusage.c: Include full_read.h.
18811         (get_fs_usage): Use full_read instead of safe_read.
18812
18813         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
18814
18815 2002-12-12  Karl Berry  <karl@gnu.org>
18816
18817         * config/config.guess: update from prep.
18818
18819 2002-12-11  Bruno Haible  <bruno@clisp.org>
18820
18821         * m4/setenv.m4: New file, from gettext-0.11.5.
18822
18823 2002-12-11  Bruno Haible  <bruno@clisp.org>
18824
18825         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
18826         not unsetenv().
18827         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
18828         modifications:
18829
18830         2002-12-11  Bruno Haible  <bruno@clisp.org>
18831
18832                 * setenv.c (alloca): Fall back to malloc.
18833                 (freea): New macro.
18834                 (setenv): Use freea() to free memory allocated with alloca().
18835
18836         2002-11-13  Bruno Haible  <bruno@clisp.org>
18837
18838                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
18839                 function declarations.
18840                 * unsetenv.c (unsetenv): Likewise.
18841
18842         2002-03-04  Bruno Haible  <bruno@clisp.org>
18843
18844                 Portability to AIX 4.3.3.
18845                 * unsetenv.c: New file, extracted from setenv.c.
18846                 * setenv.c: Move the unsetenv() function to unsetenv.c.
18847
18848         2001-12-20  Bruno Haible  <bruno@clisp.org>
18849
18850                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
18851                 use malloc instead. For SunOS 4.
18852
18853         2001-12-11  Bruno Haible  <bruno@clisp.org>
18854
18855                 * setenv.c: Declare alloca.
18856                 (compar_fn_t): New typedef.
18857                 (KNOWN_VALUE, STORE_VALUE): Use it.
18858
18859         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
18860         setenv.h.
18861
18862 2002-12-10  Paul Eggert  <eggert@twinsun.com>
18863
18864         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
18865         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
18866         Choose values that are less likely to collide with system fnmatch
18867         options.
18868         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
18869         defined (e.g., a pure POSIX system).
18870         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
18871         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
18872
18873 2002-12-06  Paul Eggert  <eggert@twinsun.com>
18874
18875         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
18876         a pain in practice to deal with generated m4 files.  This change
18877         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
18878
18879         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
18880         and jm-glibc-io.m4, as they are no longer a special case.
18881         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
18882         kludge and the auto-generation stuff.  Check only whether the
18883         functions are declared, not whether they exist, since older hosts
18884         that don't declare the functions can't use the optimization anyway.
18885
18886 2002-12-06  Jim Meyering  <jim@meyering.net>
18887
18888         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
18889
18890         Merge in changes from libc's misc/error.c, in preparation
18891         for the merge of gnulib's changes back into libc.
18892
18893         * lib/error.c (_): Define only if not already defined.
18894         Move definition to follow all #include directives.
18895         Include unlocked-io.h only if !_LIBC.
18896         [_LIBC]: Include <libio/libioP.h>.
18897         [USE_IN_LIBIO]: Include <libio/iolibio.h>
18898         (fflush): Tweak definition to use INTUSE.
18899         (putc): Define.
18900
18901 2002-12-05  Paul Eggert  <eggert@twinsun.com>
18902
18903         * lib/alloca.c [defined emacs]: Include "lisp.h".
18904         (xalloc_die) [defined emacs]: New macro.
18905         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
18906         [! defined emacs]: Include <xalloc.h>.
18907         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
18908         (pointer): Typedef to POINTER_TYPE *.
18909         (malloc): Remove decl; we now always use xmalloc.
18910         (alloca): Use old-style definition, since Emacs needs this.
18911         Check for arithmetic overflow when computing combined size.
18912
18913 2002-12-04  Paul Eggert  <eggert@twinsun.com>
18914
18915         Do not generate unlocked-io.h automatically, since it's easier to
18916         maintain it by hand.
18917
18918         * lib/unlocked-io.h: New file, from GNU diffutils,
18919         but with proper copyright notice and attribution.
18920         * lib/gen-uio: Remove.
18921         * lib/Makefile.am: Add copyright notice.
18922         (libfetish_a_SOURCES): Add unlocked-io.h.
18923         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
18924         (DISTCLEANFILES, io_functions): Remove macros.
18925         (EXTRA_DIST): Remove gen_uio.
18926         (unlocked-io.h): Remove rule.
18927
18928 2002-12-04  Jim Meyering  <jim@meyering.net>
18929
18930         Reflect the fact that stat.c and lstat.c are no longer generated.
18931         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
18932         (DISTCLEANFILES): Likewise.
18933         (EXTRA_DIST): Likewise.
18934         (all_local): Don't depend on stat.c or lstat.c.
18935         (stat.c, lstat.c): Remove rules.
18936         (EXTRA_DIST): Remove xstat.in.
18937
18938         * lib/xstat.in: Remove file.  Contents moved into stat.c.
18939         * lib/stat.c: New file.  Contents mostly from xstat.in.
18940         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
18941         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
18942
18943         * lib/safe-read.c: Rework so that it may serve to define safe_write,
18944         too.
18945         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
18946
18947 2002-12-03  Jim Meyering  <jim@meyering.net>
18948
18949         * lib/safe-read.c, safe-write.c: Change variable names and comments,
18950         but not semantics, to minimize the differences between these two files.
18951         (safe_read): Change comment to mention SAFE_READ_ERROR.
18952
18953         * lib/safe-read.c (IS_EINTR): Define.
18954         (safe_read): Use IS_EINTR in place of in-function cpp directives.
18955
18956 2002-12-02  Jim Meyering  <jim@meyering.net>
18957
18958         * lib/safe-read.c (EINTR): Define.
18959         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
18960         (INT_MAX): Provide fallback.
18961         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
18962
18963         * lib/safe-read.h (SAFE_READ_ERROR): Define.
18964
18965 2002-12-02  Bruno Haible  <bruno@clisp.org>
18966
18967         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
18968         Define, taken from safe-read.c.
18969         (INT_MAX): Provide fallback.
18970         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
18971         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
18972
18973         * lib/safe-read.c (EINTR): Remove definition.
18974         (safe_read): Don't use EINTR if it is absent.
18975
18976 2002-12-01  Jim Meyering  <jim@meyering.net>
18977
18978         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
18979         zero.
18980         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
18981
18982 2002-11-27  Paul Eggert  <eggert@twinsun.com>
18983
18984         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
18985         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
18986         with `if (! (value < limit)) abort ();', for readability.
18987
18988 2002-11-26  Karl Berry  <karl@gnu.org>
18989
18990         * lib/strdup.c: copy from libc again, with jim's ok.
18991         * lib/.cppi-disable: re-add strdup.c
18992
18993 2002-11-25  Karl Berry  <karl@gnu.org>
18994
18995         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
18996         instead of "strtol.c".
18997
18998 2002-11-25  Karl Berry  <karl@gnu.org>
18999
19000         * config/install-sh: update from automake for variable quoting, $0 in
19001         error msgs, etc.
19002
19003         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
19004         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
19005         entry.
19006
19007 2002-11-25  Jim Meyering  <jim@meyering.net>
19008
19009         * lib/mktime.c: Sync from libc, now that it has the latest fix.
19010
19011 2002-11-24  Karl Berry  <karl@gnu.org>
19012
19013         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
19014         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
19015
19016 2002-11-24  Jim Meyering  <jim@meyering.net>
19017
19018         Update from coreutils:
19019
19020         * lib/mktime.c: Merge in changes from libc.
19021
19022         Avoid a link-time failure on some Linux systems.
19023         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
19024         (otherwise).
19025         (__mon_yday): Declare with the STATIC attribute.
19026         (__mktime_internal): Likewise.
19027         Based on a report from Greg Schafer.
19028
19029 2002-11-23  Jim Meyering  <jim@meyering.net>
19030
19031         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
19032         Use `unsigned', not `int', as type of index.
19033
19034         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
19035
19036         * lib/fsusage.c: Remove unneeded parentheses around operands of
19037         `defined'.
19038
19039 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19040
19041         * lib/quotearg.h: Allow multiple inclusion by surrounding with
19042         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
19043         so that we can be included first.
19044         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
19045         * lib/quotearg.c: Include quotearg.h immediately after config.h.
19046         No need to include stddef.h or sys/types.h any more.
19047         Surround local include files with "", not "<>".
19048         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
19049         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
19050         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
19051         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19052         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19053         (ISPRINT): Remove; no longer needed now that we assume C89.
19054
19055         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
19056         Preserve errno.
19057
19058         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
19059         quotearg_char): Use SIZE_MAX rather than
19060         (size_t) -1 when we are talking about "infinity".
19061
19062         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
19063
19064 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19065
19066         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
19067         hint that one should use `if (! x) abort ();' rather than `assert
19068         (x);', and anyway it's one less thing to worry about configuring.
19069         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
19070         hash_rehash, hash_insert): Use abort rather than assert.
19071
19072 2002-11-22  Bruno Haible  <bruno@clisp.org>
19073
19074         * lib/safe-read.h: Assume C89. Add comments.
19075         (safe_read): Change return type to size_t.
19076         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
19077         byte counts > SSIZE_MAX correctly.
19078         * lib/safe-write.h: New file.
19079         * lib/safe-write.c: New file.
19080         * lib/full-read.h: New file.
19081         * lib/full-read.c: New file.
19082         * lib/full-write.h: Assume C89. Add comments.
19083         * lib/full-write.c: Include safe-write.h.
19084         (full_write): Rewritten to use safe_write.
19085         Suggested by Jim Meyering and Paul Eggert.
19086
19087 2002-11-21  Jim Meyering  <jim@meyering.net>
19088
19089         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
19090
19091         Merge in changes from the coreutils.
19092
19093         2002-09-25  Paul Eggert  <eggert@twinsun.com>
19094         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
19095         <stdint.h>.
19096         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
19097         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
19098         int.  Work more efficiently if X is the same width as uintmax_t.
19099         Do not compare X to -1, to avoid bogus compiler warning.
19100         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
19101         Don't assume that f_frsize and f_bsize are the same type.
19102
19103         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
19104         warning on FreeBSD.
19105
19106         * lib/makepath.c (make_path): Restore umask *before* creating the final
19107         component.
19108         (make_path): Minor reformatting.
19109
19110         * lib/xmalloc.c: Adjust to work with new autoconf macros,
19111         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
19112         HAVE_MALLOC/HAVE_REALLOC.
19113
19114         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
19115         dummy ones.  At least on GNU/Linux systems, `auto' means something
19116         else.
19117         From Michael Stone.
19118
19119 2002-11-21  Bruno Haible  <bruno@clisp.org>
19120
19121         Remove case insensitive option matching.
19122         * lib/argmatch.h (argcasematch): Remove declaration.
19123         (ARGCASEMATCH): Remove macro.
19124         (__xargmatch_internal): Remove case_sensitive argument.
19125         (XARGMATCH): Update.
19126         (XARGCASEMATCH): Remove macro.
19127         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
19128         case_sensitive argument.
19129         (argcasematch): Remove function.
19130         (__xargmatch_internal): Remove case_sensitive argument.
19131         (main): Use XARGMATCH instead of XARGCASEMATCH.
19132
19133         * lib/xmalloc.c: Change compile-time error message. Add comment about
19134         required autoconf version.
19135
19136 2002-11-20  Paul Eggert  <eggert@twinsun.com>
19137
19138         Merge argmatch cleanups from Bison.  Assume C89.
19139
19140         * lib/argmatch.c: Include config.h here, not in argmatch.h.
19141         Include stdlib.h, for EXIT_FAILURE.
19142         Always include <string.h>, since we assume C89.
19143         (EXIT_FAILURE): Remove pre-C89 bug workaround.
19144         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
19145         Include <stddef.h> instead, since it's all we need for size_t.
19146         (PARAMS): Remove.  All uses removed.
19147         (ARRAY_CARDINALITY): Do not bother to #undef.
19148         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
19149         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
19150         Remove unnecessary parentheses.
19151         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
19152         Insert necessary parentheses.
19153         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
19154         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
19155
19156 2002-11-19  Bruno Haible  <bruno@clisp.org>
19157
19158         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
19159         * lib/mbswidth.h: Include <stddef.h>, for size_t.
19160
19161         * lib/mbswidth.h (PARAMS): Remove macro.
19162         (mbswidth, mbsnwidth): Use ANSI C function declarations.
19163         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
19164
19165         * lib/gcd.h (PARAMS): Remove macro.
19166         (gcd): Use ANSI C function declarations.
19167         * lib/gcd.c (gcd): Likewise.
19168
19169 2002-11-15  Bruno Haible  <bruno@clisp.org>
19170
19171         * lib/strcspn.c: Include <stddef.h>.
19172         (strcspn): Use ANSI C function declaration. Change return type to
19173         size_t. Use NULL.
19174         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
19175         (strpbrk): Use NULL.
19176         * lib/strpbrk.h (PARAMS): Remove macro.
19177         (strpbrk): Use ANSI C function declaration.
19178         * lib/strstr.c: Don't include <sys/types.h>.
19179         * lib/strstr.h (PARAMS): Remove macro.
19180         (strstr): Use ANSI C function declarations.
19181
19182 2002-11-14  Karl Berry  <karl@gnu.org>
19183
19184         * config/mkinstalldirs: `do' on separate line, instead of
19185         `for var; do'.
19186
19187 2002-11-06  Bruno Haible  <bruno@clisp.org>
19188
19189         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
19190         * lib/gcd.c (gcd): Likewise.
19191
19192 2002-11-05  Bruno Haible  <bruno@clisp.org>
19193
19194         * lib/gcd.h: New file, from gettext-0.11.5.
19195         * lib/gcd.c: New file, from gettext-0.11.5.
19196
19197 2002-11-05  Bruno Haible  <bruno@clisp.org>
19198
19199         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19200         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19201         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19202         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19203
19204         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
19205         <libintl.h>.
19206         * lib/makepath.c: Include gettext.h instead of <locale.h> and
19207         <libintl.h>.
19208
19209         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
19210         * lib/human.c: Include gettext.h instead of <libintl.h>.
19211         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
19212         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
19213         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
19214         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
19215         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
19216         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
19217         (textdomain): Remove definition.
19218         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
19219
19220         * lib/long-options.c: Remove include of <libintl.h> and definition of
19221         _.
19222         * lib/same.c: Remove include of <libintl.h> and definition of _.
19223
19224 2002-11-04  Owen Taylor  <otaylor@redhat.com>
19225
19226         * lib/config.charset: A few additions for Solaris.
19227
19228 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
19229
19230         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
19231         * lib/localcharset.c (locale_charset): Declare as extern "C".
19232
19233 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
19234
19235         * lib/config.charset: msdos in uk_UA uses CP1125.
19236
19237 2002-11-04  Bruno Haible  <bruno@clisp.org>
19238
19239         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
19240         * lib/strcase.h: New file, from GNU gettext-0.11.5.
19241         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
19242         * lib/strstr.h: New file, from GNU gettext-0.11.5.
19243         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
19244
19245 2002-11-04  Bruno Haible  <bruno@clisp.org>
19246
19247         * lib/localcharset.c (locale_charset): Don't return an empty string.
19248
19249 2002-11-04  Bruno Haible  <bruno@clisp.org>
19250
19251         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
19252         aliases.
19253
19254 2002-11-04  Bruno Haible  <bruno@clisp.org>
19255
19256         * lib/config.charset: Update for newest glibc. Add canonical names
19257         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
19258
19259 2002-11-04  Bruno Haible  <bruno@clisp.org>
19260
19261         * lib/config.charset: Add support for NetBSD.
19262
19263 2002-11-04  Bruno Haible  <bruno@clisp.org>
19264
19265         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
19266
19267 2002-11-01  Bruno Haible  <bruno@clisp.org>
19268
19269         * configure.in: Add AC_CONFIG_AUX_DIR call.
19270         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
19271         test/Makefile.
19272         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
19273
19274 2002-09-28  Karl Berry  <karl@gnu.org>
19275
19276         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
19277         installed automake until the next release, since changes have been
19278         made.
19279
19280 2002-09-25  Karl Berry  <karl@gnu.org>
19281
19282         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
19283         * lib/getopt*: copy from libc/posix.
19284         * lib/gettext.h: copy from gettext.
19285         * lib/.cppi-disable: add strdup.c, gettext.h.
19286
19287 2002-09-25  Karl Berry  <karl@gnu.org>
19288
19289         * config/srclist.txt: enable gettext.h check.
19290         * config/config.{guess,sub}: update from prep.
19291         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
19292                 from automake 1.6.3.
19293         See srclist*.
19294
19295 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
19296
19297         * regex.c (PATFETCH): Remove the translating fetch.
19298         (PATFETCH_RAW): Rename to PATFETCH.
19299         (set_image_of_range): New fun.
19300         (SET_RANGE_TABLE_WORK_AREA): Use it.
19301         (regex_compile): Don't translate the pattern chars so eagerly.
19302         Only do it when inserting an `exactn' bytecode or when handling
19303         a char-range.
19304         (mutually_exclusive_p): Avoid empty statement.
19305
19306 2002-07-06  Jim Meyering  <meyering@lucent.com>
19307
19308         * m4/README: Don't mention Makefile.am.in.
19309         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
19310
19311 2002-07-01  Jim Meyering  <meyering@lucent.com>
19312
19313         * lib/c-stack.c: Include sys/time.h.
19314         From Volker Borchert.
19315
19316 2002-06-26  Paul Eggert  <eggert@twinsun.com>
19317
19318         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
19319
19320 2002-06-26  Paul Eggert  <eggert@twinsun.com>
19321
19322         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
19323         New macro.  Use it uniformly instead of
19324         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
19325         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
19326         reported by Vin Shelton.
19327
19328 2002-06-22  Paul Eggert  <eggert@twinsun.com>
19329
19330         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
19331         Do not assume SA_SIGINFO behavior.
19332         Bug reported by Jim Meyering on NetBSD 1.5.2.
19333
19334 2002-06-22  Jim Meyering  <meyering@lucent.com>
19335
19336         * m4/c-stack.m4: New file, from diffutils-2.8.2.
19337         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
19338
19339         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
19340         now that configure.ac uses AC_GNU_SOURCE.
19341         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
19342         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
19343
19344         Update to latest tools.  Suggestions from Paul Eggert.
19345         * m4/stdbool.m4: New file, from diffutils-2.8.2.
19346         * m4/gnu-source.m4: Update from diffutils-2.8.2.
19347         * m4/fnmatch.m4: Likewise.
19348         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
19349         to AC_HEADER_STDBOOL
19350
19351 2002-06-22  Jim Meyering  <meyering@lucent.com>
19352
19353         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
19354         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
19355
19356 2002-06-22  Jim Meyering  <meyering@lucent.com>
19357
19358         * lib/c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
19359
19360         * lib/exitfail.c, exitfail.h: Likewise.
19361         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
19362
19363         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
19364         of fnmatch.h.
19365         (EXTRA_DIST): Add fnmatch_loop.c.
19366         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
19367
19368         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
19369         * lib/fnmatch.c: Update from diffutils-2.8.2.
19370         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
19371         * lib/fnmatch.h: Remove file.
19372
19373 2002-06-21  Jim Meyering  <meyering@lucent.com>
19374
19375         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
19376         * m4/mbrtowc.m4: Likewise.
19377
19378         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
19379         * m4/mbswidth.m4: Reflect name change:
19380         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
19381         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
19382
19383         * m4/lib-link.m4: Update from gettext-0.11.2.
19384         * m4/gettext.m4: Likewise.
19385
19386         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
19387         From Alfred M. Szmidt.
19388
19389 2002-06-18  Paul Eggert  <eggert@twinsun.com>
19390
19391         * lib/file-type.h: Report an error if neither S_ISREG nor
19392         S_IFREG is defined, instead of using a test specific to glibc
19393         2.2.  This should be safe, since POSIX requires S_ISREG and
19394         Unix Version 7 had S_IFREG.  We don't need to check for
19395         <sys/types.h> since we don't use any symbols that it defines.
19396
19397 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
19398
19399         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
19400         $@-t, so that each temporary file name is unique and valid in the first
19401         8 characters, for operation under DOS.
19402
19403 2002-06-15  Paul Eggert  <eggert@twinsun.com>
19404
19405         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
19406
19407 2002-06-15  Jim Meyering  <meyering@lucent.com>
19408
19409         Work even with DJGPP 2.03, which lacks support for symlinks.
19410         From Richard Dawe.
19411         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
19412         is defined.
19413         * lib/lchown.c (S_ISLNK): Likewise.
19414
19415 2002-06-15  Jim Meyering  <meyering@lucent.com>
19416
19417         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
19418         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
19419         have been included before this file.
19420
19421 2002-06-14  Jim Meyering  <meyering@lucent.com>
19422
19423         * lib/file-type.h: Use the version from diffutils-2.8.2.
19424         * lib/file-type.c: Likewise.
19425
19426 2002-06-07  Jim Meyering  <meyering@lucent.com>
19427
19428         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
19429         They're needed at least for NetBSD 1.5.2.
19430         ($statxfs_includes): Include those same headers.
19431         ($statxfs_includes): Include sys/vfs.h if available.
19432         ($statxfs_includes): Likewise for sys/statvfs.h.
19433         Check for the following members in both structs statfs and statvfs:
19434         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
19435
19436 2002-06-01  Jim Meyering  <meyering@lucent.com>
19437
19438         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
19439         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
19440
19441 2002-05-28  Jim Meyering  <meyering@lucent.com>
19442
19443         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
19444         Reported by Volker Borchert.
19445
19446 2002-05-27  Jim Meyering  <meyering@lucent.com>
19447
19448         Fix a problem seen only on nonconforming systems whereby ls.c's
19449         use of localtime, and then of gettimeofday would cause trouble:
19450         the localtime call used to initialize rpl_gettimeofday's save
19451         mechanism would clobber ls's current local time information so
19452         that in any long listing the first file would always be listed
19453         with date 1970-01-01.  Analysis by Volker Borchert.
19454
19455         * lib/gettimeofday.c (localtime): Undefine.
19456         (rpl_localtime): New function.
19457
19458 2002-05-27  Jim Meyering  <meyering@lucent.com>
19459
19460         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
19461         localtime.
19462
19463         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
19464         use the replacement function; it wouldn't resolve at link time.
19465         Reported by Volker Borchert.
19466
19467 2002-05-22  Jim Meyering  <meyering@lucent.com>
19468
19469         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
19470         file-type.h.
19471         * lib/file-type.h: New file.
19472         * lib/file-type.c (file_type): New file/function.  Extracted from
19473         diffutils.
19474
19475 2002-04-30  Jim Meyering  <meyering@lucent.com>
19476
19477         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
19478
19479 2002-04-29  Paul Eggert  <eggert@twinsun.com>
19480
19481         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
19482
19483 2002-04-29  Paul Eggert  <eggert@twinsun.com>
19484
19485         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
19486         Do not check for alloca.h (no longer used) or stdbool.h (was never
19487         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
19488
19489 2002-04-29  Paul Eggert  <eggert@twinsun.com>
19490
19491         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
19492
19493 2002-04-29  Jim Meyering  <meyering@lucent.com>
19494
19495         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
19496         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
19497         Use AC_FUNC_STRNLEN here instead.
19498
19499         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
19500         With autoconf-2.53a, it's part of AC_PROG_CC.
19501
19502 2002-04-28  Paul Eggert  <eggert@twinsun.com>
19503
19504         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
19505         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
19506
19507 2002-04-28  Paul Eggert  <eggert@twinsun.com>
19508
19509         * lib/sig2str.h, sig2str.c: New files.
19510         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
19511
19512 2002-04-28  Paul Eggert  <eggert@twinsun.com>
19513
19514         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
19515         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
19516         of 127, since 64 is the largest conceivable number for ancient
19517         nonstandard hosts.
19518         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
19519
19520 2002-04-28  Jim Meyering  <meyering@lucent.com>
19521
19522         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
19523
19524 2002-04-24  Jim Meyering  <meyering@lucent.com>
19525
19526         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
19527         (jm_PREREQ): Use it.
19528
19529         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
19530         mach/mach.h fcntl.h.
19531         Check for this function: setlocale.
19532
19533 2002-04-24  Jim Meyering  <meyering@lucent.com>
19534
19535         * lib/gettext.h: New file, from Gettext.
19536         * lib/Makefile.am (INCLUDES): Remove -I../intl.
19537         (libfetish_a_SOURCES): Add gettext.h.
19538
19539 2002-04-16  Jim Meyering  <meyering@lucent.com>
19540
19541         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
19542         ut_pid, ut_id, ut_exit.
19543
19544 2002-04-16  Jim Meyering  <meyering@lucent.com>
19545
19546         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
19547         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
19548         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
19549
19550 2002-04-12  Jim Meyering  <meyering@lucent.com>
19551
19552         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
19553         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
19554         existence of the getmntinfo function.  Needed for Darwin 5.3.
19555
19556         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
19557         This is necessary at least on Darwin 5.3.
19558
19559         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
19560         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
19561         strnlen.o in the library, and that makes some versions of ranlib
19562         object.
19563
19564 2002-04-12  Jim Meyering  <meyering@lucent.com>
19565
19566         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
19567
19568 2002-04-09  Jim Meyering  <meyering@lucent.com>
19569
19570         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
19571         to be more precise.  Rather than saying we're checking whether the
19572         function `works', say what we're testing.
19573         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
19574         Reported by Bruno Haible.
19575
19576 2002-03-10  Jim Meyering  <meyering@lucent.com>
19577
19578         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
19579         Suggestion from Santiago Vila.
19580
19581 2002-03-08  Jim Meyering  <meyering@lucent.com>
19582
19583         * lib/rename.c: Mention that this wrapper is needed also on
19584         mips-dec-ultrix4.4 systems.
19585
19586 2002-03-02  Jim Meyering  <meyering@lucent.com>
19587
19588         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
19589         not HAVE_CLOCK_SETTIME.
19590
19591 2002-02-27  Paul Eggert  <eggert@twinsun.com>
19592
19593         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
19594         Check for clock_settime.
19595
19596 2002-02-27  Paul Eggert  <eggert@twinsun.com>
19597
19598         * lib/nanosleep.h: Rename to....
19599         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
19600
19601         * lib/gettime.c: New file.
19602         * lib/settime.c: New file.
19603         * lib/stime.c: Remove.
19604
19605         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
19606         timespec.h.  Remove nanosleep.h.
19607
19608 2002-02-25  Paul Eggert  <eggert@twinsun.com>
19609
19610         * m4/acl.m4: New file.
19611         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
19612         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
19613
19614 2002-02-25  Paul Eggert  <eggert@twinsun.com>
19615
19616         * lib/acl.c, acl.h: New files.
19617         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
19618
19619 2002-02-24  Jim Meyering  <meyering@lucent.com>
19620
19621         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
19622         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
19623         cause trouble.  Reported by Nelson Beebe.
19624
19625 2002-02-23  Paul Eggert  <eggert@twinsun.com>
19626
19627         * lib/path-concat.c (xpath_concat): Reorder code to pacify
19628         compilers that don't know that xalloc_die never returns.
19629
19630 2002-02-20  Jim Meyering  <meyering@lucent.com>
19631
19632         * lib/getdate.c: Regenerate using bison-1.33.
19633
19634 2002-02-17  Jim Meyering  <meyering@lucent.com>
19635
19636         * config/config.guess (main): Don't use `head -1'; it's no longer
19637         portable. Use `sed 1q' instead.
19638
19639 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
19640
19641         * m4/codeset.m4: Upgrade to gettext-0.11.
19642         * m4/gettext.m4: Upgrade to gettext-0.11.
19643         * m4/glibc21.m4: Upgrade to gettext-0.11.
19644         * m4/iconv.m4: Upgrade to gettext-0.11.
19645         * m4/isc-posix.m4: Upgrade to gettext-0.11.
19646         * m4/lcmessage.m4: Upgrade to gettext-0.11.
19647         * m4/lib-ld.m4: New file, from gettext-0.11.
19648         * m4/lib-link.m4: New file, from gettext-0.11.
19649         * m4/lib-prefix.m4: New file, from gettext-0.11.
19650         * m4/progtest.m4: Upgrade to gettext-0.11.
19651
19652 2002-02-15  Paul Eggert  <eggert@twinsun.com>
19653
19654         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
19655         (jm_PREREQ): Use it.
19656
19657 2002-02-15  Paul Eggert  <eggert@twinsun.com>
19658
19659         * lib/posixver.c, posixver.h: New files.
19660         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
19661
19662 2002-02-02  Paul Eggert  <eggert@twinsun.com>
19663             Bruno Haible  <bruno@clisp.org>
19664
19665         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
19666         (fwrite_success_callback): New declaration.
19667         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
19668         print_unicode_char. Call failure callback instead of error.
19669         (fwrite_success_callback): New function.
19670         (exit_failure_callback): New function.
19671         (fallback_failure_callback): New function.
19672         (print_unicode_char): Call unicode_to_mb.
19673
19674 2002-01-26  Jim Meyering  <meyering@lucent.com>
19675
19676         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
19677         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
19678
19679 2002-01-26  Jim Meyering  <meyering@lucent.com>
19680
19681         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
19682
19683 2002-01-22  Paul Eggert  <eggert@twinsun.com>
19684
19685         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
19686
19687 2002-01-22  Jim Meyering  <meyering@lucent.com>
19688
19689         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
19690         Otherwise, some versions of automake would omit the rule that makes
19691         Makefile from Makefile.in.
19692
19693 2002-01-21  Paul Eggert  <eggert@twinsun.com>
19694
19695         * lib/xmemcoll.h, xmemcoll.c: New files.
19696         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
19697         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
19698         (memcoll): Set errno to zero if there is no error.
19699
19700         * lib/quotearg.c (quotearg_buffer_restyled):
19701         Fix bug with quoting buffers containing NUL when backslashing escapes.
19702         This bug was exposed by the other changes in this patch.
19703         (quotearg_n_options): New arg ARGSIZE.
19704         All callers changed.
19705         (quoting_options_from_style): New function.
19706         (quotearg_n_style): Use it.
19707         (quotearg_n_style_mem): New function.
19708
19709         * lib/quotearg.h (quotearg_n_style_mem): New function.
19710
19711 2002-01-19  Jim Meyering  <meyering@lucent.com>
19712
19713         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
19714         Remove useless quotes: DF_PROG="df".
19715         * m4/strnlen.m4: New file.
19716
19717 2002-01-16  Paul Eggert  <eggert@twinsun.com>
19718
19719         * lib/backupfile.c (ISDIGIT): Comment fix.
19720         * lib/getdate.y (ISDIGIT): Likewise.
19721         * lib/posixtm.c (ISDIGIT, year): Likewise.
19722         * lib/strverscmp.c (ISDIGIT): Likewise.
19723         * lib/userspec.c (ISDIGIT): Likewise.
19724
19725 2002-01-16  Jim Meyering  <meyering@lucent.com>
19726
19727         * lib/getdate.y: Add three semicolons, each just before a closing
19728         brace. Bison (as of version 1.31) no longer papers over that mistake.
19729
19730 2002-01-05  Jim Meyering  <meyering@lucent.com>
19731
19732         * lib/version-etc.c (version_etc_copyright): Update copyright year.
19733
19734 2001-12-19  Paul Eggert  <eggert@twinsun.com>
19735
19736         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
19737         not silently exit merely because the output buffer happens to
19738         have nothing pending.
19739
19740 2001-12-18  Paul Eggert  <eggert@twinsun.com>
19741
19742         See the big note in ../ChangeLog.
19743         * lib/human.c (suffixes): Prefer K to k for 1024.
19744         (generate_suffix_backwards): New function.
19745         (human_readable_inexact): Use it.
19746         * lib/xstrtol.c (__xstrtol): If there is no number but there
19747         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
19748         Accept 'K' as well as 'k'.
19749
19750 2001-12-15  Jim Meyering  <meyering@lucent.com>
19751
19752         * lib/regex.h (__restrict_arr): Update from libc.
19753
19754         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
19755         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
19756         (STREQ): Define.
19757
19758 2001-12-14  Jim Meyering  <meyering@lucent.com>
19759
19760         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
19761         Suggestion from Bruno Haible.
19762
19763 2001-12-10  Jim Meyering  <meyering@lucent.com>
19764
19765         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
19766         xrealloc, Instead, include "xalloc.h".
19767         (initbuffer): Don't cast xmalloc return value to char*.
19768         (readline): Reword comment.
19769         Don't cast xrealloc return value to char*
19770         Return NULL, not 0.
19771
19772 2001-12-09  Jim Meyering  <meyering@lucent.com>
19773
19774         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
19775         about `signed and unsigned type in conditional expression'.
19776         * lib/posixtm.c (posix_time_parse): Likewise.
19777
19778         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
19779
19780         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
19781         to avoid a pedantic warning.
19782
19783         * lib/getstr.c: Don't include assert.h.
19784         (getstr): Remove warning-evoking assertions.
19785         Return -1 if offset parameter is out of bounds.
19786         Change the type of a local from int to size_t.
19787
19788         * lib/strftime.c (my_strftime_localtime_r): Include this function
19789         definition in the `#if ! HAVE_TM_GMTOFF' block.
19790
19791         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
19792         Include xalloc.h instead.
19793
19794 2001-12-02  Jim Meyering  <meyering@lucent.com>
19795
19796         * lib/tempname.c: Don't declare getenv, thus reverting the change of
19797         2001-11-18.  It's no longer necessary, now that stdlib.h is always
19798         included.
19799
19800         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
19801         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
19802
19803 2001-11-30  Akim Demaille  <akim@epita.fr>
19804
19805         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
19806         before being defined.
19807
19808 2001-11-27  Paul Eggert  <eggert@twinsun.com>
19809
19810         * lib/quotearg.h (quotearg_n, quotearg_n_style):
19811         First arg is int, not unsigned.
19812         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19813         (SIZE_MAX, UINT_MAX): New macros.
19814         (quotearg_n_options): Abort if N is negative.
19815         Avoid overflow check on hosts where size_t is 64 bits and int
19816         is 32 bits, as overflow is impossible there.
19817         Fix off-by-one typo that caused unnecessary reallocation.
19818
19819 2001-11-27  Jim Meyering  <meyering@lucent.com>
19820
19821         * lib/tempname.c: Merge with version from libc.
19822         * lib/regex.c: Likewise.
19823
19824         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
19825         systems for which STDC_HEADERS is 0, it was not included, resulting in
19826         a warning about an integer-to-pointer conversion problem with getenv.
19827         Reported by Volker Borchert.
19828
19829 2001-11-26  Jim Meyering  <meyering@lucent.com>
19830
19831         * lib/gtod.h: Remove file.
19832         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
19833         * lib/gettimeofday.c: Don't include gtod.h.
19834         (GTOD_init): Remove function.
19835         (rpl_gettimeofday): Do its job here instead, rather than aborting.
19836         Suggestion from Volker Borchert.
19837
19838 2001-11-23  Jim Meyering  <meyering@lucent.com>
19839
19840         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
19841         it.
19842         * lib/hash.c (struct hash_table): Define it here instead.
19843
19844 2001-11-22  Jim Meyering  <meyering@lucent.com>
19845
19846         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
19847
19848 2001-11-20  Jim Meyering  <meyering@lucent.com>
19849
19850         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
19851         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
19852
19853 2001-11-19  Jim Meyering  <meyering@lucent.com>
19854
19855         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
19856         directory.  Use "conftestXXXXXX" as the template.
19857         Suggestion from Paul Eggert.
19858
19859         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
19860         immediately, so the test doesn't mistakenly hit the max-open-files
19861         limit.
19862
19863 2001-11-18  Paul Eggert  <eggert@twinsun.com>
19864
19865         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
19866         (TEMPORARIES): New macro.
19867         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
19868         removes an artificial limitation (e.g. HP-UX 10.20, where
19869         TMP_MAX is 17576).
19870
19871 2001-11-18  Jim Meyering  <meyering@lucent.com>
19872
19873         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
19874
19875 2001-11-18  Jim Meyering  <meyering@lucent.com>
19876
19877         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
19878         on SunOS 4.
19879
19880         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
19881         files will be created before anything else.
19882
19883 2001-11-17 Paul Eggert  <eggert@twinsun.com>
19884
19885         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
19886         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
19887
19888 2001-11-17  Jim Meyering  <meyering@lucent.com>
19889
19890         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
19891         Prompted by a report from Bob Proulx.
19892
19893         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
19894         Instead, require UTILS_FUNC_MKSTEMP.
19895
19896 2001-11-17  Jim Meyering  <meyering@lucent.com>
19897
19898         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
19899         Now, that's done as part of AC_FUNC_STRTOD.
19900
19901 2001-11-17  Jim Meyering  <meyering@lucent.com>
19902
19903         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
19904         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
19905         rather than group writable.  Patch by Juan F. Codagnone.
19906
19907         * lib/readtokens.c: Remove explicit declarations of xmalloc and
19908         xrealloc, Instead, include "xalloc.h".
19909
19910         * lib/mountlist.c: Include unlocked-io.h after all system headers.
19911         Remove explicit declarations of xmalloc, xrealloc,
19912         and xstrdup.  Instead, include "xalloc.h".
19913
19914         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
19915         unlocked-io.h.
19916         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
19917         Likewise.
19918         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
19919
19920         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
19921         Reported by Padraig Brady.
19922
19923         * lib/mkstemp.c: #undef mkstemp.
19924         Include config.h.
19925         (rpl_mkstemp): Rename from mkstemp.
19926         Protoize.
19927
19928 2001-11-16  Jim Meyering  <meyering@lucent.com>
19929
19930         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
19931         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
19932         determine the amount of total physical memory, use pstat_getstatic.
19933         HPUX-11 doesn't define _SC_PHYS_PAGES.
19934         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
19935         If sysconf couldn't be used to determine the amount of available
19936         physical memory, use both pstat_getstatic and pstat_getdynamic.
19937         Based on a patch from Bob Proulx.
19938
19939 2001-11-10  Jim Meyering  <meyering@lucent.com>
19940
19941         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
19942         (jm_PREREQ): Use it.
19943
19944 2001-11-09  Jim Meyering  <meyering@lucent.com>
19945
19946         * m4/jm-macros.m4: Require autoconf-2.52f.
19947         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
19948         Use these AC_-prefixed names, not the AM_-prefixed ones.
19949
19950         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
19951
19952 2001-11-05  Jim Meyering  <meyering@lucent.com>
19953
19954         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
19955
19956 2001-11-04  Jim Meyering  <meyering@lucent.com>
19957
19958         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
19959         $DEFS.
19960
19961 2001-11-03  Jim Meyering  <meyering@lucent.com>
19962
19963         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
19964         of AC_DEFUN.
19965
19966         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
19967         know the name of the variable in the macro definition.
19968
19969 2001-11-03  Jim Meyering  <meyering@lucent.com>
19970
19971         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
19972         in argmatch_to_argument call.
19973
19974         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
19975         argument.
19976
19977         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
19978         e.g., a fault due to an attempt to free a NULL pointer.
19979
19980 2001-11-01  Jim Meyering  <meyering@lucent.com>
19981
19982         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
19983         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
19984
19985 2001-11-01  Jim Meyering  <meyering@lucent.com>
19986
19987         * lib/dirfd.c, dirfd.h: New files.
19988         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
19989
19990         * lib/hash.c (hash_print) [TESTING]: Clean up.
19991
19992 2001-10-22  Paul Eggert  <eggert@twinsun.com>
19993
19994         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
19995         to avoid a warning if -Wall.
19996
19997 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
19998
19999         * README: New file
20000         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
20001         (per RMS's instructions, this is now the canonical source)
20002         * lgpl/, gpl/: New directories.
20003
20004 2001-10-21  Paul Eggert  <eggert@twinsun.com>
20005
20006         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
20007
20008 2001-10-21  Jim Meyering  <meyering@lucent.com>
20009
20010         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
20011         this code would end up calling gettext even in packages built
20012         with --disable-nls.
20013         * lib/getopt.c (_): Likewise.
20014         * lib/regex.c (_): Likewise.
20015
20016 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20017
20018         * m4/error.m4 (jm_PREREQ_ERROR):
20019         Do not invoke AC_CHECK_FUNCS with strerror_r, as
20020         AC_FUNC_STRERROR_R does that.
20021         Check for strerror declaration.
20022
20023         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
20024         are supposed to have them these days.
20025         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
20026         Merge changes from latest Autoconf CVS.
20027         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
20028         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
20029         POSIX decided to standardize on the int flavor of strerror_r.
20030
20031 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20032
20033         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
20034         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
20035         Use strerror_r that is only a macro, even if it is not a function.
20036         (strerror): Check for HAVE_DECL_STRERROR before declaring.
20037         (private_strerror): Use prototypes, not old-style function definition.
20038         (print_errno_message): New function.
20039         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
20040         char*-flavored one.
20041         (error_tail, error, error_at_line): Use it.
20042
20043 2001-10-11  Jim Meyering  <meyering@lucent.com>
20044
20045         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
20046         and quote_n (1, ... to avoid clobbering a buffer.
20047
20048 2001-10-05  Jim Meyering  <meyering@lucent.com>
20049
20050         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
20051         hash-pjw.h.
20052         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
20053         * lib/hash-pjw.h: New file.
20054
20055 2001-09-30  Jim Meyering  <meyering@lucent.com>
20056
20057         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
20058         `struct fsstat' has the `f_fstypename' member.
20059         Use that to define FS_TYPE, which is now used to make
20060         the getfsstat link test tighter.
20061
20062 2001-09-30  Jim Meyering  <meyering@lucent.com>
20063
20064         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
20065         Include <sys/ucred.h>, for Apple Darwin.
20066         Include sys/mount.h and sys/fs_types.h only if available.
20067         (FS_TYPE): Define.
20068         (read_filesystem_list): Use FS_TYPE.
20069
20070 2001-09-29  Paul Eggert  <eggert@twinsun.com>
20071
20072         * lib/exclude.c (excluded_filename): 0 -> false, since it's
20073         a boolean context.
20074
20075 2001-09-29  Jim Meyering  <meyering@lucent.com>
20076
20077         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20078         [one-argument getmntent function]): Include stdio.h before mntent.h.
20079         SunOS 4.1.x needs it for the declaration of `FILE'.
20080         Patch by Volker Borchert.
20081
20082         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20083         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
20084         sys/fs_types.h, and make the link-test for getfsstat guard #include
20085         directives with appropriate #if HAVE_*_H tests so that we can
20086         detect getfsstat on Apple Darwin1.3.7 systems.
20087         Reported by Nelson Beebe.
20088         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
20089
20090 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20091
20092         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20093         #defines strtoimax.  Also treat the other strto* functions
20094         like strtoimax.
20095
20096         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
20097         Check for strtoul and strtoumax,
20098         as those declarations are made even in the signed case.
20099         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
20100         Likewise, for strtol and strtoimax.
20101
20102 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20103
20104         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20105         #defines strtoimax.  Also treat the other strto* functions
20106         like strtoimax.
20107
20108         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
20109         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
20110         (strtoimax, strtoumax): Do not declare if already defined as a macro.
20111
20112 2001-09-26  Jim Meyering  <meyering@lucent.com>
20113
20114         Most macros in unlocked-io.h had the wrong number of arguments.
20115         * lib/gen-uio: New script.
20116         (USE_UNLOCKED_IO): Define to 1 if not already defined.
20117         * lib/unlocked-io.hin: Remove file.
20118         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
20119         rather than trying to embed it here.
20120         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
20121         Reported by Padraig Brady.
20122
20123 2001-09-25  Volker Borchert  <bt@teknon.de>
20124
20125         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
20126         `result'.
20127
20128 2001-09-24  Jim Meyering  <meyering@lucent.com>
20129
20130         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
20131
20132 2001-09-23  Jim Meyering  <meyering@lucent.com>
20133
20134         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
20135         instead of the mere test for existence of mntent.h.  The latter
20136         would get a false-positive on AIX 3.4 systems.
20137         In the outer getmntent if-block, don't die if neither of the getmntent
20138         tests succeeds.  Instead, just fall through and continue with the
20139         remaining tests.
20140
20141 2001-09-23  Jim Meyering  <meyering@lucent.com>
20142
20143         * lib/mountlist.c: Remove useless parentheses in #if directives.
20144         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
20145         the deprecated MOUNTED symbol is no longer defined in mntent.h.
20146
20147 2001-09-22  Jim Meyering  <meyering@lucent.com>
20148
20149         * m4/gettext.m4: New file.  From gettext.
20150         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
20151         * m4/progtest.m4: Likewise
20152         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
20153         * m4/glibc21.m4: Likewise.
20154
20155         * m4/libintl.m4: Remove.  No longer used.
20156
20157 2001-09-22  Jim Meyering  <meyering@lucent.com>
20158
20159         * lib/localcharset.c: Update from latest gettext.
20160         * lib/config.charset: Likewise.
20161
20162 2001-09-20  Jim Meyering  <meyering@lucent.com>
20163
20164         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
20165         strtoimax.
20166         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
20167         strtoumax.
20168
20169 2001-09-20  Jim Meyering  <meyering@lucent.com>
20170
20171         * lib/xstrtol.c (strtoimax): Guard declaration with
20172         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
20173         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
20174         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
20175         (strtoumax): Likewise, for completeness (it wasn't necessary).
20176
20177 2001-09-17  Paul Eggert  <eggert@twinsun.com>
20178
20179         * lib/strtoimax.c (HAVE_LONG_LONG):
20180         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
20181         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
20182         to work around bug in IBM C compiler.
20183
20184 2001-09-17  Jim Meyering  <meyering@lucent.com>
20185
20186         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
20187         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
20188         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
20189         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
20190         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
20191         whenever the right hand side need not be expanded by the shell.
20192
20193 2001-09-16  Paul Eggert  <eggert@twinsun.com>
20194
20195         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
20196         library.  It's not correct, as some older glibcs are buggy.
20197         fnmatch wasn't fixed until glibc 2.2.
20198
20199         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
20200         special shell magic here.
20201
20202 2001-09-16  Jim Meyering  <meyering@lucent.com>
20203
20204         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
20205         * m4/jm-macros.m4: Require it.
20206
20207 2001-09-16  Jim Meyering  <meyering@lucent.com>
20208
20209         * lib/mkdir.c: New file.
20210
20211 2001-09-15  Jim Meyering  <meyering@lucent.com>
20212
20213         * m4/jm-macros.m4: Check for help2man.
20214
20215 2001-09-11  Jim Meyering  <meyering@lucent.com>
20216
20217         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
20218         The body, by Paul Eggert, was moved here from configure.in.
20219         * m4/jm-macros.m4: Require UTILS_HOST_OS.
20220
20221 2001-09-04  Paul Eggert  <eggert@twinsun.com>
20222
20223         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
20224         (jm_PREREQ): Use it.
20225
20226 2001-09-04  Paul Eggert  <eggert@twinsun.com>
20227
20228         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
20229         Use ssize_t, not int, to store result of readlink.
20230         Check for ssize_t overflow as well as size_t overflow,
20231         as POSIX says the result of readlink is implementation-defined
20232         when ssize_t overflows.
20233         Remove unnecessary cast to char*.
20234         Use free+malloc instead of realloc, as the storage doesn't need
20235         to be preserved and it's clearer and can be more efficient that way.
20236         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
20237         * lib/xreadlink.h (xreadlink): Update prototype.
20238
20239 2001-09-04  Paul Eggert  <eggert@twinsun.com>
20240
20241         * lib/xgetcwd.c: Revert some of the previous change; intead,
20242         fix the HAVE_GETCWD_NULL code to behave more like the
20243         !HAVE_GETCWD_NULL code used to.
20244
20245         Include "xalloc.h".
20246         (xgetcwd): Do not return NULL when memory is exhausted; instead,
20247         invoke xalloc_die.
20248
20249 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20250
20251         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
20252         sys/param.h, as pathmax.h includes them.
20253
20254 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20255
20256         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
20257         (jm_PREREQ_XGETCWD): New macro.
20258
20259         * m4/getcwd.m4: New file.
20260
20261 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20262
20263         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
20264         like the HAVE_GETCWD_NULL code.
20265         Include pathmax.h if not HAVE_GETCWD.
20266         Do not include xalloc.h.
20267         (INITIAL_BUFFER_SIZE): New symbol.
20268         Do not use xmalloc / xrealloc, since the caller is responsible for
20269         handling errors.  Preserve errno around `free' during failure.
20270         Do not overrun buffer when using getwd.
20271
20272 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20273
20274         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
20275         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
20276         getcwd (NULL, 0).
20277
20278 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20279
20280         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
20281         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
20282         spotted by Jim Meyering.
20283
20284 2001-09-03  Jim Meyering  <meyering@lucent.com>
20285
20286         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
20287         failure.
20288
20289 2001-09-02  Jim Meyering  <meyering@lucent.com>
20290
20291         * lib/error.c: Update from GNU libc.
20292
20293 2001-09-01  Jim Meyering  <meyering@lucent.com>
20294
20295         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
20296         Used by df.
20297
20298 2001-09-01  Jim Meyering  <meyering@lucent.com>
20299
20300         * lib/xreadlink.c: New file.
20301         * lib/xreadlink.h: New file.
20302         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
20303         xreadlink.h.
20304
20305         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
20306         doesn't conflict with sparc Solaris 7's definition in
20307         /usr/include/sys/int_types.h.
20308
20309         * lib/exclude.c: Use `""', not `<>' to #include non-system header
20310         files.
20311         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
20312         and strncasecmp as r-values.  Unixware didn't have declarations.
20313
20314 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20315
20316         * lib/xstrtol.h: Add copyright notice.
20317         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
20318         LONGINT_INVALID_SUFFIX_CHAR.
20319
20320 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20321
20322         * lib/xstrtol.c (strtoimax): New decl.
20323
20324 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20325
20326         * lib/xgetcwd.c: Don't include pathmax.h.
20327         Include stdlib.h and unistd.h if available.
20328         Include xalloc.h.
20329         (xmalloc, xstrdup, free): Remove decls.
20330         (xgetcwd): Don't assume sizes fit in unsigned.
20331         Check for overflow when computing sizes.
20332         Simplify reallocation code.
20333
20334 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20335
20336         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
20337         a directory's st_size can have an arbitrary value, so the old
20338         usage could waste an arbitrary amount of memory.  All uses
20339         changed.
20340         * lib/savedir.h: Update prototype.
20341
20342 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20343
20344         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
20345
20346         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
20347         old strtoimax.c.
20348
20349         Also, make the following further changes to make this file's
20350         configuration more similar to that of strtol.c:
20351         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
20352         (strtoumax, uintmax_t, strtoull, strtol): Remove.
20353         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
20354         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
20355         changed to signed values.
20356
20357         And make the following changes as well:
20358         Fix copyright notice, as 1999 was missing.
20359         (verify): New macro.
20360         (strtoimax): Check sizes at compile-time, not run-time.
20361         Prefer strtol to strtoll if both work.
20362         (main): Remove; it was not that useful and was a pain to maintain.
20363
20364         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
20365
20366 2001-08-31  Jim Meyering  <meyering@lucent.com>
20367
20368         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
20369         Use an initial, malloc'd, buffer of length 128 rather than
20370         a statically allocated one of length 1024.
20371
20372 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20373
20374         Simplify code, partly by assuming autoconf 2.52 semantics.
20375
20376         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
20377
20378         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
20379         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
20380         All uses removed.
20381         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
20382         Move AC_REQUIRE to next-to-top level, to avoid confusion.
20383         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
20384         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
20385         jm_AC_HEADER_INTTYPES_H.
20386         * m4/jm-macros.m4 (jm_MACROS): Likewise.
20387
20388         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
20389
20390         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
20391         Quote first arg of AC_DEFUN.
20392         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
20393         since they are needed to parse the include file even if we need
20394         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
20395         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
20396         but with opposite signedness.
20397
20398 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20399
20400         Merge 'exclude' changes from tar 1.13.22.
20401         This fixes one or two unlikely storage allocation overflow bugs,
20402         but doesn't change user-visible behavior otherwise.
20403
20404 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20405
20406         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
20407         (jm_PREREQ_EXCLUDE): New macro.
20408
20409 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20410
20411         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20412         tm to be declared.
20413
20414 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20415
20416         * lib/hash.c: Remove '2001' from copyright notice.
20417
20418 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20419
20420         * lib/full-write.h: New file.
20421         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
20422         * lib/full-write.c: Correct credits, as cccp.c no longer
20423         exists and anyway it was so heavily changed from the old cccp
20424         code as to be unrecognizable.  Include full-write.h.
20425         (full_write) Return size_t, with short writes meaning failure.
20426         All callers changed.  This fixes a bug with large buffers
20427         on 64-bit hosts.
20428         * lib/utime.c: Include full-write.h.
20429
20430 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20431
20432         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
20433         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
20434         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
20435         Include if available.
20436         (<xalloc.h>): Include
20437         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
20438         (verify): New macro.  Use it to verify that EXCLUDE macros do not
20439         collide with FNM macros.
20440         (struct patopts): New struct.
20441         (struct exclude): Use it, as exclude patterns now come with options.
20442         (new_exclude): Support above changes.
20443         (new_exclude, add_exclude_file):
20444         Initial size must now be a power of two to simplify overflow checking.
20445         (free_exclude, fnmatch_no_wildcards): New function.
20446         (excluded_filename): No longer requires options arg, as the options
20447         are determined by add_exclude.  Now returns bool, not int.
20448         (excluded_filename, add_exclude):
20449         Add support for the fancy new exclusion options.
20450         (add_exclude, add_exclude_file): Now takes int options arg.
20451         Check for arithmetic overflow when computing sizes.
20452         (add_exclude_file): xrealloc might modify errno, so don't
20453         realloc until after errno might be used.
20454
20455         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
20456         New macros.
20457         (free_exclude): New decl.
20458         (add_exclude, add_exclude_file): Now takes int options arg.
20459         (excluded_filename): No longer requires options arg, as the options
20460         are determined by add_exclude.  Now returns bool, not int.
20461
20462 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20463
20464         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
20465
20466 2001-08-27  Jim Meyering  <meyering@lucent.com>
20467
20468         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
20469
20470         * lib/version-etc.c (N_): Remove definition.
20471         Revert most of last change.
20472         Instead, simply don't mark the `Copyright...' string for translation.
20473         Based on advice from Paul Eggert.
20474
20475         * lib/strtoxmax.c: Tweak comment.
20476
20477 2001-08-26  Jim Meyering  <meyering@lucent.com>
20478
20479         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
20480
20481         * m4/xstrtoimax.m4: New file.
20482         * m4/xstrtoumax.m4: Add comments explaining why we
20483         AC_REPLACE_FUNCS(strtol).
20484
20485 2001-08-26  Jim Meyering  <meyering@lucent.com>
20486
20487         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
20488         of copyright with `%s' so translators don't get an untranslated
20489         message in 2002.
20490         (COPYRIGHT_YEAR): Define.
20491         (version_etc): Use fprintf rather than fputs.
20492         Suggestion from Ulrich Drepper.
20493
20494         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
20495
20496         * lib/strtoll.c: New file, from GNU libc.
20497         * lib/xstrtoimax.c: New file.
20498
20499         * lib/xstrtol.h: Add xstrtoimax.
20500         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
20501         * lib/strtoimax.c: New file.  Likewise, but first define
20502         STRTOUXMAX_SIGNED.
20503
20504         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
20505         ...
20506         * lib/strtoxmax.c: ... then renamed to this.
20507
20508 2001-08-18  Paul Eggert  <eggert@twinsun.com>
20509
20510         * m4/inttypes.m4: Add AC_PREREQ(2.13).
20511         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
20512         (jm_AC_TYPE_INTMAX_T): New macro.
20513         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
20514
20515         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
20516
20517         * m4/longlong.m4: Renamed from ulonglong.m4.
20518         * m4/inttypes.m4: Renamed from inttypes_h.m4.
20519         * m4/uintmax_t.m4: Removed.
20520
20521 2001-08-13  Paul Eggert  <eggert@twinsun.com>
20522
20523         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
20524         Port to Solaris 8, where 'sed' requires a space after the 'r'
20525         command, and where sh dislikes "$/".  Clean up the spacing a bit.
20526         Redirect output to $tmp just once.
20527
20528 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
20529
20530         * lib/addext.c (<errno.h>): Include.
20531         (errno): Declare if not defined.
20532         (addext): Work correctly when pathconf returns -1 and leaves
20533         errno alone because there is no limit.  Also, work even if
20534         pathconf returns a value greater than SIZE_MAX.
20535
20536 2001-08-12  Jim Meyering  <meyering@lucent.com>
20537
20538         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
20539         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
20540         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
20541         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
20542         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
20543         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
20544         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
20545         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
20546         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
20547         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
20548         utime.m4, utimes.m4, xstrtoumax.m4:
20549         Quote the first argument in each use of AC_DEFUN.
20550
20551 2001-08-12  Jim Meyering  <meyering@lucent.com>
20552
20553         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
20554         Simply `return getcwd (NULL, 0);'.
20555         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
20556         Use 1300 as initial value for length, not PATH_MAX.
20557
20558         * lib/pathmax.h: Clean up cpp syntax.
20559
20560 2001-08-12  Jim Meyering  <meyering@lucent.com>
20561
20562         * lib/gettimeofday.c: New file.
20563         * lib/gtod.h: New file.
20564         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
20565
20566 2001-08-05  Jim Meyering  <meyering@lucent.com>
20567
20568         * m4/jm-macros.m4: Require autoconf-2.52.
20569
20570 2001-08-04  Jim Meyering  <meyering@lucent.com>
20571
20572         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
20573         stmt, to get in sync with glibc.
20574
20575 2001-08-03  Paul Eggert  <eggert@twinsun.com>
20576
20577         The following changes are from gettext 0.10.39 as maintained by
20578         Bruno Haible.
20579
20580         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
20581         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
20582         with inverted sense.  All uses changed.
20583
20584         * lib/mbswidth.c: Don't include <limits.h>.
20585         Include <stdlib.h> and <string.h> unconditionally.
20586         (iswcntrl, mbsinit, ISCNTRL): New macros.
20587         (mbsnwidth): Use K&R style function declarations.
20588         Don't bother checking for MB_LEN_MAX == 1, since the compiler
20589         can optimize it when MB_CUR_MAX == 1.
20590         The width of control characters is zero, not 1.
20591
20592 2001-08-03  Paul Eggert  <eggert@twinsun.com>
20593
20594         The following changes are from gettext 0.10.39 as maintained by
20595         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
20596
20597         * m4/codeset.m4: Upgrade to serial AM1.
20598         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
20599         all uses changed.  Quote first arg of AC_DEFUN.
20600         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
20601
20602         * m4/iconv.m4: Upgrade to serial AM2.
20603         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
20604         Add --with-libconv-prefix.
20605         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
20606         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
20607         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
20608         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
20609         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
20610
20611         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
20612         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
20613         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
20614         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
20615         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
20616         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
20617         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
20618         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
20619         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
20620
20621         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
20622         string.h any more.
20623
20624         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
20625         not the default value.
20626
20627         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
20628         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
20629         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
20630         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
20631         Also check for iswcntrl, used for wcwidth fallback.
20632         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
20633         to Autoconf 2.13.
20634
20635 2001-08-03  Jim Meyering  <meyering@lucent.com>
20636
20637         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
20638         as it was in the original.  Reported by Paul Eggert.
20639
20640 2001-07-16  Jim Meyering  <meyering@lucent.com>
20641
20642         * m4/gettimeofday.m4: New file.
20643         Prompted by a report from Bernhard Baehr.
20644
20645 2001-07-15  Jim Meyering  <meyering@lucent.com>
20646
20647         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
20648         stuff. Now it's in ../Makefile.cfg.
20649
20650 2001-07-15  Jim Meyering  <meyering@lucent.com>
20651
20652         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
20653         (BUILT_SOURCES): Add unlocked-io.h.
20654         (io_functions): Define.
20655         (unlocked-io.h): New rule.
20656         (DISTCLEANFILES): Add unlocked-io.h.
20657         (all-local): Depend on unlocked-io.h, to ensure it is created.
20658
20659         * lib/unlocked-io.hin: New file
20660
20661         * lib/regex.c: Update from glibc.
20662
20663 2001-07-05  Jim Meyering  <meyering@lucent.com>
20664
20665         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
20666         recommendation.
20667         (libfetish_a_SOURCES): Put all .h files here instead.
20668         Remove a thus-exposed (better checks in automake) duplicate and
20669         two unnecessary .h files.
20670
20671 2001-07-04  Jim Meyering  <meyering@lucent.com>
20672
20673         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
20674         that generates jm-glibc-io.m4 so that it doesn't trigger any make
20675         distcheck failure.
20676
20677 2001-07-02  Jim Meyering  <meyering@lucent.com>
20678
20679         The following changes were prompted by suggestions from Bruno Haible.
20680
20681         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
20682         is now generated.
20683         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
20684         definition of EXTRA_DIST.
20685         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
20686         ensure that the generated file is created/updated whenever the list
20687         of $(unlocked_functions) is changed.
20688         (jm-glibc-io.m4): New rule.
20689         (unlocked-io.h): New rule -- currently unused.
20690
20691 2001-06-24  Jim Meyering  <meyering@lucent.com>
20692
20693         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
20694         unmatched right bracket, rather than kludging it with an extra,
20695         falsely-matching quote in a comment.  Patch by Akim Demaille.
20696
20697 2001-06-11  Jim Meyering  <meyering@lucent.com>
20698
20699         * lib/regex.c: Update from GNU libc.
20700
20701 2001-05-27  Jim Meyering  <meyering@lucent.com>
20702
20703         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
20704         Check for ut_type in struct utmp.
20705
20706 2001-05-27  Jim Meyering  <meyering@lucent.com>
20707
20708         * lib/readutmp.h (UT_TYPE): Define.
20709
20710 2001-05-24  Jim Meyering  <meyering@lucent.com>
20711
20712         * lib/argmatch.c: Include "quote.h".
20713         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
20714         quote function.  Reported by Göran Uddeborg.
20715
20716 2001-05-22  Jim Meyering  <meyering@lucent.com>
20717
20718         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
20719         now that we use the package-supplied version unconditionally.
20720         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
20721
20722 2001-05-21  Jim Meyering  <meyering@lucent.com>
20723
20724         * m4/regex.m4: Change a couple backticks to single quotes to avoid
20725         shell syntax errors.
20726
20727 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
20728
20729         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
20730
20731 2001-05-20  Paul Eggert  <eggert@twinsun.com>
20732
20733         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
20734         Don't bother to check library strftime, since
20735         we'll be using our own my_strftime function anyway.
20736         Define my_strftime instead of strftime.
20737
20738 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
20739
20740         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
20741         which is not yet declared.
20742
20743 2001-05-15  Jim Meyering  <meyering@lucent.com>
20744
20745         * m4/regex.m4: Use proper quoting so brackets appear in the test
20746         program.
20747         Reported by, and with help from, Bruno Haible.
20748
20749 2001-05-13  Jim Meyering  <meyering@lucent.com>
20750
20751         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
20752         undefined.
20753
20754 2001-05-11  Paul Eggert  <eggert@twinsun.com>
20755
20756         dirname code cleanup.  base_name now behaves more compatibly
20757         with POSIX basename when given file names that have trailing
20758         slashes, and similarly for dir_name.  Add new primitives
20759         base_len and dir_len.  Put the directory-name-related decls
20760         into dirname.h.
20761
20762         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
20763         * lib/backupfile.c (base_name): Likewise.
20764         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
20765         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
20766         * lib/makepath.c (strip_trailing_slashes): Likewise.
20767         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
20768         ISSLASH): Likewise.
20769         * lib/rename.c (strip_trailing_slashes): Likewise.
20770         * lib/same.c (base_name): Likewise.
20771         * lib/stripslash.c (ISSLASH): Likewise.
20772
20773         * lib/addext.c: Include <dirname.h> after size_t is defined.
20774         * lib/backupfile.c: Likewise.
20775
20776         * lib/addext.c (addext): Use base_len to trim redundant
20777         trailing slashes instead of doing it ourselves.
20778         But do not trim the last slash if it is not redundant.
20779
20780         * lib/backupfile.c (find_backup_file_name,
20781         max_backup_version): Use base_len instead of rolling it ourselves.
20782         Handle the case of "" and (on DOS) "C:" correctly.
20783
20784         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
20785         needed. Include <string.h>, <dirname.h>.
20786         (base_name): Allow file names ending in slashes, other than names
20787         that are all slashes.  In this case, return the basename followed
20788         by the slashes.  This is more general, and can be used in places
20789         where the original base_name purposely had an assertion failure.
20790         (base_len): New function.
20791
20792         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
20793         Do not include <assert.h>; no longer needed.
20794         Include xalloc.h.
20795         (memrchr): Remove decl.
20796         (dir_name_r): Remove.
20797         (dir_len): Renamed from dirlen.  All callers changed.
20798         Rewrite in terms of base_name, for simplicity and consistency.
20799         (dir_name): Never return NULL.  All callers changed.
20800         Do not include <stdlib.h> in test program; no longer needed.
20801         return 0; is fine for test program.
20802
20803         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
20804         New macros.
20805         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
20806
20807         * lib/path-concat.c (path_concat): Use base_len to compute
20808         base length, not strlen; this means we cannot rely on memcpy
20809         to null-terminate.
20810
20811         * lib/same.c (STREQ): Remove.
20812         (same_name): Handle the case where the basename ends in trailing '/'.
20813
20814         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
20815         a slash was stripped.  Do not strip the last slash after a
20816         file system prefix.
20817
20818 2001-05-11  Paul Eggert  <eggert@twinsun.com>
20819
20820         * lib/Makefile.am (libfetish_a_SOURCES):
20821         Add strftime.c, since we now compile it on all hosts.
20822
20823         * lib/strftime.c (my_strftime):
20824         Define to nstrftime if emacs, but only if my_strftime is not defined.
20825         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
20826         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
20827         Add one more extra argument: a nanoseconds value.
20828         All uses changed.
20829         (ns): New macro.
20830         (my_strftime function): Add %N format.
20831         (emacs_strftimeu): Renamed from emacs_strftime,
20832         with extra ut argument.
20833
20834 2001-05-09  Paul Eggert  <eggert@twinsun.com>
20835
20836         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
20837
20838 2001-04-21  Jim Meyering  <meyering@lucent.com>
20839
20840         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
20841         doesn't interfere.
20842
20843 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
20844
20845         * m4/ftruncate.m4: Check for chsize.
20846         Link with ftruncate.o unconditionally if ftruncate is missing.
20847         This was required when cross-compiling to i586-mingw32msvc.
20848
20849 2001-04-08  Jim Meyering  <meyering@lucent.com>
20850
20851         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
20852         recomputed; that's necessary when the offset spans a DST transition.
20853         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
20854
20855 2001-04-02  Jim Meyering  <meyering@lucent.com>
20856
20857         * lib/regex.h, regex.c: Update from GNU libc.
20858
20859 2001-03-24  Jim Meyering  <meyering@lucent.com>
20860
20861         * m4/jm-macros.m4: Require autoconf-2.49d.
20862
20863 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
20864
20865         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
20866
20867 2001-03-19  Paul Eggert  <eggert@twinsun.com>
20868
20869         * lib/version-etc.c (version_etc_copyright): Update to 2001.
20870
20871 2001-03-17  Jim Meyering  <meyering@lucent.com>
20872
20873         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
20874         now that the version in autoconf is equivalent.
20875         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
20876
20877         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
20878         Suggestion from Akim Demaille.
20879
20880         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
20881         (jm_PREREQ_TEMPNAME): New function.
20882
20883 2001-03-16  Paul Eggert  <eggert@twinsun.com>
20884
20885         * lib/tempname.c (uint64_t): Define to uintmax_t if
20886         not defined, and if UINT64_MAX is not defined.
20887         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
20888         Reported by John David Anglin.
20889
20890 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
20891
20892         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
20893         resolve alias if codeset is empty.
20894         * lib/config.charset (BeOS): Use wildcard syntax.
20895
20896 2001-03-13  Jim Meyering  <meyering@lucent.com>
20897
20898         * lib/path-concat.c (path_concat)
20899         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
20900         concatenating e.g., `C:' and `foo'.
20901         From Bruno Haible.
20902
20903 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
20904
20905         * lib/localcharset.c (locale_charset): Don't use
20906         setlocale(LC_CTYPE,NULL). Don't return NULL.
20907         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
20908
20909 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
20910
20911         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
20912         support for DOS/DJGPP.
20913
20914 2001-03-01  Paul Eggert  <eggert@twinsun.com>
20915
20916         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
20917         lacks mkstemp.  Compile our own tempname.c if we compile our own
20918         mkstemp.c, as mkstemp relies on tempname.
20919
20920 2001-03-01  Jim Meyering  <meyering@lucent.com>
20921
20922         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
20923         AH_VERBATIM really does output its argument verbatim.
20924
20925 2001-02-28  Paul Eggert  <eggert@twinsun.com>
20926
20927         * lib/Makefile.am (libfetish_a_SOURCES):
20928         Add dup-safer.c, fopen-safer.c.
20929         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
20930
20931         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h,
20932         lib/unistd-safer.h: New files.
20933
20934 2001-02-25  Paul Eggert  <eggert@twinsun.com>
20935
20936         The mkstemp replacement is taken from glibc 2.2.2, with some
20937         portability fixes for use outside glibc, as follows:
20938
20939         * lib/tempname.c (struct_stat64): New macro.
20940         (direxists, __gen_tempname): Use it.
20941         This avoids a portability problem with Solaris 8.
20942
20943         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
20944         (<stddef.h>, <stdint.h>, <string.h>):
20945         Include only if STDC_HEADERS || _LIBC.
20946         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
20947         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
20948         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
20949         (__set_errno): Define this macro if <errno.h> doesn't.
20950         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
20951         Define these macros if <stdio.h> doesn't.
20952         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
20953         Define these macros if <sys/stat.h>
20954         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
20955         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
20956         __xstat64): Define if not _LIBC.
20957         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
20958         (__gen_tempname): Invoke gettimeofday only if
20959         HAVE_GETTIMEOFDAY || _LIBC;
20960         otherwise, fall back on plain "time".
20961         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
20962
20963         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
20964
20965         * lib/mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
20966
20967 2001-02-18  Paul Eggert  <eggert@twinsun.com>
20968
20969         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
20970
20971 2001-02-17  Paul Eggert  <eggert@twinsun.com>
20972
20973         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
20974         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
20975         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
20976         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
20977
20978 2001-02-17  Paul Eggert  <eggert@twinsun.com>
20979
20980         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
20981         Remove workaround macros for hosts that have mbrtowc but not
20982         mbstate_t, as we now insist on proper declarations for both
20983         before using mbrtowc.
20984
20985 2001-02-17  Jim Meyering  <meyering@lucent.com>
20986
20987         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
20988         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
20989         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
20990         UnixWare 7.1.1.
20991
20992         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
20993         rather than AC_CACHE_VAL.
20994
20995 2001-02-17  Jim Meyering  <meyering@lucent.com>
20996
20997         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
20998         around included file name.
20999
21000         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
21001
21002         * lib/strftime.c: Update from GNU libc (the only changes were to
21003         comments).
21004
21005 2001-02-17  Jim Meyering  <meyering@lucent.com>
21006
21007         * lib/regex.c: Update from libc.
21008
21009 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
21010
21011         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
21012         clash.
21013
21014 2001-02-16  Paul Eggert  <eggert@twinsun.com>
21015
21016         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
21017         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
21018         Reported by Mark Hounschell via Paul Eggert.
21019
21020 2001-02-07  Jim Meyering  <meyering@lucent.com>
21021
21022         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
21023
21024 2001-02-05  Jim Meyering  <meyering@lucent.com>
21025
21026         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
21027         it includes the patch required for `large file' support with at least
21028         HP-UX's 10.20 /bin/cc.
21029
21030 2001-02-03  Jim Meyering  <meyering@lucent.com>
21031
21032         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
21033         AS_IF, now that it works once again (mysteriously).
21034         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21035
21036 2001-01-30  Jim Meyering  <meyering@lucent.com>
21037
21038         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
21039         * m4/chown.m4: Rename conftestchown to conftest.chown.
21040         * m4/rename.m4: s/conftestdir/conftest.d1/ and
21041         s/conftestdir2/conftest.d2/.
21042         * m4/utimes.m4: s/conftestdata/conftest.data/
21043         Inspired by Pavel Roskin's change in autoconf.
21044
21045 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
21046
21047         * lib/config.charset: Update for FreeBSD 4.2.
21048
21049 2001-01-27  Jim Meyering  <meyering@lucent.com>
21050
21051         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
21052         a use of AS_IF.
21053         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21054
21055 2001-01-26  Jim Meyering  <meyering@lucent.com>
21056
21057         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
21058         quotearg.c includes it.
21059
21060 2001-01-26  Jim Meyering  <meyering@lucent.com>
21061
21062         * lib/quotearg.c: Include stddef.h.
21063         * lib/quote.c: Include stddef.h.
21064         Reported by Axel Kittenberger.
21065
21066         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
21067         line in double quotes so that it evokes a better diagnostic.
21068         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
21069         Reported by Axel Kittenberger.
21070
21071 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
21072
21073         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
21074         as if it was a `charset'.
21075
21076 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21077
21078         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
21079         has const.
21080
21081 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21082
21083         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
21084         to avoid a warning.  Add back 'const' to inptr.
21085
21086 2001-01-20  Jim Meyering  <meyering@lucent.com>
21087
21088         Be sure that headers are checked before used in code compiled
21089         for the type checks.
21090         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
21091         In place of that, invoke jm_CHECK_ALL_TYPES.
21092         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
21093         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
21094         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
21095         The check for ssize_t was mistakenly run before the test for unistd.h.
21096
21097         The configure-time check for stdbool.h was missing.
21098         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
21099         (jm_PREREQ_HASH): New function.
21100
21101 2001-01-17  Jim Meyering  <meyering@lucent.com>
21102
21103         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
21104         for autoconf-2.49c.
21105         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
21106
21107 2001-01-16  Jim Meyering  <meyering@lucent.com>
21108
21109         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
21110         From Bruno Haible.
21111
21112 2001-01-14  Jim Meyering  <meyering@lucent.com>
21113
21114         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
21115         foo and bar.  Create conftestdir/ in the script, not in the C code.
21116         Remove directories in the script, not in the C code.
21117         Remove conftestdir{,2} before trying to create the directory.
21118         Make the entire configure script fail if the mkdir fails.
21119
21120 2001-01-14  Jim Meyering  <meyering@lucent.com>
21121
21122         * lib/rename.c: New file.  From Volker Borchert.
21123         Include stdlib.h, string.h or strings.h, and xalloc.h.
21124         Use strip_trailing_slashes rather than open-coding it.
21125
21126 2001-01-03  Paul Eggert  <eggert@twinsun.com>
21127
21128         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
21129
21130 2001-01-03  Jim Meyering  <meyering@lucent.com>
21131
21132         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
21133         of local `inptr' to avoid warning with some system declarations of
21134         iconv.
21135
21136 2001-01-02  Volker Borchert  <bt@teknon.de>
21137
21138         * m4/rename.m4: New file.
21139         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
21140
21141 2001-01-01  Jim Meyering  <meyering@lucent.com>
21142
21143         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
21144         even on systems with utmpx.h.  It's necessary for the declaration of
21145         utmp's ut_user member.  Reported by Andreas Jaeger.
21146
21147         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
21148         available. They are required for the declarations of getgrgid and
21149         getpwuid resp.
21150         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
21151         Reported by Andreas Jaeger.
21152
21153 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
21154
21155         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
21156         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
21157         so `make install' also works in VPATH builds.
21158
21159 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
21160
21161         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
21162         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
21163         can be used in subdirectories.
21164
21165 2000-12-29  Paul Eggert  <eggert@twinsun.com>
21166
21167         * lib/modechange.c: Do not assume that mode_t uses the
21168         traditional octal encoding.  E.g. "chmod 1 FOO" should set
21169         the other-execute bit of FOO even if S_IXOTH != 1.
21170
21171         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
21172         WOTH, XOTH, ALLM): New macros.
21173         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
21174          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
21175         Use them.
21176         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
21177         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
21178         (mode_compile):
21179         No need to use uintmax_t; unsigned long is long enough.
21180         Don't bother to get suffix since we don't use it.
21181
21182 2000-12-26  Jim Meyering  <meyering@lucent.com>
21183
21184         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
21185         better with autoheader.
21186
21187 2000-12-24  Jim Meyering  <meyering@lucent.com>
21188
21189         * lib/hash.c (is_prime): Return explicit boolean values.
21190         (hash_get_first): Return NULL to appease Irix5.6's 89.
21191         Reported by Nelson Beebe.
21192
21193 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
21194
21195         * lib/localcharset.c (locale_charset): Add support for Win32.
21196
21197 2000-12-18  Paul Eggert  <eggert@twinsun.com>
21198
21199         * lib/physmem.h, physmem.c: New files.
21200
21201         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
21202         (noinst_HEADERS): Add physmem.h.
21203
21204         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
21205         't' for compatibility with Solaris 8 sort.
21206
21207 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
21208
21209         * lib/config.charset: Add support for BeOS.
21210
21211 2000-12-17  Jim Meyering  <meyering@lucent.com>
21212
21213         * m4/dos.m4 (jm_AC_DOS): New file and macro.
21214         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
21215
21216 2000-12-16  Jim Meyering  <meyering@lucent.com>
21217
21218         This bug had a serious impact on chown: `chown N:M FILE' (for integer
21219         N and M) would have treated it like `chown N:N FILE'.
21220
21221         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
21222
21223 2000-12-16  Jim Meyering  <meyering@lucent.com>
21224
21225         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
21226         SHELLS_FILE to a file name that's useful on djgpp systems.
21227         Include stdlib.h.
21228         (ADDITIONAL_DEFAULT_SHELLS): Define.
21229         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
21230         Based mostly on a patch from Prashant TR.
21231
21232 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
21233
21234         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
21235         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
21236         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
21237
21238 2000-12-08  Andreas Schwab  <schwab@suse.de>
21239
21240         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
21241         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
21242
21243 2000-12-07  Jim Meyering  <meyering@lucent.com>
21244
21245         * lib/stripslash.c (ISSLASH): Define.
21246         (strip_trailing_slashes): Use ISSLASH rather than comparing against
21247         `/'.
21248         From Prashant TR.
21249
21250         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
21251         (dir_name_r): Declare this function as static.
21252         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
21253         manifest itself on a name containing a mix of slashes and
21254         backslashes.
21255         Make this function work with names starting with a DOS-style
21256         drive letter and colon prefix.
21257         (dir_name): Append `.' if necessary.
21258         Based mostly on patches from Prashant TR and Eli Zaretskii.
21259
21260         * lib/dirname.h (dir_name_r): Remove prototype.
21261
21262 2000-12-06  Paul Eggert  <eggert@twinsun.com>
21263
21264         * m4/off_t-format.m4: Remove this file.
21265         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
21266
21267 2000-12-06  Jim Meyering  <meyering@lucent.com>
21268
21269         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
21270         replacement strtoull, we may well need the replacement strtoul, too.
21271         Check for declarations of strtoul and strtoull.
21272         Check for strtol.  Mainly as a cue to cause automake to include
21273         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
21274         Check for limits.h -- strtol.c needs it.
21275
21276 2000-12-05  Jim Meyering  <meyering@lucent.com>
21277
21278         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
21279
21280 2000-12-04  Jim Meyering  <meyering@lucent.com>
21281
21282         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
21283         Also include memory.h, stdlib.h, unistd.h if appropriate.
21284         Reported by Andreas Jaeger (conflicting declaration of malloc).
21285
21286 2000-12-02  Jim Meyering  <meyering@lucent.com>
21287
21288         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
21289         * m4/jm-macros.m4 (jm_MACROS): require it.
21290
21291 2000-12-02  Jim Meyering  <meyering@lucent.com>
21292
21293         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
21294
21295 2000-12-01  Paul Eggert  <eggert@twinsun.com>
21296
21297         * lib/memrchr.c: Include <config.h> before any system include file.
21298
21299 2000-11-30  Jim Meyering  <meyering@lucent.com>
21300
21301         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
21302
21303 2000-11-30  Jim Meyering  <meyering@lucent.com>
21304
21305         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
21306
21307 2000-11-29  Paul Eggert  <eggert@twinsun.com>
21308
21309         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
21310
21311 2000-11-26  Jim Meyering  <meyering@lucent.com>
21312
21313         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
21314
21315 2000-11-22  Paul Eggert  <eggert@twinsun.com>
21316
21317         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
21318         size of (size_t) -1; it's not portable.
21319
21320 2000-11-17  Jim Meyering  <meyering@lucent.com>
21321
21322         * lib/strstr.c: Update from GNU libc.
21323
21324 2000-11-17  Akim Demaille  <akim@epita.fr>
21325
21326         * lib/obstack.h: Formatting changes.
21327         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
21328         prevent type checking.
21329         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21330         cast the value to (void *): assigning a `foo *' to a `void *'
21331         variable is valid.
21332         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21333
21334 2000-11-16  Jim Meyering  <meyering@lucent.com>
21335
21336         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
21337
21338 2000-11-11  Jim Meyering  <meyering@lucent.com>
21339
21340         * lib/error.c: Add a couple #includes, merging from GNU libc version.
21341
21342 2000-11-10  Jim Meyering  <meyering@lucent.com>
21343
21344         * lib/obstack.h: Update from GNU libc.
21345         * lib/obstack.c: Likewise.
21346
21347 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
21348
21349         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
21350
21351 2000-11-06  Paul Eggert  <eggert@twinsun.com>
21352
21353         * lib/getusershell.c (setusershell): Use rewind rather than
21354         fseek/fseeko, to avoid configuration hassles with fseeko.
21355         Don't bother opening SHELLS_FILE if shellstream is NULL;
21356         it's not necessary.
21357
21358 2000-11-05  Jim Meyering  <meyering@lucent.com>
21359
21360         * lib/makepath.h (make_dir): Declare.
21361         * lib/makepath.c (make_dir): Remove `static' attribute.
21362         Tweak a comment.
21363
21364 2000-11-04  Jim Meyering  <meyering@lucent.com>
21365
21366         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
21367
21368 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
21369
21370         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
21371         last one in a bucket, advance to the next bucket.
21372
21373 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
21374
21375         * lib/fnmatch.c: Do not comment out all the code if we are using
21376         the GNU C library, because in some cases we are replacing buggy
21377         code in the GNU C library itself.
21378
21379 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
21380
21381         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
21382         (regex_compile): Catch bogus \(\1\).
21383
21384 2000-10-30  Paul Eggert  <eggert@twinsun.com>
21385
21386         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
21387         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
21388         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
21389
21390 2000-10-30  Paul Eggert  <eggert@twinsun.com>
21391
21392         * lib/error.h, getline.h, modechange.h:
21393         Remove "2000" from Copyright line, as the file hasn't been
21394         changed this year other than in the copyright notice.
21395
21396         * lib/xalloc.h: Add "2000" to Copyright line, as this file
21397         was changed this year.
21398
21399 2000-10-29  Jim Meyering  <meyering@lucent.com>
21400
21401         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
21402         renaming.
21403         * m4/ls-mntd-fs.m4: Likewise
21404
21405 2000-10-29  Jim Meyering  <meyering@lucent.com>
21406
21407         * lib/xstat.in: Fix grammar in comment.
21408
21409 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
21410
21411         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
21412         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
21413         doesn't define __restrict_arr.
21414
21415 2000-10-28  Jim Meyering  <meyering@lucent.com>
21416
21417         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
21418         (jm_PREREQ_MEMCHR): New function.
21419
21420 2000-10-28  Jim Meyering  <meyering@lucent.com>
21421
21422         * lib/memchr.c: Update from libc.
21423         Adjust for portability:
21424         [HAVE_STDLIB_H]: Include stdlib.h.
21425         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
21426         Undef __memchr, too.
21427         [!weak_alias]: Define __memchr to memchr.
21428
21429         * lib/regex.c: Update from libc.
21430         * lib/regex.h: Likewise.
21431         * lib/getopt1.c: Likewise.
21432         * lib/memcmp.c: Likewise.
21433
21434         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
21435         Avoid using fseek, when possible -- it's broken by design.
21436         Patch by Ulrich Drepper.
21437
21438 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
21439
21440         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
21441         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
21442         Giving in to popular pressure to shut up the compiler with casts.
21443
21444 2000-10-26  Jim Meyering  <meyering@lucent.com>
21445
21446         * lib/strftime.c: Update from libc.
21447
21448 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
21449
21450         * regex.c: More `unsigned char' -> `re_char' changes.
21451         Also change several `int' into `re_wchar_t'.
21452         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
21453         (PUSH_FAILURE_POINTER): Don't cast any more.
21454         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
21455         We want GCC to complain, since this piece of code makes
21456         re_match non-reentrant, which *should* be fixed.
21457         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
21458         (EXTEND_BUFFER): Use RETALLOC.
21459         (SET_LIST_BIT): Don't cast.
21460         (re_wchar_t): New type.
21461         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
21462         that those two functions will always properly return.
21463         (IMMEDIATE_QUIT_CHECK): Cast to void.
21464         (analyse_first): Use recursion rather than an explicit stack.
21465         (re_compile_fastmap): Can't fail anymore.
21466         (re_search_2): Don't check re_compile_fastmap for failure.
21467         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
21468         Now also sets the new value (passed in a new argument).
21469         (re_match_2_internal): Use it.
21470         Also, use a new var `reg' of type size_t when looping through regs
21471         rather than reuse the inappropriate `mcnt'.
21472
21473 2000-10-25  Jim Meyering  <meyering@lucent.com>
21474
21475         * lib/obstack.c: Update from libc.
21476
21477 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
21478
21479         * regex.c (regex_compile): Change the way of handling a range from
21480         a char less than 256 to a char not less than 256.
21481
21482 2000-10-24  Andrew Innes  <andrewi@gnu.org>
21483
21484         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
21485         NT-Emacs only.
21486         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
21487         so that re_search functions only quit when callers expect them to.
21488
21489 2000-10-23  Jim Meyering  <meyering@lucent.com>
21490
21491         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
21492         wrong.  That set_locale call must not have any side effects.
21493         From Paul Eggert.
21494
21495 2000-10-22  Jim Meyering  <meyering@lucent.com>
21496
21497         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
21498         [CYCLIC]: Remove now-unused definition.
21499
21500         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
21501         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
21502         Suggestion from Ulrich Drepper.
21503
21504 2000-10-21  Jim Meyering  <meyering@lucent.com>
21505
21506         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
21507         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
21508         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
21509
21510 2000-10-21  Jim Meyering  <meyering@lucent.com>
21511
21512         * lib/dirname.c (memrchr): Declare if necessary.
21513         (dir_name): Remove the restriction that there be no
21514         trailing slashes.  Now, this code skips past them, effectively
21515         ignoring them.
21516         [TEST_DIRNAME] (main): New unit tests.
21517
21518         * lib/memrchr.c: New file from GNU libc.
21519         Undef __memrchr, too.
21520         [!weak_alias]: Define __memrchr to memrchr.
21521         Guard weak_alias use with `#ifdef weak_alias'.
21522
21523 2000-10-21  Jim Meyering  <meyering@lucent.com>
21524
21525         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
21526         (dir_name): Use dir_name_r.
21527         * lib/dirname.h (dir_name_r): Declare it.
21528
21529 2000-10-17  Jim Meyering  <meyering@lucent.com>
21530
21531         * lib/quote.h (PARAMS): Define and use.
21532         Reported by Akim Demaille.
21533
21534         * lib/getopt.c: Update from libc.
21535
21536 2000-10-16  Jim Meyering  <meyering@lucent.com>
21537
21538         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
21539         setlocale.
21540         From Jan Fedak.
21541
21542 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
21543
21544         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
21545
21546 2000-09-25  Jim Meyering  <meyering@lucent.com>
21547
21548         * lib/md5.h (rol): Define (from GnuPG).
21549
21550         * lib/sha.c: Give credit (GnuPG) where due.
21551         (M): Use rol rather than open-coding it.
21552         Add a FIXME comment.
21553
21554 2000-09-21  Jim Meyering  <meyering@lucent.com>
21555
21556         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
21557         Reported by Michael Stone.
21558
21559 2000-09-20  Jim Meyering  <meyering@lucent.com>
21560
21561         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
21562         (noinst_HEADERS): Add sha.h.
21563         Based on code from Scott G. Miller and from GnuPG.
21564
21565 2000-09-18  Jim Meyering  <meyering@lucent.com>
21566
21567         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
21568         LIBS. Otherwise, everyone ends up linking with -lelf for some
21569         configurations.
21570         Reported by Mike Stone.
21571
21572 2000-09-15  Jim Meyering  <meyering@lucent.com>
21573
21574         * lib/regex.c: Update from libc.
21575
21576 2000-09-10  Jim Meyering  <meyering@lucent.com>
21577
21578         * lib/getopt.c (_getopt_internal): Update from glibc.
21579
21580 2000-09-09  Jim Meyering  <meyering@lucent.com>
21581
21582         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
21583         think it should be used as a general replacement for isascii.
21584         * lib/fnmatch.c: Likewise.
21585         * lib/mbswidth.c: Likewise
21586         * lib/regex.c: Likewise.
21587
21588         Don't use atoi.
21589         * lib/userspec.c: Include sys/param.h and limits.h.
21590         Include xstrtol.h.
21591         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21592         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
21593         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
21594         UID, GID.  Check range.
21595
21596 2000-09-06  Jim Meyering  <meyering@lucent.com>
21597
21598         * lib/getopt.c (_getopt_internal): Update from glibc.
21599
21600 2000-08-30  Jim Meyering  <meyering@lucent.com>
21601
21602         * lib/strftime.c: Merge in changes from GNU libc.
21603
21604 2000-08-26  Jim Meyering  <meyering@lucent.com>
21605
21606         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
21607         * m4/fpending.m4: New file.
21608
21609 2000-08-26  Jim Meyering  <meyering@lucent.com>
21610
21611         * lib/closeout.c: Include "__fpending.h".
21612         (close_stdout_status): Return right away if there's nothing to flush.
21613
21614         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
21615         * lib/__fpending.c: New file.
21616         * lib/__fpending.h: New file.
21617
21618 2000-08-20  Jim Meyering  <meyering@lucent.com>
21619
21620         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
21621         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
21622         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
21623
21624 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
21625
21626         Improve fileutils installation on systems where running
21627         programs (like install) can't be unlinked.
21628         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
21629         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
21630
21631 2000-08-07  Paul Eggert  <eggert@twinsun.com>
21632
21633         Standardize on "memory exhausted" instead of "Memory exhausted"
21634         or "virtual memory exhausted".
21635         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
21636         "virtual memory exhausted".
21637         * lib/same.c (same_name): Invoke xalloc_die instead of printing
21638         our own message.
21639         * lib/userspec.c (parse_user_spec): Likewise.
21640         * lib/bumpalloc.h: comment fix
21641         * lib/same.c, userspec.c: Include xalloc.h.
21642
21643         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
21644         not char *const and pointing to a constant array.
21645         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
21646         (xrealloc): Comment fix.
21647
21648         * lib/userspec.c (parse_user_spec):
21649         Don't translate a message until just before returning,
21650         to avoid unnecessary translation.
21651
21652 2000-08-07  Jim Meyering  <meyering@lucent.com>
21653
21654         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
21655         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
21656         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
21657         getgroups.c, gethostname.c, getopt.h, group-member.c,
21658         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
21659         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
21660         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
21661         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
21662         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
21663         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
21664         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
21665         yesno.c: Back out Copyright date changes for each file with no change
21666         this year.  This eases coordination with other programs using the same
21667         source code modules.  From Paul Eggert.
21668
21669 2000-08-06  Paul Eggert  <eggert@twinsun.com>
21670
21671         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
21672         not char, for compatibility with glibc 2.1.3 strftime.c.
21673
21674 2000-08-03  Greg McGary  <greg@mcgary.org>
21675
21676         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
21677         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
21678         (EXTEND_BUFFER): Use them.
21679
21680 2000-08-01  Jim Meyering  <meyering@lucent.com>
21681
21682         * lib/dirname.c (ISSLASH): Define.
21683         (BACKSLASH_IS_PATH_SEPARATOR): Define.
21684         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
21685         both `\' and `/' may be use as path separators.
21686         Based on a patch from Prashant TR.
21687
21688 2000-07-31  Paul Eggert  <eggert@twinsun.com>
21689
21690         * lib/quotearg.c (quotearg_n_options): Don't make the initial
21691         slot vector a constant, since it might get modified.
21692
21693 2000-07-31  Jim Meyering  <meyering@lucent.com>
21694
21695         * lib/xmalloc.c: Use `virtual memory exhausted', not
21696         `Memory exhausted'.
21697         * lib/obstack.c (print_and_abort): Likewise.
21698
21699 2000-07-30  Paul Eggert  <eggert@twinsun.com>
21700
21701         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
21702         buffer, so that the caller can always quote one small
21703         component of a "memory exhausted" message in slot 0.
21704         From a suggestion by Jim Meyering.
21705
21706 2000-07-30  Jim Meyering  <meyering@lucent.com>
21707
21708         * lib/makepath.c (make_path): Quote the other instance, too.
21709
21710         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
21711         (STATIC_BUF_SIZE): Define.
21712         (quotearg_n_options): Use only statically allocated storage when
21713         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
21714         than STATIC_BUF_SIZE.
21715
21716 2000-07-29  Jim Meyering  <meyering@lucent.com>
21717
21718         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
21719         * lib/dirname.c (dir_name): Likewise.
21720
21721         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
21722         `/'.
21723
21724         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
21725         (dir_name): Assert that there are no trailing slashes.
21726
21727 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
21728
21729         * lib/mbswidth.h (mbswidth): Add a flags argument.
21730         (mbswidth): New declaration.
21731         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
21732         * lib/mbswidth.c (mbswidth): Add a flags argument.
21733         (mbsnwidth): New function.
21734
21735 2000-07-24  Jim Meyering  <meyering@lucent.com>
21736
21737         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
21738
21739 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21740
21741         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
21742
21743 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21744
21745         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
21746         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
21747         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
21748         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
21749         invoke multibyte primitives.
21750
21751 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21752
21753         * lib/quotearg.c:
21754         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
21755         so that mbstate_t is always defined.
21756
21757         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
21758         be 1 in at least one GCC installation, and this configuration
21759         error is likely to be common.  Ignoring MB_LEN_MAX hurts
21760         performance on hosts that have mbrtowc but have only unibyte
21761         locales, but I assume these hosts are rare.
21762
21763 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21764
21765         * lib/mbswidth.c (_XOPEN_SOURCE):
21766         Don't define; this causes problems on Solaris 7.
21767         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
21768
21769 2000-07-23  Jim Meyering  <meyering@lucent.com>
21770
21771         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
21772         too: getgrgid, getpwuid, getuid.
21773
21774 2000-07-23  Jim Meyering  <meyering@lucent.com>
21775
21776         * lib/basename.c (base_name): Add an assertion.
21777
21778 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
21779
21780         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
21781         shadow its mbsinit function.
21782
21783 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
21784
21785         * lib/mbswidth.h: New file.
21786         * lib/mbswidth.c: New file.
21787         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
21788         (noinst_HEADERS): Add mbswidth.h.
21789
21790 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
21791
21792         * lib/config.charset: Add support for FreeBSD. Improve support for
21793         HP-UX and IRIX 6.
21794
21795 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
21796
21797         * m4/mbswidth.m4: New file.
21798         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
21799
21800 2000-07-15  Jim Meyering  <meyering@lucent.com>
21801
21802         * lib/makepath.c: Include quote.h.
21803         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
21804         corresponding argument in a `quote (...)' call.
21805         Give better diagnostics.
21806
21807         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
21808         (noinst_HEADERS): Add quote.h.
21809
21810         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
21811         from tar's src/misc.c.
21812         * lib/quote.h: New file.  Prototypes for same.
21813
21814 2000-07-14  Paul Eggert  <eggert@twinsun.com>
21815
21816         From a suggestion by Bruno Haible.
21817         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
21818         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
21819         to decide whether to define the BeOS workaround macro;
21820         this adjusts to the change to AC_MBSTATE_T.
21821
21822 2000-07-14  Jim Meyering  <meyering@lucent.com>
21823
21824         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
21825         jm_AC_TYPE_UINTMAX_T.
21826
21827 2000-07-13  Paul Eggert  <eggert@twinsun.com>
21828
21829         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
21830
21831         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
21832         quotearg_buffer_restyled): Add support for
21833         clocale_quoting_style.  Undo previous change to
21834         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
21835         and "{RIGHT QUOTATION MARK}" msgids.
21836
21837 2000-07-10  Paul Eggert  <eggert@twinsun.com>
21838
21839         From a suggestion by Bruno Haible.
21840         * m4/mbstate_t.m4 (AC_MBSTATE_T):
21841         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
21842         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
21843         and mbstate_t, to a single-part test that simply defines mbstate_t.
21844         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
21845         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
21846
21847 2000-07-10  Jim Meyering  <meyering@lucent.com>
21848
21849         * m4/strerror_r.m4: Mirror the correction made in autoconf.
21850
21851         * m4/gnu-source.m4: Output to confdefs.h directly.
21852         Suggestion from Akim Demaille.
21853
21854 2000-07-09  Paul Eggert  <eggert@twinsun.com>
21855
21856         The old behavior of quoting `like this' doesn't look good with
21857         newer, ISO-style fonts.  See:
21858         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
21859
21860         Instead, quote "like this" by default.  Let the translator
21861         tailor the locale-specific quoting behavior by providing
21862         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
21863
21864         * lib/quotearg.c (N_): New macro.
21865         (gettext_default): New function.
21866         (quotearg_buffer_restyled): Use
21867         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
21868         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
21869
21870 2000-07-09  Jim Meyering  <meyering@lucent.com>
21871
21872         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
21873         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
21874
21875         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
21876         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
21877
21878 2000-07-09  Jim Meyering  <meyering@lucent.com>
21879
21880         * lib/Most files: Update copyright dates to include 2000.
21881
21882 2000-07-08  Jim Meyering  <meyering@lucent.com>
21883
21884         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
21885         if not defined.
21886         (xgethostname): Remove now-unnecessary #ifdef.
21887         Move declaration of `err' into loop where it's used.
21888
21889 2000-07-05  Paul Eggert  <eggert@twinsun.com>
21890         and Bruno Haible  <haible@clisp.cons.org>
21891
21892         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
21893         only if the test for an object-type mbstate_t fails.  This
21894         prevents us from mistakenly reporting that mbstate_t is a
21895         system object type after we "#define mbstate_t int" to work
21896         around its lack.
21897
21898 2000-07-05  Paul Eggert  <eggert@twinsun.com>
21899         and Bruno Haible  <haible@clisp.cons.org>
21900
21901         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
21902
21903 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
21904
21905         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
21906         to strerror_r.
21907         Include <ctype.h> for use of isalpha.
21908
21909 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
21910
21911         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
21912         by allocating a larger buffer. Test the gethostname return value for
21913         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
21914         returns an error and ENAMETOOLONG isn't defined.
21915
21916 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
21917
21918         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
21919         dimension.
21920
21921 2000-07-04  Jim Meyering  <meyering@lucent.com>
21922
21923         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
21924         of the deprecated AC_CHECKING.
21925
21926 2000-07-04  Jim Meyering  <meyering@lucent.com>
21927
21928         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
21929         Reported by Bruno Haible.
21930
21931 2000-07-04  Jim Meyering  <meyering@lucent.com>
21932
21933         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
21934         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
21935         lacks mbrtowc.
21936
21937 2000-07-03  Paul Eggert  <eggert@twinsun.com>
21938
21939         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
21940         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
21941
21942 2000-07-03  Paul Eggert  <eggert@twinsun.com>
21943         and Bruno Haible  <haible@clisp.cons.org>
21944
21945         * lib/quotearg.c (mbrtowc):
21946         Assign to *pwc, and return 1 only if result is nonzero.
21947         (iswprint): Use ISPRINT when substituting our own mbrtowc.
21948
21949 2000-07-03  Jim Meyering  <meyering@lucent.com>
21950
21951         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
21952
21953 2000-07-03  Jim Meyering  <meyering@lucent.com>
21954
21955         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
21956         This is necessary to get a definition of e.g., UTMP_FILE on
21957         HP-UX 10.20.
21958         From Bob Proulx.
21959
21960 2000-07-02  Jim Meyering  <meyering@lucent.com>
21961
21962         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
21963
21964         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
21965         AC_LIBOBJ(function_name).
21966         * m4/chown.m4: Likewise.
21967         * m4/fnmatch.m4: Likewise.
21968         * m4/ftruncate.m4: Likewise.
21969         * m4/getgroups.m4: Likewise.
21970         * m4/getline.m4: Likewise.
21971         * m4/group-member.m4: Likewise.
21972         * m4/jm-macros.m4: Likewise.
21973         * m4/lstat.m4: Likewise.
21974         * m4/malloc.m4: Likewise.
21975         * m4/memcmp.m4: Likewise.
21976         * m4/nanosleep.m4: Likewise.
21977         * m4/putenv.m4: Likewise.
21978         * m4/realloc.m4: Likewise.
21979         * m4/regex.m4: Likewise.
21980         * m4/stat.m4: Likewise.
21981         * m4/strftime.m4: Likewise.
21982
21983 2000-07-02  Jim Meyering  <meyering@lucent.com>
21984
21985         * lib/quotearg.c (mbstate_t): Don't define here.
21986
21987 2000-07-02  Jim Meyering  <meyering@lucent.com>
21988
21989         * lib/nanosleep.c (SIGCONT): Define if not already defined.
21990
21991 2000-07-01  Jim Meyering  <meyering@lucent.com>
21992
21993         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
21994
21995 2000-07-01  Jim Meyering  <meyering@lucent.com>
21996
21997         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
21998         problem.
21999
22000 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22001
22002         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
22003         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
22004
22005 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22006
22007         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
22008         per change in ../m4/ls-mntd-fs.m4.
22009         (read_filesystem_list): Ignore symbolic links.
22010
22011 2000-06-29  Jim Meyering  <meyering@lucent.com>
22012
22013         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
22014         for declaration of strcmp.
22015
22016         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
22017
22018         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
22019         Avoid warning by casting result to `char *' to remove `const'.
22020
22021 2000-06-28  Jim Meyering  <meyering@lucent.com>
22022
22023         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
22024         included by quotearg.c, for which we perform this test.  From
22025         Bruno Haible.
22026
22027 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22028
22029         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
22030         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
22031         <utmpx.h> exists, put readutmp.o into LIBOBJS.
22032
22033 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22034
22035         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
22036
22037 2000-06-26  Paul Eggert  <eggert@twinsun.com>
22038
22039         savedir now sets errno on failure and invokes xmalloc to get memory.
22040         Fix a couple of other minor bugs while we're at it.
22041
22042         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
22043         (NAMLEN): Remove macro.
22044         (malloc, realloc): Remove decls.
22045         (stpcpy): Likewise.
22046         ("xalloc.h"): Include.
22047         (NAME_SIZE_DEFAULT): New macro.
22048         (savedir): Use xmalloc / xrealloc to allocate memory.
22049         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
22050         Skip "" directory entries.
22051         Use strlen to calculate directory entry length, since the old method
22052         is rarely used these days and isn't worth supporting.
22053         Don't use a pointer after freeing it.
22054         Check for integer overflow when calculating allocation size.
22055         Use memcpy to copy entries, instead of stpcpy.
22056         Set errno properly when returning NULL.
22057         Check for readdir error.
22058
22059 2000-06-26  Jim Meyering  <meyering@lucent.com>
22060
22061         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
22062
22063 2000-06-25  Jim Meyering  <meyering@lucent.com>
22064
22065         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
22066         Linux header bug when _XOPEN_SOURCE is defined to 500.
22067
22068 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22069
22070         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
22071         deficiency.
22072
22073 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22074
22075         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
22076         Include xalloc.h.
22077         Don't include <stdlib.h>.  Don't declare malloc, realloc.
22078
22079 2000-06-24  Jim Meyering  <meyering@lucent.com>
22080
22081         * m4/strerror_r.m4: Revive this file -- to try out an experimental
22082         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
22083         for which strerror does return char*, but which lacks a conveniently
22084         accessible declaration of the function.  If the compile-test says
22085         strerror_r doesn't work, then resort to a `run'-test that works on
22086         BeOS and segfaults on DEC Unix.
22087
22088 2000-06-24  Jim Meyering  <meyering@lucent.com>
22089
22090         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
22091
22092 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22093
22094         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
22095         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
22096
22097 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22098
22099         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
22100         (mbrtowc, mbstate_t): Define substitutes if
22101         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
22102         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
22103         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
22104
22105 2000-06-23  Jim Meyering  <meyering@lucent.com>
22106
22107         * m4/afs.m4: Add missing AC_MSG_RESULT.
22108         Reported by Bruno Haible.
22109
22110         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
22111         Suggestion from Bruno Haible.
22112
22113 2000-06-23  Jim Meyering  <meyering@lucent.com>
22114
22115         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
22116
22117 2000-06-21  Jim Meyering  <meyering@lucent.com>
22118
22119         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
22120
22121 2000-06-21  Jim Meyering  <meyering@lucent.com>
22122
22123         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
22124         (noinst_HEADERS): Add getstr.h.
22125
22126         * lib/getline.c (getstr): Move into a separate file.
22127         * lib/getstr.c (getstr): New file, extracted from getline.c, with
22128         the following changes: new parameter, delim2; both delim[12]
22129         parameters have type `int', not `char'.  The latter would lose
22130         with 8-bit delimiters.
22131         * lib/getstr.h: New file.
22132
22133 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22134
22135         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
22136         than 1024, return a memory chunk of least possible size, instead
22137         of size PATH_MAX + 2. In the loop, increment the size proportionally.
22138         Use free/xmalloc instead of xrealloc to avoid copying for very long
22139         paths.
22140
22141 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22142
22143         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
22144         the empty string.
22145
22146 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22147
22148         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
22149         address, not strdup.  Include <stdlib.h> and don't declare free().
22150
22151 2000-06-19  Jim Meyering  <meyering@lucent.com>
22152
22153         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
22154
22155 2000-06-18  Jim Meyering  <meyering@lucent.com>
22156
22157         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
22158
22159         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
22160         `checking whether...' message to be consistent with that of the
22161         lstat test.
22162
22163 2000-06-18  Jim Meyering  <meyering@lucent.com>
22164
22165         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
22166         Besides, these days every porting target provides a mkdir function.
22167
22168         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
22169         needed. (this snippet comes from src/system.h).
22170
22171 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
22172
22173         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
22174
22175 2000-06-15  Paul Eggert  <eggert@twinsun.com>
22176
22177         * lib/human.c (adjust_value): New function.
22178         (human_readable_inexact): Apply rounding style even when
22179         printing approximate values.
22180
22181 2000-06-14  Paul Eggert  <eggert@twinsun.com>
22182
22183         * lib/human.c (human_readable_inexact): Allow an input block
22184         size that is not a multiple of the output block size, and vice versa.
22185         Reported by Piergiorgio Sartor.
22186
22187 2000-06-14  Paul Eggert  <eggert@twinsun.com>
22188
22189         * lib/getdate.y (get_date): Apply relative times after time
22190         zone indicator, not before.  Reported by Todd A. Jacobs.
22191
22192 2000-06-13  Jim Meyering  <meyering@lucent.com>
22193
22194         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
22195
22196         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
22197
22198 2000-06-12  Paul Eggert  <eggert@twinsun.com>
22199
22200         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
22201
22202 2000-06-12  Jim Meyering  <meyering@lucent.com>
22203
22204         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
22205         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
22206         optional argument.
22207         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
22208         the optional argument, `lib'.
22209
22210 2000-06-08  Jim Meyering  <meyering@lucent.com>
22211
22212         * m4/largefile.m4: Remove file (now that it's part of autoconf).
22213
22214 2000-06-04  Paul Eggert  <eggert@twinsun.com>
22215
22216         Rewrite largefile configuration so that we don't need to run
22217         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
22218         AC_CANONICAL_HOST in configure.in -- jmm]
22219
22220         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
22221         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
22222         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
22223         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
22224         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
22225         All uses changed.
22226         Instead of inspecting the output of getconf, try to compile the
22227         test program without and with the macro definition.
22228         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
22229         for getconf.  Instead, check for the needed flags by compiling
22230         test programs.
22231
22232 2000-06-04  Paul Eggert  <eggert@twinsun.com>
22233
22234         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
22235
22236 2000-06-04  Jim Meyering  <meyering@lucent.com>
22237
22238         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
22239         SunOS 4.1.4 for which gid_t is an unsigned type.
22240
22241 2000-06-03  Jim Meyering  <meyering@lucent.com>
22242
22243         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
22244         now that autoconf requires that.
22245
22246         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
22247         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
22248         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
22249
22250 2000-06-03  Jim Meyering  <meyering@lucent.com>
22251
22252         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
22253
22254 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
22255
22256         * m4/glibc21.m4: New file.
22257         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
22258
22259 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
22260
22261         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
22262         newer, don't install charset.alias.
22263         * lib/config.charset: Change the Linux/glibc rules so they become empty
22264         on glibc-2.1 or newer.
22265
22266 2000-06-02  Jim Meyering  <meyering@lucent.com>
22267
22268         * lib/mountlist.c: Back out last change.  Instead, do this...
22269         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
22270         me_dummy member using the same `ignore'-testing code.
22271         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
22272         fs_type strings.
22273         From Mark D. Roth.
22274
22275 2000-05-29  Jim Meyering  <meyering@lucent.com>
22276
22277         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
22278         mounts with the `ignore' attribute.  Based on a patch from
22279         Mark D. Roth.
22280
22281 2000-05-28  Jim Meyering  <meyering@lucent.com>
22282
22283         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
22284         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
22285         * m4/stat.m4: Likewise.
22286         * m4/lstat.m4: Likewise.
22287         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
22288
22289         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
22290         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
22291
22292 2000-05-26  Jim Meyering  <meyering@lucent.com>
22293
22294         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
22295
22296 2000-05-24  Jim Meyering  <meyering@lucent.com>
22297
22298         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
22299         autoconf requires that.
22300         * m4/lib-check.m4: Likewise.
22301         * m4/jm-macros.m4: Likewise.
22302         * m4/strftime.m4: Likewise.
22303
22304         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
22305         AC_CHECK_DECLS, now that autoconf requires that.
22306
22307 2000-05-22  Jim Meyering  <meyering@lucent.com>
22308
22309         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
22310         * m4/lstat.m4: Likewise.
22311
22312 2000-05-22  Jim Meyering  <meyering@lucent.com>
22313
22314         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
22315
22316 2000-05-20  Jim Meyering  <meyering@lucent.com>
22317
22318         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
22319         (jm_PREREQ): Use it.
22320
22321 2000-05-18  Jim Meyering  <meyering@lucent.com>
22322
22323         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
22324         back, too, since it may have been modified by allocate_entry.
22325         (hash_delete): Rewrite to use neither the assignment operator
22326         nor the comma operator in an if-expression.
22327
22328 2000-05-15  Paul Eggert  <eggert@twinsun.com>
22329
22330         * lib/closeout.c:
22331         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
22332         Remove; no longer needed.
22333         "quotearg.h": Add include.
22334         (file_name): Do not bother to explicitly initialize to NULL; it's less
22335         efficient on some hosts.
22336         (close_stdout_status): Remove test as to whether stdout was already
22337         closed; it breaks for the case "echo x | sort >&-".
22338         Quote file name colons.
22339         Do not assume that _("write error") lacks format strings.
22340
22341 2000-05-15  Jim Meyering  <meyering@lucent.com>
22342
22343         * lib/version-etc.c (version_etc_copyright): Update the copyright
22344         string used in all --version output.
22345
22346 2000-05-14  Jim Meyering  <meyering@lucent.com>
22347
22348         * lib/closeout.c (close_stdout_set_file_name): New function.
22349         (close_stdout_status): Use new file-scoped global.
22350         Return right away if fstat says the stdout file descriptor is invalid.
22351         * lib/closeout.h (close_stdout_set_file_name): Declare.
22352
22353 2000-05-10  Jim Meyering  <meyering@lucent.com>
22354
22355         * lib/closeout.c [default_exit_status]: New file-scoped variable.
22356         (close_stdout_set_status): New function.
22357         * lib/closeout.h (close_stdout_set_status): Declare.
22358
22359 2000-05-09  Jim Meyering  <meyering@lucent.com>
22360
22361         * m4/gettext.m4: Rename this...
22362         * m4/libintl.m4: ...to this.
22363
22364 2000-05-08  Jim Meyering  <meyering@lucent.com>
22365
22366         * lib/long-options.c: Don't include closeout.h.
22367         (parse_long_options): Don't call close_stdout for --version.
22368
22369 2000-05-06  Paul Eggert  <eggert@twinsun.com>
22370
22371         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
22372         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
22373         2.1.3 bug.  This avoids a clash when files like regex.c define
22374         _GNU_SOURCE.
22375
22376 2000-05-06  Jim Meyering  <meyering@lucent.com>
22377
22378         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
22379         (AC_REPLACE_FUNCS): Add strnlen.
22380
22381         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
22382         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
22383
22384         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
22385         AC_SEARCH_LIBS call for nanosleep.
22386         (LIB_NANOSLEEP): Set and AC_SUBST.
22387
22388 2000-05-06  Jim Meyering  <meyering@lucent.com>
22389
22390         * lib/strnlen.c: Undefine __strnlen and strnlen.
22391         [!weak_alias]: Define __strnlen to strnlen.
22392
22393         * lib/atexit.c: New file, from libiberty.
22394
22395 2000-05-06  Jim Meyering  <meyering@lucent.com>
22396
22397         * lib/closeout.c (close_stdout_status): Also check for errors on the
22398         stderr stream.
22399
22400 2000-05-05  Jim Meyering  <meyering@lucent.com>
22401
22402         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
22403         AC_SEARCH_LIBS call for clock_gettime.
22404         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
22405
22406         * m4/search-libs.m4: Update from autoconf.
22407
22408         su doesn't work on Solaris 2.6.
22409         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
22410         <shadow.h>.  Reported by Dragos Harabor.
22411
22412 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
22413
22414         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
22415         memcpy instead of xmalloc, xrealloc, path_concat.
22416         (locale_charset): Treat empty environment variables as absent.
22417         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
22418
22419 2000-05-04  Jim Meyering  <meyering@lucent.com>
22420
22421         * lib/getopt.c: Update from glibc.
22422         * lib/obstack.c: Likewise.
22423         * lib/obstack.h: Likewise.
22424         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
22425         file
22426
22427         * lib/regex.h: Likewise.
22428         * lib/strndup.c: Likewise.
22429         * lib/strnlen.c: New file, from glibc.
22430
22431 2000-05-03  Jim Meyering  <meyering@lucent.com>
22432
22433         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
22434
22435 2000-05-02  Paul Eggert  <eggert@twinsun.com>
22436
22437         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
22438         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
22439         compile-time test, rather than inspecting host and OS, to
22440         decide whether to define _LARGEFILE_SOURCE.
22441
22442 2000-05-01  Jim Meyering  <meyering@lucent.com>
22443
22444         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
22445
22446         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
22447         Based on a patch from Bruno Haible.
22448
22449 2000-05-01  Jim Meyering  <meyering@lucent.com>
22450
22451         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
22452
22453 2000-04-29  Jim Meyering  <meyering@lucent.com>
22454
22455         * lib/path-concat.c: Declare strdup only if it's not defined.
22456         * lib/canon-host.c: Likewise.
22457
22458 2000-04-28  Jim Meyering  <meyering@lucent.com>
22459
22460         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
22461         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
22462         is included first, then limits.h is included by locale.h by libintl.h.
22463         From John David Anglin.
22464
22465 2000-04-25  Jim Meyering  <meyering@lucent.com>
22466
22467         * lib/makepath.c (S_IRWXUGO): Define.
22468         (make_path): Always perform explicit chmod if MODE specifies any
22469         of the `special' permission bits.  Prompted by a bug report against
22470         install from Mate Wierdl and Joost van Baal.
22471
22472 2000-04-18  Jim Meyering  <meyering@lucent.com>
22473
22474         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
22475         (jm_PREREQ): Use it.
22476
22477 2000-04-18  Jim Meyering  <meyering@lucent.com>
22478
22479         * lib/README: New file.
22480
22481         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
22482         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
22483
22484 2000-04-17  Jim Meyering  <meyering@lucent.com>
22485
22486         Get it right :-)
22487         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
22488         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
22489         Suggestion from Akim Demaille.
22490
22491 2000-04-17  Jim Meyering  <meyering@lucent.com>
22492
22493         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
22494         the definition of it to rpl_strftime also defined-away the system's
22495         declaration.
22496
22497 2000-04-15  Jim Meyering  <meyering@lucent.com>
22498
22499         Use `C' to denote so-called `contiguous' files, the same way
22500         that tar does.
22501         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
22502         (ftypelet): Use S_ISCTG.
22503         From Michael Deutschmann.
22504
22505 2000-04-14  Jim Meyering  <meyering@lucent.com>
22506
22507         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
22508         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
22509         clobbered.
22510
22511 2000-04-14  Jim Meyering  <meyering@lucent.com>
22512
22513         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
22514
22515 2000-04-13  Jim Meyering  <meyering@lucent.com>
22516
22517         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
22518         AH_VERBATIM to insert required #ifndef into config.h.in.
22519         Suggestion from Akim Demaille.
22520
22521 2000-04-12  Jim Meyering  <meyering@lucent.com>
22522
22523         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
22524         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
22525         Christian Krackowizer.
22526
22527         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
22528         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
22529         (AC_SYS_LARGEFILE): Require.
22530         (AM_C_PROTOTYPES): Require.
22531
22532 2000-04-08  Jim Meyering  <meyering@lucent.com>
22533
22534         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
22535         names don't conflict.  Reported by Eli Zaretskii.
22536
22537 2000-04-07  Jim Meyering  <meyering@lucent.com>
22538
22539         * lib/putenv.c: Move inclusion of errno.h so it follows that of
22540         sys/types.h, to work around system header problems on AIX 3.2.5.
22541         From Bruno Haible.
22542
22543 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
22544
22545         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
22546         bug.  Deal with the different error behavior of Irix iconv.
22547
22548 2000-04-05  Paul Eggert  <eggert@twinsun.com>
22549
22550         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
22551         IRIX if the installer said otherwise.
22552
22553 2000-04-05  Jim Meyering  <meyering@lucent.com>
22554
22555         Portability tweaks required for ultrix4.3.
22556         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
22557         (jm_CHECK_DECLS): Add getutent to the list of functions.
22558         (_jm_DECL_HEADERS): Add utmpx.h.
22559         From John David Anglin.
22560
22561         * m4/strftime.m4: Back out the 2000-04-02 change.
22562         Instead of that change, simply undefine putenv in the test program.
22563
22564 2000-04-05  Jim Meyering  <meyering@lucent.com>
22565
22566         Portability tweaks required for ultrix4.3.
22567         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
22568         getutent.
22569         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
22570         * lib/canon-host.c: Declare strdup.
22571         * lib/path-concat.c: Likewise.
22572         From John David Anglin.
22573
22574 2000-04-04  Jim Meyering  <meyering@lucent.com>
22575
22576         Be more DOS 8.3-friendly.
22577         * lib/ref-add.sin: Renamed from ref-add.sed.in.
22578         * lib/ref-del.sin: Renamed from ref-del.sed.in.
22579         * lib/Makefile.am: Reflect renaming.
22580         Reported by Eli Zaretskii.
22581
22582         Use a temporary file name that won't clash with `charset.alias'
22583         in the DOS 8.3 name space.
22584         * lib/Makefile.am (charset_tmp): Define.
22585         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
22586         (uninstall-local): Likewise.
22587         Reported by Eli Zaretskii.
22588
22589 2000-04-03  Jim Meyering  <meyering@lucent.com>
22590
22591         * m4/gettext.m4: Fix typo in comment.
22592
22593         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
22594         textutils/configure.in).  Suggestion from Paul Eggert.
22595         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
22596
22597 2000-04-02  Paul Eggert  <eggert@twinsun.com>
22598
22599         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
22600         variable in the shell rather than using putenv, which isn't
22601         portable.  This avoids the configure-time inter-test dependency
22602         on the potentially-renamed putenv function.
22603
22604 2000-03-30  Paul Eggert  <eggert@twinsun.com>
22605
22606         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
22607         before checking struct stat.st_blksize, so that
22608         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
22609
22610 2000-03-29  Paul Eggert  <eggert@twinsun.com>
22611
22612         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
22613         since strftime.c uses HAVE_STRFTIME to decide whether to use
22614         the underlying strftime.
22615
22616 2000-03-29  Paul Eggert  <eggert@twinsun.com>
22617
22618         * lib/time/strftime.c (my_strftime): Make sure we call the system
22619         strftime, not ourselves, when invoking the underlying strftime.
22620
22621 2000-03-24  Jim Meyering  <meyering@lucent.com>
22622
22623         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
22624         (charset_alias): Define.
22625         (install-exec-local): Factor out common code.
22626         (uninstall-local): Split lines longer than 80.
22627         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
22628         (SUFFIXES): Define.
22629         (.sed.in.sed): New rule.  Don't redirect directly to $@.
22630         (CLEANFILES): Add ref-add.sed and ref-del.sed.
22631
22632 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
22633
22634         * lib/config.charset: Output a line containing "Packages using this
22635         file".
22636         * lib/ref-add.sed.in, ref-del.sed.in: New files.
22637         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
22638         ref-del.sed): New rules.
22639
22640 2000-03-17  Jim Meyering  <meyering@lucent.com>
22641
22642         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
22643         Otherwise, include <strings.h>
22644
22645 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
22646
22647         * lib/unicodeio.c (utf8_wctomb): New function.
22648         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
22649         format instead of in UCS-4 with platform dependent endianness.
22650
22651 2000-03-10  Jim Meyering  <meyering@lucent.com>
22652
22653         * m4/lib-check.m4: Look for getspnam in -lgen, too.
22654         From Marco Franzen.
22655
22656 2000-03-07  Paul Eggert  <eggert@twinsun.com>
22657
22658         * lib/savedir.c (savedir): Work even if directory size is
22659         negative; this can happen with some screwy NFS configurations.
22660
22661 2000-03-06  Jim Meyering  <meyering@lucent.com>
22662
22663         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
22664         if it's NULL (because we ran out of memory).  From Bruno Haible.
22665
22666 2000-03-05  Jim Meyering  <meyering@lucent.com>
22667
22668         * lib/localcharset.c ("path-concat.h"): Include.
22669         (get_charset_aliases): Use path_concat instead of ANSI string
22670         concatenation.
22671
22672         * lib/unicodeio.h (PARAMS): Define.
22673         Use it to guard prototype.
22674
22675 2000-03-04  Jim Meyering  <meyering@lucent.com>
22676
22677         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
22678         for lib/localcharset.c.
22679
22680 2000-03-04  Jim Meyering  <meyering@lucent.com>
22681
22682         * lib/Makefile.am (install-exec-local): Create $(libdir) before
22683         installing into it.
22684         (uninstall-local): Uncomment this rule so `make distcheck' works
22685         once again.
22686
22687         * lib/unicodeio.c (<errno.h>): Include it.
22688         (errno): Declare if not defined.
22689
22690         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
22691
22692         * lib/config.charset: New version, incorporating remarks from a linux
22693         i18n mailing list.  From Bruno Haible.
22694
22695 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
22696
22697         * m4/codeset.m4: New file.
22698         * m4/iconv.m4: New file.
22699         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
22700
22701 2000-03-03  Jim Meyering  <meyering@lucent.com>
22702
22703         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
22704
22705 2000-03-02  Jim Meyering  <meyering@lucent.com>
22706
22707         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
22708         the messages come out on separate lines.
22709
22710         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
22711         rather than jm_CHECK_DECLARATIONS.
22712         * m4/decl.m4: Remove now-unused file.
22713
22714         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
22715         geteuid.
22716
22717 2000-03-02  Jim Meyering  <meyering@lucent.com>
22718
22719         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
22720
22721 2000-03-01  Jim Meyering  <meyering@lucent.com>
22722
22723         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
22724         * lib/unicodeio.c: Likewise.
22725
22726 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
22727
22728         * lib/config.charset: New file.
22729         * lib/localcharset.c: New file.
22730         * lib/unicodeio.h, unicodeio.c: New files.
22731         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
22732         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
22733         (noinst_HEADERS): Add unicodeio.h.
22734         (all-local, install-exec-local, charset.alias): New targets.
22735
22736 2000-02-28  Paul Eggert  <eggert@twinsun.com>
22737
22738         * lib/quotearg.c (ALERT_CHAR): New macro.
22739         (quotearg_buffer_restyled): Use it.
22740
22741 2000-02-27  Jim Meyering  <meyering@lucent.com>
22742
22743         * m4/check-decl.m4: Add getenv to the list.
22744
22745 2000-02-27  Jim Meyering  <meyering@lucent.com>
22746
22747         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
22748         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
22749
22750         * lib/backupfile.c: Guard inclusion of stdlib.h with
22751         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
22752         Declare malloc if needed.
22753
22754         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
22755         `#ifndef HAVE_DECL..'
22756         now that autoconf always defines the HAVE_DECL_ symbols.
22757         * lib/human.c: Likewise.
22758         * lib/same.c: Likewise.
22759         * lib/strtoumax.c: Likewise.
22760
22761         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
22762         declaration check was not run.
22763         * lib/hash.c: Likewise.
22764         * lib/human.c: Likewise.
22765         * lib/same.c: Likewise.
22766         * lib/strtoumax.c: Likewise.
22767
22768         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
22769         `.', then first look up the entire `.'-containing string as a login
22770         name.
22771
22772 2000-02-23  Jim Meyering  <meyering@lucent.com>
22773
22774         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
22775         in place of my hack.
22776
22777 2000-02-18  Paul Eggert  <eggert@twinsun.com>
22778
22779         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
22780         (textint): New typedef.
22781         (parser_control): Member year changed from int to textint.
22782         All uses changed.
22783         (YYSTYPE): Removed; replaced by %union with int and textint members.
22784         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
22785         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
22786         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
22787         (tSNUMBER, tUNUMBER): Now of type <textintval>.
22788         (date, number, to_year): Use width of number in digits, not its value,
22789         to determine whether it's a 2-digit year, or a 2-digit time.
22790         (yylex): Store number of digits of numeric tokens.
22791         Reported by John Kendall.
22792
22793         (parser_control): Changed from struct parser_control to typedef (for
22794         consistency).  All uses changed.
22795
22796         (tID): Removed; not used.
22797         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
22798
22799 2000-02-14  Paul Eggert  <eggert@twinsun.com>
22800
22801         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
22802         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
22803
22804 2000-02-12  Jim Meyering  <meyering@lucent.com>
22805
22806         * lib/userspec.c (ISDIGIT): Define it.
22807         (isdigit): Remove definition.
22808         (is_number): Use ISDIGIT, not isdigit.
22809         <libintl.h>: Include.
22810         (_ and N_): Define.
22811         (parse_user_spec): Mark translatable strings.
22812
22813 2000-02-10  Jim Meyering  <meyering@lucent.com>
22814
22815         With these changes, nanosleep.[ch] are finally enough like the other
22816         lib/* replacement files to compile on a few more losing systems.
22817
22818         * lib/nanosleep.h: Don't include config.h.
22819         Remove prototype from declaration of nanosleep.
22820         (PARAMS): Remove now-unneeded definition.
22821         * lib/nanosleep.c: #undef nanosleep.
22822         (rpl_nanosleep): Rename from nanosleep.
22823
22824 2000-02-10  Jim Meyering  <meyering@lucent.com>
22825
22826         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
22827         gnu_nanosleep to rpl_nanosleep.
22828
22829 2000-02-09  Jim Meyering  <meyering@lucent.com>
22830
22831         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
22832         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
22833
22834 2000-02-08  Akim Demaille  <akim@epita.fr>
22835
22836         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
22837         `[' and `]' and remove uses of `changequote'.
22838         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
22839         (AC_SYS_LARGEFILE): Likewise.
22840         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
22841         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
22842         of changequote.
22843         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
22844         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
22845         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
22846         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
22847
22848 2000-02-05  Jim Meyering  <meyering@lucent.com>
22849
22850         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
22851         Remove explicit use of AC_HEADER_TIME.  It is required by
22852         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
22853         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
22854         in autoconf whereby the expansion of the latter ended up preceding
22855         the expansion of its prerequisite, AC_HEADER_TIME.
22856         Reported by Volker Borchert.
22857
22858 2000-02-03  Jim Meyering  <meyering@lucent.com>
22859
22860         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
22861
22862 2000-02-03  Jim Meyering  <meyering@lucent.com>
22863
22864         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
22865         rather than with `#if HAVE_UTMPNAME'.
22866
22867 2000-02-02  Jim Meyering  <meyering@lucent.com>
22868
22869         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
22870         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
22871         Reported by Eli Zaretskii.
22872
22873 2000-02-01  Jim Meyering  <meyering@lucent.com>
22874
22875         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
22876
22877 2000-01-31  Jim Meyering  <meyering@lucent.com>
22878
22879         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
22880         functions.  Add the time.h and sys/time.h headers along with the
22881         AC_REQUIRE'ment of AC_HEADER_TIME.
22882
22883 2000-01-31  Jim Meyering  <meyering@lucent.com>
22884
22885         * lib/nanosleep.h (nanosleep): Guard declaration with
22886         `#if ! HAVE_DECL_NANOSLEEP'.
22887         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
22888         the declaration in that vendor's sys/timers.h.
22889         Reported by Christian Krackowizer.
22890
22891         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
22892         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
22893         (ISPRINT): Likewise.
22894         Reported by Tom Tromey.
22895
22896 2000-01-30  Jim Meyering  <meyering@lucent.com>
22897
22898         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
22899
22900         * m4/prereq.m4 (utmp_includes): Define.
22901         Check for ut_user and ut_name members in both struct utmpx
22902         and struct utmp.
22903
22904 2000-01-30  Jim Meyering  <meyering@lucent.com>
22905
22906         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
22907         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
22908         header files where only utmpx.ut_user is declared.
22909
22910         * lib/readutmp.h (UT_USER): Define.
22911
22912 2000-01-29  Jim Meyering  <meyering@lucent.com>
22913
22914         * m4/lib-check.m4: New file containing library-related checks from
22915         fileutils and sh-utils (textutils had none).
22916
22917 2000-01-28  Jim Meyering  <meyering@lucent.com>
22918
22919         * m4/perl.m4: Change format of warning message to look more like that
22920         from the missing script.  Suggestion from François Pinard.
22921
22922 2000-01-25  Jim Meyering  <meyering@lucent.com>
22923
22924         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
22925         well as time.h in the compile check.
22926         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
22927         Fix typo in cross-compiling case: s/yes/no/.
22928
22929 2000-01-23  Jim Meyering  <meyering@lucent.com>
22930
22931         * m4/jm-macros.m4: Move df-related tests here from
22932         fileutils/configure.in
22933
22934         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
22935         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
22936
22937         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
22938         s/space/ac_fsusage_space/.
22939         (jm_FILE_SYSTEM_USAGE): Take two parameters.
22940
22941         * m4/ftruncate.m4: New file (derived from part of
22942         fileutils/configure.in).
22943         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
22944         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
22945
22946         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
22947         AC_SUBST these here, rather than just in sh-util/configure.in, so
22948         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
22949         all the same.
22950         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
22951         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
22952         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
22953         (AC_SUBST(POW_LIBM)): Likewise.
22954         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
22955
22956 2000-01-23  Jim Meyering  <meyering@lucent.com>
22957
22958         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
22959         obstack.c.
22960
22961 2000-01-22  Jim Meyering  <meyering@lucent.com>
22962
22963         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
22964
22965         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
22966
22967         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
22968         configure.in
22969         (AC_CHECK_HEADERS): Likewise for sh-utils.
22970         (AC_CHECK_HEADERS): Likewise for textutils.
22971         Merge the three lists of headers.
22972
22973         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
22974         from fileutils' configure.in.
22975
22976         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
22977         code. Moved tests into their own function (_jm_DECL_HEADERS) in
22978         check-decl.m4.
22979
22980         * m4/check-decl.m4: Use #if rather than #ifdef.
22981         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
22982         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
22983         (_jm_DECL_HEADERS): Define new function.
22984         (jm_CHECK_DECLARATIONS): Require it.
22985
22986 2000-01-22  Jim Meyering  <meyering@lucent.com>
22987
22988         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
22989         [! HAVE_DECL_STRTOULL]: Declare strtoull.
22990         Required for some AIX systems.  Reported by Christian Krackowizer.
22991         [TESTING] (main): New function.
22992
22993         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
22994         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
22995         letters.
22996
22997         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
22998         iswprint.
22999
23000         * lib/strverscmp.c (ISDIGIT): Define.
23001         (strverscmp): Use ISDIGIT, not isdigit.
23002
23003 2000-01-19  Jim Meyering  <meyering@lucent.com>
23004
23005         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
23006         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
23007         defines `struct timespec' in <sys/time.h>
23008
23009         * m4/c-bs-a.m4: Remove uses of changequote altogether.
23010         Thanks to Akim for explaining.
23011
23012 2000-01-17  Paul Eggert  <eggert@twinsun.com>
23013
23014         * lib/nanosleep.c (nanosleep):
23015         Don't use SA_INTERRUPT to decide whether to call sigaction, as
23016         POSIX.1 doesn't require SA_INTERRUPT and some systems
23017         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
23018         it's been part of POSIX.1 since day 1 (in 1988).
23019
23020 2000-01-17  Jim Meyering  <meyering@lucent.com>
23021
23022         * lib/interlock: Remove unused file.  Reported by François Pinard.
23023
23024 2000-01-16  Paul Eggert  <eggert@twinsun.com>
23025
23026         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
23027         alert, backslash, formfeed, and vertical tab unnecessarily in
23028         shell quoting style.
23029
23030 2000-01-16  Jim Meyering  <meyering@lucent.com>
23031
23032         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
23033         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
23034         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
23035         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
23036
23037 2000-01-16  Jim Meyering  <meyering@lucent.com>
23038
23039         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
23040         because the latter didn't work.
23041
23042 2000-01-15  Jim Meyering  <meyering@lucent.com>
23043
23044         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
23045         (AC_REPLACE_FUNCS): Add memcpy and memset.
23046         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
23047         Add strpbrk.
23048         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
23049
23050 2000-01-12  Jim Meyering  <meyering@lucent.com>
23051
23052         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
23053         (jm_PREREQ): Use it.
23054         (jm_PREREQ_READUTMP): New macro.
23055         (jm_PREREQ): Use it.
23056
23057 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23058
23059         Quote multibyte characters correctly.
23060         * m4/c-bs-a.m4: New file.
23061         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
23062         (jm_PREREQ): Use it.
23063
23064 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23065
23066         * m4/uintmax_t.m4: Port to autoconf 2.13.
23067
23068 2000-01-08  Jim Meyering  <meyering@ascend.com>
23069
23070         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
23071         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
23072
23073 2000-01-04  Jim Meyering  <meyering@ascend.com>
23074
23075         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
23076         jm_STRUCT_DIRENT_D_TYPE.
23077         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
23078         jm_STRUCT_DIRENT_D_INO.
23079         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
23080         jm_STRUCT_UTIMBUF.
23081         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
23082         renamings.
23083         * m4/utime.m4: Likewise.
23084
23085         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
23086         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
23087
23088 2000-01-03  Paul Eggert  <eggert@twinsun.com>
23089
23090         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
23091         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
23092
23093 2000-01-02  Jim Meyering  <meyering@ascend.com>
23094
23095         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
23096         remember if this is necessary.
23097
23098 1999-12-26  Jim Meyering  <meyering@ascend.com>
23099
23100         * m4/jm-macros.m4: Use it here.
23101         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
23102
23103 1999-12-23  Jim Meyering  <meyering@ascend.com>
23104
23105         * m4/jm-macros.m4: Check for clock_gettime (moved from
23106         fileutils/configure.in)
23107         Check for gettimeofday.
23108
23109 1999-12-20  Jim Meyering  <meyering@ascend.com>
23110
23111         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
23112         autoconf-2.14a-1999-12-20.
23113
23114 1999-12-19  Jim Meyering  <meyering@ascend.com>
23115
23116         * m4/lstat-slash.m4: New file.
23117         * m4/jm-macros.m4: Use the new macro:
23118         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23119
23120 1999-12-07  Jim Meyering  <meyering@ascend.com>
23121
23122         * m4/perl.m4: Require that File::Compare be available, too.
23123         Too many systems seem to lack it.
23124
23125         * m4/strftime.m4: Add checks for most of the cpp macros tested in
23126         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
23127
23128 1999-11-18  Paul Eggert  <eggert@twinsun.com>
23129
23130         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
23131         problem with the QNX 4.25 shell, which doesn't propagate exit
23132         status of failed commands inside shell assignments.
23133
23134 1999-11-17  Jim Meyering  <meyering@ascend.com>
23135
23136         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
23137
23138 1999-11-07  Jim Meyering  <meyering@ascend.com>
23139
23140         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
23141
23142 1999-11-06  Jim Meyering  <meyering@ascend.com>
23143
23144         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
23145         * m4/jm-macros.m4 (jm_MACROS): Use it here.
23146
23147 1999-11-05  Jim Meyering  <meyering@ascend.com>
23148
23149         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
23150         configure.in of textutils, fileutils, and sh-utils into this one
23151         (shared between those packages) file.
23152         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
23153         AC_STRUCT_ST_BLKSIZE.
23154
23155 1999-11-03  Jim Meyering  <meyering@ascend.com>
23156
23157         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
23158         of AC_CHECK_TYPE checks includes unistd.h.
23159         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
23160         Suggestion from Akim Demaille.
23161
23162 1999-10-30  Jim Meyering  <meyering@ascend.com>
23163
23164         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
23165         m4-quoted string.
23166         * m4/ls-mntd-fs.m4: Likewise.
23167         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
23168         * m4/jm-winsz1.m4: Likewise.
23169
23170         * m4/const.m4: Remove file, since the fix made it into the experimental
23171         version of autoconf.
23172         * m4/mktime.m4: Likewise.
23173
23174         * m4/check-type.m4: Remove file, now that the latest version of
23175         AC_CHECK_TYPE takes a third arg to specify additional #includes.
23176
23177         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
23178         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
23179         AC_CHECK_TYPE.
23180
23181 1999-10-04  Jim Meyering  <meyering@ascend.com>
23182
23183         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
23184
23185 1999-09-22  Paul Eggert  <eggert@twinsun.com>
23186
23187         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
23188         2.95.1 bug with HP-UX 10.20.
23189
23190 1999-09-17  Jim Meyering  <meyering@ascend.com>
23191
23192         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
23193         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
23194         due to missing strdup (against sh-utils-2.0).
23195
23196 1999-08-29  Jim Meyering  <meyering@ascend.com>
23197
23198         * m4/jm-macros.m4: Require jm_BISON.
23199         * m4/bison.m4: New file.
23200
23201 1999-08-17  Paul Eggert  <eggert@twinsun.com>
23202
23203         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
23204         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
23205
23206 1999-08-05  Jim Meyering  <meyering@ascend.com>
23207
23208         * m4/getline.m4: Rename test file from conftestdata to conftest.data
23209         to avoid conflicts with `conftest' on 8+3 filesystems.
23210         Suggestion from Eli Zaretskii.
23211
23212 1999-08-04  Jim Meyering  <meyering@ascend.com>
23213
23214         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
23215         fileutils and sh-utils (textutils's getline test was inadequate).
23216         (AM_FUNC_GETLINE): Run this test.
23217         (AC_CHECK_FUNCS): Check for getdelim.
23218         Reported by Bob Proulx.
23219
23220 1999-08-02  Jim Meyering  <meyering@ascend.com>
23221
23222         * m4/jm-macros.m4: Add a comment.
23223
23224 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23225
23226         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
23227         <inttypes.h> defines strtoumax as a macro (and not as a
23228         function).
23229
23230 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23231
23232         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
23233         that we can shift, multiply and divide unsigned long long
23234         values; Ultrix cc can't do it.
23235
23236 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23237
23238         * m4/mktime.m4: New file, which is a preview of what should appear
23239         in the next public autoconf release.
23240
23241 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23242
23243         * m4/lfs.m4: Remove this file.
23244         * m4/largefile.m4: New file.  It contains the old contents of
23245         lfs.m4, except that all names with prefix AC_LFS have been
23246         changed to use the prefix AC_SYS_LARGEFILE instead, to be
23247         compatible with future autoconf versions.  Also, some minor m4
23248         quoting problems have been fixed.
23249
23250 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23251
23252         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
23253         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
23254         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
23255         and simplify the shell code.
23256
23257 1999-08-01  Jim Meyering  <meyering@ascend.com>
23258
23259         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
23260         m4.
23261
23262 1999-07-20  Jim Meyering  <meyering@ascend.com>
23263
23264         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
23265
23266 1999-07-15  Jim Meyering  <meyering@ascend.com>
23267
23268         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
23269
23270 1999-05-22  Jim Meyering  <meyering@ascend.com>
23271
23272         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
23273
23274 1999-05-20  Jim Meyering  <meyering@ascend.com>
23275
23276         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
23277         Add a colon after each `then' in case $4 is empty.
23278
23279 1999-05-16  Jim Meyering  <meyering@ascend.com>
23280
23281         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
23282
23283 1999-05-10  Jim Meyering  <meyering@ascend.com>
23284
23285         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
23286
23287         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
23288         AC_FUNC_MKTIME.
23289
23290 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
23291
23292         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
23293
23294 1999-05-04  Paul Eggert  <eggert@twinsun.com>
23295
23296         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
23297         not CPPFLAGS, so that linking works correctly in IRIX.
23298
23299 1999-04-30  Paul Eggert  <eggert@twinsun.com>
23300
23301         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
23302
23303 1999-04-20  Paul Eggert  <eggert@twinsun.com>
23304
23305         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
23306         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
23307         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
23308         jm_AC_TYPE_UNSIGNED_LONG_LONG.
23309         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
23310
23311         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
23312
23313 1999-04-20  Jim Meyering  <meyering@ascend.com>
23314
23315         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
23316         AC_REPLACE xstroull if necessary.  From Paul Eggert.
23317         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
23318
23319 1999-04-18  Jim Meyering  <meyering@ascend.com>
23320
23321         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
23322         * m4/jm-macros.m4: Use it.
23323
23324 1999-04-06  Jim Meyering  <meyering@ascend.com>
23325
23326         * m4/strftime.m4: Remove test for %f.
23327
23328 1999-03-29  Jim Meyering  <meyering@ascend.com>
23329
23330         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
23331         superset of the AC_TYPE_* checks in the textutils, fileutils,
23332         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
23333         AC_TYPE_PID_T.
23334
23335 1999-03-28  Jim Meyering  <meyering@ascend.com>
23336
23337         * m4/jm-macros.m4: Define GNU_PACKAGE here.
23338         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
23339         replaced e.g., in the *.sh files of the sh-utils.
23340
23341 1999-03-20  Jim Meyering  <meyering@ascend.com>
23342
23343         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
23344         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
23345         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
23346
23347 1999-03-19  Jim Meyering  <meyering@ascend.com>
23348
23349         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
23350
23351 1999-03-12  Jim Meyering  <meyering@ascend.com>
23352
23353         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
23354
23355 1999-03-07  Jim Meyering  <meyering@ascend.com>
23356
23357         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
23358         declared.
23359
23360 1999-02-17  Jim Meyering  <meyering@ascend.com>
23361
23362         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
23363         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
23364
23365 1999-02-07  Jim Meyering  <meyering@ascend.com>
23366
23367         * m4/group-member.m4: New file -- extracted from sh-utils'
23368         configure.in.
23369
23370         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
23371         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
23372
23373 1999-02-06  Jim Meyering  <meyering@ascend.com>
23374
23375         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
23376         * m4/fnmatch.m4: Likewise.
23377         * m4/getgroups.m4: Likewise.
23378         * m4/lstat.m4: Likewise.
23379         * m4/malloc.m4: Likewise.
23380         * m4/putenv.m4: Likewise.
23381         * m4/realloc.m4: Likewise.
23382         * m4/regex.m4: Likewise.
23383         * m4/stat.m4: Likewise.
23384         * m4/strftime.m4: Likewise.
23385         Suggestion from Alain Magloire.
23386
23387         * m4/chown.m4: Use `.$ac_objext', not `.o'.
23388         * m4/fnmatch.m4: Likewise.
23389         * m4/getgroups.m4: Likewise.
23390         * m4/getline.m4: Likewise.
23391         * m4/lstat.m4: Likewise.
23392         * m4/malloc.m4: Likewise.
23393         * m4/memcmp.m4: Likewise.
23394         * m4/putenv.m4: Likewise.
23395         * m4/realloc.m4: Likewise.
23396         * m4/regex.m4: Likewise.
23397         * m4/stat.m4: Likewise.
23398         * m4/strftime.m4: Likewise.
23399         Suggestion from Alain Magloire.
23400
23401         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
23402         an argument.
23403
23404         * m4/regex.m4: Add a run-time Test for proper operation of
23405         re_compile_pattern.
23406
23407 1999-01-31  Jim Meyering  <meyering@ascend.com>
23408
23409         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
23410
23411 1999-01-30  Jim Meyering  <meyering@ascend.com>
23412
23413         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
23414
23415         * m4/jm-mktime.m4: Make this a wrapper around the official
23416         AM_FUNC_MKTIME rather than my private copy, now that the official one
23417         is up to date.
23418         * m4/mktime.m4: Remove file.
23419
23420         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
23421         * m4/uptime.m4: Likewise.
23422         * m4/uintmax_t.m4: Likewise.
23423
23424 1999-01-28  Jim Meyering  <meyering@ascend.com>
23425
23426         * m4/jm-macros.m4: Use jm_AFS.
23427         * m4/afs.m4: New file (from fileutils' configure.in).
23428
23429         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
23430         * m4/chown.m4: Likewise.
23431         * m4/d-ino.m4: Likewise.
23432         * m4/d-type.m4: Likewise.
23433         * m4/fnmatch.m4: Likewise.
23434         * m4/getgroups.m4: Likewise.
23435         * m4/gettext.m4: Likewise.
23436         * m4/jm-mktime.m4: Likewise.
23437         * m4/jm-winsz2.m4: Likewise.
23438         * m4/lcmessage.m4: Likewise.
23439         * m4/ls-mntd-fs.m4: Likewise.
23440         * m4/malloc.m4: Likewise.
23441         * m4/memcmp.m4: Likewise.
23442         * m4/putenv.m4: Likewise.
23443         * m4/realloc.m4: Likewise.
23444         * m4/st_mtim.m4: Likewise.
23445         * m4/strftime.m4: Likewise.
23446
23447 1999-01-16  Jim Meyering  <meyering@ascend.com>
23448
23449         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
23450         (ARGMATCH_DIE_DECL): Define.
23451
23452 1999-01-12  Jim Meyering  <meyering@ascend.com>
23453
23454         * m4/Makefile.am.in: Rewrite to avoid using fmt.
23455         Reported by Lars Hecking.
23456
23457 1999-01-10  Jim Meyering  <meyering@ascend.com>
23458
23459         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
23460         gross kludge.
23461         * m4/inttypes_h.m4: Likewise.
23462         * m4/lstat.m4: Likewise.
23463         * m4/malloc.m4: Likewise.
23464         * m4/readdir.m4: Likewise.
23465         * m4/realloc.m4: Likewise.
23466         * m4/st_dm_mode.m4: Likewise.
23467         * m4/stat.m4: Likewise.
23468         * m4/utimbuf.m4: Likewise.
23469         * m4/utimes.m4: Likewise.
23470
23471         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
23472         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
23473         comments in config.h.in are meaningful.
23474
23475         * m4/jm-macros.m4: Require autoconf-2.13 here.
23476
23477         * m4/regex.m4: By default, don't use the included regex.c on systems
23478         with glibc 2.  Suggestion from Uli Drepper.
23479
23480 1999-01-02  Jim Meyering  <meyering@ascend.com>
23481
23482         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
23483
23484 1998-12-18  Jim Meyering  <meyering@ascend.com>
23485
23486         * m4/Makefile.am.in (Makefile.am): Simplify rule.
23487         Based on a suggestion from Lars Hecking.
23488
23489 1998-11-16  Paul Eggert  <eggert@twinsun.com>
23490
23491         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
23492
23493 1998-11-16  Jim Meyering  <meyering@ascend.com>
23494
23495         * m4/lfs.m4: Double-quote the `uname...` expression.
23496
23497 1998-11-14  Jim Meyering  <meyering@ascend.com>
23498
23499         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
23500         * m4/stat.m4: Likewise.
23501
23502 1998-11-03  Jim Meyering  <meyering@ascend.com>
23503
23504         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
23505         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
23506
23507 1998-10-18  Jim Meyering  <meyering@ascend.com>
23508
23509         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
23510
23511 1998-10-17  Jim Meyering  <meyering@ascend.com>
23512
23513         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
23514         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
23515         calls for those previously hard-coded headers.  Instead, take a new
23516         parameter.
23517         (jm_CHECK_DECLARATIONS): Reflect interface change.
23518         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
23519         (jm_CHECK_DECL_LOCALTIME_R): New macro.
23520
23521         * m4/mktime.m4: Test for spring-forward gap before long-running test.
23522
23523 1998-10-14  Jim Meyering  <meyering@ascend.com>
23524
23525         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
23526         instead of "TZ=America/Vancouver".  From Paul Eggert.
23527
23528 1998-10-11  Jim Meyering  <meyering@ascend.com>
23529
23530         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
23531         This adds a test for a recently added compatibility fix for mktime.c.
23532         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
23533
23534 1998-09-27  Jim Meyering  <meyering@ascend.com>
23535
23536         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
23537
23538         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
23539         ../configure.in, including a change from Gordon Matzigkeit to allow
23540         cross-compiling for the Hurd.
23541
23542         * m4/glibc.m4: New file/macro to test for the GNU C Library
23543         versions 1 and 2.  From Gordon Matzigkeit.
23544         Indent.
23545
23546 1998-09-21  Jim Meyering  <meyering@ascend.com>
23547
23548         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
23549
23550 1998-08-18  Paul Eggert  <eggert@twinsun.com>
23551
23552         Port nanosecond-resolution times to UnixWare 2.1.2 and
23553         pedantic Solaris 2.6.
23554
23555         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
23556         AC_STRUCT_ST_MTIM.
23557         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
23558         Generate name of ns member, instead of just 1 or undef.
23559         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
23560
23561 1998-08-15  Jim Meyering  <meyering@ascend.com>
23562
23563         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
23564         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
23565         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
23566         instead of jm_TYPE_SSIZE_T.
23567
23568 1998-08-12  Jim Meyering  <meyering@ascend.com>
23569
23570         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
23571
23572 1998-08-02  Jim Meyering  <meyering@ascend.com>
23573
23574         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
23575         in acconfig.h manually.
23576
23577 1998-07-31  Paul Eggert  <eggert@twinsun.com>
23578
23579         * m4/st_mtim.m4: New file.
23580
23581 1998-07-28  Jim Meyering  <meyering@ascend.com>
23582
23583         * m4/utimes.m4: Undef stat.
23584
23585 1998-07-25  Jim Meyering  <meyering@ascend.com>
23586
23587         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
23588         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
23589
23590 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
23591
23592         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
23593         uid and gid actually remain unchanged.
23594
23595 1998-07-07  Jim Meyering  <meyering@ascend.com>
23596
23597         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
23598
23599 1998-07-04  Jim Meyering  <meyering@ascend.com>
23600
23601         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
23602         to prove that this macro can be used in packages without regex.c.
23603
23604 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
23605
23606         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
23607         is to be used.
23608
23609 1998-07-03  Jim Meyering  <meyering@ascend.com>
23610
23611         * m4/gettext.m4: Add -lintl if it's found to be necessary.
23612
23613         * m4/gettext.m4: New file -- from gettext-0.10.35.
23614         * m4/lcmessage.m4: Likewise.
23615         * m4/progtest.m4: Likewise.
23616
23617         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
23618         * m4/jm-macros.m4: Require the new macro.
23619
23620 1998-06-29  Jim Meyering  <meyering@ascend.com>
23621
23622         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
23623         for the definition of NGROUPS (used in a system header included
23624         by sys/mount.h).
23625
23626 1998-06-28  Jim Meyering  <meyering@ascend.com>
23627
23628         * m4/ls-mntd-fs.m4: New file.
23629         * m4/fstypename.m4: New file.
23630
23631         * m4/jm-macros.m4: Require the new macro.
23632         * m4/jm-glibc-io.m4: New file.
23633
23634 1998-05-19  Jim Meyering  <meyering@ascend.com>
23635
23636         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
23637         * m4/lchown.m4: New file.
23638
23639         * m4/Makefile.am.in: New file.
23640         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
23641
23642 1998-05-14  Jim Meyering  <meyering@ascend.com>
23643
23644         * m4/Makefile.am (EXTRA_DIST): Add them.
23645         * m4/jm-macros.m4: New file.
23646         * m4/utimbuf.m4: New file.
23647
23648 1998-05-12  Jim Meyering  <meyering@ascend.com>
23649
23650         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
23651
23652 1998-05-11  Jim Meyering  <meyering@ascend.com>
23653
23654         * m4/isc-posix.m4: New file.
23655
23656 1998-05-10  Jim Meyering  <meyering@ascend.com>
23657
23658         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
23659
23660 1998-05-09  Jim Meyering  <meyering@ascend.com>
23661
23662         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
23663         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
23664         with automake.
23665
23666         * m4/ssize_t.m4: New file.
23667         * m4/mktime.m4: Remove file -- the new automake has this now.
23668
23669 1998-04-26  Jim Meyering  <meyering@ascend.com>
23670
23671         * m4/assert.m4: New file.
23672         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
23673
23674 1998-04-05  Jim Meyering  <meyering@ascend.com>
23675
23676         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
23677         (jm_PREREQ): Use it here.
23678
23679 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
23680
23681         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
23682         in acconfig.h.
23683
23684 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
23685
23686         * m4/prereq.m4: New file.
23687         * m4/error.m4: New file.
23688         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
23689
23690 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
23691
23692         * m4/getline.m4: Don't set am_cv_func_working_getline before the
23693         cache-check for the same variable -- that defeated the purpose of
23694         the test; the test program was never run.  This was a problem only
23695         on systems with losing getline functions -- HP-UX 10.20 is one.
23696         Reported by Bjorn Helgaas.
23697
23698 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
23699
23700         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
23701
23702 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
23703
23704         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
23705
23706         * m4/const.m4: New file.  Use an initializer in this declaration
23707         typedef int charset[2]; const charset x;
23708         Reported by Bob Glickstein.
23709
23710 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
23711
23712         * m4/chown.m4: Fix reversed types on -1 args to chown.
23713         From Kaveh Ghazi.
23714
23715 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
23716
23717         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
23718         Add lseek and memchr.
23719
23720         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
23721         T.E.Dickey <dickey@clark.net> said that some older preprocessors
23722         have a 20-character limit on names.
23723
23724 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
23725
23726         * m4/inttypes_h.m4: New file.
23727         * m4/uintmax_t.m4: New file.
23728         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
23729
23730 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
23731   Free Software Foundation, Inc.
23732 Copying and distribution of this file, with or without modification,
23733 are permitted provided the copyright notice and this notice are preserved.