New module 'tsearch'.
[pspp] / ChangeLog
1 2006-10-22  Bruno Haible  <bruno@clisp.org>
2
3         * modules/tsearch: New file.
4         * lib/tsearch.h: New file.
5         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
6         * m4/tsearch.m4: New file.
7         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
8
9 2006-10-29  Eric Blake  <ebb9@byu.net>
10
11         * lib/arcfour.c: Assume config.h.
12         * lib/arctwo.c: Likewise.
13         * lib/base64.c: Likewise.
14         * lib/check-version.c: Likewise.
15         * lib/crc.c: Likewise.
16         * lib/des.c: Likewise.
17         * lib/gc-gnulib.c: Likewise.
18         * lib/gc-libgcrypt.c: Likewise.
19         * lib/gc-pbkdf2-sha1.c: Likewise.
20         * lib/getaddrinfo.c: Likewise.
21         * lib/getdelim.c: Likewise.
22         * lib/getline.c: Likewise.
23         * lib/hmac-md5.c: Likewise.
24         * lib/hmac-sha1.c: Likewise.
25         * lib/iconvme.c: Likewise.
26         * lib/md2.c: Likewise.
27         * lib/md4.c: Likewise.
28         * lib/memxor.c: Likewise.
29         * lib/read-file.c: Likewise.
30         * lib/readline.c: Likewise.
31         * lib/rijndael-alg-fst.c: Likewise.
32         * lib/rijndael-api-fst.c: Likewise.
33         * lib/xgetdomainname.c: Likewise.
34
35 2006-10-28  Eric Blake  <ebb9@byu.net>
36
37         * lib/xstrndup.c: Assume config.h.
38
39 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
40
41         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
42         stat-macros.h is now for our own macros, whereas stat_h is for
43         macros in the <sys/stat.h> name space.
44         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
45         (STAT_MACROS_H): Remove.
46         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
47         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
48         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
49         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
50         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
51         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
52         Move these macros to ...
53         * lib/stat_.h: here.  Don't include stat-macros.h.
54         * lib/canonicalize.c: Don't include stat-macros.h.
55         * lib/chown.c: Likewise.
56         * lib/euidaccess.c: Likewise.
57         * lib/file-type.c: Likewise.
58         * lib/filemode.c: Likewise.
59         * lib/glob.c: Likewise.
60         * lib/isapipe.c: Likewise.
61         * lib/lchown.c: Likewise.
62         * lib/lstat.c: Likewise.
63         * lib/mkdir-p.c: Likewise.
64         * lib/rmdir.c: Likewise.
65         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
66         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
67         unless mkdir isn't declared, to speed up 'configure'.
68         Always create sys/stat.h, since it's unlikely any real sys/stat.h
69         would define all the S_* symbols.
70         * modules/canonicalize (Depends-on):
71         Depend on sys_stat, not stat-macros.
72         * modules/chown: Likewise.
73         * modules/euidaccess: Likewise.
74         * modules/filemode: Likewise.
75         * modules/file-type: Likewise.
76         * modules/glob: Likewise.
77         * modules/isapipe: Likewise.
78         * modules/lchown: Likewise.
79         * modules/lstat: Likewise.
80         * modules/mkancesdirs: Likewise.
81         * modules/rmdir: Likewise.
82         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
83         * modules/modechange: Likewise.
84         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
85         (configure.ac): Remove gl_STAT_MACROS.
86         * modules/sys_stat (Depends-on): Remove stat-macros.
87
88 2006-10-27  Bruno Haible  <bruno@clisp.org>
89
90         * m4/signed.m4: Remove file.
91         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
92         invocation.
93         * modules/vasnprintf (Files): Remove m4/signed.m4.
94
95 2006-10-27  Bruno Haible  <bruno@clisp.org>
96
97         Update to GNU gettext 0.16.
98         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
99         m4/inttypes-h.m4, m4/signed.m4.
100         * m4/gettext.m4: Update to GNU gettext 0.16.
101         * m4/intl.m4: New file, from GNU gettext.
102         * m4/intldir.m4: New file, from GNU gettext.
103         * config/srclist.txt: Update
104
105 2006-10-27  Eric Blake  <ebb9@byu.net>
106
107         * MODULES.html.sh: Document tempname.
108         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
109         dependencies.
110         (Files): Move lib/tempname.c...
111         * modules/tempname: ...to this new module.
112         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
113         (gl_PREREQ_TEMPNAME): Move...
114         * m4/tempname.m4: ...to this new file.
115         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
116         * modules/sys_stat (Depends-on): Add stat-macros.
117         * lib/stat_.h (includes): Pick up stat macros.
118         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
119         if stat macros are broken.
120         * lib/tempname.c (includes): No need to include "stat-macros.h".
121         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
122         (direxists, __path_search) [!_LIBC]: Don't compile these in
123         gnulib; the tmpdir module covers that.
124         * lib/tempname.h: New file.
125
126 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
127
128         * COPYING: Explain how gnulib-tool converts licence headers.
129         Almost all wording by Eric Blake.
130
131 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
132
133         * lib/mbchar.h (is_basic_table): Make read-only.
134         * lib/mbchar.c (is_basic_table): Likewise.
135         Reported by John Darrington.
136
137 2006-10-25  Bruno Haible  <bruno@clisp.org>
138
139         * lib/progname.h (set_program_name): Undefine before defining.
140
141 2006-10-25  Bruno Haible  <bruno@clisp.org>
142
143         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
144         false for non-gcc C++ compilers.
145         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
146
147 2006-10-24  Bruno Haible  <bruno@clisp.org>
148
149         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
150         iconv implementations like Irix iconv.
151
152 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
153
154         * modules/vararrays: New file.
155         * m4/vararrays.m4: New file, taken from diffutils.
156         * MODULES.html.sh: New module vararrays.
157
158 2006-10-24  Karl Berry  <karl@gnu.org>
159
160         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
161         Don't call GNU Unix.
162
163 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
164
165         * users.txt: Add Libtool.
166
167         Sync from Libtool:
168
169         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
170
171         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
172         to gnulib's policy of including config.h unconditionally.
173
174 2006-10-24  Bruno Haible  <bruno@clisp.org>
175
176         * modules/wcwidth (Files): Add m4/wint_t.m4.
177         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
178         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
179
180 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
181
182         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
183         to pacify GCC with some -W flags enabled.  Problem reported by
184         Bruno Haible.
185
186 2006-10-24  Jim Meyering  <jim@meyering.net>
187
188         * MODULES.html.sh: Remove uinttostr.  It's not a module.
189         Reported by Karl Berry.
190
191 2006-10-23  Bruno Haible  <bruno@clisp.org>
192
193         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
194
195 2006-10-24  Bruno Haible  <bruno@clisp.org>
196
197         * lib/gl_list.h: Use C comment style, not C++ comment style.
198
199 2006-10-23  Eric Blake  <ebb9@byu.net>
200
201         * lib/getaddrinfo.c (includes): Add missing include.
202
203 2006-10-23  Bruno Haible  <bruno@clisp.org>
204             Paul Eggert  <eggert@cs.ucla.edu>
205
206         Ability to rename obstack_free.
207         * lib/obstack.h (__obstack_free): New macro. Declare instead of
208         obstack_free.
209         (obstack_free): Invoke the __obstack_free macro.
210         * lib/obstack.c (obstack_free): Use __obstack_free macro.
211
212 2006-10-23  Bruno Haible  <bruno@clisp.org>
213             Paul Eggert  <eggert@cs.ucla.edu>
214
215         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
216         __argc, __argv from the declaration. (They are defined as macros on
217         mingw.)
218
219 2006-10-22  Bruno Haible  <bruno@clisp.org>
220
221         * doc/gnulib-intro.texi: New file.
222         * doc/gnulib.texi: Include it.
223
224 2006-10-21  Bruno Haible  <bruno@clisp.org>
225
226         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
227         "Introduction", "Miscellanous Notes", "Particular Modules".
228
229 2006-10-21  Bruno Haible  <bruno@clisp.org>
230
231         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
232         Change mostlyclean-local rule to avoid sh syntax error from bash
233         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
234
235 2006-10-23  Jim Meyering  <jim@meyering.net>
236
237         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
238         in place of snprintf.
239
240         * modules/inttostr (Files): Add lib/uinttostr.c.
241         * lib/uinttostr.c (inttostr): New file/function.
242         * lib/inttostr.h (uinttostr): Declare.
243         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
244         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
245         Add uinttostr.
246         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
247
248 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
249
250         * lib/canonicalize.c (ELOOP): Define if not already defined.
251         Problem reported by Bruno Haible in
252         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
253
254 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
255
256         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
257         Problem reported by Perry Smith and Ville Laurikari.
258
259         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
260         uses.
261
262 2006-10-19  Bruno Haible  <bruno@clisp.org>
263
264         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
265         for mingw.
266
267 2006-10-19  Bruno Haible  <bruno@clisp.org>
268
269         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
270         Needed for mingw.
271
272 2006-10-19  Bruno Haible  <bruno@clisp.org>
273
274         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
275
276 2006-10-19  Bruno Haible  <bruno@clisp.org>
277
278         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
279         it.
280
281 2006-10-19  Bruno Haible  <bruno@clisp.org>
282
283         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
284         invocation.
285
286 2006-10-19  Bruno Haible  <bruno@clisp.org>
287
288         * gnulib-tool (func_create_testdir): Don't include ftruncate and
289         mountlist by default.
290
291 2006-10-16  Bruno Haible  <bruno@clisp.org>
292
293         * lib/c-strstr.c: Include c-strstr.h.
294
295 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
296
297         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
298         in a slash.
299
300 2006-10-18  Bruno Haible  <bruno@clisp.org>
301
302         * lib/lock.h [C++]: Wrap definitions in extern "C".
303
304 2006-10-18  Bruno Haible  <bruno@clisp.org>
305
306         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
307         gl_LIBOBJS list.
308
309 2006-10-18  Bruno Haible  <bruno@clisp.org>
310
311         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
312
313 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
314
315         * lib/xstrtol.h: Include gettext.h.
316         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
317         Problem reported by Eric Blake.
318         * modules/xstrtol (Depends-on): Add gettext-h.
319
320 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
321
322         * lib/strftime.c (advance): New macro.
323         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
324         incomplete type, so you can't add 0 to it.  Problem and patch
325         reported by Eelco Dolstra for dietlibc.
326
327 2006-10-18  Jim Meyering  <jim@meyering.net>
328
329         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
330         type for a local, and rename it: s/up/user_proc/.
331
332 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
333
334         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
335         READ_UTMP_USER_PROCESS.
336         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
337
338 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
339
340         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
341         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
342
343 2006-10-17  Eric Blake  <ebb9@byu.net>
344
345         * lib/sigprocmask.c (sigprocmask): Fix typo.
346
347         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
348
349         * modules/clean-temp (Makefile.am): Don't add to make output...
350         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
351         config.h.
352
353 2006-10-17  Bruno Haible  <bruno@clisp.org>
354
355         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
356         differently if DEFAULT_TEXT_DOMAIN is set.
357
358 2006-10-16  Bruno Haible  <bruno@clisp.org>
359
360         * lib/clean-temp.c: Include fwriteerror.h.
361
362 2006-10-16  Bruno Haible  <bruno@clisp.org>
363
364         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
365
366 2006-10-16  Bruno Haible  <bruno@clisp.org>
367
368         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
369         * lib/sigprocmask.h: Include <sys/types.h>.
370         (sigset_t): Use the system's definition if present.
371
372 2006-10-17  Eric Blake  <ebb9@byu.net>
373
374         * lib/xvasprintf.c (includes): Assume config.h.
375         * lib/xasprintf.c (includes): Likewise.
376
377 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
378
379         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
380         at least as wide as intmax_t.
381
382 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
383
384         (Imported from Automake.)
385         * build-aux/gnupload: Update to version 1.1 of directive file.
386
387 2006-10-16  Eric Blake  <ebb9@byu.net>
388
389         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
390         match Automake 1.10a.
391
392 2006-10-14  Bruno Haible  <bruno@clisp.org>
393
394         * modules/sigprocmask: New file.
395         * lib/sigprocmask.h: New file.
396         * lib/sigprocmask.c: New file.
397         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
398         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
399         request sigprocmask.o.
400         (gl_PREREQ_SIGPROCMASK): New macro.
401         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
402         (Depends-on): Add sigprocmask.
403         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
404         gt_SIGNALBLOCKING. Test for 'raise' only once.
405         * lib/fatal-signal.c: Include sigprocmask.h.
406         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
407         unblock_fatal_signals): Define always.
408         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
409         sigprocmask.
410
411 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
412
413         Sync from Automake.
414         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
415         which incorrectly sets the mode of an existing destination
416         directory.  In some cases the unpatched install-sh could do the
417         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
418         system.  We hope this is rare in practice, but it's clearly worth
419         fixing.  Problem reported by Alex Unleashed in
420         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
421         Also, don't bother to check for -m bugs unless we're using -m;
422         suggested by Stepan Kasal.
423
424 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
425
426         Sync from Automake.
427         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
428         `-c' flag, so they appear at the same position as in %FASTDEP%
429         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
430         which ignores unknown options only after the first non-option.
431         Bug report against M4 by Nelson H. F. Beebe.
432
433 2006-10-13  Jim Meyering  <jim@meyering.net>
434
435         Fix a bug in yesterday's change.
436         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
437         p->fts_statp->st_dev would be used uninitialized.
438         Ensures that we always call fts_stat on the very first entry.
439         Miklos Szeredi reported that find -xdev stopped working.
440
441 2006-10-12  Bruno Haible  <bruno@clisp.org>
442
443         * gnulib-tool (func_get_automake_snippet): Append an automatically
444         computed EXTRA_DIST augmentation.
445         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
446         * modules/alloca-opt (Makefile.am): Likewise.
447         * modules/allocsa (Makefile.am): Likewise.
448         * modules/arcfour (Makefile.am): Likewise.
449         * modules/arctwo (Makefile.am): Likewise.
450         * modules/argmatch (Makefile.am): Likewise.
451         * modules/argz (Makefile.am): Likewise.
452         * modules/atexit (Makefile.am): Likewise.
453         * modules/backupfile (Makefile.am): Likewise.
454         * modules/byteswap (Makefile.am): Likewise.
455         * modules/c-strtod (Makefile.am): Likewise.
456         * modules/c-strtold (Makefile.am): Likewise.
457         * modules/calloc (Makefile.am): Likewise.
458         * modules/canon-host (Makefile.am): Likewise.
459         * modules/canonicalize (Makefile.am): Likewise.
460         * modules/chdir-long (Makefile.am): Likewise.
461         * modules/chdir-safer (Makefile.am): Likewise.
462         * modules/check-version (Makefile.am): Likewise.
463         * modules/chown (Makefile.am): Likewise.
464         * modules/cloexec (Makefile.am): Likewise.
465         * modules/close-stream (Makefile.am): Likewise.
466         * modules/closeout (Makefile.am): Likewise.
467         * modules/crc (Makefile.am): Likewise.
468         * modules/csharpexec (Makefile.am): Likewise.
469         * modules/cycle-check (Makefile.am): Likewise.
470         * modules/des (Makefile.am): Likewise.
471         * modules/dev-ino (Makefile.am): Likewise.
472         * modules/dirfd (Makefile.am): Likewise.
473         * modules/dirname (Makefile.am): Likewise.
474         * modules/dup2 (Makefile.am): Likewise.
475         * modules/eealloc (Makefile.am): Likewise.
476         * modules/error (Makefile.am): Likewise.
477         * modules/euidaccess (Makefile.am): Likewise.
478         * modules/exclude (Makefile.am): Likewise.
479         * modules/exitfail (Makefile.am): Likewise.
480         * modules/fcntl-safer (Makefile.am): Likewise.
481         * modules/fcntl (Makefile.am): Likewise.
482         * modules/file-type (Makefile.am): Likewise.
483         * modules/fileblocks (Makefile.am): Likewise.
484         * modules/filemode (Makefile.am): Likewise.
485         * modules/filenamecat (Makefile.am): Likewise.
486         * modules/fnmatch (Makefile.am): Likewise.
487         * modules/fopen-safer (Makefile.am): Likewise.
488         * modules/fpending (Makefile.am): Likewise.
489         * modules/fprintftime (Makefile.am): Likewise.
490         * modules/free (Makefile.am): Likewise.
491         * modules/fsusage (Makefile.am): Likewise.
492         * modules/ftruncate (Makefile.am): Likewise.
493         * modules/fts (Makefile.am): Likewise.
494         * modules/gc-arcfour (Makefile.am): Likewise.
495         * modules/gc-des (Makefile.am): Likewise.
496         * modules/gc-hmac-md5 (Makefile.am): Likewise.
497         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
498         * modules/gc-md4 (Makefile.am): Likewise.
499         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
500         * modules/gc-sha1 (Makefile.am): Likewise.
501         * modules/gc (Makefile.am): Likewise.
502         * modules/getaddrinfo (Makefile.am): Likewise.
503         * modules/getcwd (Makefile.am): Likewise.
504         * modules/getdelim (Makefile.am): Likewise.
505         * modules/getdomainname (Makefile.am): Likewise.
506         * modules/getgroups (Makefile.am): Likewise.
507         * modules/gethostname (Makefile.am): Likewise.
508         * modules/gethrxtime (Makefile.am): Likewise.
509         * modules/getline (Makefile.am): Likewise.
510         * modules/getloadavg (Makefile.am): Likewise.
511         * modules/getlogin_r (Makefile.am): Likewise.
512         * modules/getndelim2 (Makefile.am): Likewise.
513         * modules/getopt (Makefile.am): Likewise.
514         * modules/getpagesize (Makefile.am): Likewise.
515         * modules/getpass-gnu (Makefile.am): Likewise.
516         * modules/getpass (Makefile.am): Likewise.
517         * modules/getsubopt (Makefile.am): Likewise.
518         * modules/gettime (Makefile.am): Likewise.
519         * modules/gettimeofday (Makefile.am): Likewise.
520         * modules/getugroups (Makefile.am): Likewise.
521         * modules/getusershell (Makefile.am): Likewise.
522         * modules/glob (Makefile.am): Likewise.
523         * modules/group-member (Makefile.am): Likewise.
524         * modules/hard-locale (Makefile.am): Likewise.
525         * modules/hash (Makefile.am): Likewise.
526         * modules/hmac-md5 (Makefile.am): Likewise.
527         * modules/hmac-sha1 (Makefile.am): Likewise.
528         * modules/human (Makefile.am): Likewise.
529         * modules/idcache (Makefile.am): Likewise.
530         * modules/imaxabs (Makefile.am): Likewise.
531         * modules/imaxdiv (Makefile.am): Likewise.
532         * modules/inet_ntop (Makefile.am): Likewise.
533         * modules/inet_pton (Makefile.am): Likewise.
534         * modules/intprops (Makefile.am): Likewise.
535         * modules/inttostr (Makefile.am): Likewise.
536         * modules/inttypes (Makefile.am): Likewise.
537         * modules/isapipe (Makefile.am): Likewise.
538         * modules/javaversion (Makefile.am): Likewise.
539         * modules/lchmod (Makefile.am): Likewise.
540         * modules/lchown (Makefile.am): Likewise.
541         * modules/localcharset (Makefile.am): Likewise.
542         * modules/long-options (Makefile.am): Likewise.
543         * modules/lstat (Makefile.am): Likewise.
544         * modules/malloc (Makefile.am): Likewise.
545         * modules/mathl (Makefile.am): Likewise.
546         * modules/mbchar (Makefile.am): Likewise.
547         * modules/md2 (Makefile.am): Likewise.
548         * modules/md4 (Makefile.am): Likewise.
549         * modules/md5 (Makefile.am): Likewise.
550         * modules/memcasecmp (Makefile.am): Likewise.
551         * modules/memchr (Makefile.am): Likewise.
552         * modules/memcmp (Makefile.am): Likewise.
553         * modules/memcoll (Makefile.am): Likewise.
554         * modules/memcpy (Makefile.am): Likewise.
555         * modules/memmem (Makefile.am): Likewise.
556         * modules/memmove (Makefile.am): Likewise.
557         * modules/mempcpy (Makefile.am): Likewise.
558         * modules/memrchr (Makefile.am): Likewise.
559         * modules/memset (Makefile.am): Likewise.
560         * modules/memxor (Makefile.am): Likewise.
561         * modules/mkancesdirs (Makefile.am): Likewise.
562         * modules/mkdir-p (Makefile.am): Likewise.
563         * modules/mkdir (Makefile.am): Likewise.
564         * modules/mkdtemp (Makefile.am): Likewise.
565         * modules/mkstemp (Makefile.am): Likewise.
566         * modules/mktime (Makefile.am): Likewise.
567         * modules/modechange (Makefile.am): Likewise.
568         * modules/mountlist (Makefile.am): Likewise.
569         * modules/nanosleep (Makefile.am): Likewise.
570         * modules/obstack (Makefile.am): Likewise.
571         * modules/openat (Makefile.am): Likewise.
572         * modules/pagealign_alloc (Makefile.am): Likewise.
573         * modules/pathmax (Makefile.am): Likewise.
574         * modules/physmem (Makefile.am): Likewise.
575         * modules/poll (Makefile.am): Likewise.
576         * modules/posixtm (Makefile.am): Likewise.
577         * modules/posixver (Makefile.am): Likewise.
578         * modules/putenv (Makefile.am): Likewise.
579         * modules/quote (Makefile.am): Likewise.
580         * modules/quotearg (Makefile.am): Likewise.
581         * modules/raise (Makefile.am): Likewise.
582         * modules/read-file (Makefile.am): Likewise.
583         * modules/readline (Makefile.am): Likewise.
584         * modules/readlink (Makefile.am): Likewise.
585         * modules/readtokens (Makefile.am): Likewise.
586         * modules/readutmp (Makefile.am): Likewise.
587         * modules/realloc (Makefile.am): Likewise.
588         * modules/regex (Makefile.am): Likewise.
589         * modules/rename-dest-slash (Makefile.am): Likewise.
590         * modules/rename (Makefile.am): Likewise.
591         * modules/rijndael (Makefile.am): Likewise.
592         * modules/rmdir (Makefile.am): Likewise.
593         * modules/rpmatch (Makefile.am): Likewise.
594         * modules/safe-read (Makefile.am): Likewise.
595         * modules/safe-write (Makefile.am): Likewise.
596         * modules/same-inode (Makefile.am): Likewise.
597         * modules/same (Makefile.am): Likewise.
598         * modules/save-cwd (Makefile.am): Likewise.
599         * modules/savedir (Makefile.am): Likewise.
600         * modules/setenv (Makefile.am): Likewise.
601         * modules/settime (Makefile.am): Likewise.
602         * modules/sha1 (Makefile.am): Likewise.
603         * modules/sig2str (Makefile.am): Likewise.
604         * modules/snprintf (Makefile.am): Likewise.
605         * modules/stat-macros (Makefile.am): Likewise.
606         * modules/stat-time (Makefile.am): Likewise.
607         * modules/stdbool (Makefile.am): Likewise.
608         * modules/stdint (Makefile.am): Likewise.
609         * modules/stdlib-safer (Makefile.am): Likewise.
610         * modules/stpcpy (Makefile.am): Likewise.
611         * modules/stpncpy (Makefile.am): Likewise.
612         * modules/strcase (Makefile.am): Likewise.
613         * modules/strcasestr (Makefile.am): Likewise.
614         * modules/strchrnul (Makefile.am): Likewise.
615         * modules/strcspn (Makefile.am): Likewise.
616         * modules/strdup (Makefile.am): Likewise.
617         * modules/strerror (Makefile.am): Likewise.
618         * modules/strftime (Makefile.am): Likewise.
619         * modules/strndup (Makefile.am): Likewise.
620         * modules/strnlen (Makefile.am): Likewise.
621         * modules/strpbrk (Makefile.am): Likewise.
622         * modules/strsep (Makefile.am): Likewise.
623         * modules/strstr (Makefile.am): Likewise.
624         * modules/strtod (Makefile.am): Likewise.
625         * modules/strtoimax (Makefile.am): Likewise.
626         * modules/strtok_r (Makefile.am): Likewise.
627         * modules/strtol (Makefile.am): Likewise.
628         * modules/strtoll (Makefile.am): Likewise.
629         * modules/strtoul (Makefile.am): Likewise.
630         * modules/strtoull (Makefile.am): Likewise.
631         * modules/strtoumax (Makefile.am): Likewise.
632         * modules/strverscmp (Makefile.am): Likewise.
633         * modules/sys_socket (Makefile.am): Likewise.
634         * modules/sys_stat (Makefile.am): Likewise.
635         * modules/sysexits (Makefile.am): Likewise.
636         * modules/time_r (Makefile.am): Likewise.
637         * modules/timegm (Makefile.am): Likewise.
638         * modules/timespec (Makefile.am): Likewise.
639         * modules/tmpfile-safer (Makefile.am): Likewise.
640         * modules/trim (Makefile.am): Likewise.
641         * modules/unistd-safer (Makefile.am): Likewise.
642         * modules/unlinkdir (Makefile.am): Likewise.
643         * modules/unlocked-io (Makefile.am): Likewise.
644         * modules/userspec (Makefile.am): Likewise.
645         * modules/utime (Makefile.am): Likewise.
646         * modules/utimecmp (Makefile.am): Likewise.
647         * modules/utimens (Makefile.am): Likewise.
648         * modules/vasnprintf (Makefile.am): Likewise.
649         * modules/vasprintf (Makefile.am): Likewise.
650         * modules/vsnprintf (Makefile.am): Likewise.
651         * modules/xalloc (Makefile.am): Likewise.
652         * modules/xgetcwd (Makefile.am): Likewise.
653         * modules/xnanosleep (Makefile.am): Likewise.
654         * modules/xreadlink (Makefile.am): Likewise.
655         * modules/xstrtod (Makefile.am): Likewise.
656         * modules/xstrtol (Makefile.am): Likewise.
657         * modules/xstrtold (Makefile.am): Likewise.
658         * modules/yesno (Makefile.am): Likewise.
659         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
660
661 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
662
663         * modules/error (Makefile.am): Distribute files through
664         EXTRA_DIST, not lib_SOURCES.
665
666 2006-10-12  Eric Blake  <ebb9@byu.net>
667
668         * modules/error (Makefile.am): Distribute files in /lib.
669         * modules/obstack (Makefile.am): Likewise.
670
671 2006-10-12  Bruno Haible  <bruno@clisp.org>
672
673         * modules/acl (Makefile.am): Distribute all files in lib/ through
674         EXTRA_DIST.
675         * modules/arcfour (Makefile.am): Likewise.
676         * modules/arctwo (Makefile.am): Likewise.
677         * modules/argmatch (Makefile.am): Likewise.
678         * modules/argz (Makefile.am): Likewise.
679         * modules/atexit (Makefile.am): Likewise.
680         * modules/backupfile (Makefile.am): Likewise.
681         * modules/c-strtod (Makefile.am): Likewise.
682         * modules/c-strtold (Makefile.am): Likewise.
683         * modules/calloc (Makefile.am): Likewise.
684         * modules/canon-host (Makefile.am): Likewise.
685         * modules/canonicalize (Makefile.am): Likewise.
686         * modules/chdir-long (Makefile.am): Likewise.
687         * modules/chdir-safer (Makefile.am): Likewise.
688         * modules/check-version (Makefile.am): Likewise.
689         * modules/chown (Makefile.am): Likewise.
690         * modules/cloexec (Makefile.am): Likewise.
691         * modules/close-stream (Makefile.am): Likewise.
692         * modules/closeout (Makefile.am): Likewise.
693         * modules/crc (Makefile.am): Likewise.
694         * modules/cycle-check (Makefile.am): Likewise.
695         * modules/des (Makefile.am): Likewise.
696         * modules/dirfd (Makefile.am): Likewise.
697         * modules/dirname (Makefile.am): Likewise.
698         * modules/dup2 (Makefile.am): Likewise.
699         * modules/euidaccess (Makefile.am): Likewise.
700         * modules/exclude (Makefile.am): Likewise.
701         * modules/exitfail (Makefile.am): Likewise.
702         * modules/fcntl-safer (Makefile.am): Likewise.
703         * modules/file-type (Makefile.am): Likewise.
704         * modules/fileblocks (Makefile.am): Likewise.
705         * modules/filemode (Makefile.am): Likewise.
706         * modules/filenamecat (Makefile.am): Likewise.
707         * modules/fnmatch (Makefile.am): Likewise.
708         * modules/fopen-safer (Makefile.am): Likewise.
709         * modules/fpending (Makefile.am): Likewise.
710         * modules/fprintftime (Makefile.am): Likewise.
711         * modules/free (Makefile.am): Likewise.
712         * modules/fsusage (Makefile.am): Likewise.
713         * modules/ftruncate (Makefile.am): Likewise.
714         * modules/fts (Makefile.am): Likewise.
715         * modules/gc (Makefile.am): Likewise.
716         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
717         * modules/getaddrinfo (Makefile.am): Likewise.
718         * modules/getcwd (Makefile.am): Likewise.
719         * modules/getdelim (Makefile.am): Likewise.
720         * modules/getdomainname (Makefile.am): Likewise.
721         * modules/getgroups (Makefile.am): Likewise.
722         * modules/gethostname (Makefile.am): Likewise.
723         * modules/gethrxtime (Makefile.am): Likewise.
724         * modules/getline (Makefile.am): Likewise.
725         * modules/getloadavg (Makefile.am): Likewise.
726         * modules/getlogin_r (Makefile.am): Likewise.
727         * modules/getopt (Makefile.am): Likewise.
728         * modules/getpass (Makefile.am): Likewise.
729         * modules/getpass-gnu (Makefile.am): Likewise.
730         * modules/getsubopt (Makefile.am): Likewise.
731         * modules/gettime (Makefile.am): Likewise.
732         * modules/gettimeofday (Makefile.am): Likewise.
733         * modules/getugroups (Makefile.am): Likewise.
734         * modules/getusershell (Makefile.am): Likewise.
735         * modules/glob (Makefile.am): Likewise.
736         * modules/group-member (Makefile.am): Likewise.
737         * modules/hard-locale (Makefile.am): Likewise.
738         * modules/hash (Makefile.am): Likewise.
739         * modules/hmac-md5 (Makefile.am): Likewise.
740         * modules/hmac-sha1 (Makefile.am): Likewise.
741         * modules/human (Makefile.am): Likewise.
742         * modules/idcache (Makefile.am): Likewise.
743         * modules/imaxabs (Makefile.am): Likewise.
744         * modules/imaxdiv (Makefile.am): Likewise.
745         * modules/inet_ntop (Makefile.am): Likewise.
746         * modules/inet_pton (Makefile.am): Likewise.
747         * modules/inttostr (Makefile.am): Likewise.
748         * modules/isapipe (Makefile.am): Likewise.
749         * modules/lchown (Makefile.am): Likewise.
750         * modules/long-options (Makefile.am): Likewise.
751         * modules/lstat (Makefile.am): Likewise.
752         * modules/malloc (Makefile.am): Likewise.
753         * modules/mathl (Makefile.am): Likewise.
754         * modules/mbchar (Makefile.am): Likewise.
755         * modules/md2 (Makefile.am): Likewise.
756         * modules/md4 (Makefile.am): Likewise.
757         * modules/md5 (Makefile.am): Likewise.
758         * modules/memcasecmp (Makefile.am): Likewise.
759         * modules/memchr (Makefile.am): Likewise.
760         * modules/memcmp (Makefile.am): Likewise.
761         * modules/memcoll (Makefile.am): Likewise.
762         * modules/memcpy (Makefile.am): Likewise.
763         * modules/memmem (Makefile.am): Likewise.
764         * modules/memmove (Makefile.am): Likewise.
765         * modules/mempcpy (Makefile.am): Likewise.
766         * modules/memrchr (Makefile.am): Likewise.
767         * modules/memset (Makefile.am): Likewise.
768         * modules/memxor (Makefile.am): Likewise.
769         * modules/mkancesdirs (Makefile.am): Likewise.
770         * modules/mkdir (Makefile.am): Likewise.
771         * modules/mkdir-p (Makefile.am): Likewise.
772         * modules/mkdtemp (Makefile.am): Likewise.
773         * modules/mkstemp (Makefile.am): Likewise.
774         * modules/mktime (Makefile.am): Likewise.
775         * modules/modechange (Makefile.am): Likewise.
776         * modules/mountlist (Makefile.am): Likewise.
777         * modules/nanosleep (Makefile.am): Likewise.
778         * modules/openat (Makefile.am): Likewise.
779         * modules/pagealign_alloc (Makefile.am): Likewise.
780         * modules/physmem (Makefile.am): Likewise.
781         * modules/poll (Makefile.am): Likewise.
782         * modules/posixtm (Makefile.am): Likewise.
783         * modules/posixver (Makefile.am): Likewise.
784         * modules/putenv (Makefile.am): Likewise.
785         * modules/quote (Makefile.am): Likewise.
786         * modules/quotearg (Makefile.am): Likewise.
787         * modules/raise (Makefile.am): Likewise.
788         * modules/read-file (Makefile.am): Likewise.
789         * modules/readline (Makefile.am): Likewise.
790         * modules/readlink (Makefile.am): Likewise.
791         * modules/readtokens (Makefile.am): Likewise.
792         * modules/readutmp (Makefile.am): Likewise.
793         * modules/realloc (Makefile.am): Likewise.
794         * modules/regex (Makefile.am): Likewise.
795         * modules/rename (Makefile.am): Likewise.
796         * modules/rename-dest-slash (Makefile.am): Likewise.
797         * modules/rijndael (Makefile.am): Likewise.
798         * modules/rmdir (Makefile.am): Likewise.
799         * modules/rpmatch (Makefile.am): Likewise.
800         * modules/safe-read (Makefile.am): Likewise.
801         * modules/safe-write (Makefile.am): Likewise.
802         * modules/same (Makefile.am): Likewise.
803         * modules/save-cwd (Makefile.am): Likewise.
804         * modules/savedir (Makefile.am): Likewise.
805         * modules/setenv (Makefile.am): Likewise.
806         * modules/settime (Makefile.am): Likewise.
807         * modules/sha1 (Makefile.am): Likewise.
808         * modules/sig2str (Makefile.am): Likewise.
809         * modules/snprintf (Makefile.am): Likewise.
810         * modules/stdlib-safer (Makefile.am): Likewise.
811         * modules/stpcpy (Makefile.am): Likewise.
812         * modules/stpncpy (Makefile.am): Likewise.
813         * modules/strcase (Makefile.am): Likewise.
814         * modules/strcasestr (Makefile.am): Likewise.
815         * modules/strchrnul (Makefile.am): Likewise.
816         * modules/strcspn (Makefile.am): Likewise.
817         * modules/strdup (Makefile.am): Likewise.
818         * modules/strerror (Makefile.am): Likewise.
819         * modules/strftime (Makefile.am): Likewise.
820         * modules/strndup (Makefile.am): Likewise.
821         * modules/strnlen (Makefile.am): Likewise.
822         * modules/strpbrk (Makefile.am): Likewise.
823         * modules/strsep (Makefile.am): Likewise.
824         * modules/strstr (Makefile.am): Likewise.
825         * modules/strtod (Makefile.am): Likewise.
826         * modules/strtoimax (Makefile.am): Likewise.
827         * modules/strtok_r (Makefile.am): Likewise.
828         * modules/strtol (Makefile.am): Likewise.
829         * modules/strtoll (Makefile.am): Likewise.
830         * modules/strtoul (Makefile.am): Likewise.
831         * modules/strtoull (Makefile.am): Likewise.
832         * modules/strtoumax (Makefile.am): Likewise.
833         * modules/strverscmp (Makefile.am): Likewise.
834         * modules/time_r (Makefile.am): Likewise.
835         * modules/timegm (Makefile.am): Likewise.
836         * modules/tmpfile-safer (Makefile.am): Likewise.
837         * modules/unistd-safer (Makefile.am): Likewise.
838         * modules/unlinkdir (Makefile.am): Likewise.
839         * modules/userspec (Makefile.am): Likewise.
840         * modules/utime (Makefile.am): Likewise.
841         * modules/utimecmp (Makefile.am): Likewise.
842         * modules/utimens (Makefile.am): Likewise.
843         * modules/vasnprintf (Makefile.am): Likewise.
844         * modules/vasprintf (Makefile.am): Likewise.
845         * modules/vsnprintf (Makefile.am): Likewise.
846         * modules/xalloc (Makefile.am): Likewise.
847         * modules/xgetcwd (Makefile.am): Likewise.
848         * modules/xnanosleep (Makefile.am): Likewise.
849         * modules/xreadlink (Makefile.am): Likewise.
850         * modules/xstrtod (Makefile.am): Likewise.
851         * modules/xstrtol (Makefile.am): Likewise.
852         * modules/xstrtold (Makefile.am): Likewise.
853         * modules/yesno (Makefile.am): Likewise.
854
855 2006-10-12  Jim Meyering  <jim@meyering.net>
856
857         * m4/getloadavg.m4: Revert the change below.
858
859         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
860         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
861         fail with a symlink, which is what coreutils' ./bootstrap now
862         creates by default.
863
864 2006-10-12  Bruno Haible  <bruno@clisp.org>
865
866         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
867         mingw.
868         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
869         MSVC and mingw explicitly.
870
871 2006-10-11  Simon Josefsson  <jas@extundo.com>
872             Bruno Haible  <bruno@clisp.org>
873
874         Add support for multiple gnulib-tool invocations in the scope of a
875         single configure.ac file.
876         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
877         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
878         with the same contents as the _LIBADD variable.
879         (func_emit_initmacro_start, func_emit_initmacro_end,
880         func_emit_initmacro_done): New functions.
881         (func_import, func_create_testdir): Invoke them. Allow the identifiers
882         gl_LIBOBJS and gl_LTLIBOBJS.
883
884 2006-10-11  Bruno Haible  <bruno@clisp.org>
885
886         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
887         (func_create_testdir): Don't create po/Makefile.am, don't invoke
888         autoreconf. Instead, invoke autopoint explicitly but move back the
889         *.m4 files from gnulib.
890
891 2006-10-11  Bruno Haible  <bruno@clisp.org>
892
893         * gnulib-tool (func_usage): Make module names after --create-testdir
894         optional.
895         (func_create_testdir): If no module was specified, use nearly all
896         modules.
897
898 2006-10-12  Jim Meyering  <jim@meyering.net>
899
900         Big performance improvement for fts-based tools that use FTS_NOSTAT.
901         Avoid spurious inode-mismatch problems on non-POSIX file systems.
902         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
903         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
904         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
905         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
906         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
907         (fts_set_stat_required): New function.
908         (fts_open): Defer the calls to fts_stat, if possible or requested.
909         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
910         into fts_stat itself.
911         (fts_read): Perform any required (deferred) fts_stat call.
912         (fts_build): Likewise, for the directory we're about to open and read.
913         In the readdir loop, carefully decide whether each entry will require
914         an eventual call to fts_stat, using dirent.d_type info if available.
915         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
916         a command line argument into this function.  Update all callers.
917         Map a return value of FTS_DOT to FTS_D for a command line argument.
918         * modules/fts (Depends-on): Add d-type.  Alphabetize.
919         Thanks to Miklos Szeredi for his tenacity and for the initial
920         bug report about "find" failing on a FUSE-based file system.
921
922         * lib/fts.c (fts_open): Use consistent indentation.
923
924 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
925
926         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
927         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
928         reported by Jim Meyering.  All uses of cache variables renamed
929         to match Autoconf's.
930         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
931         the other one.
932
933         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
934         Fix misspelling in diagnostic.
935
936 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
937
938         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
939         defined.  Problem reported by Matthew Woehlke.
940
941         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
942         Add support for Tandem NonStop R series.
943         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
944         Use new macro.
945
946         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
947         (has_trailing_slash): Omit size arg; all callers changed.
948         Omit 'inline', since it doesn't help performance and we'd
949         need to configure it.
950         Don't count //, ///, etc. as having a trailing slash.
951         As a side effect, this removes a C99ism reported by Matthew Woehlke.
952         (rpl_rename_dest_slash): On failure, use rename's errno rather
953         than (in some cases) an incorrect or junk errno.
954         Simplify code by removing need to compute length; this does
955         cause it to make two passes instead of one over the file name,
956         but it's worth it.
957
958         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
959         change, since Autoconf's version may no longer be appropriate now
960         that we are using CVS Autoconf's version.  Add support for Tandem.
961
962 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
963             Bruno Haible  <bruno@clisp.org>
964
965         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
966         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
967         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
968         gl_AC_TYPE_LONG_LONG.
969
970         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
971         instead of HAVE_LONG_LONG.
972         * lib/printf-args.c (printf_fetchargs): Likewise.
973         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
974         * lib/vasnprintf.c (VASNPRINTF): Likewise.
975         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
976         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
977         gl_AC_TYPE_LONG_LONG.
978
979 2006-10-11  Bruno Haible  <bruno@clisp.org>
980
981         * m4/longlong.m4: Add comments.
982         * m4/ulonglong.m4: Likewise.
983
984 2006-10-10  Bruno Haible  <bruno@clisp.org>
985
986         Make it possible to #define stpcpy, strdup to aliases.
987         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
988         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
989
990 2006-10-10  Bruno Haible  <bruno@clisp.org>
991
992         Make it possible to #define gcd to an alias.
993         * lib/gcd.c: Include config.h.
994
995 2006-10-10  Bruno Haible  <bruno@clisp.org>
996
997         Make it possible to #define c_isascii to an alias.
998         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
999         defined. Undefine the macros before defining them, to avoid gcc
1000         warnings.
1001         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
1002         define NO_C_CTYPE_MACROS early.
1003
1004 2006-10-10  Bruno Haible  <bruno@clisp.org>
1005
1006         Make it possible to #define set_program_name to an alias.
1007         * lib/progname.c: Don't undefine set_program_name; instead, undefine
1008         ENABLE_RELOCATABLE early.
1009
1010 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
1011
1012         Port to Tandem NSK OSS, which has 64-bit signed int but at most
1013         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
1014         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
1015         More generally, don't assume that 64-bit signed int is available
1016         if unsigned int is, and vice versa.
1017         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
1018         unsigned symbols, not on their signed counterparts.
1019         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
1020         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
1021         (UINT64_C, UINTMAX_C):
1022         Likewise.
1023         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
1024         unsigned counterparts.
1025         (Have_long_long, Unsigned): New macros.
1026         (Int): Renamed from INT.
1027         (strtoimax): Use the new macros.
1028         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
1029         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
1030         * modules/inttypes (inttypes.h): Substitute
1031         HAVE_UNSIGNED_LONG_LONG_INT.
1032         * modules/stdint (stdint.h): Likewise.
1033         (Files): Add m4/ulonglong.m4.
1034
1035 2006-10-10  Bruno Haible  <bruno@clisp.org>
1036
1037         Fix a gcc -Wshadow warning.
1038         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
1039         to 'bucket'.
1040         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
1041         gl_linked_indexof_from_to): Likewise.
1042         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
1043         Likewise.
1044         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
1045         Likewise.
1046         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
1047         Reported by Eric Blake.
1048
1049 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
1050
1051         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
1052         for NetBSD.  Problem reported by Bruno Haible.
1053
1054 2006-10-09  Jim Meyering  <jim@meyering.net>
1055
1056         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
1057         Patch from Bruno Haible.
1058
1059 2006-10-09  Jim Meyering  <jim@meyering.net>
1060
1061         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
1062         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
1063         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
1064
1065 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1066
1067         Don't include <config.h> twice; this doesn't work in some cases,
1068         e.g., when config.h has "#define intmax_t long long int" and
1069         we include <config.h>, <inttypes.h>, <config.h> in that order.
1070         Problem reported by Matthew Woehlke in:
1071         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
1072         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
1073         * lib/fts-cycle.c: Don't include config.h.
1074         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
1075         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
1076         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
1077         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
1078         inttypes.h.
1079         * lib/xstrtoumax.c: Likewise.
1080         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
1081         __strtol and the like, so that this module is more like its siblings.
1082         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
1083         Remove; no longer needed now that we assume gnulib inttypes.h.
1084
1085 2006-10-08  Bruno Haible  <bruno@clisp.org>
1086
1087         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
1088         option.
1089
1090 2006-10-07  Jim Meyering  <jim@meyering.net>
1091
1092         * modules/inttypes (inttypes.h): Revert what seems to have been
1093         an inadvertent part of today's change: use "|", not "/" in the
1094         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
1095
1096 2006-10-07  Bruno Haible  <bruno@clisp.org>
1097
1098         * modules/sublist: New file.
1099
1100 2006-10-07  Bruno Haible  <bruno@clisp.org>
1101
1102         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
1103         * modules/argz (argz.h): Likewise.
1104         * modules/arpa_inet (arpa/inet.h): Likewise.
1105         * modules/byteswap (byteswap.h): Likewise.
1106         * modules/configmake (configmake.h): Likewise.
1107         * modules/fcntl (fcntl.h): Likewise.
1108         * modules/fnmatch (fnmatch.h): Likewise.
1109         * modules/getopt (getopt.h): Likewise.
1110         * modules/glob (glob.h): Likewise.
1111         * modules/inttypes (inttypes.h): Likewise.
1112         * modules/netinet_in (netinet/in.h): Likewise.
1113         * modules/poll (poll.h): Likewise.
1114         * modules/stdbool (stdbool.h): Likewise.
1115         * modules/stdint (stdint.h): Likewise.
1116         * modules/sys_select (sys/select.h): Likewise.
1117         * modules/sys_socket (sys/socket.h): Likewise.
1118         * modules/sys_stat (sys/stat.h): Likewise.
1119         * modules/sysexits (sysexits.h): Likewise.
1120         * modules/unistd (unistd.h): Likewise.
1121         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1122         Add a "DO NOT EDIT" comment to the generated file.
1123         (func_import): Likewise for gnulib-comp.m4.
1124
1125 2006-10-07  Bruno Haible  <bruno@clisp.org>
1126
1127         * lib/gl_sublist.h: New file.
1128         * lib/gl_sublist.c: New file.
1129
1130 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
1131
1132         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
1133         name (relative to the original working directory) and the file
1134         name component (relative to the temporary working directory).  All
1135         callers changed.
1136         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
1137         * lib/mkdir-p.c (make_dir_parents): Likewise.
1138         * lib/mkdir-p.h (make_dir_parents): Likewise.
1139
1140 2006-10-06  Eric Blake  <ebb9@byu.net>
1141
1142         Define several macros for use by the clean-temp module.
1143         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
1144         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
1145         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
1146
1147         * lib/clean-temp.h (close_stream_temp): New declaration.
1148         * lib/clean-temp.c (includes): Pull in headers according to what
1149         other modules are in use.
1150         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
1151
1152 2006-10-06  Bruno Haible  <bruno@clisp.org>
1153
1154         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
1155         instead of fopen, fwriteerror.
1156
1157 2006-10-06  Bruno Haible  <bruno@clisp.org>
1158
1159         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
1160         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
1161         int.
1162         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
1163         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
1164         Return an error indicator.
1165         Suggested by Eric Blake.
1166
1167 2006-10-06  Bruno Haible  <bruno@clisp.org>
1168
1169         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
1170         Reported by Eric Blake.
1171
1172 2006-10-06  Bruno Haible  <bruno@clisp.org>
1173
1174         * modules/closeout (Description): Mention stderr too.
1175
1176 2006-10-06  Bruno Haible  <bruno@clisp.org>
1177         and Paul Eggert  <eggert@cs.ucla.edu>
1178
1179         * lib/closeout.c (close_stdout): Also close stderr.
1180         * lib/closeout.h: Update comment.
1181
1182 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
1183
1184         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
1185         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
1186         * lib/dirchownmod.c: Include lchown.h.
1187         * lib/lchown.c: Don't include files that lchown.h now includes.
1188         Don't declare chown, since lchown.h now does that.
1189         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
1190         (lchown): Define to rpl_chown if lchown is declared but
1191         does not exist.  Declare using a prototype if lchown is not
1192         declared.  Add a copyright notice.
1193         * lib/mkstemp.h: Include <unistd.h>.
1194         * lib/openat.c: Include lchown.h.
1195
1196         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
1197         we now test for that separately.
1198         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
1199         rather than O_NOFOLLOW, when testing whether it's possible to
1200         avoid a race condition reliably.
1201         * lib/savewd.c (savewd_chdir): Likewise.
1202
1203         Remove macros that are no longer needed now that stdint.h is
1204         reliable.
1205         * lib/fsusage.c (UINTMAX_MAX): Remove.
1206         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
1207         * lib/utimecmp.c (SIZE_MAX): Remove.
1208
1209         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
1210
1211         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
1212         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
1213         O_NOATIME works.
1214
1215 2006-10-05  Bruno Haible  <bruno@clisp.org>
1216
1217         * lib/gl_list.h (gl_sortedlist_search_from_to,
1218         gl_sortedlist_indexof_from_to): New declarations.
1219         (gl_list_implementation): New fields sortedlist_search_from_to,
1220         sortedlist_indexof_from_to.
1221         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
1222         inline functions.
1223         * lib/gl_list.c (gl_sortedlist_search_from_to,
1224         gl_sortedlist_indexof_from_to): New functions.
1225         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
1226         function.
1227         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
1228         (gl_array_sortedlist_search_from_to): New function.
1229         (gl_array_list_implementation): Update.
1230         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
1231         function.
1232         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
1233         (gl_carray_sortedlist_search_from_to): New function.
1234         (gl_carray_list_implementation): Update.
1235         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
1236         gl_linked_sortedlist_indexof_from_to): New functions.
1237         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
1238         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
1239         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
1240         gl_tree_sortedlist_indexof_from_to): New functions.
1241         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
1242         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
1243         Update.
1244         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
1245         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
1246         Update.
1247
1248 2006-10-05  Bruno Haible  <bruno@clisp.org>
1249
1250         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
1251         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
1252         (struct gl_list_implementation): Add fields search_from_to,
1253         indexof_from_to. Remove fields search, indexof.
1254         (gl_list_search): Use the search_from_to method.
1255         (gl_list_search_from, gl_list_search_from_to): New functions.
1256         (gl_list_indexof): Use the indexof_from_to method.
1257         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
1258         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
1259         (gl_list_search_from, gl_list_search_from_to): New functions.
1260         (gl_list_indexof): Use the indexof_from_to method.
1261         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
1262         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
1263         gl_array_indexof. Add start_index, end_index arguments.
1264         (gl_array_search_from_to): Renamed from gl_array_search. Add
1265         start_index, end_index arguments.
1266         (gl_array_remove, gl_array_list_implementation): Update.
1267         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
1268         gl_carray_indexof. Add start_index, end_index arguments.
1269         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
1270         start_index, end_index arguments.
1271         (gl_carray_remove, gl_carray_list_implementation): Update.
1272         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
1273         gl_linked_search. Add start_index, end_index arguments.
1274         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
1275         start_index, end_index arguments.
1276         (gl_linked_remove): Update.
1277         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
1278         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
1279         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
1280         field to 'size_t'.
1281         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
1282         gl_tree_search. Add start_index, end_index arguments.
1283         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
1284         start_index, end_index arguments.
1285         (gl_tree_remove): Update.
1286         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
1287         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
1288         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
1289         function.
1290         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
1291         gl_tree_search. Add start_index, end_index arguments.
1292         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
1293         start_index, end_index arguments.
1294         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
1295         Update.
1296         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
1297
1298 2006-10-05  Bruno Haible  <bruno@clisp.org>
1299
1300         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
1301
1302         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
1303         fwriteerror_temp): New declarations.
1304         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
1305         (descriptors): New variable.
1306         (cleanup): First, close the descriptors.
1307         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
1308         fclose_temp, fwriteerror_temp): New functions.
1309
1310 2006-10-04  Jim Meyering  <jim@meyering.net>
1311
1312         * lib/fts.c (fts_open): Tiny comment change.
1313
1314 2006-10-04  Bruno Haible  <bruno@clisp.org>
1315
1316         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
1317         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
1318         gl_LOCK_BODY.
1319         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
1320         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
1321         gl_LOCK_EARLY_BODY.
1322         (gl_LOCK): Require gl_LOCK_BODY.
1323
1324 2006-10-04  Bruno Haible  <bruno@clisp.org>
1325
1326         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
1327         (gl_oset_search_atleast): New declaration.
1328         (struct gl_oset_implementation): Add field 'search_atleast'.
1329         (gl_oset_search_atleast): New inline function.
1330         * lib/gl_oset.c (gl_oset_search_atleast): New function.
1331         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
1332         (gl_array_oset_implementation): Update.
1333         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
1334         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
1335         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
1336
1337 2006-10-04  Bruno Haible  <bruno@clisp.org>
1338
1339         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
1340
1341 2006-10-03  Bruno Haible  <bruno@clisp.org>
1342
1343         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
1344         from gl_avltreehash_list_implementation.
1345
1346 2006-10-03  Bruno Haible  <bruno@clisp.org>
1347
1348         * lib/gl_oset.c (gl_oset_add): Fix return type.
1349
1350 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
1351
1352         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
1353
1354 2006-10-02  Eric Blake  <ebb9@byu.net>
1355
1356         * modules/strnlen (Depends-on): Add extensions.
1357
1358 2006-10-02  Eric Blake  <ebb9@byu.net>
1359
1360         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
1361         definition in 2.60+.
1362
1363 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
1364
1365         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
1366         checks.
1367
1368 2006-10-02  Bruno Haible  <bruno@clisp.org>
1369
1370         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
1371         to the AUTOMAKE_OPTIONS.
1372         Reported by Jim Meyering.
1373
1374 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
1375
1376         Work around bug in Solaris 10 /proc file system:
1377         /proc/self/fd/NNN/.. isn't the parent directory of
1378         the directory whose file descriptor is NNN.  This needs to
1379         be worked around at run time, not compile time, since a
1380         program might be built on Solaris 8, where things work, and
1381         run on Solaris 10.
1382         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
1383         to use the following interface instead:
1384         (OPENAT_BUFFER_SIZE): New macro.
1385         (openat_proc_name): New function.
1386         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
1387         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
1388         Likewise.
1389         * lib/openat-proc.c: New file.
1390         * modules/openat (Files): Add lib/openat-proc.c.
1391         (Depends-on): Add same-inode, stdbool.
1392         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
1393
1394 2006-09-29  Bruno Haible  <bruno@clisp.org>
1395
1396         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
1397         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
1398         argument. Set stdout_closed before testing for ferror, not after.
1399         (fwriteerror, fwriteerror_no_ebadf): New functions.
1400
1401 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1402
1403         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
1404
1405 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
1406
1407         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
1408         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
1409
1410 2006-09-28  Jim Meyering  <jim@meyering.net>
1411
1412         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
1413         Include <unistd.h>.
1414
1415 2006-09-28  Bruno Haible  <bruno@clisp.org>
1416
1417         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
1418         * modules/linkedhash-list (Depends-on): Likewise.
1419         * modules/rbtreehash-list (Depends-on): Likewise.
1420
1421 2006-09-28  Bruno Haible  <bruno@clisp.org>
1422
1423         * lib/strndup.h: Simplify the redefinition of strndup.
1424         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
1425         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
1426
1427 2006-09-28  Bruno Haible  <bruno@clisp.org>
1428
1429         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
1430         * lib/gl_linkedhash_list.c: Likewise.
1431         * lib/gl_rbtreehash_list.c: Likewise.
1432
1433 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
1434
1435         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
1436         getaddrinfo.
1437
1438         * lib/__fpending.h: Don't include <stdio_ext.h> unless
1439         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
1440         it causes <stdio_ext.h> to cause a compile-time error.
1441         Problem reported by Nelson H. F. Beebe.
1442         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
1443         of HAVE_DECL___PENDING.
1444
1445         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
1446         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
1447         declaration.
1448
1449 2006-09-27  Jim Meyering  <jim@meyering.net>
1450
1451         This file could end up with a definition for a function
1452         named __strndup, rather than rpl_strndup on a system with
1453         incomplete weak_alias support.
1454         * lib/strndup.c (strndup): Rename from __strndup.
1455         Remove #defines that used to map __strndup to strndup.
1456         Don't use K&R prototypes.
1457         Remove LIBC-related code, since this file is not sync'd with glibc.
1458         * lib/strndup.h: Revamp, accordingly.
1459         * m4/strndup.m4: Modernize.
1460
1461 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
1462
1463         * modules/savewd (Depends-on): Add 'raise'.
1464         * lib/savewd.c: Include <signal.h>, for 'raise'.
1465
1466 2006-09-26  Jim Meyering  <jim@meyering.net>
1467
1468         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
1469         when we detect Darwin 8.7.0's acl_get_file bug.
1470         Rearrange to perform the new (below) run-test while $LIBS
1471         contains any acl-related library.  Set USE_ACL at the end.
1472         (gl_ACL_GET_FILE): New function.
1473
1474 2006-09-26  Eric Blake  <ebb9@byu.net>
1475
1476         * lib/verror.c: Include <config.h> unconditionally.
1477
1478 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
1479
1480         * modules/clock-time (Maintainer): Add self.
1481         * modules/getlogin_r (Depends-on): Add extensions.
1482
1483 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1484
1485         * modules/clock-time: New module.
1486         * modules/nanosleep (Depends-on): Add clock-time.
1487         * modules/gethrxtime (Depends-on): Likewise.
1488         * modules/gettime (Depends-on): Likewise.
1489         * modules/settime (Depends-on): Likewise.
1490
1491         * modules/fts-lgpl: Depend on openat.
1492         * modules/mkancesdirs: Depend on savewd.
1493         * modules/mkdir-p: Likewise.
1494
1495 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1496
1497         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
1498
1499         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
1500         `gl_have_arbitrary_file_name_length_limit' to
1501         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
1502         actually works between configure runs.
1503
1504 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1505             Bruno Haible  <bruno@clisp.org>
1506
1507         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
1508
1509 2006-09-25  Jim Meyering  <jim@meyering.net>
1510
1511         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
1512         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
1513
1514 2006-09-25  Eric Blake  <ebb9@byu.net>
1515
1516         * gnulib-tool (func_import, func_create_testdir): Fix typos in
1517         exec's in 2006-09-18 patch when shuffling fds.
1518
1519 2006-09-25  Bruno Haible  <bruno@clisp.org>
1520
1521         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
1522         Reported by Jim Meyering.
1523
1524 2006-09-24  Jim Meyering  <jim@meyering.net>
1525
1526         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
1527         compare a pointer against a literal "0".  That caused failures with
1528         at least HP-UX's hpcc.
1529
1530 2006-09-22  Simon Josefsson  <jas@extundo.com>
1531
1532         * modules/gc-sha1:
1533         * modules/gc-md4:
1534         * modules/gc-hmac-sha1:
1535         * modules/gc-hmac-md5:
1536         * modules/gc-des:
1537         * modules/gc-arcfour: Distribute more files.
1538
1539 2006-09-22  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1540
1541         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
1542         (gl_linked_iterator_from_to): Initialize struct completely.
1543         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
1544         (gl_tree_iterator_from_to): Likewise
1545         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
1546         * lib/gl_array_list.c [lint] (gl_array_iterator)
1547         (gl_array_iterator_from_to): Likewise.
1548         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
1549         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
1550         (gl_carray_iterator_from_to): Likewise.
1551
1552         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
1553         * lib/md4.c (md4_process_block): Remove unused variable.
1554         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
1555         parentheses for clarity.
1556
1557 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1558
1559         * modules/bison-i18n (Depends-on): Add gettext.
1560
1561 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1562
1563         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
1564         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
1565         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
1566         also add missing comma that caused broken test.
1567         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
1568         stdlib.h, for `abort'.
1569         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
1570         variables.
1571         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
1572         include unistd.h if present, for `rmdir'.
1573         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
1574         variables.
1575         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
1576         in the process include standard headers for prototypes.
1577         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
1578         gets declared on GNU/Linux.
1579         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
1580         unistd.h, for `rmdir'.
1581         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
1582
1583         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
1584         always true.
1585         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
1586
1587         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
1588
1589 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1590
1591         * gnulib-tool (func_version): Create output all at once.  This
1592         may help avoid triggering unnecessary SIGPIPEs, and at any
1593         rate it doesn't hurt.
1594
1595 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1596             Bruno Haible  <bruno@clisp.org>
1597
1598         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
1599         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1600         * m4/signed.m4 (bh_C_SIGNED): Likewise.
1601
1602         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
1603         (gl_FUNC_VASPRINTF): Invoke it.
1604
1605 2006-09-22  Bruno Haible  <bruno@clisp.org>
1606
1607         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
1608         getloadavg.c as first argument.
1609
1610 2006-09-22  Bruno Haible  <bruno@clisp.org>
1611
1612         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
1613         at the beginning of the gl_INIT macro.
1614         * modules/getloadavg (configure.ac): Pass $gl_source_base to
1615         gl_GETLOADAVG.
1616
1617 2006-09-22  Bruno Haible  <bruno@clisp.org>
1618
1619         * gnulib-tool (func_create_megatestdir): Don't include the config-h
1620         module.
1621         Suggested by Ralf Wildenhues.
1622
1623 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
1624
1625         Import this patch from libc:
1626
1627         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
1628
1629         * lib/regex_internal.c (re_string_reconstruct): Handle
1630         offset < pstr->valid_raw_len && pstr->offsets_needed case.
1631         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
1632         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
1633         re_string_context_at.
1634
1635         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
1636         now requires it.
1637         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
1638         gl_REGEX now does it for us.
1639         (gl_REGEX): Add test taken from
1640         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
1641
1642         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
1643         Check that large offsets work.  Modernize Autoconf usages.
1644         Prefer "yes" to mean a good thing rather than a bad.
1645         Don't put "#define mkstemp" in config.h, as this might interfere
1646         with standard system headers that "#define mkstemp mkstemp64".
1647
1648         * modules/mkstemp (Depends-on): Add extensions, so that
1649         mkstemp is visible on some platforms.
1650         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
1651         (Include): Change to "mkstemp.h" from <stdlib.h>.
1652         (Files): Add mkstemp.h.
1653
1654         * lib/mkstemp.h: New file, since some standard headers
1655         #define mkstemp.
1656         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
1657         Include "mkstemp.h".
1658         Make the _LIBC code resemble glibc original more,
1659         e.g., use K&R style.
1660         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
1661         (mkstemp): Remove, since mkstemp.h does this for us.
1662         * lib/stdlib--.h: Include mkstemp.h.
1663
1664         Import this patch from libc:
1665
1666         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
1667
1668         * lib/tempname.c (__gen_tempname): Change attempts_min
1669         into a macro.  Use preprocessor to decide how to initialize
1670         attempts [Coverity CID 67].
1671
1672 2006-09-20  Bruno Haible  <bruno@clisp.org>
1673
1674         * lib/mkdtemp.c: Import from libc.
1675         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
1676                 * sysdeps/posix/tempname.c (__gen_tempname): Change
1677                 attempts_min into a macro.  Use preprocessor to decide how to
1678                 initialize attempts [Coverity CID 67].
1679         2001-11-27  Paul Eggert  <eggert@twinsun.com>
1680                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
1681                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
1682
1683 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1684
1685         * gnulib-tool (func_exit): New function, to allow to pass the
1686         exit status portably through the trap.  Use everywhere.
1687         (--help, --version): Signal a write error.
1688         (trap): catch SIGPIPE, for write errors.
1689         Exit at the end of the trap, with the correct exit status.
1690
1691 2006-09-19  Karl Berry  <karl@gnu.org>
1692
1693         * doc/gnulib.texi: note about the license texinfo files.
1694
1695 2006-09-19  Eric Blake  <ebb9@byu.net>
1696
1697         * gnulib-tool: Avoid space-tab.
1698
1699 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
1700
1701         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
1702         that prevented coreutils 6.1 from building.  Problem reported
1703         by Petter Reinholdtsen.
1704
1705 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
1706
1707         * gnulib-tool (avoidlist): Fix typo that broke options like
1708         --avoid=lock that are used by coreutils bootstrap.
1709
1710 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
1711
1712         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
1713         more systematically.
1714
1715 2006-09-18  Jim Meyering  <jim@meyering.net>
1716
1717         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
1718
1719 2006-09-18  Bruno Haible  <bruno@clisp.org>
1720
1721         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
1722
1723 2006-09-18  Bruno Haible  <bruno@clisp.org>
1724
1725         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
1726         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
1727         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
1728         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
1729         * m4/gettext.m4: Require autoconf >= 2.52.
1730         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
1731         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
1732         of gl_cv_header_inttypes_h.
1733
1734 2006-09-18  Bruno Haible  <bruno@clisp.org>
1735
1736         * lib/javaversion.c: Include configmake.h.
1737
1738 2006-09-18  Bruno Haible  <bruno@clisp.org>
1739
1740         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
1741         avoid that the while loops be executed in a subshell.
1742
1743 2006-09-18  Bruno Haible  <bruno@clisp.org>
1744
1745         * MODULES.html.sh (func_module): Break long lines.
1746         Suggested by Bruce Korb <bkorb@gnu.org>.
1747
1748 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1749
1750         Speed up by a factor of 1.12.
1751         * gnulib-tool (nl): New variable.
1752         (func_import): Rewrite include directive extraction to only read each
1753         directive once.
1754
1755 2006-09-17  Bruno Haible  <bruno@clisp.org>
1756
1757         * modules/javaversion (Makefile.am): Remove DEFS setting.
1758         (Depends-on): Add configmake, for PKGDATADIR definition.
1759
1760 2006-09-17  Bruno Haible  <bruno@clisp.org>
1761
1762         * gnulib-tool (func_create_testdir): Rewrite all files at once.
1763
1764 2006-09-17  Bruno Haible  <bruno@clisp.org>
1765
1766         * gnulib-tool (func_append): New function, stolen from libtool.m4.
1767         (func_modules_transitive_closure, func_modules_add_dummy,
1768         func_modules_to_filelist, func_import, func_create_testdir,
1769         func_create_megatestdir, ...): Use it wherever possible.
1770         Suggested by Ralf Wildenhues.
1771
1772 2006-09-16  Karl Berry  <karl@gnu.org>
1773
1774         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
1775         to avoid sectioning errors.
1776         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
1777         [ifinfo]: blank line after @center-ed titles.
1778         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
1779         Spell FSF address consistently with others.
1780         (These changes approved by rms.)
1781
1782 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1783
1784         Speed up by a factor of 1.61.
1785         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
1786         already checked module names again.
1787
1788 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1789
1790         Speed up by a factor of 1.13.
1791         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
1792         for new_files, and the input to func_add_or_update.
1793
1794 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1795
1796         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
1797         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
1798
1799 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
1800
1801         * modules/mkancesdirs (Depends-on): Add fcntl.
1802         * modules/savewd: New file.
1803         * MODULES.html.sh (File system functions): Add savewd.
1804
1805         * modules/configmake (Makefile.am): Add support for the
1806         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
1807
1808 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
1809
1810         * m4/savewd.m4: New file.
1811
1812 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
1813
1814         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
1815         (dirchownmod): New arg FD.  All callers changed.
1816         Use FD rather than opening the directory ourself, as opening is
1817         now the caller's responsibility.
1818         * lib/dirchownmod.h: Likewise.
1819         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
1820         hosts that require <sys/types.h> before <sys/stat.h>.  Include
1821         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
1822         (test_dir): Remove.
1823         (mkancesdirs): Return length of prefix of FILE that has already
1824         been made, or -2 if there is a child doing the work.  Redo
1825         algorithm so that it is O(N) rather than O(N**2).  Optimize away
1826         ".", and treat ".." specially since it might stray back into
1827         already-created areas.  Use a subprocess if necessary.  New arg
1828         WD; all users changed.  MAKE_DIR function should now return 1
1829         if it creates a directory that is not readable.  Return -2 if
1830         a child process is spun off.
1831         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
1832         Adjust signature to match code.
1833         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
1834         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
1835         all users changed.
1836         * lib/savewd.c, savewd.h: New files.
1837
1838 2006-09-15  Jim Meyering  <jim@meyering.net>
1839
1840         * modules/rename-dest-slash: New module.
1841         * MODULES.html.sh (posix_compat): Add it here.
1842
1843         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
1844
1845 2006-09-15  Jim Meyering  <jim@meyering.net>
1846
1847         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
1848         file.
1849
1850         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
1851
1852 2006-09-15  Jim Meyering  <jim@meyering.net>
1853
1854         * lib/rename-dest-slash.c (has_trailing_slash): Use
1855         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
1856         (rpl_rename_dest_slash): Perform the cheaper trailing slash
1857         test before testing whether SRC is a directory.
1858         Suggestions from Bruno Haible.
1859
1860         Avoid a warning about an unused variable.
1861         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
1862         into the #ifdef block where it's used.
1863
1864         * lib/rename-dest-slash.c: New file.
1865
1866 2006-09-14  Bruno Haible  <bruno@clisp.org>
1867
1868         * lib/allocsa.c: Include <config.h> unconditionally.
1869         * lib/asnprintf.c: Likewise.
1870         * lib/asprintf.c: Likewise.
1871         * lib/c-strcasecmp.c: Likewise.
1872         * lib/c-strcasestr.c: Likewise.
1873         * lib/c-strncasecmp.c: Likewise.
1874         * lib/c-strstr.c: Likewise.
1875         * lib/classpath.c: Likewise.
1876         * lib/clean-temp.c: Likewise.
1877         * lib/concatpath.c: Likewise.
1878         * lib/copy-file.c: Likewise.
1879         * lib/csharpcomp.c: Likewise.
1880         * lib/csharpexec.c: Likewise.
1881         * lib/execute.c: Likewise.
1882         * lib/fatal-signal.c: Likewise.
1883         * lib/findprog.c: Likewise.
1884         * lib/fwriteerror.c: Likewise.
1885         * lib/gl_array_list.c: Likewise.
1886         * lib/gl_array_oset.c: Likewise.
1887         * lib/gl_avltree_list.c: Likewise.
1888         * lib/gl_avltree_oset.c: Likewise.
1889         * lib/gl_avltreehash_list.c: Likewise.
1890         * lib/gl_carray_list.c: Likewise.
1891         * lib/gl_linked_list.c: Likewise.
1892         * lib/gl_linkedhash_list.c: Likewise.
1893         * lib/gl_list.c: Likewise.
1894         * lib/gl_oset.c: Likewise.
1895         * lib/gl_rbtree_list.c: Likewise.
1896         * lib/gl_rbtree_oset.c: Likewise.
1897         * lib/gl_rbtreehash_list.c: Likewise.
1898         * lib/imaxabs.c: Likewise.
1899         * lib/imaxdiv.c: Likewise.
1900         * lib/javacomp.c: Likewise.
1901         * lib/javaexec.c: Likewise.
1902         * lib/javaversion.c: Likewise.
1903         * lib/linebreak.c: Likewise.
1904         * lib/localcharset.c: Likewise.
1905         * lib/lock.c: Likewise.
1906         * lib/mbchar.c: Likewise.
1907         * lib/mbswidth.c: Likewise.
1908         * lib/mkdtemp.c: Likewise.
1909         * lib/pipe.c: Likewise.
1910         * lib/printf-args.c: Likewise.
1911         * lib/printf-parse.c: Likewise.
1912         * lib/progname.c: Likewise.
1913         * lib/progreloc.c: Likewise.
1914         * lib/readlink.c: Likewise.
1915         * lib/sh-quote.c: Likewise.
1916         * lib/stpcpy.c: Likewise.
1917         * lib/stpncpy.c: Likewise.
1918         * lib/strcasecmp.c: Likewise.
1919         * lib/strcasestr.c: Likewise.
1920         * lib/strcspn.c: Likewise.
1921         * lib/striconv.c: Likewise.
1922         * lib/strncasecmp.c: Likewise.
1923         * lib/strnlen1.c: Likewise.
1924         * lib/strstr.c: Likewise.
1925         * lib/strtok_r.c: Likewise.
1926         * lib/tls.c: Likewise.
1927         * lib/tmpdir.c: Likewise.
1928         * lib/unicodeio.c: Likewise.
1929         * lib/unsetenv.c: Likewise.
1930         * lib/vasnprintf.c: Likewise.
1931         * lib/vasprintf.c: Likewise.
1932         * lib/wait-process.c: Likewise.
1933         * lib/xallocsa.c: Likewise.
1934         * lib/xsetenv.c: Likewise.
1935         * lib/xstriconv.c: Likewise.
1936
1937 2006-09-13  Simon Josefsson  <jas@extundo.com>
1938
1939         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
1940         that internally, suggested by Ralf Wildenhues
1941         <Ralf.Wildenhues@gmx.de>.
1942
1943 2006-09-13  Simon Josefsson  <jas@extundo.com>
1944
1945         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
1946         @LIBOBJS@.
1947         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1948
1949 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
1950
1951         * lib/_fpending.c: Include <config.h> unconditionally, since we no
1952         longer worry about uses that don't define HAVE_CONFIG_H.
1953         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
1954         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
1955         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
1956         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
1957         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
1958         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
1959         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
1960         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
1961         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
1962         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
1963         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
1964         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
1965         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
1966         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
1967         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
1968         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
1969         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
1970         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
1971         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
1972         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
1973         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
1974         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
1975         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
1976         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
1977         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
1978         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
1979         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
1980         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
1981         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
1982         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
1983         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
1984         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
1985         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
1986         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
1987         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
1988         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
1989         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
1990         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
1991         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
1992         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
1993         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
1994         Likewise.
1995
1996 2006-09-13  Eric Blake  <ebb9@byu.net>
1997
1998         * lib/getopt.c: Fix typo in last commit.
1999
2000 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2001
2002         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
2003         dgettext.
2004
2005 2006-09-12  Jim Meyering  <jim@meyering.net>
2006
2007         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
2008         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
2009         Reported by Nelson H. F. Beebe.
2010
2011 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
2012
2013         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
2014         program_invocation_name and program_invocation_short_name are
2015         initialized.
2016         * lib/argp-namefrob.h: Move declarations of program_invocation_name
2017         and program_invocation_short_name to argp.h, so they are visible
2018         to user programs.
2019         * lib/argp.h: Likewise
2020
2021 2006-09-10  Bruno Haible  <bruno@clisp.org>
2022
2023         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
2024         m4/inttypes_h.m4, m4/uintmax_t.m4.
2025
2026 2006-09-10  Bruno Haible  <bruno@clisp.org>
2027
2028         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
2029         gl_AC_TYPE_UINTMAX_T.
2030
2031 2006-09-10  Bruno Haible  <bruno@clisp.org>
2032
2033         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
2034
2035 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
2036
2037         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
2038         convention.  Text proposed by Bruno Haible.
2039         (struct argp_option): Document the use of N_() wrappers.
2040
2041         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
2042         '\v', and translate the two parts separately, instead of feeding
2043         the whole string to gettext.  This allows to exclude
2044         '\v' from the strings visible to the translator by writing doc
2045         strings as N_("..") "\v" N_("..").
2046
2047 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
2048
2049         * config/srclist.txt: Undo latest change; the bug was fixed.
2050
2051 2006-09-09  Bruno Haible  <bruno@clisp.org>
2052
2053         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
2054         assignments if building a library without libtool.
2055         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
2056         in func_emit_lib_Makefile_am.
2057         (func_import): When building a static library libfoo.a, arrange to
2058         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
2059         (func_create_testdir): Likewise.
2060         * modules/gc (configure.ac, Makefile.am): If building statically,
2061         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
2062         * modules/iconvme (configure.ac, Makefile.am): Likewise.
2063         * modules/striconv (configure.ac, Makefile.am): Likewise.
2064         Based on a suggestion by Ralf Wildenhues.
2065
2066 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2067
2068         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2069         Check for unistd.h too, since Autoconf doesn't assume POSIX.
2070         Also:
2071
2072         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2073         Add year_2050_test to catch glibc bug 2821
2074         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
2075
2076         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
2077         Prefer #ifdef to #if.
2078
2079         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
2080         Return from 'main' instead of calling 'exit'.
2081
2082 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2083
2084         * lib/mktime.c (guess_time_tm): Fix bug where mktime
2085         returned the maximum time_t value rather than (time_t) -1.
2086         Problem originally reported by William Bardwell
2087         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
2088
2089         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
2090         Moved to here ...
2091         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
2092         ... from here.
2093
2094 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
2095
2096         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
2097         2821 is fixed.
2098
2099 2006-09-08  Jim Meyering  <jim@meyering.net>
2100
2101         Don't make generated files read-only.  That would bother too many
2102         people.  However, do retain the ability to work when targets are
2103         read-only: remove the destination and temporary files before writing
2104         them (when generated via sed or echo), or by using the -f option for
2105         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
2106         * modules/alloca-opt, modules/argz, modules/arpa_inet:
2107         * modules/byteswap, modules/configmake, modules/fcntl:
2108         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
2109         * modules/localcharset, modules/netinet_in, modules/poll:
2110         * modules/stdbool, modules/stdint, modules/sys_select:
2111         * modules/sys_socket, modules/sys_stat, modules/sysexits:
2112
2113 2006-09-08  Jim Meyering  <jim@meyering.net>
2114
2115         Avoid new build failure on FreeBSD 6.0.
2116         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
2117         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
2118         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
2119
2120 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2121
2122         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
2123
2124 2006-09-07  Jim Meyering  <jim@meyering.net>
2125
2126         Fix global typo in last change: use chmod u-w, not chmod u-x.
2127         Spotted by Paul Eggert and Bruce Korb.
2128         * modules/alloca-opt, modules/argz, modules/arpa_inet:
2129         * modules/byteswap, modules/configmake, modules/fcntl:
2130         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
2131         * modules/localcharset, modules/netinet_in, modules/poll:
2132         * modules/stdbool, modules/stdint, modules/sys_select:
2133         * modules/sys_socket, modules/sys_stat, modules/sysexits:
2134
2135 2006-09-06  Jim Meyering  <jim@meyering.net>
2136
2137         Make generated files be read-only.
2138         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
2139         Ensure that each generated file is now read-only.
2140         * modules/argz: Likewise.
2141         * modules/arpa_inet: Likewise.
2142         * modules/byteswap: Likewise.
2143         * modules/configmake: Likewise.
2144         * modules/fcntl: Likewise.
2145         * modules/fnmatch: Likewise.
2146         * modules/getopt: Likewise.
2147         * modules/glob: Likewise.
2148         * modules/inttypes: Likewise.
2149         * modules/netinet_in: Likewise.
2150         * modules/poll: Likewise.
2151         * modules/stdbool: Likewise.
2152         * modules/stdint: Likewise.
2153         * modules/sys_select: Likewise.
2154         * modules/sys_socket: Likewise.
2155         * modules/sys_stat: Likewise.
2156         * modules/sysexits: Likewise.
2157         * modules/localcharset: Same as above, but continue using temporary
2158         file named "t-$@" (why different?) rather than the "$@-t" used
2159         everywhere else.
2160
2161         * modules/sysexits (Makefile.am): Replace literal occurrences
2162         of "sysexit.h" more readable, and more consistent, "$@".
2163
2164 2006-09-06  Bruno Haible  <bruno@clisp.org>
2165
2166         * modules/striconv: New file.
2167         * modules/xstriconv: New file.
2168         * MODULES.html.sh (Internationalization functions): Add striconv,
2169         xstriconv.
2170
2171 2006-09-06  Bruno Haible  <bruno@clisp.org>
2172
2173         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
2174         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
2175         not using libtool correctly.
2176
2177 2006-09-06  Bruno Haible  <bruno@clisp.org>
2178
2179         * lib/striconv.h: New file.
2180         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
2181         iconvstring.c.
2182         * lib/xstriconv.h: New file.
2183         * lib/xstriconv.c: New file.
2184
2185 2006-09-06  Bruno Haible  <bruno@clisp.org>
2186
2187         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2188         lib_..._LDFLAGS.
2189
2190 2006-09-05  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2191
2192         * lib/argz_.h: Sync from Libtool.
2193
2194         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
2195                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2196
2197         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
2198
2199 2006-09-05  Davide Angelocola <davide.angelocola@tiscali.it>
2200
2201         * modules/trim: New file.
2202
2203 2006-09-05  Davide Angelocola <davide.angelocola@tiscali.it>
2204
2205         * lib/trim.h: New file.
2206         * lib/trim.c: New file.
2207
2208 2006-09-05  Bruno Haible  <bruno@clisp.org>
2209
2210         * MODULES.html.sh (String handling): Add trim.
2211
2212 2006-09-04  Karl Berry  <karl@gnu.org>
2213
2214         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
2215         until next release.
2216
2217 2006-09-03  Bruno Haible  <bruno@clisp.org>
2218
2219         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
2220         correctly.
2221
2222 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
2223
2224         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
2225         not gl_GETLOADAVG.  Omit unneeded semicolons.
2226         Problems reported by Ralf Wildenhues in
2227         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
2228         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
2229         at the end, which is the usual gnulib style.
2230
2231         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
2232         of doing all the work ourselves.
2233         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
2234         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
2235
2236 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
2237
2238         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
2239         Problem reported by Ralf Wildenhues in
2240         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
2241
2242         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
2243         HAVE_STRUCT_STATFS_F_FSTYPENAME.
2244
2245 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
2246
2247         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
2248         yesterday's patch by changing test -n to test -z.
2249
2250 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
2251
2252         * modules/getloadavg (Files): Add m4/getloadavg.m4.
2253         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
2254         the former is now obsolescent.
2255
2256         * modules/chdir-long (Depends-on): Add fcntl.
2257
2258 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
2259
2260         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
2261         obsolescent, and programs should use gnulib instead.
2262         * m4/getloadavg.m4: New file, with contents taken from Autoconf
2263         but with prefixes changed.
2264
2265 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
2266
2267         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
2268         or stdbool.h, because they might not exist while configuring.
2269
2270         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
2271         Don't include unistd.h or limits.h; not needed, since chdir-long.h
2272         does that for us.
2273         (O_DIRECTORY): Remove.
2274
2275 2006-08-31  Eric Blake  <ebb9@byu.net>
2276
2277         * gnulib-tool: Don't let emacs change spaces to TAB.
2278
2279 2006-08-31  Bruno Haible  <bruno@clisp.org>
2280
2281         * gnulib-tool: When calling func_import more than once, do it in a
2282         subshell.
2283         Reported by Eric Blake <ebb9@byu.net>.
2284
2285 2006-08-31  Bruno Haible  <bruno@clisp.org>
2286
2287         * gnulib-tool (nl): Remove variable.
2288         (sed_transform_lib_file): Use more robust test for config-h module.
2289         (func_import): Fix typo in 2006-08-25 patch.
2290
2291 2006-08-31  Bruno Haible  <bruno@clisp.org>
2292
2293         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
2294         specified, augment Makefile.am variables instead of assigning them.
2295
2296 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2297
2298         Work around a bug in both the Linux and SunOS 64-bit kernels:
2299         nanosleep mishandles sleeps for longer than 2**31 seconds.
2300         Problem reported by Frank v Waveren in
2301         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
2302         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
2303         Check for nanosleep bug.
2304         (LIB_NANOSLEEP): Append clock_gettime library if needed.
2305
2306 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2307
2308         Work around a bug in both the Linux and SunOS 64-bit kernels:
2309         nanosleep mishandles sleeps for longer than 2**31 seconds.
2310         Problem reported by Frank v Waveren in
2311         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
2312         * lib/nanosleep.c (BILLION): New constant.
2313         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
2314         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
2315         implementation.
2316
2317 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2318
2319         * modules/nanosleep (Depends-on): Add gettime.
2320
2321 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
2322         and Simon Josefsson  <jas@extundo.com>
2323         and Oskar Liljeblad  <oskar@osk.mine.nu>
2324
2325         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
2326         * gnulib-tool (func_import): New license type 'unmodifiable license
2327         text'.
2328         * modules/fdl: Use it.  Longer description.
2329         * module/gpl, module/lgpl: New files.
2330
2331 2006-08-30  Jim Meyering  <jim@meyering.net>
2332
2333         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
2334         shadowing the parameter.
2335
2336 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2337
2338         Sync from Libtool:
2339
2340         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2341
2342         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
2343         sharing with gnulib.  Report by Eric Blake.
2344
2345 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2346
2347         * modules/isapipe: New file.
2348         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
2349
2350 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2351
2352         * modules/configmake (Makefile.am): Add a comment, and omit
2353         the CONFIGMAKE_ prefix from generated macro names.  Suggested
2354         by Bruno Haible.
2355
2356 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2357
2358         * m4/isapipe.m4: New file.
2359
2360 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
2361
2362         * lib/isapipe.c, isapipe.h: New files.
2363
2364 2006-08-29  Jim Meyering  <jim@meyering.net>
2365
2366         * modules/configmake (Makefile.am): Make configmake.h depend on
2367         Makefile.  Otherwise, a stale configmake.h could hang around.
2368
2369 2006-08-29  Eric Blake  <ebb9@byu.net>
2370
2371         * lib/error.c (error_at_line, print_errno_message): Match libc, after
2372         resolution of upstream bug 3044.
2373
2374 2006-08-29  Bruno Haible  <bruno@clisp.org>
2375
2376         * modules/localcharset (Depends-on): Add configmake.
2377         (Makefile.am): Remove setting of LIBDIR through DEFS.
2378
2379 2006-08-29  Bruno Haible  <bruno@clisp.org>
2380
2381         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
2382         defined.
2383
2384 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2385
2386         * modules/fcntl: New file.
2387         * modules/chdir-safer (Depends-on): Add fcntl.
2388         * modules/fts: Likewise.
2389         * modules/mkdir-p: Likewise.
2390
2391         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
2392         This undoes the most recent change, since we're now addressing the
2393         problem in a different way.
2394
2395         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
2396         into output, since the output might be called Makefile.am even
2397         if $makefile_name is something different.
2398         (func_import): Use $makefile_am rather than
2399         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
2400         empty.
2401
2402         * modules/inttypes (Files): Add m4/inttypes-h.m4.
2403
2404 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2405
2406         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
2407         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
2408         recent change to stdint.m4, since we're now addressing the problem in a
2409         different way.
2410
2411 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2412
2413         * m4/fcntl_h.m4: New file.
2414
2415 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
2416
2417         * lib/fcntl_.h: New file.
2418         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
2419         the fcntl module.
2420         * lib/dirchownmod.c: Likewise.
2421         * lib/fts.c: Likewise.
2422
2423         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
2424         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
2425         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
2426         just before including <inttypes.h>, to avoid circular inclusion.
2427
2428 2006-08-28  Jim Meyering  <jim@meyering.net>
2429
2430         * doc/visibility.texi: Actually read and correct the grammar of the
2431         sentence affected by yesterday's change.
2432
2433 2006-08-28  Eric Blake  <ebb9@byu.net>
2434
2435         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
2436         needs wrapper.
2437
2438 2006-08-28  Eric Blake  <ebb9@byu.net>
2439
2440         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
2441
2442 2006-08-28  Eric Blake  <ebb9@byu.net>
2443
2444         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
2445
2446 2006-08-28  Bruno Haible  <bruno@clisp.org>
2447
2448         * modules/c-strstr: New file, from GNU gettext.
2449         * MODULES.html.sh (String handling): Add c-strstr.
2450
2451 2006-08-28  Bruno Haible  <bruno@clisp.org>
2452
2453         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
2454         macros.
2455         Reported by Eric Blake.
2456
2457 2006-08-28  Bruno Haible  <bruno@clisp.org>
2458
2459         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
2460         (VASNPRINTF): Return a string of length > INT_MAX without failing.
2461         * lib/vasprintf.c: Include errno.h, limits.h.
2462         (EOVERFLOW): New fallback definition.
2463         (vasprintf): Test here whether the string length is > INT_MAX.
2464         * lib/vsnprintf.c: Include errno.h, limits.h.
2465         (EOVERFLOW): New fallback definition.
2466         (vsnprintf): Fix bug when generated string was too long for the buffer.
2467         Test here whether the string length is > INT_MAX.
2468
2469 2006-08-28  Bruno Haible  <bruno@clisp.org>
2470
2471         * lib/inttypes_.h (SCNX*): Remove definitions.
2472         Reported by Eric Blake.
2473
2474 2006-08-28  Bruno Haible  <bruno@clisp.org>
2475
2476         * lib/c-strstr.h: New file, from GNU gettext.
2477         * lib/c-strstr.c: New file, from GNU gettext.
2478
2479 2006-08-28  Bruno Haible  <bruno@clisp.org>
2480
2481         * gnulib-tool: Reorder some statements.
2482
2483 2006-08-28  Bruno Haible  <bruno@clisp.org>
2484
2485         * gnulib-tool: New option --makefile-name.
2486         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
2487         $makefile_name.
2488         (func_import): Write $makefile_name to the cache file, and read it from
2489         there unless explicitly specified. Use $makefile_name as file name
2490         instead of Makefile.am. Adjust the recommendations accordingly.
2491
2492 2006-08-28  Bruno Haible  <bruno@clisp.org>
2493
2494         * gnulib-tool (func_verify_module): Check against misapplying patch.
2495
2496 2006-08-28  Bruno Haible  <bruno@clisp.org>
2497
2498         * gnulib-tool (func_relativize, func_relconcat): New functions.
2499         Give an error if --local-dir is given with --update.
2500         Remove trailing slashes from $local_gnulib_dir.
2501         (func_import): Store the relativized $local_gnulib_dir in
2502         gnulib-cache.m4, and read it from there if not specified explicitly.
2503
2504 2006-08-28  Bruno Haible  <bruno@clisp.org>
2505
2506         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
2507         is the current directory. Respect also $local_gnulib_dir.
2508
2509 2006-08-28  Bruno Haible  <bruno@clisp.org>
2510             Simon Josefsson  <jas@extundo.com>
2511
2512         BeOS portability.
2513         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
2514
2515 2006-08-27  Jim Meyering  <jim@meyering.net>
2516
2517         * doc/visibility.texi: Remove duplicate word: "pointer".
2518
2519 2006-08-26  Bruno Haible  <bruno@clisp.org>
2520
2521         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
2522         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
2523         (Makefile.am): Create inttypes.h from inttypes_.h.
2524         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
2525
2526         * modules/imaxabs: New file.
2527
2528         * modules/imaxdiv: New file.
2529
2530 2006-08-26  Bruno Haible  <bruno@clisp.org>
2531
2532         * m4/inttypes.m4: New file.
2533         * m4/_inttypes_h.m4: Remove file.
2534         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
2535         PRI_MACROS_BROKEN.
2536         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
2537
2538         * m4/imaxabs.m4: New file.
2539
2540         * m4/imaxdiv.m4: New file.
2541
2542 2006-08-26  Bruno Haible  <bruno@clisp.org>
2543
2544         * lib/inttypes_.h: New file.
2545         * lib/inttypes.h: Remove file.
2546         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
2547
2548         * lib/imaxabs.c: New file.
2549
2550         * lib/imaxdiv.c: New file.
2551
2552 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
2553
2554         New config-h module, so that "make" output needn't be cluttered
2555         by -DHAVE_CONFIG_H.
2556         * MODULES.html.sh (Support for building libraries and executables):
2557         Add config-h.
2558         * modules/config-h: New file.
2559         * gnulib-tool (nl, sed_transform_lib_file): New vars.
2560         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
2561         the config-h module is used.
2562
2563         New configmake module, so that "make" output needn't be cluttered
2564         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
2565         * MODULES.html.sh (Support for building libraries and executables):
2566         Add configmake.
2567         * modules/configmake: New file.
2568
2569 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
2570
2571         * m4/config-h.m4: New file.
2572
2573 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
2574
2575         * config/srclist.txt: Add elisp-comp.
2576
2577 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
2578
2579         * MODULES.html.sh (Support for building libraries and executables):
2580         Add elisp-comp.
2581         * build-aux/elisp-comp: New file.
2582         * modules/elisp-comp: New file.
2583
2584 2006-08-24  Bruno Haible <bruno@clisp.org>
2585
2586         * gnulib-tool (func_create_testdir): Use non-default values of
2587         sourcebase and m4base.
2588
2589 2006-08-24  Bruno Haible <bruno@clisp.org>
2590
2591         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
2592         HTML structure.
2593
2594 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
2595
2596         * modules/openat (Depends-on): Add lchown.
2597
2598 2006-08-23  Bruno Haible <bruno@clisp.org>
2599
2600         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
2601         of gl_LOCK_EARLY instead of gl_LOCK.
2602
2603 2006-08-23  Bruno Haible  <bruno@clisp.org>
2604
2605         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
2606         on OSF/1 to no.
2607         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
2608
2609 2006-08-23  Bruno Haible  <bruno@clisp.org>
2610
2611         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
2612         as unusable.
2613
2614         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
2615         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
2616         (gl_LOCK): New macro.
2617
2618 2006-08-22  Simon Josefsson  <jas@extundo.com>
2619
2620         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
2621         to md5 module.
2622
2623 2006-08-22  Simon Josefsson  <jas@extundo.com>
2624
2625         * MODULES.html.sh: Add "Support for maintaining and release
2626         projects".
2627
2628         * build-aux/gnupload: New file, from coreutils.
2629
2630 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
2631
2632         Avoid the need for AC_LIBSOURCES in m4 macros.
2633         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
2634         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
2635         * modules/check-version (EXTRA_DIST): Add check-version.h.
2636         * modules/crc (EXTRA_DIST): Add crc.h.
2637         * modules/des (EXTRA_DIST): Add des.h.
2638         * modules/gc (EXTRA_DIST): Add gc.h.
2639         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
2640         * modules/getline (EXTRA_DIST): Add getline.h.
2641         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
2642         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
2643         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
2644         * modules/md2 (EXTRA_DIST): Add md2.h.
2645         * modules/md4 (EXTRA_DIST): Add md4.h.
2646         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
2647         * modules/read-file (EXTRA_DIST): Add read-file.h.
2648         * modules/readline (EXTRA_DIST): Add readline.h.
2649         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
2650         rijndael-api-fst.h.
2651
2652 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
2653
2654         * m4/rijndael.m4 (gl_ARCFOUR):
2655         * m4/arctwo.m4 (gl_ARCTWO):
2656         * m4/check-version.m4 (gl_CHECK_VERSION):
2657         * m4/crc.m4 (gl_CRC):
2658         * m4/des.m4 (gl_DES):
2659         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
2660         * m4/gc.m4 (gl_GC):
2661         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
2662         * m4/getline.m4 (gl_FUNC_GETLINE):
2663         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
2664         * m4/hmac-md5.m4 (gl_HMAC_MD5):
2665         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
2666         * m4/md2.m4 (gl_MD2):
2667         * m4/md4.m4 (gl_MD4):
2668         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
2669         * m4/read-file.m4 (gl_FUNC_READ_FILE):
2670         * m4/readline.m4 (gl_FUNC_READLINE):
2671         * m4/rijndael.m4 (gl_RIJNDAEL):
2672         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
2673         to get the necessary .h files and whatnot.
2674
2675 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
2676
2677         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
2678         gnulib rather than the other way around.
2679         * config/srclistvars.sh (COREUTILS): Remove.
2680
2681 2006-08-22  Jim Meyering  <jim@meyering.net>
2682
2683         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
2684
2685         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
2686
2687 2006-08-22  Eric Blake  <ebb9@byu.net>
2688
2689         * modules/regexprops-generic: New file.
2690         * MODULES.html.sh (Support for building documentation): List it.
2691
2692 2006-08-22  Eric Blake  <ebb9@byu.net>
2693
2694         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
2695         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
2696         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
2697         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
2698
2699 2006-08-22  Bruno Haible <bruno@clisp.org>
2700
2701         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
2702         and lib_LTLIBRARIES like the other lib_* variables.
2703
2704 2006-08-22  Bruno Haible <bruno@clisp.org>
2705
2706         * build-aux/x-to-1.in: New file, from GNU gettext.
2707
2708 2006-08-22  Bruno Haible  <bruno@clisp.org>
2709
2710         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
2711         <utmpx.h> exists.
2712
2713 2006-08-22  Bruno Haible  <bruno@clisp.org>
2714
2715         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
2716         <utmpx.h> exists.
2717
2718 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
2719
2720         BeOS portability.
2721         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
2722         exist.
2723         Problem reported by Bruno Haible.
2724
2725 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
2726
2727         Avoid the need for AC_LIBSOURCES in m4 macros.
2728         * modules/acl (EXTRA_DIST): Add acl.h.
2729         * modules/argmatch (Files): Add m4/argmatch.m4.
2730         (configure.ac): Add gl_ARGMATCH.
2731         (EXTRA_DIST): Renamed from lib_SOURCES, for
2732         consistency with the other modules.  Remove argmatch.c.
2733         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
2734         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
2735         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
2736         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
2737         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
2738         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
2739         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
2740         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
2741         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
2742         * modules/closeout (EXTRA_DIST): Add closeout.h.
2743         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
2744         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
2745         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
2746         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
2747         dirname.h; remove basename.c and stripslash.c.
2748         * modules/exclude (EXTRA_DIST): Add exclude.h.
2749         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
2750         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
2751         * modules/file-type (EXTRA_DIST): Add file-type.h.
2752         * modules/filemode (EXTRA_DIST): Add filemode.h.
2753         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
2754         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
2755         * modules/fpending (EXTRA_DIST): Add __fpending.h.
2756         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
2757         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
2758         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
2759         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
2760         * modules/getdate (EXTRA_DIST): Add getdate.c.
2761         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
2762         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
2763         * modules/getpass (EXTRA_DIST): Add getpass.h.
2764         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
2765         * modules/group-member (EXTRA_DIST): Add group-member.h.
2766         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
2767         * modules/hash (EXTRA_DIST): Add hash.h.
2768         * modules/human (EXTRA_DIST): Add human.h.
2769         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
2770         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
2771         * modules/lchown (EXTRA_DIST): Add lchown.h.
2772         * modules/long-options (EXTRA_DIST): Add long-options.h.
2773         * modules/lstat (EXTRA_DIST): Add lstat.h.
2774         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
2775         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
2776         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
2777         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
2778         * modules/memxor (EXTRA_DIST): Add memxor.h.
2779         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
2780         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
2781         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
2782         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
2783         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
2784         * modules/physmem (EXTRA_DIST): Add physmem.h.
2785         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
2786         * modules/posixver (EXTRA_DIST): Add posixver.h.
2787         * modules/quote (EXTRA_DIST): Add quote.h.
2788         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
2789         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
2790         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
2791         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
2792         regex_internal.h regexec.c.
2793         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
2794         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
2795         * modules/same (EXTRA_DIST): Add same.h.
2796         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
2797         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
2798         * modules/savedir (EXTRA_DIST): Add savedir.h.
2799         * modules/sha1 (EXTRA_DIST): Add sha1.h.
2800         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
2801         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
2802         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
2803         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
2804         * modules/strdup (EXTRA_DIST): Add strdup.h.
2805         * modules/strftime (EXTRA_DIST): Add strftime.h.
2806         * modules/strndup (EXTRA_DIST): Add strndup.h.
2807         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
2808         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
2809         * modules/time_r (EXTRA_DIST): Add time_r.h.
2810         * modules/timespec (EXTRA_DIST): Add timespec.h.
2811         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
2812         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
2813         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
2814         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
2815         * modules/userspec (EXTRA_DIST): Add userspec.h.
2816         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
2817         * modules/utimens (EXTRA_DIST): Add utimens.h.
2818         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
2819         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
2820         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
2821         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
2822         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
2823         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
2824         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
2825         * modules/yesno (EXTRA_DIST): Add yesno.h.
2826
2827 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
2828
2829         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
2830
2831         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
2832         * m4/dev-ino.m4, same-inode.m4: Remove.
2833
2834         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
2835         * m4/acl.m4 (AC_FUNC_ACL):
2836         * m4/backupfile.m4 (gl_BACKUPFILE):
2837         * m4/c-strtod.m4 (gl_C99_STRTOLD):
2838         * m4/canon-host.m4 (gl_CANON_HOST):
2839         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2840         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
2841         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
2842         * m4/cloexec.m4 (gl_CLOEXEC):
2843         * m4/close-stream.m4 (gl_CLOSE_STREAM):
2844         * m4/closeout.m4 (gl_CLOSEOUT):
2845         * m4/dirfd.m4 (gl_FUNC_DIRFD):
2846         * m4/dirname.m4 (gl_DIRNAME):
2847         * m4/exclude.m4 (gl_EXCLUDE):
2848         * m4/exitfail.m4 (gl_EXITFAIL):
2849         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
2850         * m4/file-type.m4 (gl_FILE_TYPE):
2851         * m4/filemode.m4 (gl_FILEMODE):
2852         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
2853         * m4/fpending.m4 (gl_FUNC_FPENDING):
2854         * m4/fprintftime.m4 (gl_FPRINTFTIME):
2855         * m4/fts.m4 (gl_FUNC_FTS):
2856         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
2857         * m4/getdate.m4 (gl_GETDATE):
2858         * m4/gethrxtime.m4 (gl_GETHRXTIME):
2859         * m4/getpagesize.m4 (gl_GETPAGESIZE):
2860         * m4/getpass.m4 (gl_FUNC_GETPASS):
2861         * m4/gettime.m4 (gl_GETTIME):
2862         * m4/getugroups.m4 (gl_GETUGROUPS):
2863         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
2864         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
2865         * m4/hard-locale.m4 (gl_HARD_LOCALE):
2866         * m4/hash.m4 (gl_HASH):
2867         * m4/idcache.m4 (gl_IDCACHE):
2868         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
2869         * m4/lchown.m4 (gl_FUNC_LCHOWN):
2870         * m4/long-options.m4 (gl_LONG_OPTIONS):
2871         * m4/lstat.m4 (gl_FUNC_LSTAT):
2872         * m4/md5.m4 (gl_MD5):
2873         * m4/memcasecmp.m4 (gl_MEMCASECMP):
2874         * m4/memcoll.m4 (gl_MEMCOLL):
2875         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
2876         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
2877         * m4/memxor.m4 (gl_MEMXOR):
2878         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
2879         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
2880         * m4/modechange.m4 (gl_MODECHANGE):
2881         * m4/mountlist.m4 (gl_MOUNTLIST):
2882         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2883         * m4/openat.m4 (gl_FUNC_OPENAT):
2884         * m4/pathmax.m4 (gl_PATHMAX):
2885         * m4/physmem.m4 (gl_PHYSMEM):
2886         * m4/posixtm.m4 (gl_POSIXTM):
2887         * m4/posixver.m4 (gl_POSIXVER):
2888         * m4/quote.m4 (gl_QUOTE):
2889         * m4/quotearg.m4 (gl_QUOTEARG):
2890         * m4/readtokens.m4 (gl_READTOKENS):
2891         * m4/readutmp.m4 (gl_READUTMP):
2892         * m4/regex.m4 (gl_REGEX):
2893         * m4/safe-read.m4 (gl_SAFE_READ):
2894         * m4/safe-write.m4 (gl_SAFE_WRITE):
2895         * m4/same.m4 (gl_SAME):
2896         * m4/save-cwd.m4 (gl_SAVE_CWD):
2897         * m4/savedir.m4 (gl_SAVEDIR):
2898         * m4/settime.m4 (gl_SETTIME):
2899         * m4/sha1.m4 (gl_SHA1):
2900         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
2901         * m4/stat-macros.m4 (gl_STAT_MACROS):
2902         * m4/stat-time.m4 (gl_STAT_TIME):
2903         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
2904         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
2905         * m4/strdup.m4 (gl_FUNC_STRDUP):
2906         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
2907         * m4/strndup.m4 (gl_FUNC_STRNDUP):
2908         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
2909         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
2910         * m4/time_r.m4 (gl_TIME_R):
2911         * m4/timespec.m4 (gl_TIMESPEC):
2912         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
2913         * m4/unlinkdir.m4 (gl_UNLINKDIR):
2914         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
2915         * m4/userspec.m4 (gl_USERSPEC):
2916         * m4/utimecmp.m4 (gl_UTIMECMP):
2917         * m4/utimens.m4 (gl_UTIMENS):
2918         * m4/xalloc.m4 (gl_XALLOC):
2919         * m4/xgetcwd.m4 (gl_XGETCWD):
2920         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
2921         * m4/xreadlink.m4 (gl_XREADLINK):
2922         * m4/xstrtod.m4 (gl_XSTRTOD):
2923         * m4/yesno.m4 (gl_YESNO):
2924         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
2925         to get the necessary .h files and whatnot.
2926
2927 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
2928             Bruno Haible <bruno@clisp.org>
2929
2930         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
2931         /bin/sh understanding of '!' conditional negation.
2932
2933 2006-08-21  Jim Meyering  <jim@meyering.net>
2934
2935         * modules/openat (Depends-on): Really alphabetize.
2936
2937         * modules/acl (Depends-on): Add error and quote.
2938
2939         * check-module (find_included_lib_files): Add at-func.c to the
2940         ok-to-include-more-than-once white list.
2941
2942         * modules/openat (Depends-on): Add lstat.  Alphabetize.
2943
2944 2006-08-21  Bruno Haible <bruno@clisp.org>
2945
2946         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2947         Emit a pkgdata_DATA variable only if some snippets add contents to it.
2948         Reported by Martin Lambers <marlam@marlam.de>.
2949
2950 2006-08-21  Bruno Haible <bruno@clisp.org>
2951
2952         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
2953         specify an installation location, don't emit a noinst_LIBRARIES or
2954         noinst_LTLIBRARIES assignment.
2955
2956 2006-08-21  Bruno Haible  <bruno@clisp.org>
2957
2958         BeOS portability.
2959         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
2960         BeOS has mbrtowc() but no <wctype.h>.
2961
2962 2006-08-21  Bruno Haible  <bruno@clisp.org>
2963
2964         BeOS portability.
2965         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
2966         exist.
2967
2968 2006-08-21  Bruno Haible  <bruno@clisp.org>
2969
2970         BeOS portability.
2971         * lib/mbchar.h: Include <wctype.h> only if it exists.
2972
2973 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
2974
2975         Remove files that are no longer needed by their respective modules.
2976         * m4/obstack.m4: Remove.
2977         * m4/strerror_r.m4: Remove.
2978         * m4/uint32_t.m4: Remove.
2979         * m4/uintptr_t.m4: Remove.
2980         * m4/ullong_max.m4: Remove.
2981         * m4/xstrtoimax.m4: Remove.
2982         * m4/xstrtoumax.m4: Remove.
2983
2984         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
2985         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
2986         dependencies now capture this.
2987
2988         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
2989         Do not use AC_LIBSOURCES, since gnulib modules now do this.
2990         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
2991         * m4/human.m4 (gl_HUMAN): Likewise.
2992         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
2993         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
2994
2995         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
2996
2997         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
2998         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
2999         stdint.
3000         * m4/human.m4 (gl_HUMAN): Likewise.
3001         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
3002         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
3003         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3004         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3005         * m4/xstrtol (gl_XSTRTOL): Likewise.
3006
3007         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
3008         AC_TYPE_LONG_LONG_INT.
3009         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3010         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
3011         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
3012         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3013
3014         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
3015         on stdbool.
3016
3017         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
3018         (gl_PREREQ_XSTRTOUL): Remove.
3019
3020         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
3021
3022         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
3023         mode.
3024
3025 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3026
3027         Add and change modules to make it easier for coreutils to use
3028         gnulib-tool.
3029         * modules/backupfile (Files): Remove m4/d-ino.m4.
3030         (Depends-on): Add d-ino.
3031         * modules/cycle-check (Depends-on): Add stdint.
3032         (lib_SOURCES): Add cycle-check.h.
3033         * modules/d-ino: New module.
3034         * modules/d-type: New module.
3035         * modules/error (Files): Remove m4/strerror_r.m4.
3036         * modules/filemode (Files): Add m4/st_dm_mode.m4.
3037         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
3038         m4/inttypes_h.m4, m4/uintmax_t.m4.
3039         (Depends-on): Add stdint.
3040         (lib_SOURCES): Add fsusage.h.
3041         * modules/getcwd (Files): Remove d-ino.m4.
3042         (Depends-on): Add d-ino.
3043         * modules/getndelim2 (Depends-on): Add stdint.
3044         * modules/glob (Files): Remove m4/d-type.m4.
3045         (Depends-on): Add d-type.
3046         * modules/host-os: New module.
3047         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
3048         m4/inttypes_h.m4, m4/uintmax_t.m4.
3049         * Depends-on: Add stdint.
3050         (lib_SOURCES): Add human.h.
3051         * modules/inttostr (Files): Remove m4/intmax_t.m4,
3052         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
3053         m4/uintmax_t.m4, m4/ulonglong.m4.
3054         (Depends-on): Add stdint.
3055         (EXTRA_DIST): Add inttostr.h.
3056         * modules/lchmod: New module.
3057         * modules/link-follow: New module.
3058         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
3059         (Depends-on): Add lchmod.
3060         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
3061         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
3062         (Depends-on): Add stdint.
3063         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
3064         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3065         (Depends-on): Add stdint.
3066         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
3067         * modules/perl: New module.
3068         * modules/regex (Depends-on): Add stdint.
3069         * modules/rmdir-errno: New module.
3070         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
3071         m4/intmax_t.m4.
3072         (Depends-on): Add stdint.
3073         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
3074         m4/uintmax_t.m4.
3075         (Depends-on): Add stdint.
3076         * modules/unlink-busy: New module.
3077         * modules/utimecmp (Depends-on): Add stdint.
3078         * modules/uptime: New module.
3079         * modules/winsz-ioctl: New module.
3080         * modules/winsz-termios: New module.
3081         * modules/xnanosleep (Depends-on): Add nanosleep.
3082         * modules/ullong_max: Remove.
3083         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
3084         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
3085         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
3086         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
3087         (Depends-on): Add inttypes.
3088         (lib_SOURCES): Add xstrtol.h.
3089         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
3090         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
3091         * MODULES.html.sh: Move 'assert' into the assert section.
3092         Move 'dummy' into the linking section.
3093         Remove ullong_max.
3094         Add section for compatibility checks for POSIX:2001 functions,
3095         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
3096         winsz-ioctl, and winsz-termios into it.
3097         Add lchmod.
3098         Add top-level Misc section and put host-os, perl, and uptime
3099         into it.
3100
3101 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3102
3103         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
3104         now assume the stdint module.  Do not include inttypes.h.
3105         * lib/fsusage.h: Likewise.
3106         * lib/getndelim2.c: Likewise.
3107         * lib/human.h: Likewise.
3108         * lib/inttostr.h: Likewise.
3109         * lib/obstack.c: Likewise.
3110         * lib/regex_internal.h: Likewise.
3111         * lib/tempname.c: Likewise.
3112         * lib/utimecmp.c: Likewise.
3113         * lib/xstrtol.h: Likewise.
3114
3115         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
3116
3117         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
3118         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
3119         * lib/xtime.h: Likewise.
3120
3121 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
3122
3123         * modules/openat (Files): Add lib/fchmodat.c.
3124         Fixes problem reported by Jay Youngman.
3125
3126 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
3127
3128         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
3129         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
3130
3131 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
3132             Bruno Haible  <bruno@clisp.org>
3133
3134         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3135         and is a script that invokes bison. Tighten the code. Add comments.
3136
3137 2006-08-18  Jim Meyering  <jim@meyering.net>
3138
3139         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
3140         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
3141         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
3142         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
3143
3144 2006-08-18  Bruno Haible  <bruno@clisp.org>
3145
3146         * modules/bison-i18n: New file.
3147         * MODULES.html.sh (Internationalization functions): Add it.
3148
3149 2006-08-18  Bruno Haible  <bruno@clisp.org>
3150
3151         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
3152         sys/statvfs.h. When getmntinfo was found, check its declaration and
3153         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
3154
3155 2006-08-18  Bruno Haible  <bruno@clisp.org>
3156
3157         * m4/bison-i18n.m4: New file, from bison.
3158
3159 2006-08-18  Bruno Haible  <bruno@clisp.org>
3160
3161         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
3162         (ME_DUMMY): Treat "kernfs" as a dummy.
3163         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
3164
3165 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
3166
3167         Update from coreutils.
3168
3169         2006-08-15  Jim Meyering  <jim@meyering.net>
3170
3171         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
3172
3173         2006-01-17  Jim Meyering  <jim@meyering.net>
3174
3175         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
3176
3177         2006-01-11  Jim Meyering  <jim@meyering.net>
3178
3179         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
3180         Check for the lchmod function.
3181
3182 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
3183
3184         Update from coreutils.
3185
3186         * lib/__fpending.h: Add copyright notice.
3187         * lib/fprintftime.h: Likewise.
3188         * lib/savedir.c: Use (C) in copyright notice.
3189         * lib/savedir.h: Likewise.
3190
3191         2006-08-15  Jim Meyering  <jim@meyering.net>
3192
3193         * lib/at-func.c: New file, with the logic of all emulated at-functions.
3194         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
3195         in support of the EXPECTED_ERRNO macro.
3196         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
3197         definitions.  Instead, define the appropriate symbols and include
3198         "at-func.c".
3199         * lib/mkdirat.c (mkdirat): Likewise.
3200         * lib/fchmodat.c (fchmodat): Likewise.
3201         (ENOSYS): Remove definition.
3202         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
3203         it.  Don't include "unistd--.h" -- it wasn't ever used.
3204
3205         2006-01-17  Jim Meyering  <jim@meyering.net>
3206
3207         Rewrite fts.c not to change the current working directory,
3208         by using openat, fstatat, fdopendir, etc..
3209
3210         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
3211         (HAVE_OPENAT_SUPPORT): Define.
3212         [_LIBC] (fchdir): Don't undef or define; no longer used.
3213         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
3214         Now, this `function' always succeeds, and consumes its file descriptor
3215         parameter -- so callers must not close such FDs.  Update callers.
3216         (diropen_fd, opendirat, cwd_advance_fd): New functions.
3217         (diropen): Add parameter, SP.  Adjust all callers.
3218         Implement using diropen_fd, rather than open.
3219         (fts_open): Initialize new member, fts_cwd_fd.
3220         Remove fts_rft-setting code.
3221         (fts_close): Close fts_cwd_fd, if necessary.
3222         (__opendir2): Define in terms of opendir or opendirat,
3223         depending on whether the FST_NOCHDIR flag is set.
3224         (fts_build): Since fts_safe_changedir consumes its FD, and since
3225         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
3226         and close the dup'd file descriptor upon failure.
3227         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
3228         (fts_safe_changedir): Tweak semantics to reflect that this function
3229         now calls cwd_advance_fd and hence consumes its FD argument.
3230         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
3231         [struct FTS] (fts_rft): Remove now-unused member.
3232         [struct FTS] (fts_cycle.state): Improve comment.
3233
3234         * lib/openat.c (openat_needs_fchdir): New function.
3235         * lib/openat.h (openat_needs_fchdir): Declare it.
3236
3237 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
3238
3239         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
3240         Problem and fix reported by Pádraig Brady in
3241         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
3242
3243 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3244
3245         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
3246
3247 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3248
3249         * lib/memcoll.c (memcoll): Optimize for the common case where the
3250         arguments are bytewise equal.
3251
3252 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3253
3254         * doc/regexprops-generic.texi: Add a copyright notice.
3255
3256 2006-08-15  Bruno Haible  <bruno@clisp.org>
3257
3258         * modules/tmpdir (License): Change to LGPL.
3259
3260 2006-08-15  Bruno Haible  <bruno@clisp.org>
3261
3262         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
3263         module.
3264
3265 2006-08-14  Simon Josefsson  <jas@extundo.com>
3266
3267         * config/srclist.txt: Add gnupload.
3268
3269 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3270
3271         Change copyright notice from LGPL 2 to GPL 2, since that's the
3272         standard form used in the gnulib repository.
3273         * tests/test-lock.c: Likewise.
3274         * tests/test-stdint.c: Likewise.
3275         * tests/test-tls.c: Likewise.
3276
3277         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
3278         prelude-manager.  User shorter URLs for GNU projects, without '?'.
3279         Add copyright notice.
3280
3281         * check-module: Add copyright notice.  Output a copyright
3282         notice if "--version" is specified.
3283         * modules/COPYING: New file.
3284         * tests/test-getaddrinfo.c: Add copyright notice.
3285         * tests/test-verify.c: Likewise.
3286
3287 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3288
3289         Change copyright notice from LGPL 2 to GPL 2, since that's the
3290         standard form used in the gnulib repository.
3291         * lib/lock.c: LGPL -> GPL.
3292         * lib/lock.h: Likewise.
3293         * lib/strnlen1.c: Likewise.
3294         * lib/strnlen1.h: Likewise.
3295         * lib/tls.c: Likewise.
3296         * lib/tls.h: Likewise.
3297         * lib/tmpdir.c: Likewise.
3298
3299         * lib/TODO: Remove; this belongs only in coreutils.
3300
3301 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3302
3303         Add copyright notices to long-enough files that lack them, since
3304         otherwise the files aren't clearly free.  Use the same notice that
3305         getdate.texi already uses.
3306         * doc/alloca-opt.texi: Add copyright notice.
3307         * doc/alloca.texi: Likewise.
3308         * doc/ctime.texi: Likewise.
3309         * doc/functions.texi: Likewise.
3310         * doc/gcd.texi: Likewise.
3311         * doc/gnulib-tool.texi: Likewise.
3312         * doc/inet_ntoa.texi: Likewise.
3313         * doc/visibility.texi: Likewise.
3314
3315         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
3316         * doc/quote.texi: Add copyright notice.
3317
3318         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
3319         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
3320         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
3321         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
3322         is now obsolete, and give a pointer to the Sun list.
3323         Add copyright notice.
3324
3325 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
3326
3327         * config/srclistvars.sh: Add copyright notice.
3328
3329 2006-08-14  Eric Blake  <ebb9@byu.net>
3330
3331         Import the following change from libc:
3332
3333         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
3334
3335         Upstream bug 2997.
3336         * lib/misc/error.c: Add space between program name and message if file
3337         name is missing.
3338
3339 2006-08-12  Karl Berry  <karl@gnu.org>
3340
3341         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
3342         remove, these originate in gnulib now.
3343
3344 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3345
3346         * doc/Makefile (standards.info standards.html standards.dvi):
3347         Also depend on make-stds.texi.
3348
3349 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
3350
3351         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
3352         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
3353
3354         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
3355         in wchar_t.  Problem reported by Eric Blake.
3356
3357         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
3358         LEN is smaller than SIZE.  Suggested by Bruno Haible.
3359         Also, help the compiler to keep LEN in a register.
3360
3361 2006-08-11  Eric Blake  <ebb9@byu.net>
3362
3363         * users.txt: Sort.  Add tar.
3364
3365 2006-08-11  Bruno Haible  <bruno@clisp.org>
3366
3367         * users.txt: New file.
3368
3369 2006-08-11  Bruno Haible  <bruno@clisp.org>
3370
3371         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
3372         before <wchar.h>. Needed for OSF/1 and BSD/OS.
3373
3374 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
3375
3376         * modules/snprintf (Depends-on): Remove minmax.
3377         (Maintainer): Add self and Bruno.
3378
3379 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
3380
3381         * lib/.cppi-disable: Add snprintf.h, socket_.h.
3382         * lib/snprintf.c: Include <errno.h> and <limits.h>.
3383         (EOVERFLOW): Define if the system does not.
3384         Do not include "minmax.h"; it wasn't used.
3385         (snprintf): Don't assume size_t promotes to an unsigned type.
3386         Fix bug when generated string was too long for the buffer: the
3387         buffer's contents are supposed to be the initial prefix of the
3388         output.  Don't assume vasnprintf returns EOVERFLOW if the size
3389         exceeds INT_MAX; do the check ourselves.
3390
3391         Import the following changes from libc:
3392
3393         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
3394
3395         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
3396         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
3397         set wc to the byte which couldn't be converted.
3398         (re_string_reconstruct): Don't clear valid_raw_len before calling
3399         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
3400         tip_context using re_string_context_at.
3401
3402         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
3403
3404         * lib/posix/regex.h: g++ still cannot handled [restrict].
3405
3406         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
3407
3408         * lib/posix/regex.h: Remove special handling for VMS.
3409
3410 2006-08-10  Jim Meyering  <jim@meyering.net>
3411
3412         * modules/same-inode: New module.
3413         * modules/dev-ino: New module.
3414         * modules/cycle-check: Depend on these modules, rather than simply
3415         including their .h files.
3416         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
3417         required via m4/cycle-check.m4.
3418         * modules/same: Depend on new same-inode module, rather than
3419         including same-inode.h.
3420         * modules/chdir-safer: New file.
3421
3422         * modules/chown (Depends-on): Add stat-macros.
3423
3424 2006-08-10  Jim Meyering  <jim@meyering.net>
3425
3426         * m4/cycle-check.m4: New file.
3427         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
3428         * m4/dev-ino.m4, same-inode.m4: New files.
3429
3430 2006-08-10  Eric Blake  <ebb9@byu.net>
3431
3432         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
3433         in from original proposal.
3434
3435 2006-08-10  Eric Blake  <ebb9@byu.net>
3436         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3437
3438         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
3439         namespace.
3440
3441 2006-08-10  Bruno Haible  <bruno@clisp.org>
3442
3443         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
3444         as well.
3445
3446 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3447
3448         Sync from coreutils.
3449
3450         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
3451
3452         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
3453         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
3454
3455 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3456
3457         * modules/restrict: Remove; no longer needed now that we assume
3458         Autoconf 2.59 or later.
3459         * MODULES.html.sh: Remove 'restrict'.
3460         * modules/argp (Depends-on): Remove 'restrict'.
3461         * modules/base64 (Depends-on): Likewise.
3462         * modules/gc (Depends-on): Likewise.
3463         * modules/getaddrinfo (Depends-on): Likewise.
3464         * modules/glob (Depends-on): Likewise.
3465         * modules/inet_ntop (Depends-on): Likewise.
3466         * modules/inet_pton (Depends-on): Likewise.
3467         * modules/memxor (Depends-on): Likewise.
3468         * modules/regex (Depends-on): Likewise.
3469         * modules/strtok_r (Depends-on): Likewise.
3470         * modules/time_r (Depends-on): Likewise.
3471
3472 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
3473
3474         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
3475         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
3476         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
3477         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
3478         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
3479         * m4/memxor.m4 (gl_MEMXOR): Likewise.
3480         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
3481         gl_C_RESTRICT replaced by AC_C_RESTRICT.
3482
3483         Merge from coreutils.
3484         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
3485         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
3486         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
3487         * m4/time_r.m4 (gl_TIME_R): Likewise.
3488
3489 2006-08-09  Karl Berry  <karl@gnu.org>
3490
3491         * config/srclist.txt: no more gettext-tools, per Bruno.
3492
3493 2006-08-08  Eric Blake  <ebb9@byu.net>
3494
3495         * modules/verror: New module.
3496         * MODULES.html.sh: Document it.
3497
3498 2006-08-08  Eric Blake  <ebb9@byu.net>
3499
3500         * lib/verror.h, verror.c: New files.
3501
3502 2006-08-08  Eric Blake  <ebb9@byu.net>
3503
3504         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
3505         verror_at_line output complies with GNU Coding Standards even when
3506         file is NULL.
3507
3508 2006-08-07  Bruno Haible  <bruno@clisp.org>
3509
3510         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
3511         versions of AIX.
3512         Reported by Ralf Wildenhues.
3513
3514 2006-08-07  Bruno Haible  <bruno@clisp.org>
3515
3516         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
3517         in an AC_DEFUN. Needed so that the autoconf snippets can use
3518         AC_REQUIRE.
3519
3520 2006-08-06  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3521
3522         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3523         Initialize pkgdata_DATA.
3524         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
3525         overriding it.
3526
3527 2006-08-06  Eric Blake  <ebb9@byu.net>
3528
3529         * lib/error.h: Fold in some upstream changes from glibc.
3530         * lib/error.c: Likewise.
3531
3532 2006-08-04  Bruno Haible  <bruno@clisp.org>
3533
3534         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3535         Make the mostlyclean-local rule depend on mostlyclean-generic.
3536         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
3537
3538 2006-07-31  Bruno Haible  <bruno@clisp.org>
3539
3540         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
3541         <stdlib.h>, <string.h>.
3542
3543 2006-07-30  Bruno Haible  <bruno@clisp.org>
3544
3545         * modules/readlink (License): Change to LGPL.
3546
3547 2006-07-30  Bruno Haible  <bruno@clisp.org>
3548
3549         * modules/javaversion (Makefile.am): Distribute javaversion.java and
3550         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
3551         set PKGDATADIR to point to it.
3552
3553 2006-07-30  Bruno Haible  <bruno@clisp.org>
3554
3555         * modules/csharpexec (configure.ac): Comment out macro invocation.
3556         * modules/javaexec (configure.ac): Likewise.
3557         * modules/javacomp-script (configure.ac): Likewise.
3558
3559         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
3560
3561 2006-07-30  Bruno Haible  <bruno@clisp.org>
3562
3563         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
3564         linked-list.
3565
3566 2006-07-30  Bruno Haible  <bruno@clisp.org>
3567
3568         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
3569
3570 2006-07-30  Bruno Haible  <bruno@clisp.org>
3571
3572         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3573         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
3574         get removed.
3575
3576 2006-07-29  Bruno Haible  <bruno@clisp.org>
3577
3578         Make it possible for gnulib-tool to work with locally modified or
3579         augmented gnulib repositories.
3580         * gnulib-tool (func_usage): Document --local-dir option.
3581         (local_gnulib_dir): New variable.
3582         Handle --local-dir option.
3583         (func_lookup_file): New function.
3584         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
3585         (func_get_description, func_get_filelist, func_get_description,
3586         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
3587         func_get_automake_snippet, func_get_include_directive,
3588         func_get_license, func_get_maintainer): Use func_lookup_file.
3589         (func_import, func_create_testdir): Use func_lookup_file.
3590
3591 2006-07-29  Bruno Haible  <bruno@clisp.org>
3592
3593         * modules/setenv (Depends-on): Add unistd.
3594
3595 2006-07-29  Bruno Haible  <bruno@clisp.org>
3596
3597         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
3598
3599 2006-07-29  Bruno Haible  <bruno@clisp.org>
3600
3601         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
3602
3603 2006-07-29  Bruno Haible  <bruno@clisp.org>
3604
3605         * gnulib-tool (import, update): If there is no Makefile.am, look at
3606         aclocal.m4, instead of bailing out.
3607
3608 2006-07-29  Bruno Haible  <bruno@clisp.org>
3609
3610         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
3611         Categorize the options by when they are useful.
3612
3613 2006-07-29  Bruno Haible  <bruno@clisp.org>
3614
3615         * gnulib-tool (func_usage): Document option --no-libtool.
3616         Handle option --no-libtool.
3617         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
3618         for changed semantics of $libtool variable.
3619         (func_import): Likewise. If libtool is not used, show this through
3620         an option --no-libtool.
3621         (func_create_testdir): Update.
3622
3623 2006-07-29  Bruno Haible  <bruno@clisp.org>
3624
3625         * gnulib-tool (func_import): Extend error message about missing
3626         --doc-base.
3627
3628 2006-07-29  Bruno Haible  <bruno@clisp.org>
3629
3630         * gnulib-tool (func_import): Don't create the $docbase directory if
3631         there is no file to store there.
3632
3633 2006-07-29  Bruno Haible  <bruno@clisp.org>
3634
3635         * gnulib-tool (autoconf_minversion): If a --dir option is given and
3636         relevant, look for configure.ac there, not in the current directory.
3637         Also use a simple search for AC_PREREQ, not "autoconf --trace".
3638
3639 2006-07-29  Bruno Haible  <bruno@clisp.org>
3640
3641         * gnulib-tool (SORT): New variable.
3642         (func_usage): Undocument --assume-autoconf option.
3643         Remove --assume-autoconf option handling.
3644         (autoconf_minversion): Determine from the contents of configure.ac.
3645         (func_import): Remove autoconf_minversion handling.
3646         Suggested by Eric Blake.
3647
3648 2006-07-29  Bruno Haible  <bruno@clisp.org>
3649
3650         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
3651
3652 2006-07-29  Bruno Haible  <bruno@clisp.org>
3653
3654         * config/srclist.txt (*setenv.[ch]): Remove rules.
3655
3656 2006-07-28  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3657
3658         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
3659
3660 2006-07-28  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3661
3662         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
3663         arpa/inet.h.
3664
3665 2006-07-28  Simon Josefsson  <jas@extundo.com>
3666
3667         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
3668         * modules/inet_pton (Depends-on): Likewise.
3669
3670 2006-07-28  Simon Josefsson  <jas@extundo.com>
3671
3672         * m4/netinet_in_h.m4: New file.
3673
3674 2006-07-28  Simon Josefsson  <jas@extundo.com>
3675
3676         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
3677         #include's.
3678
3679 2006-07-28  Simon Josefsson  <jas@extundo.com>
3680
3681         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
3682         #include's.
3683
3684 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
3685
3686         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
3687         setgid on directories only if they set these bits.
3688         * lib/modechange.h: Remove obsolete comment about masks.
3689
3690 2006-07-28  Eric Blake  <ebb9@byu.net>
3691
3692         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
3693         macro expansion.
3694
3695 2006-07-28  Bruno Haible <bruno@clisp.org>
3696
3697         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
3698
3699 2006-07-28  Bruno Haible  <bruno@clisp.org>
3700
3701         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
3702
3703 2006-07-28  Bruno Haible  <bruno@clisp.org>
3704
3705         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
3706         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
3707         Define fallbacks.
3708         Avoids link error on FreeBSD 4.x.
3709         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
3710
3711         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
3712         encoding.
3713         * lib/mbswidth.c (iswcntrl): Likewise.
3714
3715 2006-07-27  Bruno Haible  <bruno@clisp.org>
3716
3717         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
3718         test.
3719
3720 2006-07-27  Bruno Haible  <bruno@clisp.org>
3721
3722         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
3723         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
3724         defined.
3725
3726 2006-07-26  Eric Blake  <ebb9@byu.net>
3727
3728         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
3729
3730 2006-07-26  Eric Blake  <ebb9@byu.net>
3731
3732         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
3733         like mingw that lack mkstemp.
3734         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
3735         avoid compilation warning on mingw.
3736
3737 2006-07-26  Bruno Haible  <bruno@clisp.org>
3738
3739         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
3740         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
3741         INT_FAST*_MIN, INTPTR_MIN.
3742
3743 2006-07-25  Bruno Haible  <bruno@clisp.org>
3744
3745         * modules/version-etc (Depends-on): Add stdarg.
3746
3747 2006-07-25  Bruno Haible  <bruno@clisp.org>
3748
3749         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
3750         complex commands.
3751
3752 2006-07-25  Bruno Haible  <bruno@clisp.org>
3753
3754         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
3755         defined in <stdarg.h> or config.h.
3756
3757 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
3758
3759         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
3760         (gl_STDIO_SAFER): Remove.
3761
3762 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
3763
3764         * MODULES.html.sh (File stream based Input/Output):
3765         Add fopen-safer, tmpfile-safer; remove stdio-safer.
3766         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
3767         * modules/fopen-safer, modules/tmpfile-safer: New files.
3768         * modules/stdio-safer: Remove.
3769
3770 2006-07-24  Bruno Haible  <bruno@clisp.org>
3771
3772         * modules/tmpdir: New file.
3773         * MODULES.html.sh (File system functions): Add it.
3774
3775 2006-07-24  Bruno Haible  <bruno@clisp.org>
3776
3777         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
3778         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
3779
3780 2006-07-24  Bruno Haible  <bruno@clisp.org>
3781
3782         * modules/clean-temp: New file.
3783
3784 2006-07-24  Bruno Haible  <bruno@clisp.org>
3785
3786         * m4/tmpdir.m4: New file, from GNU gettext.
3787
3788 2006-07-24  Bruno Haible  <bruno@clisp.org>
3789
3790         * lib/tmpdir.h: New file, from GNU gettext.
3791         * lib/tmpdir.c: New file, from GNU gettext.
3792
3793 2006-07-24  Bruno Haible  <bruno@clisp.org>
3794
3795         * lib/clean-temp.h: New file, from GNU gettext.
3796         * lib/clean-temp.c: New file, from GNU gettext.
3797
3798 2006-07-23  Eric Blake  <ebb9@byu.net>
3799
3800         * modules/stdio-safer (Files): Add tmpfile-safer.c.
3801         (Depends-on): Add binary-io.
3802
3803 2006-07-23  Eric Blake  <ebb9@byu.net>
3804
3805         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
3806
3807 2006-07-23  Eric Blake  <ebb9@byu.net>
3808
3809         * lib/tmpfile-safer.c: New file.
3810         * lib/stdio-safer.h (fopen_safer): Add prototype.
3811         * lib/stdio--.h (tmpfile): Make safer.
3812
3813 2006-07-23  Bruno Haible  <bruno@clisp.org>
3814
3815         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
3816         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
3817         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
3818         gl_linked_remove_at): Use it.
3819
3820 2006-07-22  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3821         and Simon Josefsson <jas@extundo.com>
3822
3823         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
3824
3825         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
3826
3827 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
3828
3829         * modules/close-stream: New file.
3830         * modules/closeout (Description): Make it clear that it exits
3831         with a diagnostic on error.
3832         (Depends-on): Add close-stream.  Remove fpending, stdbool.
3833         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
3834
3835 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
3836
3837         * m4/close-stream.m4: New file.
3838
3839 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
3840
3841         * lib/close-stream.c, close-stream.h: New files.
3842
3843 2006-07-22  Bruno Haible  <bruno@clisp.org>
3844
3845         Merge from GNU gettext 0.15.
3846
3847         2006-05-01  Bruno Haible  <bruno@clisp.org>
3848
3849                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
3850
3851         2006-07-22  Bruno Haible  <bruno@clisp.org>
3852
3853                 * modules/javaversion: New file.
3854                 * MODULES.html.sh (Java): Add javaversion.
3855
3856         2006-03-12  Bruno Haible  <bruno@clisp.org>
3857
3858                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
3859
3860         2005-12-04  Bruno Haible  <bruno@clisp.org>
3861
3862                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
3863                 (untested).
3864
3865         2006-06-21  Bruno Haible  <bruno@clisp.org>
3866
3867                 Avoid warnings from recent versions of mcs.
3868                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
3869                 -o, -L, -r any more. Use options documented since mcs-1.0
3870                 instead. Similarly for -g.
3871
3872         2005-12-04  Bruno Haible  <bruno@clisp.org>
3873
3874                 * build-aux/csharpcomp.sh.in: Suffix for resources is
3875                 .resources, not .resource.
3876
3877         2005-07-09  Bruno Haible  <bruno@clisp.org>
3878
3879                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
3880                 add a .dll suffix.
3881                 Reported by Mark Junker <mjscod@gmx.de>.
3882
3883         2006-07-22  Bruno Haible  <bruno@clisp.org>
3884
3885                 * modules/gettext: Upgrade to gettext-0.15.
3886                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
3887                 m4/visibility.m4.
3888                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
3889
3890 2006-07-22  Bruno Haible  <bruno@clisp.org>
3891
3892         Merge from GNU gettext 0.15.
3893
3894         2006-03-25  Bruno Haible  <bruno@clisp.org>
3895
3896                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
3897
3898         2006-07-21  Bruno Haible  <bruno@clisp.org>
3899
3900                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
3901                 "1.1".
3902
3903         2006-05-09  Bruno Haible  <bruno@clisp.org>
3904
3905                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
3906                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
3907                 for the conftestver execution.
3908
3909         2006-05-01  Bruno Haible  <bruno@clisp.org>
3910
3911                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
3912                 optional target-version argument. Verify that the compiler
3913                 groks source of the specified source-version, or add -source
3914                 option as necessary. Verify that the compiler produces
3915                 bytecode in the specified target-version, or add -target and
3916                 -source options as necessary. Make the result of the test
3917                 available as variable CONF_JAVAC. Also log error output in
3918                 config.log.
3919
3920         2006-03-11  Bruno Haible  <bruno@clisp.org>
3921
3922                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
3923
3924         2006-05-09  Bruno Haible  <bruno@clisp.org>
3925
3926                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
3927                 CLASSPATH_SEPARATOR to a semicolon.
3928
3929         2006-03-12  Bruno Haible  <bruno@clisp.org>
3930
3931                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
3932                 available as variable CONF_JAVA, for subsequent autoconf
3933                 tests. Also log error output in config.log.
3934
3935         2006-07-19  Bruno Haible  <bruno@clisp.org>
3936
3937                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
3938                 that getline works on glibc2 systems. Needed to avoid trouble
3939                 in relocatable.c.
3940                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
3941
3942         2005-12-04  Bruno Haible  <bruno@clisp.org>
3943
3944                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
3945                 launcher (untested).
3946
3947         2005-12-04  Bruno Haible  <bruno@clisp.org>
3948
3949                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
3950
3951         2006-07-22  Bruno Haible  <bruno@clisp.org>
3952
3953                 * gettext.m4: Update from GNU gettext-0.15.
3954                 * nls.m4: Likewise.
3955                 * po.m4: Likewise.
3956                 * inttypes-pri.m4: Likewise.
3957                 * inttypes-h.m4: Renamed from inttypes.m4.
3958                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
3959
3960 2006-07-22  Bruno Haible  <bruno@clisp.org>
3961
3962         Merge from GNU gettext 0.15.
3963
3964         2005-07-05  Bruno Haible  <bruno@clisp.org>
3965
3966                 * printf-args.c (printf_fetchargs): Work around broken
3967                 definition of wint_t on mingw.
3968
3969         2005-02-12  Bruno Haible  <bruno@clisp.org>
3970
3971                 * xallocsa.h: Add extern "C" for C++.
3972
3973         2006-05-17  Bruno Haible  <bruno@clisp.org>
3974
3975                 Cygwin portability.
3976                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
3977
3978         2006-04-30  Bruno Haible  <bruno@clisp.org>
3979
3980                 * progreloc.c: Include <mach-o/dyld.h> if available.
3981                 (find_executable): Use _NSGetExecutablePath when possible.
3982
3983         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3984
3985                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
3986                 function.
3987
3988         2005-12-29  Bruno Haible  <bruno@clisp.org>
3989
3990                 * progreloc.c (set_program_name_and_installdir): Fix
3991                 compilation error.
3992
3993         2005-12-04  Bruno Haible  <bruno@clisp.org>
3994
3995                 Cygwin portability.
3996                 * progreloc.c: Include <windows.h> also on Cygwin.
3997                 (find_executable): Add support for Cygwin.
3998                 (set_program_name_and_installdir): Handle also platforms with
3999                 nonempty EXEEXT.
4000
4001         2006-07-11  Bruno Haible  <bruno@clisp.org>
4002
4003                 * javacomp.c: Fix a comment.
4004                 Reported by Jim Meyering.
4005
4006         2006-04-30  Bruno Haible  <bruno@clisp.org>
4007
4008                 * javacomp.h (compile_java_class): Add source_version,
4009                 target_version arguments.
4010                 * javacomp.c: Rewritten to choose only a compiler that
4011                 respects the specified source_version and target_version.
4012
4013         2006-06-27  Bruno Haible  <bruno@clisp.org>
4014
4015                 Assume correct S_ISDIR macro.
4016                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
4017
4018         2006-07-22  Bruno Haible  <bruno@clisp.org>
4019
4020                 * javaversion.h: New file, from GNU gettext.
4021                 * javaversion.c: New file, from GNU gettext.
4022                 * javaversion.java: New file, from GNU gettext.
4023                 * javaversion.class: New file, from GNU gettext.
4024
4025         2006-05-17  Bruno Haible  <bruno@clisp.org>
4026
4027                 Cygwin portability.
4028                 * javaexec.c (execute_java_class): Test for jview program
4029                 also on Cygwin.
4030
4031         2006-04-09  Bruno Haible  <bruno@clisp.org>
4032
4033                 * fatal-signal.c: Don't include string.h.
4034                 (at_fatal_signal): Use a copying loop instead of memcpy.
4035
4036         2005-12-04  Bruno Haible  <bruno@clisp.org>
4037
4038                 * csharpexec.c: Add support for 'clix' launcher (untested).
4039                 (execute_csharp_using_sscli): New function.
4040                 (execute_csharp_program): Call it.
4041
4042         2006-06-21  Bruno Haible  <bruno@clisp.org>
4043
4044                 Avoid warnings from recent versions of mcs.
4045                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
4046                 -o, -L, -r any more. Use options documented since mcs-1.0
4047                 instead. Similarly for -g.
4048
4049         2005-07-09  Bruno Haible  <bruno@clisp.org>
4050
4051                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
4052                 add a .dll suffix.
4053                 Reported by Mark Junker <mjscod@gmx.de>.
4054
4055         2006-06-17  Bruno Haible  <bruno@clisp.org>
4056
4057                 * config.charset: Update for NetBSD 3.0.
4058
4059         2006-05-17  Bruno Haible  <bruno@clisp.org>
4060
4061                 Cygwin portability.
4062                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
4063
4064         2006-05-16  Bruno Haible  <bruno@clisp.org>
4065
4066                 * localcharset.c [CYGWIN]: Include <windows.h>.
4067                 (get_charset_aliases): For Cygwin, return the same CPxxx
4068                 aliases list as under WIN32.
4069                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
4070                 the environment variables. Fall back to GetACP().
4071
4072         2006-04-05  Bruno Haible  <bruno@clisp.org>
4073
4074                 * config.charset: Update Juan Manuel Guerrero's address.
4075
4076         2005-02-12  Bruno Haible  <bruno@clisp.org>
4077
4078                 * allocsa.h: Add extern "C" for C++.
4079
4080         2005-02-10  Bruno Haible  <bruno@clisp.org>
4081
4082                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
4083                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
4084
4085         2006-07-22  Bruno Haible  <bruno@clisp.org>
4086
4087                 * gettext.h: Update to GNU gettext-0.15.
4088
4089 2006-07-22  Bruno Haible  <bruno@clisp.org>
4090
4091         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
4092         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
4093         lib-prefix.m4, longdouble.m4, ssize_t.m4.
4094
4095 2006-07-21  Eric Blake  <ebb9@byu.net>
4096
4097         * modules/stdlib-safer: New file.
4098         * MODULES.html.sh (File stream based Input/Output): Add
4099         stdlib-safer.
4100
4101 2006-07-21  Eric Blake  <ebb9@byu.net>
4102
4103         * lib/stdlib-safer.h: New file from coreutils, required by
4104         stdlib--.h.
4105
4106 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
4107
4108         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
4109
4110 2006-07-20  Bruno Haible  <bruno@clisp.org>
4111
4112         * gnulib-tool: Recognize new option --assume-autoconf.
4113         (autoconf_minversion): New variable.
4114         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
4115
4116 2006-07-20  Bruno Haible  <bruno@clisp.org>
4117
4118         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
4119
4120 2006-07-19  Derek R. Price  <derek@ximbiot.com>
4121
4122         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
4123         Reindent and repaginate.
4124
4125 2006-07-19  Derek Price  <derek@ximbiot.com>
4126
4127         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
4128         Correct grammar.
4129
4130 2006-07-17  Bruno Haible  <bruno@clisp.org>
4131
4132         * modules/list: New file.
4133         * modules/array-list: New file.
4134         * modules/carray-list, modules/carray-list-tests: New files.
4135         * modules/linked-list, modules/linked-list-tests: New files.
4136         * modules/avltree-list, modules/avltree-list-tests: New files.
4137         * modules/rbtree-list, modules/rbtree-list-tests: New files.
4138         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
4139         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
4140         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
4141         * modules/oset: New file.
4142         * modules/array-oset: New file.
4143         * modules/avltree-oset, modules/avltree-oset-tests: New files.
4144         * modules/rbtree-oset, rbtree-oset-tests: New files.
4145         * tests/test-carray_list.c: New file.
4146         * tests/test-linked_list.c: New file.
4147         * tests/test-avltree_list.c: New file.
4148         * tests/test-rbtree_list.c: New file.
4149         * tests/test-linkedhash_list.c: New file.
4150         * tests/test-avltreehash_list.c: New file.
4151         * tests/test-rbtreehash_list.c: New file.
4152         * tests/test-avltree_oset.c: New file.
4153         * tests/test-rbtree_oset.c: New file.
4154         * MODULES.html.sh (Container data structures): New section.
4155
4156 2006-07-17  Bruno Haible  <bruno@clisp.org>
4157
4158         * m4/gl_list.m4: New file.
4159
4160 2006-07-17  Bruno Haible  <bruno@clisp.org>
4161
4162         * lib/gl_list.h: New file.
4163         * lib/gl_list.c: New file.
4164         * lib/gl_array_list.h: New file.
4165         * lib/gl_array_list.c: New file.
4166         * lib/gl_carray_list.h: New file.
4167         * lib/gl_carray_list.c: New file.
4168         * lib/gl_linked_list.h: New file.
4169         * lib/gl_linked_list.c: New file.
4170         * lib/gl_anylinked_list1.h: New file.
4171         * lib/gl_anylinked_list2.h: New file.
4172         * lib/gl_avltree_list.h: New file.
4173         * lib/gl_avltree_list.c: New file.
4174         * lib/gl_anyavltree_list1.h: New file.
4175         * lib/gl_anyavltree_list2.h: New file.
4176         * lib/gl_rbtree_list.h: New file.
4177         * lib/gl_rbtree_list.c: New file.
4178         * lib/gl_anyrbtree_list1.h: New file.
4179         * lib/gl_anyrbtree_list2.h: New file.
4180         * lib/gl_anytree_list1.h: New file.
4181         * lib/gl_anytree_list2.h: New file.
4182         * lib/gl_linkedhash_list.h: New file.
4183         * lib/gl_linkedhash_list.c: New file.
4184         * lib/gl_anyhash_list1.h: New file.
4185         * lib/gl_anyhash_list2.h: New file.
4186         * lib/gl_avltreehash_list.h: New file.
4187         * lib/gl_avltreehash_list.c: New file.
4188         * lib/gl_rbtreehash_list.h: New file.
4189         * lib/gl_rbtreehash_list.c: New file.
4190         * lib/gl_anytreehash_list1.h: New file.
4191         * lib/gl_anytreehash_list2.h: New file.
4192
4193         * lib/gl_oset.h: New file.
4194         * lib/gl_oset.c: New file.
4195         * lib/gl_array_oset.h: New file.
4196         * lib/gl_array_oset.c: New file.
4197         * lib/gl_avltree_oset.h: New file.
4198         * lib/gl_avltree_oset.c: New file.
4199         * lib/gl_rbtree_oset.h: New file.
4200         * lib/gl_rbtree_oset.c: New file.
4201         * lib/gl_anytree_oset.h: New file.
4202
4203 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
4204
4205         * m4/mkancesdirs.m4: New file.
4206         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
4207         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
4208         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
4209         it.
4210
4211 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
4212
4213         * lib/dirchownmod.c, dirchownmod.h, mkancesdirs.c, mkancesdirs.h:
4214         New files.
4215         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
4216         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
4217         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
4218         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
4219         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
4220         callers changed.  Revamp internals significantly, by not
4221         attempting to create directories that are temporarily more
4222         permissive than the final results.  Do not attempt to use
4223         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
4224         This removes some race conditions, fixes some bugs, and simplifies
4225         things.  Use new dirchownmod function to do owner and mode changes.
4226         * lib/mkdir-p.h: Likewise.
4227         * lib/modechange.c (octal_to_mode): New function.
4228         (struct mode_change): New member mentioned.
4229         (make_node_op_equals): New arg mentioned.  All callers changed.
4230         (mode_compile): Keep track of which mode bits the user has explicitly
4231         mentioned.
4232         (mode_adjust): New arg DIR, so that we implement the X op correctly.
4233         New arg PMODE_BITS, to keep track of which mode bits the user
4234         mentioned; it treats S_ISUID and S_ISGID speciall.
4235         All callers changed.
4236         * lib/modechange.h: Likewise.
4237
4238 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
4239
4240         * MODULES.html.sh: Add mkancestors.
4241         * modules/mkancesdirs: New module.
4242         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
4243         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
4244         The chdir-safer and afs files are now orphans; I'll remove them
4245         unless someone speaks up.
4246         Add lib/dirchownmod.c, lib/dirchownmod.h.
4247         (Depends-on): Remove alloca, chown, save-cwd, dirname.
4248         Add lchown, mkancesdirs.
4249         (Maintainer): Add self.
4250
4251 2006-07-15  Karl Berry  <karl@gnu.org>
4252
4253         * gnulib-tool: help message wording/arrangement.
4254
4255 2006-07-14  Simon Josefsson  <jas@extundo.com>
4256
4257         * doc/gnulib.texi (Libtool and Windows): New section.
4258
4259 2006-07-12  Simon Josefsson  <jas@extundo.com>
4260
4261         * modules/gendocs (License): Fix license, approved by Karl.
4262
4263 2006-07-12  Eric Blake  <ebb9@byu.net>
4264
4265         * MODULES.html.sh: Add gendocs.
4266
4267 2006-07-11  Eric Blake  <ebb9@byu.net>
4268
4269         * modules/fdl: New module, to install doc/fdl.texi.
4270         * MODULES.html.sh: Add new section for documentation modules.
4271         * gnulib-tool: Avoid space-tab.
4272         (--doc-base): New option, to manage files from doc.
4273
4274 2006-07-11  Eric Blake  <ebb9@byu.net>
4275
4276         * m4/absolute-header.m4: Fix comments to match recent change.
4277
4278 2006-07-11  Eric Blake  <ebb9@byu.net>
4279
4280         * gnulib-tool: List --doc-base before --tests-base.
4281
4282 2006-07-11  Derek R. Price  <derek@ximbiot.com>
4283
4284         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
4285
4286 2006-07-11  Bruno Haible  <bruno@clisp.org>
4287
4288         * README: Mention where to put documentation.
4289
4290 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4291
4292         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
4293
4294 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
4295
4296         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
4297         to stdint.m4.
4298
4299 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
4300
4301         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
4302         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
4303         "no/such/file/stdint.h" when there is no such file, so that
4304         the resulting C code can be parsed by dodgy compilers.
4305         Problems reported by Bob Proulx.
4306
4307 2006-07-10  Derek R. Price  <derek@ximbiot.com>
4308
4309         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
4310         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
4311         macros into the GNU _D_EXACT_NAMLEN.
4312         * lib/savedir.c:  Likewise.
4313         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
4314
4315 2006-07-10  Derek R. Price  <derek@ximbiot.com>
4316         and Paul Eggert  <eggert@cs.ucla.edu>
4317
4318         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
4319         * m4/savedir.m4:
4320         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
4321         macros into the GNU _D_EXACT_NAMLEN.
4322
4323 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4324
4325         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
4326         around the absolute name, to work around a problem with the HP-UX
4327         11.23 native C compiler, reported by Bob Proulx.
4328
4329 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4330
4331         * doc/maintain.texi, make-stds.texi: Sync from
4332         <http://savannah.gnu.org/projects/gnustandards>.
4333
4334 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
4335
4336         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
4337
4338 2006-07-09  Jim Meyering  <jim@meyering.net>
4339
4340         * m4/glob.m4: Remove a doubled word in a comment.
4341
4342 2006-07-09  Jim Meyering  <jim@meyering.net>
4343
4344         * lib/argp-pv.c: Remove a doubled word in a comment.
4345         * lib/check-version.c (check_version): Likewise.
4346         * lib/javacomp.c (compile_java_class): Likewise.
4347
4348 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
4349
4350         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
4351         for the benefit of people using Autoconf 2.60.  If you want to
4352         support older Autoconf versions you can copy m4/onceonly_2_57.m4
4353         (or m4/onceonly.m4, if pre-2.57) manually.
4354
4355 2006-07-08  Jim Meyering  <jim@meyering.net>
4356
4357         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
4358         comment.
4359         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
4360         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
4361         comment.
4362
4363 2006-07-08  Jim Meyering  <jim@meyering.net>
4364
4365         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
4366
4367 2006-07-07  Simon Josefsson  <jas@extundo.com>
4368
4369         * tests/test-crc.c: Change expected crc value, the test vector
4370         were probably computed using the old broken crc.c?
4371
4372 2006-07-06  Simon Josefsson  <jas@extundo.com>
4373
4374         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
4375         now the canonical place for the M4 file).
4376
4377         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
4378         from the sys_socket dependency now.
4379
4380         * modules/inet_pton (Files): Ditto.
4381
4382         * modules/inet_ntop (Files): Ditto.
4383
4384 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
4385
4386         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
4387         not gl_PREREQ_GETUSERSHELL.
4388
4389 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4390
4391         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
4392         with only one argument, for Autoconf 2.60.
4393         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
4394         expand to nothing, so add a shell command to avoid syntax error.
4395         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
4396
4397 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4398
4399         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
4400
4401 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
4402
4403         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
4404         no longer needed.  Check for isblank decl.
4405         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
4406         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
4407         of existence.
4408
4409 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
4410
4411         * lib/getloadavg.c: Use __VMS, not VMS.
4412         * lib/getopt.c: Likewise.
4413         * lib/getpagesize.h: Likewise.
4414         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
4415         and probably does not work.
4416
4417 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
4418
4419         * lib/.cppi-disable: Add wcwidth.
4420         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
4421         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
4422         (ISGRAPH): Remove.  All uses changed to isgraph.
4423         (FOLD) [!defined _LIBC]: Remove special case.
4424         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
4425         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
4426         HAVE_ISBLANK.
4427         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
4428         case.
4429
4430 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
4431
4432         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
4433         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
4434         brackets.  Other minor changes to suppress some compiler
4435         warnings.
4436
4437 2006-07-06  Derek R. Price  <derek@ximbiot.com>
4438         and Paul Eggert  <eggert@cs.ucla.edu>
4439
4440         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
4441         of invoking obsolescent AC_HEADER_DIRENT macro.
4442         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
4443         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
4444         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
4445         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
4446         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
4447         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
4448         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
4449         * m4/readdir.m4: Remove; no longer needed.
4450
4451 2006-07-06  Derek R. Price  <derek@ximbiot.com>
4452         and Paul Eggert  <eggert@cs.ucla.edu>
4453
4454         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
4455         Don't worry about this obsolete case any more.
4456         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
4457         directories.
4458         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
4459         worry about this obsolete case any more.
4460         * lib/fts.c: Likewise.
4461         * lib/getcwd.c: Likewise.
4462         * lib/glob.h: Likewise.
4463         * lib/savedir.c: Likewise.
4464
4465 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
4466
4467         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
4468         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
4469         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
4470         needed.
4471         All uses removed.
4472         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
4473         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
4474         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
4475         needed.
4476         * m4/getdate.m4 (gl_GETDATE): Likewise.
4477         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
4478         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
4479         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
4480         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
4481         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
4482         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
4483         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
4484         needed.
4485
4486 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
4487
4488         * lib/memcasecmp.c: Include <limits.h>.
4489         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
4490         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
4491         Don't assume isdigit succeeds only on '0' through '9'.
4492
4493 2006-07-05  Eric Blake  <ebb9@byu.net>
4494
4495         * modules/getaddrinfo (Depends-on): Add snprintf.
4496
4497 2006-07-05  Eric Blake  <ebb9@byu.net>
4498
4499         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
4500         to avoid 'header present but could not be compiled' on cygwin.
4501
4502 2006-07-05  Eric Blake  <ebb9@byu.net>
4503
4504         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
4505         missing from netdb.h.
4506         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
4507
4508 2006-07-05  Derek R. Price  <derek@ximbiot.com>
4509
4510         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
4511         no longer needed.
4512         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
4513         * m4/getdate.m4 (gl_GETDATE): Likewise.
4514         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
4515         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
4516         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
4517         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
4518         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
4519
4520 2006-07-05  Derek R. Price  <derek@ximbiot.com>
4521
4522         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
4523         All uses of is_space replaced by isspace.
4524         * lib/exit.h: Don't talk about STDC_HEADERS.
4525         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
4526         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
4527         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
4528         replaced by isprint etc.
4529         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
4530         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
4531         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
4532         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
4533         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
4534         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
4535
4536 2006-07-05  Bruno Haible  <bruno@clisp.org>
4537
4538         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
4539         the function exists, before testing against AIX.
4540         Reported by Martin Lambers <marlam@marlam.de>.
4541
4542 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
4543
4544         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
4545         From Mark D. Baushke.
4546
4547 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
4548
4549         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
4550         to the absolute name, not just one, to bypass Sun C 5.8's
4551         "warning: #include of /usr/include/... may be non-portable".
4552
4553 2006-07-04  Eric Blake  <ebb9@byu.net>
4554
4555         * modules/dirname-tests: New test module.
4556         * tests/test-dirname.c: New file, replacing dirname.c
4557         TEST_DIRNAME section that was recently deleted.
4558
4559 2006-07-04  Bruno Haible  <bruno@clisp.org>
4560
4561         Assume ANSI C header files and <ctype.h> functions.
4562         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
4563         (mbsnwidth): Use isprint, iscntrl instead.
4564
4565 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
4566
4567         Merge from coreutils.
4568         * MODULES.html.sh: Add xstrtold.
4569         * modules/xstrtold: New file.
4570         * modules/cycle-check (Files): Add lib/same-inode.h.
4571         * modules/dirname (Files): Add m4/double-slash-root.m4.
4572         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
4573         * modules/mkdir-p (Files): Add lib/same-inode.h.
4574         * modules/same (Files): Add lib/same-inode.h.
4575
4576 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
4577
4578         * m4/absolute-header.m4: Renamed from full-header-path.m4.
4579         This is to keep the terminology clean; POSIX talks about
4580         "absolute pathnames", not "full pathnames", but the GNU
4581         Coding Standards say to use "path" for something else;
4582         so use "absolute" to keep both sides happy.
4583         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
4584         Set gl_absolute_header, not gl_full_header_path.
4585         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
4586         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
4587         All uses changed.
4588
4589         Merge from coreutils.
4590
4591         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
4592
4593         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
4594         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
4595         want to require the building of c-strtod.o.
4596         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
4597         needs -lm directly.
4598         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
4599
4600         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
4601
4602         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
4603         --as-needed option if available.  Problem reported by Albert Chin in
4604         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
4605         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
4606         cc merely issues a bunch of annoying warnings for --as-needed
4607         (this problem was reported by Bob Proulx).  Also, try linking with
4608         -lm to detect a bug in binutils 2.16 (this problem was reported
4609         by Ralf Wildenhues).
4610
4611         2006-06-18  Jim Meyering  <jim@meyering.net>
4612
4613         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
4614         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
4615         macro.
4616         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
4617         also check for glibc-2.4's abort-inducing bug.
4618
4619         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
4620         Low-probability clean-up should be to use rmdir to get rid of
4621         the just-created directory, not unlink.
4622
4623         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
4624         configure fail, and request a bug report to inform us about it.
4625         Add a comment that, barring reports to the contrary, in 2007 we'll
4626         assume ftruncate is universally available.
4627
4628         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
4629
4630         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
4631
4632         2006-03-12  Jim Meyering  <jim@meyering.net>
4633
4634         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
4635         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
4636         * m4/same.m4 (gl_SAME): Likewise.
4637         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
4638
4639         2006-03-11  Eric Blake  <ebb9@byu.net>
4640
4641         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
4642         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
4643         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
4644         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
4645
4646 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
4647
4648         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
4649         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
4650         reported by Mark D. Baushke, one in
4651         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
4652
4653         Merge from coreutils.
4654
4655         * lib/.cppi-disable: Add stdint_.h.
4656         * lib/.cvsignore: Add stdint.h.
4657
4658         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
4659
4660         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
4661         both double and long double versions.
4662         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
4663         * lib/xstrtold.c: New file.
4664         * lib/xstrtod.h (xstrtold): New decl.
4665
4666         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
4667
4668         * lib/filemode.c (setst): Remove.
4669         (strmode): Rewrite to avoid setst.  This makes the code shorter,
4670         (arguably) clearer, and the generated code is a bit smaller on my
4671         Debian GNU/Linux stable x86 host.
4672
4673         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
4674
4675         * lib/filemode.c: Include "filemode.h" first, to test the interface.
4676         Assume that filemode.h includes sys/types.h and sys/stat.h.
4677         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
4678         (ftypelet): Reorder to put common cases first, for efficiency.
4679         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
4680         to do 'M'.
4681         (strmode): Renamed from mode_string, and now stores 12 bytes instead
4682         of 10, for compatibility with FreeBSD.  All callers changed.
4683         (filemodestring): Now stores 12 bytes instead of 10, and sets file
4684         types that can't be deduced solely from st_mode.  First arg is now a
4685         const pointer.
4686         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
4687         (strmode): Renamed from mode_string.
4688         (filemodestring): New decl.
4689         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
4690         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
4691         needed.
4692         (S_ISPORT, S_ISWHT): New macros, if not already defined.
4693
4694         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
4695
4696         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
4697         fsusage.h now does that.  Include fsusage.h first, to test interface.
4698         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
4699         at most one method (the old code could have generated decls that
4700         didn't conform to C89, not that this was ever exercised).
4701         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
4702
4703         2006-03-19  Jim Meyering  <jim@meyering.net>
4704
4705         Work even in a chroot where d_ino values for entries in "/"
4706         don't match the stat.st_ino values for the same names.
4707         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
4708         number, iterate through all entries again, using lstat instead.
4709         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
4710         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
4711
4712         * lib/getcwd.c (__getcwd): Clarify a comment.
4713         Use memcpy in place of a call to strcpy.
4714
4715         2006-03-12  Jim Meyering  <jim@meyering.net>
4716
4717         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
4718         matches that of the current directory (which we're about to chdir ".."
4719         out of), then save the dev-ino of the parent, instead.
4720
4721         * lib/same-inode.h (SAME_INODE): New file/macro.
4722         * lib/chdir-safer.c (SAME_INODE): Remove definition.
4723         Include "same-inode.h", instead.
4724         * lib/same.c: Likewise.
4725         * lib/cycle-check.h: Include "same-inode.h".
4726         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
4727         * lib/cycle-check.c (SAME_INODE): Remove definition.
4728         * lib/root-dev-ino.h: Include "same-inode.h".
4729
4730         2006-03-11  Eric Blake  <ebb9@byu.net>
4731
4732         * lib/same.c (same_name): s/base_name/last_component/
4733         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
4734         * lib/filenamecat.c (file_name_concat): Likewise.
4735
4736         2006-03-11  Eric Blake  <ebb9@byu.net>,
4737                     Paul Eggert  <eggert@cs.ucla.edu>
4738
4739         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
4740         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
4741         drive prefix.
4742         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
4743         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
4744         (last_component): New method.
4745         * lib/dirname.c (dir_len): Determine when drive letters need a
4746         subsequent slash.  Preserve // when it is special.
4747         (dir_name): Don't append dot when drive letter is absolute.
4748         [TEST_DIRNAME]: Move into a full-blown gnulib test.
4749         * lib/basename.c (base_name): New semantics - malloc the result.
4750         Preserve // when it is special.  Preserve relative files that look
4751         like drive letters.
4752         (base_len): Preserve // when it is special.
4753         (last_component): New method, similar to old base_name semantics.
4754         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
4755         base_name.  Strip redundant slashes from ///.
4756
4757 2006-07-03  Jim Meyering  <jim@meyering.net>
4758
4759         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
4760         macro is used before the first cycle_check call.
4761
4762 2006-07-03  Eric Blake  <ebb9@byu.net>
4763
4764         * modules/dirname (Depends-on): Add xstrndup.
4765
4766 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
4767
4768         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
4769         test cases, so that config.log is a bit easier to follow.
4770
4771 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
4772
4773         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
4774         both are 64 bits, since this seems to be the tradition, and this
4775         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
4776         we ever run into a host that prefers long long to long in this
4777         case, we'll need another configure-time test.  Problem reported by
4778         Jim Meyering.
4779
4780 2006-07-02  Eric Blake  <ebb9@byu.net>
4781
4782         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
4783
4784 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4785
4786         * modules/inttypes (Depends-on): No longer depends on stdint.
4787         * modules/stdint (Description): Say more about assumptions.
4788         Say that the fast types might differ.  Say macros are used.
4789         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
4790         (Makefile.am): Revise list of substituted symbols to match
4791         new stdint.m4.
4792         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
4793         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
4794         * tests/test-stdint.c (verify_same_types)
4795         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
4796         the code conforms to C99/C89.
4797         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
4798         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
4799
4800 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4801
4802         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
4803         but fix a bug, by requiring at least 64 bits.
4804         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
4805         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
4806         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
4807         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
4808
4809         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
4810         changes.  Make 2.59 a prerequisite.  Check and substitute for
4811         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
4812         inttypes.h.  Do not use special include files; just use the
4813         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
4814         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
4815         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
4816         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
4817         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
4818         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
4819         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
4820         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
4821         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
4822         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
4823         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
4824         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
4825         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
4826         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
4827         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
4828         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
4829         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
4830         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
4831         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
4832         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
4833         WINT_MAX.  Check for C99 conformance more strictly, by detecting
4834         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
4835         not check for things that C99 does not require, e.g., int8_t.  If
4836         a test isn't needed unless <stdint.h> isn't working, and is
4837         unlikely to be needed for any other reason, then don't do it
4838         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
4839         size_t, since we assume C89 freestanding at least.  Do not check
4840         for sig_atomic_t, wchar_t, or wint_t, since the code now does
4841         the right thing even if the types are not defined.  Instead use:
4842         (gl_STDINT_TYPE_PROPERTIES): New macro.
4843         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
4844         testing whether <sys/types.h> clashes, as Autoconf does this for
4845         us now.  All uses removed.
4846         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
4847         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
4848         (gl_CHECK_TYPE_SAME):
4849         Remove; no longer needed.
4850         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
4851         exists, since we'll return 0 anyway in that case.
4852         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
4853
4854 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
4855
4856         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
4857         possible collision with system files.
4858         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
4859         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
4860         WCHAR_MIN and WCHAR_MAX in this case.
4861         (<stddef.h>): Do not include; no longer needed.
4862         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
4863         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
4864         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
4865         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
4866         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
4867         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
4868         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
4869         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
4870         !defined(__c99))]: Include in this case too, since it's harmless
4871         now.
4872         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
4873         dangerous to do so.
4874         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
4875         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
4876         (_STDINT_MIN, _STDINT_MAX): New macros.
4877         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
4878         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
4879         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
4880         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
4881         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
4882         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
4883         macros, not typedefs; this simplifies things quite a bit.
4884         Use long int for all types narrower than int64_t.
4885         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
4886         Define in terms of long long int or int64_t or long int,
4887         not int64_t or int32_t.  This saves some compile-time testing.
4888         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
4889         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
4890         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
4891         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
4892         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
4893         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
4894         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
4895         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
4896         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
4897         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
4898         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
4899         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
4900         undef any previous version and define our own version, for
4901         simplicity and consistency with the new macros for types.
4902         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
4903         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
4904         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
4905         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
4906         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
4907         @WINT_T_SUFFIX@ to keep things simple here.
4908         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
4909         Simplify by assuming typical 8/16/32/64 host, since we're
4910         already doing that elsewhere anyway.
4911         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
4912         and assume long long int is 64 bits if available.  This
4913         speeds up 'configure'.
4914
4915 2006-07-01  Eric Blake  <ebb9@byu.net>
4916
4917         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
4918         Reported by Andreas Buening.
4919
4920 2006-07-01  Eric Blake  <ebb9@byu.net>
4921
4922         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
4923
4924 2006-06-30  Jim Hyslop <jhyslop@dreampossible.ca>  (tiny change)
4925
4926         * lib/getaddrinfo.c: fixed typo
4927
4928 2006-06-29  Jim Meyering  <jim@meyering.net>
4929
4930         * modules/strftime (Maintainer): Add my name, since with the
4931         FPRINTFTIME changes strftime.c has forked from glibc.
4932
4933 2006-06-29  Eric Blake  <ebb9@byu.net>
4934
4935         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
4936
4937 2006-06-29  Eric Blake  <ebb9@byu.net>
4938
4939         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
4940
4941 2006-06-29  Eric Blake  <ebb9@byu.net>
4942
4943         * lib/stat_.h: New file.
4944
4945 2006-06-29  Eric Blake  <ebb9@byu.net>
4946
4947         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
4948         unused static function.
4949
4950 2006-06-29  Eric Blake  <ebb9@byu.net>
4951
4952         * doc/functions.texi (Function Portability): Document missing lstat
4953         on mingw.
4954
4955 2006-06-29  Eric Blake  <ebb9@byu.net>
4956
4957         * MODULES.html.sh: Add sys_stat.
4958         * modules/sys_stat: New module.
4959         * modules/mkstemp (Depends-on): Add sys_stat.
4960
4961 2006-06-29  Derek R. Price  <derek@ximbiot.com>
4962
4963         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
4964
4965 2006-06-29  Derek R. Price  <derek@ximbiot.com>
4966
4967         * m4/c-bs-a.m4: Removed.
4968
4969 2006-06-29  Derek R. Price  <derek@ximbiot.com>
4970
4971         * lib/strftime.c: Assume strftime() exists.
4972
4973 2006-06-29  Derek Price  <derek@ximbiot.com>
4974
4975         * modules/c-bs-a: Removed - \a is C89.
4976         * MODULES.html.sh: Remove c-bs-a.
4977
4978 2006-06-29  Bruno Haible  <bruno@clisp.org>
4979
4980         * modules/wcwidth (License): Change to LGPL.
4981
4982 2006-06-28  Simon Josefsson  <jas@extundo.com>
4983
4984         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
4985         on _WIN32.
4986
4987         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
4988         getnameinfo.
4989
4990 2006-06-28  Simon Josefsson  <jas@extundo.com>
4991
4992         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
4993
4994 2006-06-28  Simon Josefsson  <jas@extundo.com>
4995
4996         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
4997         functions there.  It will succeed on Windows XP, but on Windows
4998         2000 and (presumably) earlier, it will fail, and use the internal
4999         re-implementation.
5000         (use_win32_p): New function.
5001         (getaddrinfo): Use strtoul on servname, to support numeric ports.
5002         Support AI_NUMERICSERV to disable getservbyname.
5003         (getnameinfo): New function, only supports
5004         NI_NUMERICHOST|NI_NUMERICSERV for now.
5005
5006         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
5007         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
5008         getnameinfo.
5009
5010 2006-06-28  Eric Blake  <ebb9@byu.net>
5011
5012         * modules/wcwidth: New file.
5013         * modules/mbchar (Depends-on): Add wcwidth.
5014         * modules/mbswidth (Depends-on): Add wcwidth.
5015         * MODULES.html.sh: Add wcwidth.
5016
5017 2006-06-28  Eric Blake  <ebb9@byu.net>
5018
5019         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
5020         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
5021
5022 2006-06-28  Eric Blake  <ebb9@byu.net>
5023
5024         * lib/xvasprintf.h: Fix comments.
5025
5026 2006-06-28  Eric Blake  <ebb9@byu.net>
5027
5028         * lib/mbchar.h (wcwidth): Include wcwidth.h.
5029         * lib/mbswidth.c (wcwidth): Move from here...
5030         * lib/wcwidth.h: ...to this new file.
5031
5032 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5033
5034         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
5035
5036         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
5037         it's obsolete.
5038         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
5039
5040 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5041
5042         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
5043         Autoconf 2.60 says this stuff was obsolete.
5044
5045 2006-06-28  Bruno Haible  <bruno@clisp.org>
5046
5047         * modules/wcwidth (Files): Add m4/wchar_t.m4.
5048
5049 2006-06-28  Bruno Haible  <bruno@clisp.org>
5050
5051         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
5052         gt_TYPE_WCHAR_T.
5053
5054 2006-06-28  Bruno Haible  <bruno@clisp.org>
5055
5056         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
5057         declaration for wcwidth.
5058         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
5059
5060 2006-06-28  Bruno Haible  <bruno@clisp.org>
5061
5062         * lib/mkdtemp.c [MINGW]: Include <io.h>.
5063         (mkdir): Define using _mkdir.
5064
5065 2006-06-28  Bruno Haible  <bruno@clisp.org>
5066
5067         * lib/getaddrinfo.h: Fix POSIX URL.
5068         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
5069         _WIN32.
5070         (use_win32_p): Make static.
5071         (getaddrinfo): Reject service name if it is empty or does not consist
5072         solely of decimal digits, or if its value is > 65535.
5073         (getnameinfo): Remove useless casts.
5074
5075 2006-06-27  Simon Josefsson  <jas@extundo.com>
5076
5077         * modules/sys_select: New file, suggested by Bruno Haible, Paul
5078         Eggert and Martin Lambers.
5079
5080 2006-06-27  Simon Josefsson  <jas@extundo.com>
5081
5082         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
5083         Eggert and Martin Lambers.
5084
5085 2006-06-27  Bruno Haible  <bruno@clisp.org>
5086
5087         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
5088         result to 0, not to empty.
5089         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
5090
5091 2006-06-27  Bruno Haible  <bruno@clisp.org>
5092
5093         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
5094
5095 2006-06-26  Simon Josefsson  <jas@extundo.com>
5096
5097         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
5098         present.
5099
5100 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
5101
5102         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
5103         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
5104         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
5105
5106 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
5107
5108         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
5109
5110 2006-06-26  Bruno Haible  <bruno@clisp.org>
5111
5112         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
5113
5114 2006-06-26  Bruno Haible  <bruno@clisp.org>
5115
5116         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
5117
5118 2006-06-26  Bruno Haible  <bruno@clisp.org>
5119
5120         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
5121         SGI C compiler in pre-C99 mode.
5122         Suggested by Mark D. Baushke and Larry Jones.
5123
5124 2006-06-26  Bruno Haible  <bruno@clisp.org>
5125
5126         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
5127         WCHAR_MAX.
5128         Reported by Mark D. Baushke and Larry Jones.
5129
5130 2006-06-26  Bruno Haible  <bruno@clisp.org>
5131
5132         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
5133         in pre-C99 mode.
5134         Suggested by Mark D. Baushke and Larry Jones.
5135
5136 2006-06-23  Simon Josefsson  <jas@extundo.com>
5137             Bruno Haible  <bruno@clisp.org>
5138
5139         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
5140         Emit mostlyclean-local rule.
5141         (func_emit_tests_Makefile_am): Likewise.
5142         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
5143
5144 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
5145
5146         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
5147
5148 2006-06-23  Bruno Haible  <bruno@clisp.org>
5149
5150         * tests/test-stdint.c: Update to match ISO C 99 Technical
5151         Corrigendum 1.
5152
5153 2006-06-23  Bruno Haible  <bruno@clisp.org>
5154
5155         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
5156
5157 2006-06-23  Bruno Haible  <bruno@clisp.org>
5158
5159         * lib/stdint_.h: Treat IRIX like OpenBSD.
5160
5161 2006-06-23  Bruno Haible  <bruno@clisp.org>
5162
5163         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
5164         ISO C 99 Technical Corrigendum 1.
5165
5166 2006-06-22  Simon Josefsson  <jas@extundo.com>
5167
5168         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
5169         MinGW.
5170
5171 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
5172
5173         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
5174         needed.  Some compiler complained about some of them.  Problem reported
5175         by Larry Jones in
5176         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
5177
5178 2006-06-21  Simon Josefsson  <jas@extundo.com>
5179
5180         * tests/test-getaddrinfo.c: New file.
5181
5182         * modules/getaddrinfo-tests: New file.
5183
5184         * MODULES.html.sh: Add inet_pton.
5185
5186         * modules/inet_pton: New file.
5187
5188 2006-06-21  Simon Josefsson  <jas@extundo.com>
5189
5190         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
5191         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
5192         of using the (limited) gnulib implementation on Windows XP.
5193
5194         * m4/inet_pton.m4: New file.
5195
5196 2006-06-21  Simon Josefsson  <jas@extundo.com>
5197
5198         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
5199         variable.
5200
5201         * lib/socket_.h: Don't define WINVER.
5202
5203         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
5204         slightly modified to work in gnulib.
5205
5206 2006-06-21  Simon Josefsson  <jas@extundo.com>
5207
5208         * doc/gnulib.texi (Windows sockets): Add.
5209
5210 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
5211
5212         * lib/read-file.c (fread_file): Start with buffer allocation of
5213         0 bytes rather than 1 byte; this simplifies the code.
5214         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
5215         code to free buffer and save/restore errno.
5216         (internal_read_file): Remove unused local.
5217
5218 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
5219
5220         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
5221         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
5222         Problem reported by Denis Excoffier in
5223         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
5224
5225 2006-06-19  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
5226
5227         * modules/sys_socket, modules/socklen: Include sys/types since
5228         FreeBSD 4.x's sys/socket.h needs it.
5229
5230 2006-06-19  Simon Josefsson  <jas@extundo.com>
5231
5232         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
5233
5234 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
5235
5236         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
5237
5238 2006-06-19  Bruno Haible  <bruno@clisp.org>
5239
5240         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
5241         and FULL_PATH_INTTYPES_H in angle brackets.
5242         Reported by Mark D. Baushke <mdb@gnu.org>.
5243
5244 2006-06-17  Eric Blake  <ebb9@byu.net>
5245
5246         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
5247         errno.
5248
5249 2006-06-17  Bruno Haible  <bruno@clisp.org>
5250
5251         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
5252         <sys/inttypes.h>.
5253
5254 2006-06-17  Bruno Haible  <bruno@clisp.org>
5255
5256         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
5257         whether errno is declared. Assume <errno.h> declares errno.
5258
5259 2006-06-17  Bruno Haible  <bruno@clisp.org>
5260
5261         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
5262
5263 2006-06-17  Bruno Haible  <bruno@clisp.org>
5264
5265         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
5266         problem on Solaris 2.5.1.
5267
5268 2006-06-16  Eric Blake  <ebb9@byu.net>
5269
5270         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
5271         * lib/unicodeio.c [!defined errno]: Likewise.
5272         * lib/strtol.c [!defined errno]: Likewise.
5273         * lib/strtod.c [!defined errno]: Likewise.
5274
5275 2006-06-15  Eric Blake  <ebb9@byu.net>
5276
5277         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
5278
5279 2006-06-15  Eric Blake  <ebb9@byu.net>
5280
5281         * config/srclist.txt (ssize_t.m4): Lose sync.
5282
5283 2006-06-15  Bruno Haible  <bruno@clisp.org>
5284
5285         * modules/stdint (Files): Include m4/full-header-path.m4,
5286         m4/size_max.m4, m4/wchar_t.m4.
5287         (Makefile.am): Many more substitutions.
5288         * modules/stdint-tests: New file.
5289         * tests/test-stdint.c: New file.
5290
5291 2006-06-15  Bruno Haible  <bruno@clisp.org>
5292
5293         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
5294         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
5295         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
5296         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
5297         gl_CHECK_TYPE_SAME): New macros.
5298
5299 2006-06-15  Bruno Haible  <bruno@clisp.org>
5300
5301         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
5302
5303 2006-06-15  Bruno Haible  <bruno@clisp.org>
5304
5305         * lib/stdint_.h: Rewritten to be fully auto-configured.
5306         Fixes bug on HP-UX/IA64.
5307
5308 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
5309
5310         * lib/getdate.y (__attribute__): Don't define if already defined.
5311         Problem reported by Larry Jones.
5312         * lib/utimens.c (__attribute__): Likewise.
5313
5314 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
5315
5316         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
5317         reported by Andreas Schwab.
5318
5319 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5320             Bruno Haible  <bruno@clisp.org>
5321
5322         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
5323         check for the declaration of strnlen and a run test that exposes the
5324         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
5325         rpl_strndup.
5326
5327 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5328             Bruno Haible  <bruno@clisp.org>
5329
5330         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
5331
5332 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5333
5334         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
5335         compile test, for Tru64 4.0D.
5336
5337 2006-05-28  Karl Berry  <karl@gnu.org>
5338
5339         * config/srclist.txt (printf-args.c): lose sync.
5340
5341 2006-05-26  Martin Lambers  <marlam@marlam.de>
5342
5343         * lib/getpass.c: Updates the test for the native W32 API, and adds
5344         missing includes, thus fixing compilation warnings.
5345
5346 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
5347
5348         * lib/exclude.c (exclude_fnmatch): New function.
5349         (excluded_file_name): Call exclude_fnmatch.
5350         * lib/exclude.h (excluded_file_name): New prototype
5351
5352 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
5353
5354         * lib/tempname.c (small_open, large_open): New macros.
5355         (__open, __open64) [!_LIBC]: Remove.
5356         (__gen_tempname): Use small_open and large_open instead of __open
5357         and __open64.  This fixes a portability bug on HP-UX 11.11i
5358         reported by Simon Wing-Tang in
5359         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
5360
5361 2006-05-24  Bruno Haible  <bruno@clisp.org>
5362
5363         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
5364         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
5365         Reported by Thorsten Maerz <torte@netztorte.de> via
5366         Aaron Stone <aaron@serendipity.cx>.
5367
5368 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
5369
5370         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
5371         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
5372         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
5373         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
5374         not really conditional on the cache.
5375         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
5376
5377 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
5378
5379         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
5380         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
5381         (my_usleep): Don't mishandle maximum value.
5382
5383 2006-05-19  Jim Meyering  <jim@meyering.net>
5384
5385         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
5386
5387 2006-05-17  Bruno Haible  <bruno@clisp.org>
5388
5389         Cygwin portability.
5390         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
5391
5392 2006-05-17  Bruno Haible  <bruno@clisp.org>
5393
5394         * lib/stdint_.h: Fix recognition of Cygwin.
5395
5396 2006-05-15  Bruno Haible  <bruno@clisp.org>
5397
5398         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
5399         on libtool patch by Ralf Wildenhues.
5400
5401 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
5402
5403         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
5404         test for C99 conformance; (bool) 0.5 is an integer constant
5405         expression, but (bool) -0.5 is not.  Problem reported by Fedor
5406         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
5407
5408 2006-05-11  Simon Josefsson  <jas@extundo.com>
5409
5410         * m4/xvasprintf.m4: Fix obvious typo.
5411
5412 2006-05-11  Jim Meyering  <jim@meyering.net>
5413
5414         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
5415         James Lemley.
5416
5417 2006-05-10  Simon Josefsson  <jas@extundo.com>
5418
5419         * lib/md4.c: Typo fix, update copyright years.
5420         (K1, K2): Don't use L because it turn computations into 64-bit on
5421         64-bit platforms.
5422
5423 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
5424
5425         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
5426         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
5427         unwanted sign propagation, e.g., on hosts with 64-bit int.
5428         There still are some problems with reeelly weird theoretical hosts
5429         (e.g., 33-bit int) but it's not worth worrying about now.
5430         * lib/sha1.c (rol): Likewise.
5431         (K1, K2, K3, K4): Remove unnecessary L suffix.
5432
5433 2006-05-10  Bruno Haible  <bruno@clisp.org>
5434
5435         * lib/des.c: Cast to avoid warnings.
5436
5437 2006-05-09  Bruno Haible  <bruno@clisp.org>
5438
5439         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
5440         (Depends-on): Depend also on xsize, stdarg.
5441         (configure.ac): Add gl_XVASPRINTF.
5442
5443 2006-05-09  Bruno Haible  <bruno@clisp.org>
5444
5445         * m4/xvasprintf.m4: New file.
5446
5447 2006-05-09  Bruno Haible  <bruno@clisp.org>
5448
5449         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
5450         (EOVERFLOW): Define fallback value.
5451         (xstrcat): New function.
5452         (xvasprintf): Recognize the special case of a string concatenation.
5453
5454 2006-05-08  Eric Blake  <ebb9@byu.net>
5455
5456         * gnulib-tool (func_version): Base copyright year on CVS date.
5457         (func_emit_copyright_notice): New function.
5458         (func_emit_lib_Makefile_am): Use it.
5459         (func_emit_tests_Makefile_am): Likewise.
5460         (func_import): Likewise.
5461
5462 2006-05-08  Bruno Haible  <bruno@clisp.org>
5463
5464         * modules/stdarg: New file.
5465         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
5466
5467 2006-05-08  Bruno Haible  <bruno@clisp.org>
5468
5469         * m4/stdarg.m4: New file, from GNU gettext.
5470
5471 2006-05-08  Bruno Haible  <bruno@clisp.org>
5472
5473         * config/srclist.txt (build-aux/config.rpath): different from latest
5474         release.
5475
5476 2006-05-08  Bruno Haible  <bruno@clisp.org>
5477
5478         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
5479
5480 2006-05-05  Jim Meyering  <jim@meyering.net>
5481
5482         * m4/warning.m4: New file, derived from bison's file by the same name.
5483
5484 2006-05-03  Bruno Haible  <bruno@clisp.org>
5485
5486         * lib/stdint_.h: Shorter URL.
5487         * lib/inttypes.h: Likewise.
5488
5489 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
5490
5491         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
5492
5493 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
5494
5495         * lib/verify.h: Document the internals better.  Most of this change
5496         was written by Bruno Haible.
5497
5498 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
5499
5500         * doc/verify.texi: New file, partly based on a proposal by
5501         Bruno Haible.
5502
5503 2006-05-02  Bruno Haible  <bruno@clisp.org>
5504
5505         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
5506         test from here...
5507         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
5508
5509 2006-04-29  Bruno Haible  <bruno@clisp.org>
5510
5511         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
5512         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
5513
5514 2006-04-29  Bruno Haible  <bruno@clisp.org>
5515
5516         * gnulib-tool: Make --update option actually work.
5517
5518 2006-04-29  Bruno Haible  <bruno@clisp.org>
5519
5520         * doc/gcd.texi: New file.
5521         * doc/gnulib.texi: Include it.
5522
5523 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
5524
5525         * lib/getdate.y (get_date): When adding relative date, start with the
5526         initial time, not with the result of the first mktime call.
5527
5528 2006-04-25  Bruno Haible  <bruno@clisp.org>
5529
5530         * gnulib-tool (func_import): Output the include directives in three
5531         blocks, sorted separately.
5532         Reported by Ben Pfaff <blp@cs.stanford.edu>.
5533
5534 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
5535
5536         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
5537         to define main with arguments, for C++.  Reported by Eric Blake.
5538         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
5539         Prefer 'int main ()' to 'int main (void)', for C++.
5540         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
5541         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
5542         for 'main', for C99 and C++.
5543
5544 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
5545
5546         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
5547         Don't assume that exit status -1 is valid.
5548         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
5549         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
5550         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
5551         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
5552         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
5553         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
5554         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
5555         functions can be used without declaring them, or that you can
5556         exit with status -1.
5557         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
5558
5559 2006-04-24  Karl Berry  <karl@gnu.org>
5560
5561         * config/srclist.txt (longdouble.m4): sync lost.
5562
5563 2006-04-24  Eric Blake  <ebb9@byu.net>
5564
5565         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
5566
5567 2006-04-24  Bruno Haible  <bruno@clisp.org>
5568
5569         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
5570         poll() implementation in AIX.
5571         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5572
5573 2006-04-24  Bruno Haible  <bruno@clisp.org>
5574
5575         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
5576         assigned exactly once.
5577
5578 2006-04-23  Claudio Fontana  <claudio@gnu.org>
5579             Bruno Haible  <bruno@clisp.org>
5580
5581         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
5582         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
5583         for AM_CPPFLAGS.
5584
5585 2006-04-23  Bruno Haible  <bruno@clisp.org>
5586
5587         * modules/copy-file: Depend on unistd.
5588         * modules/execute: Likewise.
5589         * modules/fatal-signal: Likewise.
5590         * modules/findprog: Likewise.
5591         * modules/mkdtemp : Likewise.
5592         * modules/pipe: Likewise.
5593         * modules/wait-process: Likewise.
5594
5595 2006-04-23  Bruno Haible  <bruno@clisp.org>
5596
5597         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
5598         condition was already detected.
5599         Reported by Ben Pfaff <blp@cs.stanford.edu>.
5600
5601 2006-04-23  Bruno Haible  <bruno@clisp.org>
5602
5603         * lib/copy-file.c: Include <unistd.h> unconditionally.
5604         * lib/execute.c: Likewise.
5605         * lib/fatal-signal.c: Likewise.
5606         * lib/findprog.c: Likewise.
5607         * lib/mkdtemp.c: Likewise.
5608         * lib/pipe.h: Likewise.
5609         * lib/pipe.c: Likewise.
5610         * lib/wait-process.h: Likewise.
5611
5612 2006-04-23  Bruno Haible  <bruno@clisp.org>
5613
5614         * gnulib-tool (func_usage): Fix --import description. Document
5615         --update.
5616         (func_import): Create temporary file in a temporary directory, if
5617         --dry-run is specified. Silence errors from 'grep' when there are no
5618         m4 files in $m4dir.
5619         (func_create_testdir): Silence errors from 'grep' when there are no
5620         m4 files in $m4dir.
5621         Reported by Karl Berry <karl@freefriends.org>.
5622
5623 2006-04-20  Bruno Haible  <bruno@clisp.org>
5624
5625         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
5626         one argument, so that the code will be portable to Autoconf 2.60.
5627         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
5628         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
5629         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
5630
5631 2006-04-19  Derek Price  <derek@ximbiot.com>
5632             Eric Blake  <ebb9@byu.net>
5633
5634         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
5635         rather than "/full/path.h".  Update comment to match.  Shorten &
5636         generalize m4_translit call via AS_TR_CPP.
5637
5638 2006-04-19  Derek Price  <derek@ximbiot.com>
5639             Eric Blake  <ebb9@byu.net>
5640
5641         * lib/inttypes.h: Correct grammar in comment.
5642
5643 2006-04-18  Derek Price  <derek@ximbiot.com>
5644             Paul Eggert  <eggert@cs.ucla.edu>
5645
5646         * modules/inttypes: New file.
5647         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
5648
5649 2006-04-18  Derek Price  <derek@ximbiot.com>
5650             Paul Eggert  <eggert@cs.ucla.edu>
5651
5652         * m4/_inttypes_h.m4, full-header-path.m4, include_next: New files.
5653
5654 2006-04-18  Derek Price  <derek@ximbiot.com>
5655             Paul Eggert  <eggert@cs.ucla.edu>
5656
5657         * lib/inttypes.h: New file.
5658         * lib/strtoimax.c: Assume <inttypes.h>.
5659
5660 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
5661
5662         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
5663         isn't mounted.  Problem reported by Kir Kolyshkin.
5664
5665 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
5666
5667         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
5668         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
5669         Derek R. Price.
5670         * lib/regex.h (RE_DUP_MAX): Update comment to match current
5671         implementation.
5672
5673 2006-04-12  Eric Blake  <ebb9@byu.net>
5674
5675         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
5676         is now done automatically by the corresponding Autoconf macro.
5677
5678 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
5679
5680         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
5681         time_r.h.
5682
5683 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5684
5685         Merge regex changes from libc, removing some of our
5686         POSIX-conformance changes that were rejected and redoing them in a
5687         less-intrusive way.
5688
5689         * lib/regcomp.c (re_compile_internal, init_dfa):
5690         Length arg is now size_t, not Idx.  All uses changed.
5691         (peek_token): Forward decl now says internal_function.
5692         (__re_error_msgid, __re_error_msgid_idx):
5693         Now static rather than extern with attribute_hidden.
5694         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
5695         For some reason libc prefers K&R style defns for external functions.
5696         (regerror) [!defined _LIBC]: Likewise.
5697         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
5698         (seek_collating_symbol_entry, lookup_collation_sequence_value):
5699         (build_range_exp, build_collating_symbol):
5700         Use K&R-style defn.
5701         (re_compile_fastmap): Use '\0' to memset, not 0.
5702         (utf8_sb_map): Make the calculations more obvious.
5703         (init_dfa, parse_bracket_exp, build_charclass_op):
5704         Call calloc and cast result, as glibc does.
5705         (init_word_char, fetch_token, peek_token, peek_token_bracket):
5706         (build_range_exp, build_collating_symbol):
5707         Now internal functions.
5708
5709         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
5710
5711         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
5712         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
5713         Don't depend on VMS; depend on __VMS instead, for POSIX
5714         namespace cleanness.
5715         (regoff_t): Define to ssize_t, not long int.
5716
5717         Remove the REG_ macros named below.  Instead, make the old names
5718         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
5719         __USE_GNU_REGEX.
5720         (REG_BACKSLASH_ESCAPE_IN_LISTS):
5721         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
5722         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
5723         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
5724         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
5725         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
5726         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
5727         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
5728         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
5729         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
5730         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
5731         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
5732         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
5733         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
5734         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
5735         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
5736         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
5737         (REG_NREGS):
5738         Remove.  All uses replaced by the old RE_* names.
5739         (RE_BACKSLASH_ESCAPE_IN_LISTS):
5740         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
5741         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
5742         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
5743         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
5744         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
5745         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
5746         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
5747         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
5748         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
5749         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
5750         Don't bother having these macros be independent of each others'
5751         values, since they no longer exist in the POSIX name space.
5752
5753         Rename the following member names back to their old names,
5754         unless !__USE_GNU_REGEX.  All uses changed back.
5755         (buffer): Renamed from re_buffer.
5756         (allocated): Renamed from re_allocated.
5757         (used): Renamed from re_used.
5758         (syntax): Renamed from re_syntax.
5759         (fastmap): Renamed from re_fastmap.
5760         (translate): Renamed from re_translate.
5761         (can_be_null): Renamed from re_can_be_null.
5762         (regs_allocated): Renamed from re_regs_allocated.
5763         (fastmap_accurate): Renamed from re_fastmap_accurate.
5764         (no_sub): Renamed from re_no_sub.
5765         (not_bol): Renamed from re_not_bol.
5766         (not_eol): Renamed from re_not_eol.
5767         (newline_anchor): Renamed from re_newline_anchor.
5768         (num_regs): Renamed from rm_num_regs.
5769         (start): Renamed from rm_start.
5770         (end): Renamed from rm_end.
5771
5772         (free_state): Move up a bit.
5773
5774         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
5775         #define to be empty.
5776         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
5777         when that is what is intended.
5778         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
5779         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
5780         (MAX): New macro.
5781         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
5782         All uses changed back to re_malloc, etc.  It's now the caller's
5783         responsibility to check for overflow; all callers changed.
5784         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
5785         (re_x2nrealloc): Remove.
5786         (free_state): Remove decl.
5787
5788         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
5789         (re_set_registers, re_exec):
5790         Use K&R-style defn.
5791
5792         2006-01-31  Roland McGrath  <roland@redhat.com>
5793
5794         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
5795         Reported by Mike Frysinger <vapier@gentoo.org>.
5796
5797         2006-01-15  Andreas Jaeger  <aj@suse.de>
5798
5799         [BZ #1950]
5800         * lib/regex_internal.c (re_string_reconstruct): Adjust for
5801         build_wcs_upper_buffer change.
5802         (build_wcs_upper_buffer): Change return type.
5803
5804         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
5805
5806         * lib/regex_internal.h: Include <stdint.h> if available.
5807
5808         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
5809
5810         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
5811
5812         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
5813
5814         * lib/regcomp.c: Adjust for changed secondary hash function.
5815
5816         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
5817
5818         * lib/regex.h: Pretty printing.
5819         Clean up namespace a bit.
5820
5821         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
5822
5823         * lib/regexec.c (update_cur_sifted_state, check_arrival,
5824         check_arrival_add_next_nodes): Avoid using uninitialized variable.
5825
5826         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
5827                     Ulrich Drepper  <drepper@redhat.com>
5828
5829         [BZ #1302]
5830         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
5831         changed.
5832         (bitset_word_t): Renamed from bitset_word.  All uses changed.
5833
5834         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
5835
5836         [BZ #281]
5837         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
5838         * lib/regcomp.c: Remove unnecessary uses of
5839         unsigned RE_TRANSLATE_TYPE.
5840         * lib/regex_internal.h: Likewise.
5841         * lib/regex_internal.c: Likewise.
5842         * lib/regexec.c: Likewise.
5843         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
5844
5845         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
5846
5847         * lib/regexec.c (find_recover_state): Remove unnecessary
5848         initialization.
5849         (transit_state_bkref): Make DFA a const pointer.
5850         (get_subexp): Likewise.
5851         (check_arrival): Likewise.
5852         (update_cur_sifted_state): Likewise.
5853         (re_search_internal): Likewise.
5854         (prune_impossible_nodes): Likewise.
5855         (acquire_init_state_context): Likewise.
5856         (proceed_next_node): Likewise.
5857         (set_regs): Likewise.
5858         (free_fail_stack_return): Likewise.
5859         (check_arrival_expand_ecl): Mark DFA parameter as const.
5860         (check_arrival_expand_ecl_sub): Likewise.
5861         (check_subexp_limits): Likewise.
5862         (sub_epsilon_src_nodes):  Likewise.
5863         (add_epsilon_src_nodes):  Likewise.
5864         (merge_state_array): Likewise.
5865         (update_regs): Likewise.
5866         (build_trtable): Likewise.
5867         (sift_states_backward): Mark MCTX parameter as const.
5868         (build_sifted_states): Likewise.
5869         (update_cur_sifted_state): Likewise.
5870         (sift_states_mkref): Likewise.
5871         (check_arrival_expand_ecl): Mark eclosure as const.
5872         (check_dst_limits_calc_pos_1): Likewise.
5873         * lib/regex_internal.h (re_match_context_t): Make dfa a const
5874         pointer.
5875
5876         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
5877
5878         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
5879         (transit_state_sb): Likewise.
5880         (transit_state_mb): Likewise.
5881         (sift_states_iter_mb): Likewise.
5882         (check_arrival_add_next_nodes): Likewise.
5883         (check_node_accept_bytes): Change first parameter to pointer-to-const.
5884         [_LIBC] (re_search_2_stub): Use mempcpy.
5885
5886         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
5887         mbrtowc for very simple UTF-8 case.
5888
5889         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
5890         a pointer-to-const.
5891         (re_acquire_state_context): Likewise.
5892         * lib/regex_internal.h: Adjust prototypes.
5893
5894         * lib/regex.c: Prevent using C++ compilers.
5895
5896         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
5897         (re_acquire_state_context): Likewise.
5898
5899 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5900
5901         * modules/regex (Depends-on): Add ssize_t.
5902
5903 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5904
5905         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
5906         translation table.
5907
5908 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5909
5910         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
5911
5912 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
5913             Bruno Haible  <bruno@clisp.org>
5914
5915         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
5916         <sys/types.h> and <inttypes.h>.
5917
5918 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5919
5920         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
5921         `__error_t_defined', so argp.h will not typedef the former.
5922
5923 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
5924
5925         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
5926         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
5927         glibc names.  Even if glibc is changed to conform to POSIX, the
5928         traditional names will be available anyway, since regex depends on
5929         the extensions module.  Also, fix a longstanding typo in the
5930         implementation of Spencer ERE test #75 from grep 2.3.  Problems
5931         reported by Emanuele Giaquinta.  Also, change sense of cached
5932         variable, so that the message makes sense.
5933
5934 2006-03-24  Simon Josefsson  <jas@extundo.com>
5935
5936         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
5937         including some doc fixes.
5938         (base64_encode_alloc): Fix +1 bug on allocation failures.
5939
5940 2006-03-24  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5941
5942         * lib/base64.c (base64_encode): Do not read past end of array with
5943         unsanitized input on systems with CHAR_BIT > 8.
5944
5945 2006-03-24  Eric Blake  <ebb9@byu.net>
5946
5947         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
5948
5949 2006-03-22  Karl Berry  <karl@gnu.org>
5950
5951         * config/srclist.txt (*setenv.[ch]): get from coreutils.
5952         * config/srclistvars.sh (COREUTILS): new var.
5953
5954 2006-03-17  Jim Meyering  <jim@meyering.net>
5955
5956         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
5957         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
5958
5959 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
5960
5961         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
5962         no longer needs it.  Instead, check that regoff_t is as least
5963         as wide as ptrdiff_t.
5964
5965         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
5966         so that our regex.h stays compatible with the installed regex.
5967         This is helpful for installers who configure --without-included-regex.
5968         Problem reported by Emanuele Giaquinta.
5969
5970 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
5971
5972         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
5973         Typedef to long int, not to off_, as POSIX will likely change
5974         in that direction.
5975
5976 2006-03-15  Eric Blake  <ebb9@byu.net>
5977
5978         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
5979
5980 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
5981
5982         * lib/argp-help.c (validate_uparams): Fix typo
5983         * lib/argp-parse.c (argp_default_options): Consistently begin help
5984         messages with a lowercase letter.
5985
5986 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
5987
5988         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
5989         overrun buffers and shouldn't be used (much as gets shouldn't be
5990         used).
5991         * lib/time_r.c (asctime_r, ctime_r): Likewise.
5992
5993 2006-03-08  Simon Josefsson  <jas@extundo.com>
5994
5995         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
5996         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5997
5998 2006-03-08  Simon Josefsson  <jas@extundo.com>
5999
6000         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
6001         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6002
6003 2006-03-08  Simon Josefsson  <jas@extundo.com>
6004
6005         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
6006         signal that configure disabled the device.
6007
6008 2006-03-08  Simon Josefsson  <jas@extundo.com>
6009
6010         * build-aux/maint.mk: Fix refresh-po, to handle no translated
6011         languages.
6012
6013 2006-03-07  Simon Josefsson  <jas@extundo.com>
6014
6015         * modules/getopt (Depends-on): Add unistd.
6016
6017         * modules/unistd: New file.
6018
6019 2006-03-07  Simon Josefsson  <jas@extundo.com>
6020
6021         * modules/gc-random: New file.
6022
6023 2006-03-07  Simon Josefsson  <jas@extundo.com>
6024
6025         * m4/unistd_h.m4: New file.
6026
6027 2006-03-07  Simon Josefsson  <jas@extundo.com>
6028
6029         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
6030         test to be side-effect free by storing the result in the cache
6031         variable gl_cv_lib_readline, and moving the assignment of
6032         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
6033         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6034
6035 2006-03-07  Simon Josefsson  <jas@extundo.com>
6036
6037         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
6038         error on missing devices (the functions will return an error).
6039
6040         * m4/gc.m4: Move random stuff to gc-random.m4
6041
6042 2006-03-07  Simon Josefsson  <jas@extundo.com>
6043
6044         * lib/unistd_.h: New file.
6045
6046 2006-03-07  Simon Josefsson  <jas@extundo.com>
6047
6048         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
6049
6050 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6051
6052         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
6053         Problem reported by Juan Manuel Guerrero.
6054
6055 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6056
6057         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
6058         the unistd module.
6059         * lib/getlogin_r.c: Likewise.
6060         * lib/getlogin_r.h: Likewise.
6061         * lib/glob.c: Likewise.
6062         * lib/pagealign_alloc.c: Likewise.
6063         * lib/unistd_.h: Remove; no longer needed.
6064
6065 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6066
6067         * MODULES.html.sh (Support for systems lacking POSIX:2001):
6068         Add unistd.
6069         * modules/c-stack (Depends-on): Add unistd.
6070         * modules/getlogin_r: Likewise.
6071         * modules/glob: Likewise.
6072         * modules/pagealign_alloc: Likewise.
6073         * modules/unistd (Files): Remove lib/unistd_.h.
6074         (EXTRA_DIST): Remove.
6075         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
6076         need unistd_.h.
6077         (MOSTLYCLEANFILES): Remove unistd.h-t.
6078
6079 2006-03-03  Simon Josefsson  <jas@extundo.com>
6080
6081         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
6082
6083 2006-03-03  Simon Josefsson  <jas@extundo.com>
6084
6085         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
6086         libidn and bison.
6087
6088 2006-03-03  Simon Josefsson  <jas@extundo.com>
6089
6090         * build-aux/maint.mk: Add indent target.
6091
6092 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
6093
6094         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
6095         our replacement poll.h in any case, to avoid a differing
6096         declaration from a system header.  Seen on AIX.
6097
6098 2006-03-01  Simon Josefsson  <jas@extundo.com>
6099
6100         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
6101         <kasal@ucw.cz>.
6102
6103 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
6104
6105         * modules/gettime (Depends-on): Add extensions module.
6106         * modules/nanosleep (Depends-on): Likewise.
6107         * modules/settime (Depends-on): Likewise.
6108
6109 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
6110
6111         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
6112         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
6113         pedantically.
6114         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6115         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
6116
6117         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
6118         not "==".  Reported by Ralf Wildenhues.
6119
6120 2006-03-01  Karl Berry  <karl@gnu.org>
6121
6122         * doc/Copyright/request-*: new files, synced from gnuorg.
6123
6124 2006-03-01  Karl Berry  <karl@gnu.org>
6125
6126         * config/srclist.txt (Copyright/*): new entries.
6127
6128 2006-02-28  Simon Josefsson  <jas@extundo.com>
6129
6130         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
6131
6132 2006-02-27  Simon Josefsson  <jas@extundo.com>
6133
6134         * lib/base64.h: Indent #define's.  From Jim Meyering
6135         <jim@meyering.net>.
6136
6137 2006-02-27  Jim Meyering  <jim@meyering.net>
6138
6139         Revert the change of 2006-02-24, so these files can continue
6140         to be sync'd from gettext.
6141         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
6142         of `config.h'.
6143
6144 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
6145
6146         * modules/intprops: New file.
6147         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
6148         Add intprops.
6149         * modules/getloadavg (Files): Remove lib/intprops.h.
6150         (Depends-on): Add intprops.
6151         * modules/human: Likewise.
6152         * modules/inttostr: Likewise.
6153         * modules/openat: Likewise.
6154         * modules/sig2str: Likewise.
6155         * modules/userspec: Likewise.
6156         * modules/utimecmp: Likewise.
6157         * modules/xnanosleep: Likewise.
6158         * modules/xstrtol: Likewise.
6159
6160 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
6161
6162         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
6163         * modules/lock-tests (TESTS): Use $(EXEEXT).
6164         * modules/tls-tests: Likewise.
6165         * modules/argp-tests: Likewise.
6166         (check_PROGRAMS): New var, replacing...
6167         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
6168
6169 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6170
6171         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
6172         `config.h'.
6173
6174 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
6175
6176         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
6177
6178 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6179
6180         Sync from coreutils.
6181         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
6182         gl_CHDIR_SAFER.
6183
6184 2006-02-22  Jim Meyering  <jim@meyering.net>
6185
6186         Sync from coreutils.
6187         * m4/chdir-safer.m4: New file.
6188
6189 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
6190
6191         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
6192         AT_FDCWD exceeds INT_MAX.
6193         * lib/openat.h (AT_FDCWD): Likewise.
6194
6195 2006-02-17  Eric Blake  <address@hidden>
6196
6197         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
6198
6199 2006-02-16  Simon Josefsson  <jas@extundo.com>
6200
6201         * modules/getaddrinfo (Depends-on): Add sys_socket.
6202
6203 2006-02-15  Simon Josefsson  <jas@extundo.com>
6204
6205         * build-aux/maint.mk: Add dsyntax-check rule.
6206
6207 2006-02-15  Eric Blake  <ebb9@byu.net>
6208
6209         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
6210         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
6211         'present but cannot compile' warnings on cygwin.
6212         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
6213         use ws2tcpip.h if sys/socket.h works.
6214         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
6215         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
6216
6217 2006-02-14  Simon Josefsson  <jas@extundo.com>
6218
6219         * modules/maintainer-makefile (Files): Rename.
6220
6221         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
6222         and (the local) Makefile.cfg to maint-cfg.mk.
6223
6224         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
6225         to the latter.
6226
6227         * modules/maintainer-makefile: New module.
6228
6229         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
6230         severaly stripped to make it possible to build it up from scratch
6231         with reliable tests.
6232
6233         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
6234         fixes to permit overriding the default actions when configure and
6235         makefile are not available.
6236
6237 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
6238
6239         Sync from coreutils.
6240         * modules/lstat (Depends-on): Don't depend on xalloc.
6241         (License): Change from GPL to LGPL, since this is now simply a
6242         replacement for a libc function.
6243
6244 2006-02-14  Jim Meyering  <jim@meyering.net>
6245
6246         Sync from coreutils.
6247
6248         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
6249         failure on deficient systems, and simplify gnulib lgpl dependencies.
6250         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
6251         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
6252
6253         * lib/xalloc-die.c: Remove unused definition of N_.
6254
6255 2006-02-14  Jim Meyering  <jim@meyering.net>
6256
6257         Sync from coreutils.
6258         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
6259         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
6260         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
6261         double-quote uses of that variable, to accommodate the rare case in
6262         which getmntent is available in none of the libraries checked.  This
6263         happens at least on FreeBSD 5.0.
6264
6265 2006-02-13  Simon Josefsson  <jas@extundo.com>
6266
6267         * gnulib-tool (Usage): Fix --import, from
6268         karl@freefriends.org (Karl Berry).
6269
6270 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6271
6272         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
6273
6274 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
6275
6276         * lib/argp-namefrob.h: Restore changes accidentally lost during the
6277         "autoupdate" on 2005-12-12.
6278
6279 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
6280
6281         * modules/closeout (Depends-on): Remove atexit.
6282
6283 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
6284
6285         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
6286         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
6287
6288 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
6289
6290         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
6291         __EXTENSIONS__ if this causes compilation to fail.  Problem
6292         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
6293         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
6294
6295 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
6296
6297         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
6298         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
6299         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
6300         All uses changed.
6301
6302 2006-01-26  Simon Josefsson  <jas@extundo.com>
6303
6304         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
6305         prototype is visible on mingw32.
6306
6307         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
6308         for mingw32.
6309
6310         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
6311         mingw32).
6312
6313 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
6314
6315         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
6316         attempt to open for write; this always fails, at least on POSIX
6317         hosts.  This reinstates the 2006-01-09 change, which was
6318         inadvertently removed.
6319
6320 2006-01-26  Bruno Haible  <bruno@clisp.org>
6321
6322         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
6323         Reported by Paul Eggert.
6324
6325 2006-01-26  Bruno Haible  <bruno@clisp.org>
6326             Paul Eggert  <eggert@cs.ucla.edu>
6327
6328         * lib/stdbool_.h (_Bool)
6329         [(! (defined __cplusplus || defined __BEOS__)
6330           && !defined __GNUC__
6331           && !(defined __HP_cc || defined __xlc__
6332                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
6333                || defined __sgi))]:
6334         #define to signed char in these cases too; this simplifies
6335         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
6336         etc., separately) and makes it more conservative.
6337
6338 2006-01-25  Simon Josefsson  <jas@extundo.com>
6339
6340         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
6341         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
6342         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
6343
6344 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
6345
6346         * lib/argp-namefrob.h: Bugfix. Remove stray #
6347
6348 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
6349
6350         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
6351         so that we test the test.
6352         Check for yet another HP-UX cc bug involving *bool |= bool.
6353
6354 2006-01-25  Karl Berry  <karl@gnu.org>
6355
6356         * config/srclist.txt (vasnprintf.c): sync lost.
6357
6358 2006-01-25  Jim Meyering  <jim@meyering.net>
6359
6360         Sync from the stable (b5) branch of coreutils:
6361
6362         * lib/fts.c (fts_children): Don't let close() clobber errno from
6363         failed fchdir().
6364
6365         * lib/fts.c (fts_stat): When following a symlink-to-directory,
6366         don't necessarily interpret stat-fails+lstat-succeeds as indicating
6367         a dangling symlink.  That can also happen at least for ELOOP.
6368         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
6369         FYI, this bug predates the inclusion of fts.c in coreutils.
6370
6371         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
6372         in their own block, so pre-c99 compilers don't object.
6373
6374         Avoid the double-free (first in fts_read, second in fts_close) that
6375         would occur when an `active' directory is made inaccessible (e.g.,
6376         via chmod a-x) during a traversal.
6377         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
6378         before returning.  Reproduce this failure by
6379         mkdir -p a/b; cd a; chmod a-x . b
6380         Reported by Stavros Passas.
6381
6382 2006-01-25  Jim Meyering  <jim@meyering.net>
6383
6384         * lib/fileblocks.c: Remove more useless parentheses.
6385         * lib/readutmp.h: Likewise.
6386
6387 2006-01-25  Bruno Haible  <bruno@clisp.org>
6388
6389         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
6390         warnings.
6391         Reported by Paul Eggert.
6392
6393 2006-01-25  Bruno Haible  <bruno@clisp.org>
6394
6395         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
6396         rid of a trap command. For Solaris sh.
6397         Reported by Mark D. Baushke <mdb@gnu.org>.
6398
6399 2006-01-24  Simon Josefsson  <jas@extundo.com>
6400
6401         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
6402         Bruno.
6403
6404 2006-01-24  Karl Berry  <karl@gnu.org>
6405
6406         * config/srclist.txt (argp-namefrob.h): sync lost.
6407
6408 2006-01-24  Jim Meyering  <jim@meyering.net>
6409
6410         * modules/openat (Files): Add lib/intprops.h.
6411         From Mark D. Baushke.
6412
6413 2006-01-24  Jim Meyering  <jim@meyering.net>
6414
6415         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
6416         Reported by Mark D. Baushke.
6417
6418 2006-01-24  Jim Meyering  <jim@meyering.net>
6419
6420         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
6421
6422 2006-01-24  Bruno Haible  <bruno@clisp.org>
6423
6424         * modules/strnlen (Maintainer): Change from glibc to all.
6425
6426 2006-01-24  Bruno Haible  <bruno@clisp.org>
6427
6428         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
6429         Patch by Paul Eggert.
6430
6431 2006-01-24  Bruno Haible  <bruno@clisp.org>
6432
6433         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
6434         already has it.
6435         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
6436         2005-11-26.
6437
6438         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
6439         'signed char' to avoid problems with the built-in _Bool type.
6440         Reported by Paul Eggert on 2005-11-26.
6441
6442 2006-01-24  Bruno Haible  <bruno@clisp.org>
6443
6444         * gnulib-tool (func_import): Avoid constructing complicated sed
6445         expressions inside backquote.
6446         Report and solution by Mark D. Baushke <mdb@gnu.org>.
6447
6448 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
6449
6450         These changes imported from libc.
6451         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
6452         test and two separate function calls.
6453         * lib/strndup.c (__strndup): Add libc_hidden_def.
6454
6455 2006-01-23  Simon Josefsson  <jas@extundo.com>
6456
6457         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
6458         Remove the test_*_SOURCES variable: automake infers it by default.
6459         * modules/tls-tests: Likewise.
6460
6461 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6462
6463         Work around porting bugs reported by Dieter in
6464         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
6465         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
6466         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
6467         Include "getopt.h" first, to check interface.
6468         (getenv): Declare only if defined HAVE_DECL_GETENV &&
6469         !HAVE_DECL_GETENV.
6470         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
6471         (__strndup): Revert to K&R-style function dfns, the glibc style.
6472         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
6473         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
6474         Include strnlen.h first, to get prototype properly.
6475         (strnlen): Renamed from __strnlen.
6476         Remove weak alias.
6477
6478 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6479
6480         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
6481
6482 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6483
6484         * config/srclist.txt: Adjust to reflect glibc reorganization.
6485         This affects only comments.
6486
6487 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6488
6489          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
6490          Reported by Bruce Korb <bkorb@gnu.org>.
6491
6492 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
6493
6494         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
6495         to pacify gcc -Wswitch-default.
6496
6497 2006-01-22  Bruno Haible  <bruno@clisp.org>
6498
6499         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
6500         temporary buffer for sprintf, take into account the precision also
6501         for 'd', 'i', 'u', 'o', 'x', 'X'.
6502
6503 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
6504
6505         * modules/argp-tests: New module
6506         * tests/test-argp.c: New file
6507         * tests/test-argp-2.sh: New file
6508
6509 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
6510
6511         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
6512         (__argp_base_name): Removed
6513         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
6514         typo.
6515         (__argp_base_name): Provide macro definition or extern declaration
6516         depending on the configuration
6517
6518 2006-01-20  Simon Josefsson  <jas@extundo.com>
6519
6520         * modules/inet_ntop (Depends-on): Depend on sys_socket.
6521
6522 2006-01-20  Simon Josefsson  <jas@extundo.com>
6523
6524         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
6525
6526 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
6527
6528         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
6529         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
6530         Suggested by Bruno Haible.
6531
6532 2006-01-20  Karl Berry  <karl@gnu.org>
6533
6534         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
6535         until changes propagate, I guess.
6536
6537 2006-01-19  Simon Josefsson  <jas@extundo.com>
6538
6539         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
6540
6541 2006-01-19  Simon Josefsson  <jas@extundo.com>
6542
6543         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
6544
6545 2006-01-19  Simon Josefsson  <jas@extundo.com>
6546
6547         * gnulib-tool: Set check_PROGRAMS.
6548
6549         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
6550         modules/des-tests, modules/gc-arcfour-tests,
6551         modules/gc-arctwo-tests, modules/gc-des-tests,
6552         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
6553         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
6554         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
6555         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
6556         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
6557         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
6558         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
6559         test_*_SOURCES.
6560
6561 2006-01-18  Simon Josefsson  <jas@extundo.com>
6562
6563         * modules/socklen (Depends-on): Depend on sys_socket.
6564
6565 2006-01-18  Simon Josefsson  <jas@extundo.com>
6566
6567         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
6568         modules/des-tests, modules/gc-arcfour-tests,
6569         modules/gc-arctwo-tests, modules/gc-des-tests,
6570         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
6571         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
6572         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
6573         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
6574         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
6575         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
6576         $(EXEEXT) to automake TESTS variable, for mingw32.
6577
6578 2006-01-17  Simon Josefsson  <jas@extundo.com>
6579
6580         * modules/socklen (Include): Need sys/socket.h.
6581
6582 2006-01-17  Bruno Haible  <bruno@clisp.org>
6583
6584         * modules/ssize_t (Include): Add <sys/types.h>.
6585
6586 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
6587
6588         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
6589         it's not portable and it doesn't work with cross-compiles.
6590         Problem reported by Bruno Haible.  Fix missing-$ typo in
6591         'test "gl_cv_ignore_unused_libraries" ...' that prevented
6592         -zignore from being used with Sun's C compiler.
6593
6594 2006-01-12  Simon Josefsson  <jas@extundo.com>
6595
6596         * lib/base64.c: Fix warning, reported by Bruno Haible
6597         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
6598
6599 2006-01-12  Bruno Haible  <bruno@clisp.org>
6600
6601         * modules/ldd: New file.
6602         * build-aux/ldd.sh.in: New file.
6603         * MODULES.html.sh (Support for building libraries and executables): Add
6604         ldd.
6605
6606 2006-01-12  Bruno Haible  <bruno@clisp.org>
6607
6608         * m4/ldd.m4: New file.
6609
6610 2006-01-12  Bruno Haible  <bruno@clisp.org>
6611
6612         * gnulib-tool (func_import, func_create_testdir): Don't go into an
6613         endless loop while replacing $auxdir with build-aux.
6614
6615 2006-01-11  Simon Josefsson  <jas@extundo.com>
6616
6617         * lib/stdint_.h (SIZE_MAX): Add missing (.
6618
6619 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
6620
6621         Sync from coreutils.
6622         * lib/md5.c: Fix commentary typos.
6623         (alignof, UNALIGNED_P): No need for a GCC-specific version.
6624         * lib/md5.h (__attribute__): Remove; unused.
6625         * lib/sha1.c: Fix commentary to match md5 better.
6626         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
6627         so that we don't need to worry about alignment.  All uses changed.
6628         This merges the 2005-10-28 md5 change into sha1.
6629
6630 2006-01-11  Jim Meyering  <jim@meyering.net>
6631
6632         Sync from coreutils.
6633         * lib/md5.c (OP): Fix spacing.
6634
6635 2006-01-11  Bruno Haible  <bruno@clisp.org>
6636
6637         Ensure automatic ordering between gl_LOCK and gl_ARGP.
6638         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
6639         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
6640
6641 2006-01-11  Bruno Haible  <bruno@clisp.org>
6642
6643         Ensure automatic ordering between gl_LOCK and gl_ARGP.
6644         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
6645         the "early" section as well.
6646
6647 2006-01-11  Bruno Haible  <bruno@clisp.org>
6648
6649         Avoid "ar: no archive members specified" error on MacOS X.
6650         * gnulib-tool (func_modules_add_dummy): New function.
6651         (func_import, func_create_testdir): Invoke it.
6652
6653 2006-01-11  Bruno Haible  <bruno@clisp.org>
6654
6655         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
6656         with $auxdir in AC_CONFIG_FILES statements.
6657
6658 2006-01-11  Bruno Haible  <bruno@clisp.org>
6659
6660         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6661         Initialize also noinst_HEADERS to empty.
6662
6663 2006-01-11  Bruno Haible  <bruno@clisp.org>
6664
6665         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
6666         variables.
6667         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
6668         autoreconf.
6669
6670 2006-01-11  Bruno Haible  <bruno@clisp.org>
6671
6672         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
6673         overridable by the user.
6674         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6675
6676 2006-01-10  Simon Josefsson  <jas@extundo.com>
6677
6678         * modules/sys_socket: New file.
6679
6680 2006-01-10  Simon Josefsson  <jas@extundo.com>
6681
6682         * m4/sys_socket_h.m4: New file.
6683
6684 2006-01-10  Simon Josefsson  <jas@extundo.com>
6685
6686         * lib/socket_.h: New file.
6687
6688 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6689
6690         * modules/readutmp (Maintainer): Add myself.
6691
6692 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6693
6694         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
6695         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
6696         People who are still concerned with buggy memcmp implementations
6697         can invoke gl_FUNC_MEMCMP themselves.
6698
6699 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6700
6701         * lib/regex_internal.h (BITSET_WORD_BITS):
6702         Work around a bug in 64-bit PGC (before version 6.1-2), where the
6703         preprocessor mishandles large unsigned values as if they were signed.
6704         Problem reported by Claudio Fontana in
6705         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
6706
6707 2006-01-10  Jim Meyering  <jim@meyering.net>
6708
6709         Avoid the double-free (first in fts_read, second in fts_close) that
6710         would occur when an `active' directory is made inaccessible (e.g.,
6711         via chmod a-x) during a traversal.
6712         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
6713         before returning.  Reproduce this failure by
6714         mkdir -p a/b; cd a; chmod a-x . b
6715         Reported by Stavros Passas.
6716
6717         Sync from coreutils.
6718         * lib/sha1.c: Tweak grammar in a comment.
6719
6720 2006-01-10  Jim Meyering  <jim@meyering.net>
6721
6722         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
6723         Patch by Joerg Sonnenberger.
6724
6725 2006-01-10  Bruno Haible  <bruno@clisp.org>
6726
6727         * modules/readutmp: Depend on module free.
6728         * modules/strtok_r: Depend on module restrict.
6729
6730 2006-01-10  Bruno Haible  <bruno@clisp.org>
6731
6732         * modules/gettext (configure.ac): Add an invocation of
6733         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
6734
6735 2006-01-10  Bruno Haible  <bruno@clisp.org>
6736
6737         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
6738         Reported by Werner Lemberg <wl@gnu.org>.
6739
6740 2006-01-10  Bruno Haible  <bruno@clisp.org>
6741
6742         * lib/localcharset.c: Update from GNU gettext.
6743
6744 2006-01-10  Bruno Haible  <bruno@clisp.org>
6745
6746         * lib/argp.h (__const): Remove macro. Use const instead.
6747         * lib/argp-fmtstream.h (__const): Likewise.
6748         * lib/glob_.h (__const): Remove macro.
6749         * lib/glob-libc.h: Use const instead of __const.
6750
6751 2006-01-10  Bruno Haible  <bruno@clisp.org>
6752
6753         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
6754         variable.
6755         Needed to avoid an automake error regarding the 'gettext' module.
6756
6757 2006-01-09  Simon Josefsson  <jas@extundo.com>
6758
6759         * modules/inet_ntop (Depends-on): Add restrict.
6760
6761 2006-01-09  Simon Josefsson  <jas@extundo.com>
6762
6763         * modules/gc-rijndael-tests (License): Put under LGPL.
6764
6765         * modules/gc-des-tests (License): Likewise.
6766
6767         * modules/gc-arcfour-tests (License): Likewise.
6768
6769         * modules/gc-arctwo-tests (License): Likewise.
6770
6771         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
6772
6773         * modules/gc-hmac-sha1-tests (Files): Likewise.
6774
6775         * modules/gc-hmac-md5-tests (License): Likewise.
6776
6777         * modules/gc-sha1-tests (License): Likewise.
6778
6779         * modules/gc-md5-tests (License): Likewise.
6780
6781         * modules/gc-md4-tests (License): Likewise.
6782
6783         * modules/gc-md2-tests (License): Likewise.
6784
6785         * modules/gc-tests (License): Likewise.
6786
6787         * modules/des-tests (License): Likewise.
6788
6789         * modules/md4-tests (License): Likewise.
6790
6791         * modules/md2-tests (License): Likewise.
6792
6793 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6794
6795         Sync from coreutils:
6796
6797         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
6798         * modules/lib-ignore: New file.
6799         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
6800         chdir-safer.m4, lchmod.m4.
6801         * modules/openat: Add mkdirat.c, openat-priv.h.
6802
6803 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6804
6805         Sync from coreutils.
6806         * m4/lib-ignore.m4: New file.
6807         * m4/lchmod.m4: New file.
6808
6809 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6810
6811         Sync from coreutils.
6812         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
6813         for write access: POSIX says that must fail.
6814         * lib/fts.c (diropen): Likewise.
6815         * lib/save-cwd.c (save_cwd): Likewise.
6816         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
6817         well, for minor improvements on hosts that lack O_DIRECTORY.
6818         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
6819         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
6820         Fall back on chown if open failed with EACCES.
6821
6822         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
6823         Report an error at compile-time if only a 1-second nominal clock
6824         resolution is found.
6825
6826         * lib/lchmod.h: New file.
6827         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
6828         (make_dir_parents): Use lchown rather than chown, and
6829         lchmod rather than chmod.
6830
6831         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
6832         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
6833         "proc" reported by n0dalus.
6834
6835         * lib/mountlist.c: Include <limits.h>.
6836         (dev_from_mount_options)
6837         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
6838         New function.  It no longer assumes "dev=" has the System V meaning
6839         on Linux (since it doesn't).  It also parses "dev=" more carefully.
6840         (read_file_system_list)
6841         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
6842         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
6843         dev= in that case.
6844
6845         * lib/posixtm.h (PDS_PRE_2000): New macro.
6846         * lib/posixtm.c (year): Arg is now syntax_bits rather than
6847         allow_century.  All usages changed.  Reject dates outside the range
6848         1969-1999 if PDS_PRE_2000 is used.
6849
6850 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
6851
6852         Sync from coreutils.
6853         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
6854         (Time of day items): Mention the possibility of leap seconds.
6855         Problem reported by Dr. David Alan Gilbert.
6856
6857 2006-01-09  Jim Meyering  <jim@meyering.net>
6858
6859         Sync from coreutils.
6860
6861         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
6862
6863         * lib/chdir-safer.h, chdir-safer.c: New files.
6864
6865         * lib/modechange.c (mode_compile): Reject an invalid mode string
6866         that starts with an octal digit.  From Andreas Gruenbacher.
6867
6868         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
6869         and dup to open_safer and dup_safer, respectively.
6870         (openat_permissive): Fix typo in comment.
6871
6872         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
6873         "gettext.h"; either no longer needed or are guaranteed by openat.h.
6874         (_): Remove; no longer needed.
6875         (openat): Renamed from rpl_openat; no need for rpl_openat
6876         since openat.h renames openat for us.
6877         Replace most of the body with a call to openat_permissive,
6878         to avoid duplicate code.
6879         Port to (probably hypothetical) environments were mode_t is
6880         wider than int.
6881         (openat_permissive): Require mode arg, so that we can check
6882         types better.  Put it just after flags.  Change cwd failure
6883         indicator from pointer-to-bool to pointer-to-errno-value.
6884         All callers changed.
6885         Invoke openat_save_fail and/or openat_restore_fail if
6886         cwd_errno is null, so that openat can call us.
6887         (openat_permissive, fdopendir, fstatat, unlinkat):
6888         Simplify errno handling to avoid some duplicate code,
6889         as it's OK to set errno on success.
6890         * lib/openat.h: Revamp code so that function macros depend on
6891         __OPENAT_PREFIX only, not also on AT_FDCWD.
6892         (openat_ro): Remove.  Caller changed to use openat_permissive.
6893         (openat_permissive): Now a macro, if not a function.
6894         (openat_restore_fail, openat_save_fail): Now always functions,
6895         since mkdirat needs them even if __OPENAT_PREFIX is defined.
6896
6897         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
6898         and openat.c.
6899         * lib/mkdirat.c: Include openat-priv.h.
6900         Remove definitions of macros defined therein.
6901         * lib/openat.c: Likewise.
6902
6903         * lib/mkdirat.c (mkdirat): New file and function.
6904         * lib/openat.h (mkdirat): Declare.
6905
6906         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
6907
6908         * lib/openat.h (openat_permissive): Declare.
6909         (openat_ro): Define.
6910
6911         * lib/openat.c (EXPECTED_ERRNO): New macro.
6912         (openat_permissive): New function -- used in remove.c rewrite.
6913         (all functions): Set errno just before returning, only if there
6914         was an actual failure.
6915         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
6916
6917         Emulate openat-family functions using Linux's procfs, if possible.
6918         Idea and some code based on Ulrich Drepper's glibc changes.
6919
6920         * lib/openat.c: (BUILD_PROC_NAME): New macro.
6921         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
6922         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
6923         before falling back on save_cwd and restore_cwd.
6924         (fdopendir, fstatat, unlinkat): Likewise.
6925
6926         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
6927         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
6928
6929         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
6930         as second argument to va_arg.  Otherwise, some versions of gcc
6931         warn that `if this code is reached, the program will abort'.
6932
6933 2006-01-09  Jim Meyering  <jim@meyering.net>
6934
6935         Sync from coreutils.
6936         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
6937         Require openat-priv.h.
6938
6939 2006-01-09  Bruno Haible  <bruno@clisp.org>
6940
6941         * modules/strnlen (Include): Use strnlen.h.
6942
6943 2006-01-09  Bruno Haible  <bruno@clisp.org>
6944
6945         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
6946
6947 2006-01-09  Bruno Haible  <bruno@clisp.org>
6948
6949         * lib/sysexit_.h (EX_OK): New macro.
6950         Suggested by Martin Lambers <marlam@marlam.de>.
6951
6952 2006-01-09  Bruno Haible  <bruno@clisp.org>
6953
6954         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
6955         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
6956
6957 2006-01-09  Bruno Haible  <bruno@clisp.org>
6958
6959         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
6960         numbers.
6961
6962 2006-01-09  Bruno Haible  <bruno@clisp.org>
6963
6964         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
6965         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
6966         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
6967         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
6968
6969 2006-01-09  Bruno Haible  <bruno@clisp.org>
6970
6971         * build-aux/javacomp.sh.in: New file, moved from lib/.
6972         * modules/javacomp-script (Files): Update.
6973         (configure.ac): Add AC_CONFIG_FILES invocation.
6974         (EXTRA_DIST): Remove variable.
6975
6976         * build-aux/javaexec.sh.in: New file, moved from lib/.
6977         * modules/javaexec (Files): Update.
6978         (configure.ac): Add AC_CONFIG_FILES invocation.
6979         (EXTRA_DIST): Remove javaexec.sh.in.
6980
6981         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
6982         * modules/csharpcomp-script (Files): Update.
6983         (configure.ac): Add AC_CONFIG_FILES invocation.
6984         (EXTRA_DIST): Remove variable.
6985
6986         * build-aux/csharpexec.sh.in: New file, moved from lib/.
6987         * modules/csharpexec (Files): Update.
6988         (configure.ac): Add AC_CONFIG_FILES invocation.
6989         (EXTRA_DIST): Remove csharpexec.sh.in.
6990
6991 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
6992
6993         Sync from coreutils.
6994
6995         Add POSIX ACL support
6996         * lib/acl.h (copy_acl, set_acl): Add declarations.
6997         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
6998         systems other than Linux.
6999         (chmod_or_fchmod): New function: use fchmod when possible,
7000         and chmod otherwise.
7001         (file_has_acl): Add a POSIX ACL implementation, with a
7002         Linux-specific subcase.
7003         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
7004         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
7005         acls are unsupported.
7006         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
7007         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
7008         are unsupported.
7009
7010 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7011
7012         Sync from coreutils.
7013         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
7014
7015 2006-01-07  Bruno Haible  <bruno@clisp.org>
7016
7017         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
7018         gl_EARLY.
7019
7020 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7021
7022         * lib/strftime.c (tzname): Don't declare if it is already #defined.
7023         Problem reported for Mingw by Mark Junker.
7024
7025 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7026
7027         * README: Gnulib normally doesn't generate a tarball.
7028
7029 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
7030
7031         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
7032         long int, not int, for nanosecond counts, so that people who are
7033         used to POSIX struct timespec won't be surprised.  Reported by Jim
7034         Meyering.
7035
7036 2005-12-28  Bruno Haible  <bruno@clisp.org>
7037
7038         * build-aux/config.rpath: Update from GNU gettext.
7039
7040 2005-12-16  Jim Meyering  <jim@meyering.net>
7041
7042         * modules/fprintftime: New module.
7043         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
7044
7045 2005-12-16  Jim Meyering  <jim@meyering.net>
7046
7047         * m4/fprintftime.m4: New file.
7048
7049 2005-12-16  Jim Meyering  <jim@meyering.net>
7050
7051         * lib/fprintftime.c, fprintftime.h: New files.
7052
7053 2005-12-15  Simon Josefsson  <jas@extundo.com>
7054
7055         * modules/socklen (configure.ac): Fix M4 macro name, to align with
7056         new m4/socklen.m4.
7057
7058 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7059
7060         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
7061         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
7062
7063 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
7064
7065         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
7066         * lib/argp-help.c (fill_in_uparams): Check if the constructed
7067         struct uparams is valid. Fall back to the default values if it is
7068         not.
7069
7070 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7071
7072         * modules/argp (Files): Add argp-pin.c
7073         (Depends-on): dirname
7074         (lib_SOURCES): Add argp-pin.c
7075
7076 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7077
7078         * m4/argp.m4:  Check if program_invocation_name and
7079         program_invocation_short_name are declared and define appropriate
7080         macros if they are not.
7081
7082 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7083
7084         * lib/argp-help.c (__argp_base_name): New function
7085         (__argp_short_program_name): Rewrite using __argp_base_name
7086         * lib/argp-namefrob.h: Define program_invocation_name and
7087         program_invocation_short_name if requested
7088         (__argp_base_name): Add prototype
7089         * lib/argp-parse.c (argp_def): Use gettext wrappers
7090         (argp_default_parser): Use __argp_base_name
7091         * lib/argp-pin.c: New file. Defines program_invocation_name and
7092         program_invocation_short_name on systems that lack them.
7093
7094 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
7095
7096         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
7097         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
7098         porting problem reported by Georg Schwarz in
7099         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
7100
7101 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
7102
7103         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
7104         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
7105         porting problem reported by Georg Schwarz in
7106         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
7107
7108 2005-12-05  Bruno Haible  <bruno@clisp.org>
7109
7110         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
7111         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
7112         Reported by Mark Junker <mjscod@gmx.de>.
7113
7114 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
7115
7116         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
7117         Use implementation from Albert Chin, with some
7118         comments/corrections by Stepan Kasal and myself.
7119
7120 2005-12-02  Bruno Haible  <bruno@clisp.org>
7121
7122         * gnulib-tool (func_import): Accept GPLed build tool modules when
7123         --lgpl is given.
7124         * modules/csharpcomp-script: New file.
7125         * modules/csharpcomp: Depend on it.
7126         * modules/javacomp-script: New file.
7127         * modules/javacomp: Depend on it.
7128         Suggested by Simon Josefsson.
7129
7130 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
7131
7132         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
7133         statement, to work around an HP-UX 10.20 compiler bug reported by
7134         Peter O'Gorman.
7135
7136 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
7137
7138         * modules/savedir (Depends-on): Add openat.
7139
7140 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
7141
7142         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
7143         (uintmax_t) [defined uintmax_t]: Do not declare.
7144         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
7145         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
7146         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
7147         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
7148         sake of portability to weird hosts that C allows (though we don't
7149         know of any practical examples).
7150
7151         * lib/savedir.h (fdsavedir): New decl.
7152         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
7153         contains most of the former guts of savedir.
7154         (savedir): Use savedirstream.
7155         Include "openat.h".
7156
7157 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
7158
7159         * modules/obstack (Files): Add m4/ulonglong.m4.
7160         Problem reported by Davide Angelocola.
7161
7162 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
7163
7164         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
7165         coreutils no longer futzes with rounding modes.
7166
7167 2005-11-14  Jim Meyering  <jim@meyering.net>
7168
7169         * lib/mkstemp-safer.c: Include <config.h>, required for possible
7170         replacement of mkstemp.
7171
7172 2005-11-10  Simon Josefsson  <jas@extundo.com>
7173
7174         * lib/readline.c: Remove EOL.
7175
7176 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
7177
7178         * modules/gethrxtime (Depends-on): Add gettime.
7179
7180 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
7181
7182         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
7183         or gettimeofday; no longer needed.
7184
7185 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
7186
7187         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
7188         time business.
7189         (gethrxtime) [! (HAVE_NANOUPTIME
7190         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
7191         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
7192         our own approximation.
7193
7194 2005-11-08  Eric Blake  <ebb9@byu.net>
7195
7196         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
7197
7198 2005-11-08  Eric Blake  <ebb9@byu.net>
7199
7200         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
7201
7202 2005-11-04  Bruno Haible  <bruno@clisp.org>
7203
7204         * gnulib-tool: Implement --update mode.
7205
7206 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
7207
7208         Fix porting problem reported by Theodoros V. Kalamatianos.
7209         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
7210         Don't assume that futimes failing means we must fail.
7211
7212 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
7213
7214         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
7215         variables to suggest the intended function of the PATH_MAX check.
7216
7217 2005-10-30  Kean Johnston  <jkj@sco.com>
7218
7219         Trivial changes to support SCO systems.
7220         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
7221         as PATH_MAX.
7222         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
7223         where __ptr is null when no I/O is pending.
7224
7225 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
7226
7227         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
7228         leave errno alone.  Problem reported by Dmitry V. Levin.
7229
7230 2005-10-28  Simon Josefsson  <jas@extundo.com>
7231
7232         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
7233         Test more.
7234
7235         * tests/test-gc-md2.c, tests/test-md2.c: New files.
7236
7237         * modules/md2, modules/md2-tests: New files.
7238
7239 2005-10-28  Simon Josefsson  <jas@extundo.com>
7240
7241         * m4/inet_ntop.m4: More tests.
7242
7243         * m4/gc-md2.m4, md2.m4: New file.
7244
7245 2005-10-28  Simon Josefsson  <jas@extundo.com>
7246
7247         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
7248         "restrict" keywords, as per POSIX.  Protect the function
7249         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
7250         Don't use K&R prototypes.  Check the sprintf return values.
7251         Re-define EAFNOSUPPORT if not present.  Indent.
7252
7253         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
7254         suggested by Bruno Haible <bruno@clisp.org>.
7255
7256         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
7257
7258         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
7259
7260         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
7261         libgcrypt).
7262
7263         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
7264
7265         * lib/md2.h, md2.c: New files.
7266
7267 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
7268
7269         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
7270         errno alone.  Problem reported by Frederic Jolliton.
7271
7272 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
7273
7274         * modules/verify (License): Change from GPL to LGPL.  This is a
7275         tiny module and there are apparently near-equivalents that are
7276         under the BSD license.
7277
7278 2005-10-24  Simon Josefsson  <jas@extundo.com>
7279
7280         * modules/sha1: Relicense to LGPL.
7281
7282 2005-10-24  Simon Josefsson  <jas@extundo.com>
7283
7284         * lib/md4.h: Shrink buffer size, now that we changed the type.
7285
7286 2005-10-23  Simon Josefsson  <jas@extundo.com>
7287
7288         * gnulib-tool (func_import): Fix --tests-base.
7289
7290 2005-10-22  Simon Josefsson  <jas@extundo.com>
7291
7292         * modules/arcfour (Depends-on): Need stdint.
7293
7294 2005-10-22  Simon Josefsson  <jas@extundo.com>
7295
7296         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
7297         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
7298
7299 2005-10-22  Simon Josefsson  <jas@extundo.com>
7300
7301         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
7302         suggested by Bruno Haible <bruno@clisp.org>.
7303
7304 2005-10-22  Simon Josefsson  <jas@extundo.com>
7305
7306         * lib/crc.h: Include stddef.h, for size_t.
7307
7308 2005-10-22  Simon Josefsson  <jas@extundo.com>
7309
7310         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
7311         arcfour_context struct (simplify test vector testing in GNU
7312         Shishi).
7313
7314 2005-10-21  Simon Josefsson  <jas@extundo.com>
7315
7316         * modules/des, modules/des-tests: New files.
7317
7318         * modules/gc-des, modules/gc-des-tests: New files.
7319
7320         * tests/test-des.c, tests/test-gc-des.c: New file.
7321
7322 2005-10-21  Simon Josefsson  <jas@extundo.com>
7323
7324         * modules/arctwo, modules/arctwo-tests: New files.
7325
7326         * tests/test-arctwo.c: New file.
7327
7328         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
7329
7330         * tests/test-gc-arctwo.c: New file.
7331
7332 2005-10-21  Simon Josefsson  <jas@extundo.com>
7333
7334         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
7335         Bruno Haible <bruno@clisp.org>.
7336
7337         * m4/gc-des.m4: New file.
7338
7339 2005-10-21  Simon Josefsson  <jas@extundo.com>
7340
7341         * m4/arctwo.m4: New file.
7342
7343         * m4/gc-arctwo.m4: New file.
7344
7345 2005-10-21  Simon Josefsson  <jas@extundo.com>
7346
7347         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
7348         block.
7349
7350 2005-10-21  Simon Josefsson  <jas@extundo.com>
7351
7352         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
7353         <bruno@clisp.org>.
7354
7355         * lib/hmac-sha1.c (hmac_sha1): Likewise.
7356
7357         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
7358         Bruno Haible <bruno@clisp.org>.
7359
7360         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
7361         <bruno@clisp.org>.
7362
7363 2005-10-21  Simon Josefsson  <jas@extundo.com>
7364
7365         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
7366
7367 2005-10-21  Simon Josefsson  <jas@extundo.com>
7368
7369         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
7370
7371 2005-10-21  Simon Josefsson  <jas@extundo.com>
7372
7373         * lib/des.h, des.c: New files.
7374
7375         * lib/gc-gnulib.c: Support DES.c
7376
7377 2005-10-21  Simon Josefsson  <jas@extundo.com>
7378
7379         * lib/arctwo.h, arctwo.c: New files.
7380
7381         * lib/gc-gnulib.c: Support ARCTWO.
7382
7383 2005-10-21  Simon Josefsson  <jas@extundo.com>
7384
7385         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
7386         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7387
7388 2005-10-21  Simon Josefsson  <jas@extundo.com>
7389
7390         * gnulib-tool (func_import, func_create_testdir): Define automake
7391         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
7392         Makefile.am snippet),
7393         suggested by Bruno Haible <bruno@clisp.org>.
7394
7395         * modules/gc (Makefile.am): Use it.
7396
7397 2005-10-21  Bruno Haible  <bruno@clisp.org>
7398
7399         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
7400         patch.
7401
7402 2005-10-19  Simon Josefsson  <jas@extundo.com>
7403
7404         * tests/test-gc-rijndael.c: New file.
7405
7406         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
7407
7408 2005-10-19  Simon Josefsson  <jas@extundo.com>
7409
7410         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
7411         interface too.
7412
7413 2005-10-19  Simon Josefsson  <jas@extundo.com>
7414
7415         * tests/test-gc-arcfour.c: New file.
7416
7417         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
7418
7419 2005-10-19  Simon Josefsson  <jas@extundo.com>
7420
7421         * modules/gc-md4, modules/gc-md4-tests: New file.
7422
7423         * tests/test-gc-md4.c: New file.
7424
7425 2005-10-19  Simon Josefsson  <jas@extundo.com>
7426
7427         * m4/gc-md4.m4: New file.
7428
7429 2005-10-19  Simon Josefsson  <jas@extundo.com>
7430
7431         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
7432         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
7433         <kasal@ucw.cz>.
7434
7435 2005-10-19  Simon Josefsson  <jas@extundo.com>
7436
7437         * m4/gc-arcfour.m4: New file.
7438
7439         * m4/gc-rijndael.m4: New file.
7440
7441 2005-10-19  Simon Josefsson  <jas@extundo.com>
7442
7443         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
7444
7445 2005-10-19  Simon Josefsson  <jas@extundo.com>
7446
7447         * lib/gc-gnulib.c: Support ARCFOUR.
7448
7449 2005-10-19  Simon Josefsson  <jas@extundo.com>
7450
7451         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
7452         support.
7453
7454         * lib/gc.h: Add ECB enum type.
7455
7456         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
7457
7458 2005-10-18  Simon Josefsson  <jas@extundo.com>
7459
7460         * tests/test-md5.c: New file.
7461
7462         * modules/md5-tests: New file.
7463
7464 2005-10-18  Simon Josefsson  <jas@extundo.com>
7465
7466         * tests/test-md4.c: New file.
7467
7468         * modules/md4, modules/md4-tests: New files.
7469
7470 2005-10-18  Simon Josefsson  <jas@extundo.com>
7471
7472         * m4/md4.m4: New file.
7473
7474 2005-10-18  Simon Josefsson  <jas@extundo.com>
7475
7476         * lib/md4.h, md4.c: New files, based on md5.?.
7477
7478 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
7479
7480         * gnulib-tool (func_create_testdir): Omit the second check whether
7481         BUILT_SOURCES in nonempty.
7482
7483 2005-10-17  Simon Josefsson  <jas@extundo.com>
7484
7485         * tests/test-rijndael.c: New file.
7486
7487 2005-10-17  Simon Josefsson  <jas@extundo.com>
7488
7489         * modules/sha1: Depend on stdint instead of md5.
7490
7491         * modules/md5: Depend on stdint, remove uint32_t.
7492
7493 2005-10-17  Simon Josefsson  <jas@extundo.com>
7494
7495         * modules/gc-sha1-tests: New file.
7496
7497         * tests/test-gc-sha1.c: New file.
7498
7499 2005-10-17  Simon Josefsson  <jas@extundo.com>
7500
7501         * m4/md5.m4: Remove call to uint32_t.m4.
7502
7503 2005-10-17  Simon Josefsson  <jas@extundo.com>
7504
7505         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
7506
7507         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
7508         md5.h.
7509
7510         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
7511
7512         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
7513
7514 2005-10-17  Simon Josefsson  <jas@extundo.com>
7515
7516         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
7517
7518 2005-10-17  Simon Josefsson  <jas@extundo.com>
7519
7520         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
7521
7522 2005-10-17  Simon Josefsson  <jas@extundo.com>
7523
7524         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
7525
7526         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
7527
7528 2005-10-17  Bruno Haible  <bruno@clisp.org>
7529
7530         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
7531         that it can also be used in a test.
7532
7533 2005-10-16  Bruno Haible  <bruno@clisp.org>
7534
7535         * gnulib-tool (func_emit_tests_Makefile_am): Also define
7536         TESTS_ENVIRONMENT, so that individual tests can augment it.
7537
7538         * gnulib-tool (func_create_testdir): Use an intermediate target for
7539         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
7540         macros, like $(ALLOCA_H), which cannot be passed through the command
7541         line.
7542
7543 2005-10-15  Simon Josefsson  <jas@extundo.com>
7544
7545         * modules/rijndael-tests: New file.
7546
7547         * modules/rijndael: New file.
7548
7549 2005-10-15  Simon Josefsson  <jas@extundo.com>
7550
7551         * m4/rijndael.m4: New file.
7552
7553 2005-10-15  Simon Josefsson  <jas@extundo.com>
7554
7555         * lib/rijndael-api-fst.h, rijndael-api-fst.c: New files.
7556
7557         * lib/rijndael-alg-fst.h, rijndael-alg-fst.c: New files.
7558
7559 2005-10-14  Simon Josefsson  <jas@extundo.com>
7560
7561         * tests/test-arcfour.c: New file.
7562
7563         * modules/arcfour, modules/arcfour-tests: New files.
7564
7565 2005-10-14  Simon Josefsson  <jas@extundo.com>
7566
7567         * m4/arcfour.m4: New file.
7568
7569 2005-10-14  Simon Josefsson  <jas@extundo.com>
7570
7571         * lib/arcfour.h, arcfour.c: New files.
7572
7573 2005-10-14  Roland McGrath  <roland@redhat.com>
7574
7575         Import from libc.  [BZ #1331]
7576         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
7577         macro argument.
7578         Reported by Matej Vela <vela@debian.org>.
7579
7580 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
7581
7582         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
7583         include <wchar.h>; no longer needed.
7584
7585 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
7586
7587         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
7588
7589 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
7590         and  Ulrich Drepper  <drepper@redhat.com>
7591
7592         Import from libc.
7593         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
7594         instead of inline stream orientation test and two separate
7595         function calls.  Pay no attention to USE_IN_LIBIO.
7596
7597 2005-10-13  Simon Josefsson  <jas@extundo.com>
7598
7599         * modules/gc-hmac-md5-tests: New file.
7600
7601         * tests/test-gc-hmac-sha1.c: New file.
7602
7603         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
7604
7605         * modules/gc-hmac-md5-tests: New file.
7606
7607         * tests/test-gc-md5.c: New file.
7608
7609         * modules/gc-md5-tests: New file.
7610
7611 2005-10-13  Simon Josefsson  <jas@extundo.com>
7612
7613         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
7614         Move memory allocation outside of loop.
7615
7616 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
7617
7618         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
7619         intermediate directory is in a read-only file system.  Problem
7620         reported by Eric Blake.
7621
7622 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
7623
7624         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
7625
7626 2005-10-12  Simon Josefsson  <jas@extundo.com>
7627
7628         * tests/test-hmac-sha1.c: New file.
7629
7630         * modules/hmac-sha1-tests: New file.
7631
7632         * modules/hmac-sha1: New file.
7633
7634 2005-10-12  Simon Josefsson  <jas@extundo.com>
7635
7636         * modules/gc-sha1: New file.
7637
7638 2005-10-12  Simon Josefsson  <jas@extundo.com>
7639
7640         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
7641
7642         * tests/test-gc-pbkdf2-sha1.c: New file.
7643
7644 2005-10-12  Simon Josefsson  <jas@extundo.com>
7645
7646         * modules/gc-md5, modules/gc-hmac-md5: New files.
7647
7648         * modules/gc (Files): Remove md5, memxor and hmac files.
7649
7650 2005-10-12  Simon Josefsson  <jas@extundo.com>
7651
7652         * m4/gc-pbkdf2-sha1.m4: New file.
7653
7654         * m4/gc-hmac-sha1.m4: New file.
7655
7656         * m4/gc-sha1: New file.
7657
7658         * m4/hmac-sha1.m4: New file.
7659
7660 2005-10-12  Simon Josefsson  <jas@extundo.com>
7661
7662         * m4/gc-md5.m4, gc-hmac-md5: New files.
7663
7664         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
7665
7666 2005-10-12  Simon Josefsson  <jas@extundo.com>
7667
7668         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
7669         suggested by Bruno Haible <bruno@clisp.org>.
7670
7671 2005-10-12  Simon Josefsson  <jas@extundo.com>
7672
7673         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
7674
7675 2005-10-12  Simon Josefsson  <jas@extundo.com>
7676
7677         * lib/gc-pbkdf2-sha1.c: New file.
7678
7679         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
7680
7681 2005-10-12  Simon Josefsson  <jas@extundo.com>
7682
7683         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
7684
7685         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
7686
7687 2005-10-12  Simon Josefsson  <jas@extundo.com>
7688
7689         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
7690         GC_USE_HMAC_MD5, respectively.
7691
7692         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
7693         (gc_md5): Fix typo.
7694
7695         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
7696
7697         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
7698
7699         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
7700
7701 2005-10-12  Bruno Haible  <bruno@clisp.org>
7702
7703         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
7704         Reported by Stepan Kasal <kasal@ucw.cz>.
7705
7706 2005-10-11  Simon Josefsson  <jas@extundo.com>
7707
7708         * tests/test-crc.c: New file.
7709
7710         * modules/crc, modules/crc-tests: New files.
7711
7712 2005-10-11  Simon Josefsson  <jas@extundo.com>
7713
7714         * m4/crc.m4: New file.
7715
7716 2005-10-11  Simon Josefsson  <jas@extundo.com>
7717
7718         * lib/gc.h: Add gc_hash and gc_hash_buffer.
7719
7720         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
7721
7722         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
7723
7724 2005-10-11  Simon Josefsson  <jas@extundo.com>
7725
7726         * lib/crc.h, crc.c: New files.
7727
7728         * lib/gc.h (gc_hash_buffer): Add doc.
7729
7730 2005-10-11  Bruno Haible  <bruno@clisp.org>
7731
7732         * modules/c-strcasestr: New file.
7733         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
7734
7735 2005-10-11  Bruno Haible  <bruno@clisp.org>
7736
7737         * modules/c-strcase: New file.
7738         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
7739
7740 2005-10-11  Bruno Haible  <bruno@clisp.org>
7741
7742         * lib/strcasecmp.c: Include limits.h.
7743         (strcasecmp): Avoid integer overflow on exotic platforms.
7744         * lib/strncasecmp.c: Include limits.h.
7745         (strncasecmp): Avoid integer overflow on exotic platforms.
7746         Reported by Paul Eggert.
7747
7748 2005-10-11  Bruno Haible  <bruno@clisp.org>
7749
7750         * lib/c-strcasestr.h: New file, from GNU gettext.
7751         * lib/c-strcasestr.c: New file, from GNU gettext.
7752
7753 2005-10-11  Bruno Haible  <bruno@clisp.org>
7754
7755         * lib/c-strcase.h: New file, from GNU gettext.
7756         * lib/c-strcasecmp.c: New file, from GNU gettext.
7757         * lib/c-strncasecmp.c: New file, from GNU gettext.
7758
7759 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
7760
7761         * modules/mempcpy (License): GPL -> LGPL.
7762         * modules/strchrnul (License): Likewise.
7763         * modules/sysexits (License): Likewise.
7764
7765 2005-10-08  Simon Josefsson  <jas@extundo.com>
7766
7767         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
7768
7769 2005-10-07  Simon Josefsson  <jas@extundo.com>
7770
7771         * m4/memxor.m4: Remove gl_C_RESTRICT call.
7772
7773 2005-10-06  Simon Josefsson  <jas@extundo.com>
7774
7775         * tests/test-hmac-md5.c: New file.
7776
7777         * modules/hmac-md5-tests: New file.
7778
7779         * modules/hmac-md5: New file.
7780
7781 2005-10-06  Simon Josefsson  <jas@extundo.com>
7782
7783         * m4/hmac-md5.m4: New file.
7784
7785         * m4/memxor.m4: Require gl_C_RESTRICT.
7786
7787 2005-10-06  Simon Josefsson  <jas@extundo.com>
7788
7789         * lib/memxor.c (memxor): Avoid casts and warnings.
7790
7791 2005-10-06  Simon Josefsson  <jas@extundo.com>
7792
7793         * lib/hmac-md5.c: New file.
7794
7795         * lib/hmac.h: New file.
7796
7797 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
7798
7799         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
7800         promotes to int, not unsigned int, to catch the AIX 5.3
7801         compiler bug.
7802
7803 2005-10-05  Simon Josefsson  <jas@extundo.com>
7804
7805         * modules/memxor: New file.
7806
7807         * modules/iconv (Files): Move config.rpath to havelib, it is used
7808         there.
7809
7810         * modules/havelib (Files): Add config.rpath.
7811
7812 2005-10-05  Simon Josefsson  <jas@extundo.com>
7813
7814         * m4/memxor.m4: New file.
7815
7816 2005-10-05  Simon Josefsson  <jas@extundo.com>
7817
7818         * lib/memxor.c (memxor): Fix compiler error.
7819
7820         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
7821         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
7822
7823         * lib/memxor.h, memxor.c: New files.
7824
7825         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
7826         we assume all systems have it, suggested by Jim Meyering
7827         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
7828         any systems lack sys/socket.h; mingw32 is known to lack it, but we
7829         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
7830         same reasons.
7831
7832 2005-10-05  Simon Josefsson  <jas@extundo.com>
7833
7834         * config/srclist.txt: Add glibc bug 1423 for md5.h.
7835
7836 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
7837
7838         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
7839         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
7840         needed, since the source code now assumes these .h files.
7841
7842 2005-10-05  Derek Price  <derek@ximbiot.com>
7843
7844         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
7845
7846 2005-10-05  Bruno Haible  <bruno@clisp.org>
7847
7848         * modules/stdint (License): Change to LGPL.
7849
7850 2005-10-04  Simon Josefsson  <jas@extundo.com>
7851
7852         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
7853         D. Baushke" <mdb@gnu.org>.
7854
7855 2005-10-04  Bruno Haible  <bruno@clisp.org>
7856
7857         * lib/verify.h (verify_true): Provide alternative definition for C++.
7858
7859 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
7860
7861         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
7862         (SSIZE_MAX): New macro, if not already defined.
7863         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
7864         than 2 GiB.
7865
7866 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
7867
7868         Sync from coreutils.
7869         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
7870         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
7871         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
7872         ULLONG_MAX doesn't work with 2.7.2.1.
7873
7874 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
7875
7876         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
7877         From Ben Pfaff.
7878
7879         * modules/exclude (Depends-on): Depend on verify.
7880         * modules/strtoimax (Depends-on): Likewise.
7881         * modules/utimecmp (Depends-on): Likewise.
7882
7883 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
7884
7885         * lib/exclude.c: Include verify.h.
7886         (verify): Remove.  All callers changed to use verify.h's version.
7887         * lib/strtoimax.c: Likewise.
7888         * lib/utimecmp.c: Likewis.e
7889
7890         Sync from coreutils.
7891         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
7892         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
7893         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
7894         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
7895         bother returning ENOSYS if settimeofday or stime fails; just let
7896         them return whatever errno they want to return.
7897         * lib/utimens.c: Include unistd.h, for dup2.
7898         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
7899         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
7900
7901 2005-10-02  Jim Meyering  <jim@meyering.net>
7902
7903         Sync from coreutils.
7904         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
7905         from glibc-2.2.5 that fails for read-only files.
7906
7907 2005-10-02  Jim Meyering  <jim@meyering.net>
7908
7909         Sync from coreutils.
7910         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
7911         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
7912         `#if HAVE_CONFIG_H'.
7913         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
7914         Remove AT_FDCWD test.
7915         Do not consume the fd unless successful.
7916         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
7917         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
7918         block, so that we don't even try to compile it if settimeofday is
7919         available.  This works around a compilation failure on OSF1 V5.1,
7920         due to stime requiring a `long int*' while tv_sec is `int'.
7921
7922 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
7923
7924         Sync from coreutils.
7925         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
7926         against `yes', rather than just testing for nonempty.
7927
7928 2005-10-01  Simon Josefsson  <jas@extundo.com>
7929
7930         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
7931         and Darwin.
7932
7933         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
7934         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
7935         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
7936         freeaddrinfo and gai_strerror are declared by the POSIX headers.
7937         Check if struct addrinfo is declared.
7938
7939 2005-10-01  Simon Josefsson  <jas@extundo.com>
7940
7941         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
7942         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
7943         AI_* and EAI_* definitions.  Protect function declarations.
7944
7945 2005-10-01  Jim Meyering  <jim@meyering.net>
7946
7947         Sync from coreutils.
7948
7949         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
7950         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
7951         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
7952         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
7953         in the inet and nsl libraries.  Required on Solaris 5.7.
7954
7955 2005-10-01  Jim Meyering  <jim@meyering.net>
7956
7957         Sync from coreutils.
7958         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
7959         in the inet and nsl libraries.  Required on Solaris 5.7.
7960
7961 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
7962
7963         * lib/getdelim.c (getdelim): Remove unused variables.
7964
7965 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
7966
7967         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
7968         so that the code works even with ancient cpp.  Portability problem
7969         with GCC 2.7.2.1 reported by Thomas M.Ott.
7970
7971 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
7972
7973         * modules/regex (Depends-on): Add strcase.
7974
7975         * modules/gethostname (Licence): Change from GPL to LGPL, since
7976         gethostname.c is a trivial implementation of a standard library
7977         function.
7978         * modules/poll (License): Change from GPL to LGPL, since it's
7979         derived from LGPL code.
7980
7981 2005-09-27  Jim Meyering  <jim@meyering.net>
7982
7983         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
7984         HAVE_CONFIG_H.
7985
7986         * lib/intprops.h (signed_type_or_expr__): Define.
7987         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
7988         for unsigned types.
7989
7990 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
7991
7992         * lib/verify.h (verify_expr): Remove, replacing with:
7993         (verify_true): New macro that returns true instead of void.
7994         (verify_type__): Remove.
7995         (verify): Use verify_true rather than verify_type__.
7996
7997 2005-09-26  Bruno Haible  <bruno@clisp.org>
7998
7999         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
8000         is necessary.
8001         (lib_SOURCES): Remove mbchar.c.
8002         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
8003         (Files): Add m4/mbrtowc.m4.
8004         * modules/mbiter: Likewise.
8005         * modules/mbuiter: Likewise.
8006
8007 2005-09-26  Bruno Haible  <bruno@clisp.org>
8008
8009         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
8010         compile mbchar.c if they are not both present.
8011         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
8012         * m4/mbiter.m4 (gl_MBITER): Likewise.
8013         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
8014         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
8015         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
8016
8017 2005-09-25  Jim Meyering  <jim@meyering.net>
8018
8019         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
8020         also uses socklen_t.
8021
8022 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
8023
8024         * lib/utimens.c (ENOSYS): Define if not already defined.
8025         (futimens): Support having a null PATH if the file descriptor
8026         is nonnegative.
8027
8028         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
8029         Remove.
8030         (__attribute): Define to empty unless GCC 3.1 or later.
8031         This works around a core dump on OpenBSD 3.4, which has GCC
8032         2.95.3, which dumps core when given __attribute__(()).  It also
8033         simplifies other tests, since we really don't want to bother with
8034         worrying about which ancient version of GCC supported what.
8035         Original problem reported by Yoann Vandoorselaere, with part of
8036         the fix suggested by Derek Price.
8037
8038 2005-09-24  Jim Meyering  <jim@meyering.net>
8039
8040         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
8041         so we can once again use a positive bitfield width of 1 -- now we
8042         don't have to explain why we were using a bitfield width of 2.
8043
8044 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8045
8046         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
8047         and similarly for the other external symbols.  Problem reported
8048         by James Gallager.
8049
8050         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
8051         bug reported by Jim Meyering.
8052
8053         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
8054         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
8055         not needed, since socklen is a prerequisite module.
8056
8057 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8058
8059         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
8060         Problem reported by Eric Blake.
8061         (getaddrinfo): Initialize se so that it's not garbage.
8062         Redo internal storage allocation so that it doesn't make unportable
8063         assumptions about alignment.
8064         Fix a memory leak.
8065
8066         * lib/utimens.c (futimens): Use futimesat if available.
8067         Prefer it to futimes since it doesn't have the futimes bug.
8068
8069         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
8070         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
8071         Instead, declare a function that returns a pointer to an array,
8072         and use verify_type__ to declare the size of the array.
8073         Problem and germ of a solution reported by Bruno Haible.
8074         (verify_type__): Use 2, not 1, for bitfield size, to avoid
8075         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
8076
8077 2005-09-23  Jim Meyering  <jim@meyering.net>
8078
8079         Sync from coreutils.
8080         Correct build failure (socklen_t not defined) on at least
8081         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
8082         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
8083
8084 2005-09-23  Jim Meyering  <jim@meyering.net>
8085
8086         * modules/getaddrinfo (Depends-on): Add socklen.
8087
8088 2005-09-23  Bruno Haible  <bruno@clisp.org>
8089
8090         * tests/test-verify.c: New file.
8091
8092 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8093
8094         Sync from coreutils.
8095
8096         * modules/argmatch (Depends-on): Add verify.
8097         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
8098         unistd-safer.
8099         * modules/save-cwd (Depends-on): Likewise.
8100
8101         * modules/openat (Files): Add lib/openat-die.c.
8102         (Depends-on): Remove error, exitfail.
8103         Add dirname.
8104
8105         * modules/verify: New file.
8106         * MODULES.html.sh (Diagnostics <assert.h>): New section,
8107         with "verify" module.
8108
8109 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8110
8111         Sync from coreutils.
8112
8113         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
8114         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
8115         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
8116         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
8117         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
8118         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
8119         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
8120         Don't bother checking for string.h, stdlib.h, unistd.h.
8121         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
8122         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
8123         module's job.
8124         * m4/jm-macros.m4 (gl_MACROS): Likewise.
8125         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
8126
8127         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
8128         (gl_GETDATE): Use it.
8129
8130         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
8131
8132 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8133
8134         Sync from coreutils.
8135
8136         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
8137         stat-time.h.
8138         * lib/argmatch.h: Include verify.h
8139         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
8140         (ARGMATCH_ASSERT): Remove; unused.
8141         * lib/canonicalize.c: Assume STDC_HEADERS.
8142         * lib/exclude.c: Include "strcase.h".
8143         * lib/regex_internal.h [!defined _LIBC]: Likewise.
8144         * lib/getusershell.c: Include stdio--.h rather than stdio.h
8145         and stdio-safer.h.
8146         (getusershell): Call fopen, not fopen_safer.
8147         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
8148         Do not include unistd-safer.h.
8149         (save_cwd): Don't call fd_safer; no longer needed
8150         now that we include fcntl--.h.
8151
8152         * lib/getdate.y (relative_time): New type.
8153         (RELATIVE_TIME_0): New constant.
8154         (parser_control): Use relative_time instead of doing it ourselves.
8155         (%union): Add new relative_time rel member.
8156         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
8157         Now typeless.
8158         (relunit, relunit_snumber): Now of type rel.
8159         (zone, rel, relunit, get_date): Adjust to above changes.
8160
8161         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
8162         Do not include unistd-safer.h.
8163         (getloadavg): Don't call fd_safer; no longer needed
8164         now that we include fcntl--.h.
8165
8166         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
8167         (make_dir_parents): Treat ENOSYS like EEXIST.
8168
8169         Improve quality of diagnostics on restore_cwd failure.
8170         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
8171         (make_dir_parents): Last arg is now int * (for errno), not bool *.
8172         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
8173         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
8174         each time through the loop.  Do not diagnose restore_cwd failure;
8175         that is the caller's job (and perhaps the caller does not care).
8176
8177         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
8178         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
8179         If the file already exists but is not a directory, don't bother
8180         to try to make its parents.
8181         Close potential file descriptor leak if we can't chdir("/") (!).
8182         Don't always return true if chdir($PWD) fails; return true only
8183         if the requested action was done successfully (except for the
8184         chdir($PWD)).
8185         Don't log final directory unless we actually made it.
8186         Refactor to avoid duplicate code to fix up permissions.
8187         Don't attempt to fix up parent permissions if chdir($PWD) fails.
8188
8189         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
8190         to make it a bit faster and (I hope) clearer.
8191         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
8192         Fix bug in formats like %2N.
8193
8194         * lib/verify.h: New file.
8195
8196 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
8197
8198         Sync from coreutils.
8199         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
8200
8201 2005-09-22  Jim Meyering  <jim@meyering.net>
8202
8203         Sync from coreutils.
8204
8205         * m4/lstat.m4 (gl_FUNC_LSTAT):
8206         Use AC_LIBSOURCES to require lstat.c and lstat.h.
8207         Remove obsolete comment.
8208         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
8209         * m4/xstrtod.m4: Likewise.
8210
8211         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
8212
8213 2005-09-22  Jim Meyering  <jim@meyering.net>
8214
8215         Sync from coreutils.
8216
8217         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
8218
8219         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
8220         the .tm_year member, since otherwise gcc-4.0 would now warn about
8221         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
8222
8223         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
8224         order to avoid an unsuppressible warning from gcc on 64-bit systems.
8225
8226         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
8227         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
8228         when run in a time zone for which daylight savings time is in effect
8229         for the starting date.
8230
8231         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
8232         stop us from restricting permissions of just-created absolute-named
8233         directories.
8234         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
8235         to restore initial working directory.
8236         * lib/mkdir-p.c (make_dir_parents): New parameter:
8237         different_working_dir, to tell caller if/when we change the working
8238         directory and are unable to return to the initial one.
8239         * lib/mkdir-p.h (make_dir_parents): Update prototype.
8240         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
8241         `return false'.  This fixes a bug introduced on 2004-07-30.
8242
8243         * lib/openat.c (fdopendir): Be sure to close the supplied
8244         file descriptor before returning.  This makes our replacement
8245         implementation a little closer to Solaris's, where fdopendir
8246         ties the file descriptor to the returned DIR* pointer.
8247         * lib/openat.c (unlinkat): New function.
8248         * lib/openat.h (unlinkat): Add prototype.
8249         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
8250         (openat_restore_fail): Rename from openat_restore_die.
8251         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
8252
8253         Provide an alternative to exiting immediately upon save_cwd or
8254         restore_cwd failure.  Now, an application can arrange e.g.,
8255         to perform a longjump in that case.
8256         * lib/openat.c: Include dirname.h.
8257         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
8258         (rpl_openat, fdopendir, fstatat): Call openat_save_die
8259         and openat_restore_die rather than calling error directly.
8260         Don't include "error.h" or "exitfail.h"; they're no longer needed.
8261
8262         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
8263         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
8264         define.
8265
8266         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
8267         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
8268                             int utc, int nanoseconds);
8269         Background:
8270         date should not have to allocate a megabyte of virtual memory to
8271         handle a format argument like +%1048575T.  When implemented with
8272         strftime, it must allocate such a buffer, use strftime to fill it
8273         in, print it, then free it.
8274         With fprintftime, it simply prints everything and exits.
8275         With no need for memory allocation, that's one fewer way to fail.
8276         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
8277         optional field width, not before, so we accept %9:z, not %:9z.
8278         (my_strftime): Be sure to use L_('x') for literals.
8279
8280         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
8281         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
8282         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
8283         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
8284         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
8285         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
8286         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
8287         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
8288         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
8289         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
8290         * lib/xgethostname.c, lib/xreadlink.c:
8291         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
8292
8293         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
8294         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
8295         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
8296         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
8297         and don't include <sys/file.h>).
8298
8299 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
8300
8301         Sync from coreutils.
8302
8303         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
8304         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
8305         [!LDAV_DONE]: Avoid unused variable warning.
8306
8307 2005-09-21  Bruno Haible  <bruno@clisp.org>
8308
8309         * lib/unicodeio.h (unicode_to_mb): New declaration.
8310
8311 2005-09-20  Derek Price  <derek@ximbiot.com>
8312
8313         * lib/getaddrinfo.c: Don't include <netdb.h> included from
8314         getaddrinfo.h.
8315
8316 2005-09-20  Bruno Haible  <bruno@clisp.org>
8317
8318         * gnulib-tool: Remove trailing slashes from the values specified for
8319         --source-base, --m4-base, --tests-base, --aux-dir.
8320         Suggested by Simon Josefsson <jas@extundo.com>.
8321
8322 2005-09-20  Bruno Haible  <bruno@clisp.org>
8323
8324         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
8325         func_modules_to_filelist, func_import, func_create_testdir): Make all
8326         sorting results locale-independent, so that gnulib-cache.m4 doesn't
8327         change when gnulib-tool is invoked in a different locale.
8328
8329 2005-09-19  Simon Josefsson  <jas@extundo.com>
8330
8331         * m4/socklen.m4: Fix typo.
8332
8333 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8334
8335         Use a consistent style for including <config.h>.
8336         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
8337         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
8338         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
8339         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
8340         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
8341         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
8342         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
8343         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
8344         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
8345         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
8346         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
8347         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
8348         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
8349         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
8350         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
8351         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
8352         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
8353         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
8354         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
8355         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
8356         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
8357         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
8358         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
8359         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
8360         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
8361         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
8362         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
8363         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
8364         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
8365         lib/xstrtoumax.c, lib/yesno.c:
8366         Standardize inclusion of config.h.
8367         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
8368         lib/inttostr.h:  Removed inclusion of config.h from header files.
8369         * lib/inttostr.c:  Adjusted in-tree users.
8370         * lib/timespec.h: Remove superfluous warning to include config.h.
8371         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
8372         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
8373         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
8374         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
8375         config.h with HAVE_CONFIG_H.
8376
8377 2005-09-19  Jim Meyering  <jim@meyering.net>
8378
8379         * modules/pathmax (License): Change to LGPL.
8380
8381 2005-09-19  Derek Price  <derek@ximbiot.com>
8382
8383         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
8384
8385 2005-09-19  Bruno Haible  <bruno@clisp.org>
8386
8387         * gnulib-tool (import): Provide default for --tests-base.
8388
8389 2005-09-19  Bruno Haible  <bruno@clisp.org>
8390
8391         * doc/quote.texi: New file, extracted from gnulib.texi.
8392         * doc/ctime.texi: New file, extracted from gnulib.texi.
8393         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
8394         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
8395         * doc/gnulib.texi: Include them.
8396
8397 2005-09-18  Bruno Haible  <bruno@clisp.org>
8398
8399         Portability fix.
8400         * gnulib-tool (func_readlink): New function.
8401         (func_ln_if_changed): Use it.
8402
8403 2005-09-18  Bruno Haible  <bruno@clisp.org>
8404
8405         * gnulib-tool: Support --with-tests also with --import.
8406         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
8407         (func_import): Use variables $testsbase and $inctests. Emit a
8408         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
8409         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
8410         SUBDIRS += $testsdir.
8411         (func_create_testdir): Update.
8412
8413 2005-09-18  Bruno Haible  <bruno@clisp.org>
8414
8415         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
8416         instead of $dry_run.
8417         (func_cp_if_changed, func_mv_if_changed): Remove functions.
8418         (func_ln_if_changed): Don't handle dry-run here.
8419         (func_import): In dry-run mode, detect more precisely which actions
8420         would be performed, and don't use "...ing" verbs.
8421
8422 2005-09-18  Bruno Haible  <bruno@clisp.org>
8423
8424         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
8425         (func_import): Use join on two temporary files instead of three nested
8426         loops, in order to determine which files are new or old.
8427
8428 2005-09-18  Bruno Haible  <bruno@clisp.org>
8429
8430         * gnulib-tool (func_import): Comment out code that spits out the
8431         new files with --dry-run.
8432
8433 2005-09-18  Bruno Haible  <bruno@clisp.org>
8434
8435         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
8436
8437 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
8438
8439         * lib/stat-time.h: New file.
8440         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
8441         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
8442         in a different way.
8443         (timespec_cmp): New function.
8444         * lib/utimecmp.c: Include stat-time.h.
8445         (SYSCALL_RESOLUTION): Depend on whether various struct stat
8446         members exist, not on the obsolescent ST_MTIM_NSEC.
8447         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
8448
8449 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
8450
8451         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
8452
8453 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
8454
8455         * MODULES.html.sh (File system functions): Add stat-time.
8456         * modules/stat-time: New file.
8457         * modules/timespec (Files): Remove m4/st_mtim.m4; this
8458         is now done in a different way, by the stat-time module.
8459         * modules/utimecmp (Depends-on): Add stat-time.
8460
8461 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
8462
8463         * m4/st_mtim.m4: Remove.  Superseded by...
8464         * m4/stat-time.m4: New file.
8465         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
8466         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
8467
8468 2005-09-15  Derek Price  <derek@ximbiot.com>
8469
8470         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
8471
8472 2005-09-15  Derek Price  <derek@ximbiot.com>
8473
8474         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
8475         * lib/regex_internal.c: Ditto, using this...
8476         (__GNUC_PREREQ): ...new macro.
8477         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
8478         using...
8479         (__GNUC_PREREQ): ...this new macro.
8480
8481         * lib/strstr.h: Include string.h. Define strstr as a macro here.
8482
8483 2005-09-15  Derek Price  <derek@ximbiot.com>
8484             Paul Eggert  <eggert@cs.ucla.edu>
8485
8486         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
8487         changes, consolidating in...
8488         * lib/regex_internal.h: ...this file.
8489
8490 2005-09-13  Jim Meyering  <jim@meyering.net>
8491
8492         * lib/canon-host.c: Filter through gnu indent and reword comments
8493         slightly.
8494         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
8495
8496 2005-09-13  Derek Price  <derek@ximbiot.com>
8497
8498         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
8499         failure.
8500         Reported by Jim Meyering  <jim@meyering.net>.
8501
8502 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
8503
8504         * lib/base64.c: Typo.
8505         (base64_encode): Put b64str in initialized data section.
8506
8507 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
8508
8509         Merge glibc and coreutils changes into gnulib, plus a few
8510         extra fixes.
8511         * lib/md5.c: Use #error rather than a string.
8512         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
8513         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
8514         (__attribute__): Define to empty for non recent-GCC.
8515         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
8516         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
8517         Renamed from their non-__ counterparts, with new macros replacing
8518         them if not _LIBC.  Add __THROW attribute.
8519         (rol): Remove.
8520         (struct md5_ctx): Align buffer if using GCC.
8521         * lib/sha1.h (struct sha1_ctx): Likewise.
8522         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
8523         The old name was backwards.
8524         (NOTSWAP): Remove; not used.
8525         (rol): New macro, moved here from md5.h.
8526         (sha1_process_block): Remove a FIXME that doesn't make sense.
8527
8528 2005-09-12  Derek Price  <derek@ximbiot.com>
8529
8530         Return usable errors from canon-host.
8531         * lib/canon-host.h: New file.
8532         * lib/canon-host.c (canon_host): Wrap...
8533         (canon_host_r): ...this new function, which now relies exclusively on
8534         getaddrinfo.
8535         (ch_strerror): New function.
8536         (last_cherror): New global.
8537         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
8538         interface.
8539         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
8540         void *.
8541         (freeaddrinfo): Free ai->ai_canonname when set.
8542
8543 2005-09-12  Derek Price  <derek@ximbiot.com>
8544
8545         Make canon-host require getaddrinfo.
8546         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
8547         AC_LIBSOURCE canon-host.h.  Call...
8548         (gl_PREREQ_CANON_HOST): ...this new function, which requires
8549         gl_GETADDRINFO.
8550         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
8551
8552 2005-09-12  Derek Price  <derek@ximbiot.com>
8553
8554         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
8555         LGPL.
8556         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
8557
8558 2005-09-12  Derek Price  <derek@ximbiot.com>
8559
8560         * lib/gai_strerror.c: Include config.h when available.  Include
8561         getaddrinfo.h before other headers to test interface.
8562         Reported by Larry Jones <lawrence.jones@ugs.com>.
8563
8564 2005-09-12  Derek Price  <derek@ximbiot.com>
8565             Paul Eggert  <eggert@cs.ucla.edu>
8566
8567         * modules/glob (Files): Add glob-libc.h.
8568
8569 2005-09-12  Derek Price  <derek@ximbiot.com>
8570             Paul Eggert  <eggert@cs.ucla.edu>
8571
8572         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
8573         glob_.h, glob-libc.h.
8574         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
8575
8576 2005-09-12  Derek Price  <derek@ximbiot.com>
8577             Paul Eggert  <eggert@cs.ucla.edu>
8578
8579         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
8580         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
8581         protecting things that should be done only in gnulib contexts.
8582         * lib/glob_.h: New file, containing only the glob things needed for
8583         gnulib.
8584         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
8585         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
8586         (glob, globfree, glob_pattern_p): Now defined simply in terms of
8587         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
8588         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
8589         and to respect the namespace rules better.
8590
8591 2005-09-08  Simon Josefsson  <jas@extundo.com>
8592
8593         * modules/socklen: New file.
8594
8595 2005-09-08  Simon Josefsson  <jas@extundo.com>
8596
8597         * m4/socklen.m4: New file.
8598
8599 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8600
8601         * modules/utimens (Files): Add m4/utimbuf.m4, since
8602         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
8603         Reported by Sergey Poznyakoff.
8604
8605 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8606
8607         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
8608         definitions, since that's the preferred style in glibc.
8609         Fix a minor spacing issue, and update copyright notice to match
8610         glibc's.
8611
8612 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
8613
8614         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
8615
8616 2005-09-06  Simon Josefsson  <jas@extundo.com>
8617
8618         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
8619         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
8620
8621 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8622
8623         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
8624         warning.
8625
8626 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8627
8628         * config/srclist.txt: Add glibc bug 1302.
8629
8630 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
8631
8632         Change bitset word type from unsigned int to unsigned long int,
8633         as this has better performance on typical 64-bit hosts.
8634         Port bitset code to hosts with unusual word sizes.
8635         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
8636         (build_collating_symbol):
8637         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
8638         argument is a bitset.  This is merely a style issue, but it makes
8639         it clearer that an entire array is expected.
8640         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
8641         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
8642         Port to the case where bitset_word is not the same as unsigned int.
8643         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
8644         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
8645         Likewise.
8646         * lib/regexec.c (check_dst_limits_calc_pos_1,
8647         check_subexp_matching_top):
8648         (build_trtable, group_nodes_into_DFAstates):
8649         Likewise.
8650         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
8651         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
8652         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
8653         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
8654         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
8655         * lib/regcomp.c (optimize_subexps, lower_subexp):
8656         Work even if bitset_word has holes in its bitwise representation.
8657         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
8658         * lib/regexec.c (check_dst_limits_calc_pos_1,
8659         check_subexp_matching_top):
8660         Likewise.
8661         * lib/regex_internal.c (re_string_reconstruct):
8662         Don't assume UCHAR_MAX == 255.
8663         * lib/regex_internal.h (bitset_set_all): Likewise.
8664         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
8665         All uses changed.
8666         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
8667         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
8668         All uses changed.
8669         (BITSET_WORD_MAX): New macro.
8670         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
8671         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
8672         (bitset_empty, bitset_copy):
8673         Prefer sizeof (bitset) to multiplying it out ourselves.
8674         (bitset_not_merge): Remove; unused.
8675         (bitset_contain): Return bool, not unsigned int with one bit on.
8676         All callers changed.
8677         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
8678         alignment than re_node_set; do this by defining a new internal
8679         type struct dests_alloc and using it to allocate memory.
8680
8681 2005-09-05  Bruno Haible  <bruno@clisp.org>
8682
8683         * gnulib-tool (func_import): Fix comparison in handling of symbolic
8684         links.
8685
8686 2005-09-04  Martin Lambers <marlam@marlam.de>  (tiny change)
8687
8688         * modules/size_max (Makefile.am): Add size_max.h
8689
8690 2005-09-04  Derek Price  <derek@ximbiot.com>
8691
8692         * gnulib-tool (func_import): Fix reversed $symbolic logic.
8693
8694 2005-09-03  Simon Josefsson  <jas@extundo.com>
8695
8696         * gnulib-tool: Fix typo.
8697
8698 2005-09-03  Simon Josefsson  <jas@extundo.com>
8699
8700         * config/srclist.txt: Add glibc bug 1293.
8701
8702 2005-09-03  Derek Price  <derek@ximbiot.com>
8703
8704         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
8705         From Larry Jones <lawrence.jones@ugs.com>.
8706
8707 2005-09-02  Simon Josefsson  <jas@extundo.com>
8708
8709         * modules/socklen: New file.
8710
8711 2005-09-02  Simon Josefsson  <jas@extundo.com>
8712
8713         * modules/havelib: New module.
8714
8715         * modules/gettext, modules/iconv, modules/lock, modules/readline:
8716         Use havelib.
8717
8718 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
8719
8720         Check for arithmetic overflow when calculating sizes, to prevent
8721         some buffer-overflow issues.  These patches are conservative, in the
8722         sense that when I couldn't determine whether an overflow was possible,
8723         I inserted a run-time check.
8724         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
8725         macros.
8726         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
8727         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
8728         (re_xnrealloc, re_x2nrealloc): New inline functions.
8729         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
8730         parse_bracket_exp):
8731         (build_equiv_class, build_charclass): Check for arithmetic overflow
8732         in size expression calculations.
8733         * lib/regex_internal.c (re_string_realloc_buffers):
8734         (build_wcs_upper_buffer, re_node_set_add_intersect):
8735         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
8736         (re_dfa_add_node, register_state): Likewise.
8737         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
8738         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
8739         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
8740         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
8741
8742 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
8743
8744         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
8745         m4/ulonglong.m4.  Problem reported by Martin Lambers.
8746
8747 2005-09-02  Bruno Haible  <bruno@clisp.org>
8748
8749         Support for lib vs. lib64 distinction on biarch platforms.
8750         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
8751         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
8752         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
8753
8754 2005-09-02  Bruno Haible  <bruno@clisp.org>
8755
8756         * gnulib-tool (import): In the other first-use case, provide defaults
8757         as well.
8758
8759 2005-09-02  Bruno Haible  <bruno@clisp.org>
8760
8761         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
8762         patches not yet found in the latest gettext release.
8763
8764 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8765
8766         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
8767         to avoid a collision with bits/local_lim.h in glibc.
8768         All uses changed.  Problem reported by Dmitry V. Levin in
8769         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
8770
8771         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
8772         bugs in int versus size_t comparisons.
8773         (re_string_context_at): Fix bug where the code assumed that
8774         Idx is signed.
8775
8776         Use bool where appropriate.
8777         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
8778         All callers changed.
8779         (calc_eclosure_iter): Likewise, for ROOT arg.
8780         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
8781         (build_charclass_op): Likewise, for NON_MATCH arg.
8782         * lib/regex_internal.c (re_string_allocate, re_string_construct):
8783         (re_string_construct_common): Likewise, for ICASE arg.
8784         * lib/regexec.c (re_search_2_stub, re_search_stub):
8785         Likewise, for RET_LEN arg.
8786         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
8787         (set_regs): Likewise, for FL_BACKTRACK arg.
8788         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
8789         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
8790         (calc_eclosure_iter, parse_bracket_exp):
8791         Use bool for internal variables that are booleans.
8792         * lib/regexec.c (re_search_internal, check_matching,
8793         proceed_next_node):
8794         (set_regs, build_sifted_states, sift_states_bkref):
8795         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
8796         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
8797         (find_collation_sequence_value):
8798         Likewise.
8799         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
8800         (re_node_set_compare):
8801         Return bool, not int. All callers changed.
8802         * lib/regexec.c (check_halt_node_context, check_dst_limits):
8803         (build_trtable, check_node_accept): Likewise.
8804         * lib/regex_internal.h: Include stdbool.h.
8805
8806         Fix bugs uncovered when converting to bool.
8807         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
8808         failure instead of charging ahead blindly.
8809         * lib/regex_internal.c (register_state): Likewise.
8810         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
8811         for freeing internal storage.
8812         (group_nodes_into_DFA_states): Use unsigned int, not int, for
8813         bitset pieces used as boolean, to avoid undefined behavior
8814         on hosts that do int overflow checking.
8815
8816 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
8817
8818         * config/srclist.txt: Add glibc bugs 1285-1287.
8819
8820 2005-09-01  Jim Meyering  <jim@meyering.net>
8821
8822         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
8823         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
8824         Require gl_STAT_MACROS, too.
8825
8826 2005-09-01  Bruno Haible  <bruno@clisp.org>
8827
8828         * gnulib-tool (import): In the first-use case, provide defaults.
8829
8830 2005-09-01  Bruno Haible  <bruno@clisp.org>
8831
8832         * gnulib-tool (func_import): Remove the .tmp files.
8833
8834 2005-09-01  Bruno Haible  <bruno@clisp.org>
8835
8836         * gnulib-tool (func_import): Fix handling of symbolic links.
8837
8838 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8839
8840         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
8841         old glibc regex code mishandles strings longer than 2**31 bytes.
8842         This patch fixes this when the regex code is used in gnulib
8843         (i.e., outside glibc).
8844
8845         This patch should not affect the use of the regex code inside
8846         glibc.  No doubt this problem also needs to be handled for glibc
8847         as well, but the result will be an incompatible change to the
8848         glibc ABI, and the old ABI will have to be supported too.  That
8849         can be the the subject for another patch.
8850
8851         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
8852         governing whether the rest of this patch is active.  By default,
8853         the macro is disabled and the patch has no effect.
8854         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
8855         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
8856         (struct re_pattern_buffer, re_search, re_search_2, re_match):
8857         (re_match_2, re_set_registers): Use the new types.
8858         * lib/regex_internal.h (Idx, re_hashval_t): New types.
8859         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
8860         New macros.
8861         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
8862         (re_string_context_at, bin_tree_t, re_dfastate_t):
8863         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
8864         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
8865         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
8866         (re_string_char_size_at, re_string_wchar_at):
8867         (re_string_elem_size_at):
8868         Use the new types and macros to port to 64-bit hosts.
8869         Use unsigned types for internal values, so that the code
8870         mostly works even for arrays larger than SSIZE_MAX.
8871         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
8872         (search_duplicated_node, calc_eclosure_iter, fetch_number):
8873         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
8874         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
8875         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
8876         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
8877         (calc_inveclosure, parse_dup_op, build_range_exp):
8878         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
8879         (fetch_number, create_token_tree, mark_opt_subexp):
8880         Likewise.
8881         * lib/regex_internal.c (re_string_construct_common,
8882         create_ci_newstate):
8883         (create_cd_newstate, re_string_allocate, re_string_construct):
8884         (re_string_realloc_buffers, build_wcs_upper_buffer):
8885         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
8886         (re_string_reconstruct, re_string_peek_byte_case):
8887         (re_string_fetch_byte_case, re_string_context_at):
8888         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
8889         (re_node_set_init_copy, re_node_set_add_intersect):
8890         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
8891         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
8892         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
8893         (re_acquire_state, re_acquire_state_context, register_state):
8894         Likewise.
8895         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
8896         search_cur_bkref_entry):
8897         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
8898         (re_search_internal, re_search_2_stub, re_search_stub)
8899         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
8900         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
8901         (update_cur_sifted_state, check_dst_limits):
8902         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
8903         (check_subexp_limits, sift_states_bkref, merge_state_array):
8904         (check_subexp_matching_top, get_subexp, get_subexp_sub):
8905         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
8906         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
8907         (expand_bkref_cache, check_node_accept_bytes):
8908         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
8909         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
8910         (acquire_init_state_context, check_halt_node_context):
8911         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
8912         (sift_states_backward, clean_state_log_if_needed):
8913         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
8914         (find_recover_state, transit_state_sb, transit_state_mb):
8915         (transit_state_bkref, build_trtable, match_ctx_clean):
8916         Likewise.
8917         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
8918         to work around an assumption that REG_MISSING is negative.
8919
8920         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
8921         (seek_collating_symbol_entry) [defined _LIBC]:
8922         (lookup_collation_sequence_value) [defined _LIBC]:
8923         (build_range_exp, build_collating_symbol) [defined _LIBC]:
8924         Use prototypes rather than old-style function definitions.
8925         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
8926         (transit_state_sb) [0]:
8927         (find_collation_sequence_value) [defined _LIBC]: Likewise.
8928
8929         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
8930         rm_eo.
8931
8932         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
8933         (optimize_subexps, lower_subexp):
8934         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
8935         since the signed shift might overflow.  Use 1u<<31 instead.
8936         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
8937         Likewise.
8938         * lib/regexec.c (check_dst_limits_calc_pos_1,
8939         check_subexp_matching_top): Likewise.
8940
8941         * lib/regcomp.c (optimize_subexps, lower_subexp):
8942         Use CHAR_BIT rather than 8, for clarity.
8943         * lib/regexec.c (check_dst_limits_calc_pos_1):
8944         (check_subexp_matching_top): Likewise.
8945         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
8946         have to worry about portability issues when shifting it left.
8947         Remove no-longer-needed test for table_size > 0.
8948         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
8949         in a word, as the resulting behavior is undefined.
8950         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
8951         in one case, a <= should have been an <, and in another case the
8952         whole test was missing.
8953         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
8954         the standard name CHAR_BIT.
8955         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
8956         this is not true on one's complement and signed-magnitude hosts.
8957
8958         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
8959         next_last_offset.
8960         (struct re_dfa_t): Remove unused member states_alloc.
8961         * lib/regcomp.c (init_dfa): Don't initialize unused members.
8962
8963 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8964
8965         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
8966         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
8967         and large-file glibc and in 32-bit large-file Solaris.
8968
8969 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8970
8971         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
8972         lengths fit in regoff_t; this isn't true if regoff_t is the same
8973         width as size_t.
8974         * lib/regex.c (re_search_internal): 5th arg is LAST_START
8975         (= START + RANGE) instead of RANGE.  This avoids overflow
8976         problems when regoff_t is the same width as size_t.
8977         All callers changed.
8978         (re_search_2_stub): Check for overflow when adding the
8979         sizes of the two strings.
8980         (re_search_stub): Check for overflow when adding START
8981         to RANGE; if it occurs, substitute the extreme value.
8982
8983 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8984
8985         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
8986
8987 2005-08-31  Jim Meyering  <jim@meyering.net>
8988
8989         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
8990         a pointer-to-const.
8991         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
8992         (register_state): Likewise.
8993         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
8994         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
8995         (group_nodes_into_DFAstates): Likewise.
8996
8997 2005-08-31  Jim Meyering  <jim@meyering.net>
8998
8999         * check-module: Add a FIXME comment.
9000
9001 2005-08-31  Eric Blake  <ebb9@byu.net>
9002
9003         * modules/unistd-safer (Files): Add unistd--.h.
9004         * modules/stdio-safer (Files): Add stdio--.h.
9005
9006 2005-08-31  Derek Price  <derek@ximbiot.com>
9007
9008         * lib/getdelim.c (getdelim): Return EOF on EOF.
9009         Reported by Larry Jones <lawrence.jones@ugs.com>.
9010
9011 2005-08-31  Bruno Haible  <bruno@clisp.org>
9012
9013         Avoid unnecessary diffs in the generated lib/Makefile.am.
9014         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
9015         the generated files.
9016         (func_import): Don't set cmd.
9017
9018 2005-08-31  Bruno Haible  <bruno@clisp.org>
9019
9020         * lib/strstr.c: Include <stddef.h>, for NULL.
9021         * lib/strcasestr.c: Likewise.
9022         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
9023
9024 2005-08-31  Bruno Haible  <bruno@clisp.org>
9025
9026         * gnulib-tool: New option --macro-prefix.
9027         (func_import): Use macro_prefix.
9028         (import): Handle option --macro-prefix.
9029
9030 2005-08-31  Bruno Haible  <bruno@clisp.org>
9031
9032         * gnulib-tool (import): Rename most ac_* variables to cached_*.
9033         Also use new variables cached_lgpl, cached_libtool.
9034
9035 2005-08-31  Bruno Haible  <bruno@clisp.org>
9036
9037         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
9038         always instantiating them.
9039
9040 2005-08-31  Bruno Haible  <bruno@clisp.org>
9041
9042         * gnulib-tool (func_import): Read the previous cached settings
9043         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
9044         earlier added by gnulib but are now dropped. Warn when a gnulib file
9045         overwrites a non-gnulib file.
9046
9047 2005-08-31  Bruno Haible  <bruno@clisp.org>
9048
9049         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
9050         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
9051         projects that don't keep autogenerated files in CVS. Put into
9052         actioncmd only the specified modules, not the transitive closure.
9053
9054 2005-08-31  Bruno Haible  <bruno@clisp.org>
9055
9056         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
9057         Create directories that shall be filled.
9058         (import): Don't look for gl_* macros in configure.ac. Recurse across
9059         all directories containing a gnulib-cache.m4 files, if meaningful.
9060
9061 2005-08-31  Bruno Haible  <bruno@clisp.org>
9062
9063         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
9064         (import): Set seen_libtool when we see gl_LIBTOOL.
9065
9066 2005-08-31  Bruno Haible  <bruno@clisp.org>
9067
9068         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
9069         declaration macro definitions from generated gnulib.m4.
9070
9071 2005-08-30  "Oskar Liljeblad" <oskar@osk.mine.nu>
9072
9073         * lib/iconvme.h: Add prototype for iconv_alloc.
9074
9075 2005-08-29  Simon Josefsson  <jas@extundo.com>
9076
9077         * lib/iconvme.c: Fix errno.
9078
9079 2005-08-29  Bruno Haible  <bruno@clisp.org>
9080
9081         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
9082         that it works when the directory contains spaces.
9083
9084 2005-08-29  Bruno Haible  <bruno@clisp.org>
9085
9086         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
9087
9088 2005-08-29  Bruno Haible  <bruno@clisp.org>
9089
9090         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
9091         Emit more advice.
9092
9093 2005-08-29  Bruno Haible  <bruno@clisp.org>
9094         and Stepan Kasal  <kasal@ucw.cz>
9095
9096         * check-module: If more parameters are given, check each of them
9097         separately; add more exceptions, as noted by Jim Meyering.
9098         (check_module): New procedure.
9099         (%exempt_header): Now contains all exceptions.
9100
9101 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
9102
9103         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
9104
9105 2005-08-29  "Oskar Liljeblad" <oskar@osk.mine.nu>
9106
9107         * lib/iconvme.c: Split iconv_string into iconv_alloc.
9108
9109 2005-08-28  Bruno Haible  <bruno@clisp.org>
9110
9111         * m4/gnulib-tool.m4: New file.
9112
9113 2005-08-27  Jim Meyering  <jim@meyering.net>
9114
9115         * modules/unistd-safer (Files): Add pipe-safer.c.
9116         * modules/fcntl-safer (Files): Add creat-safer.c.
9117
9118 2005-08-27  Jim Meyering  <jim@meyering.net>
9119
9120         * m4/stdlib-safer.m4: New file.  From coreutils.
9121         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
9122         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
9123         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
9124         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
9125         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
9126
9127 2005-08-27  Jim Meyering  <jim@meyering.net>
9128
9129         * lib/fopen-safer.c: Merge minor changes from coreutils.
9130         * lib/dup-safer.c: Likewise.
9131         * lib/fd-safer.c: Likewise.
9132
9133         Merge from coreutils.
9134         * lib/stdio--.h: New file.
9135         * lib/stdlib--.h: New file.
9136         * lib/mkstemp-safer.c: New file.
9137
9138         GNU tar needs these.
9139         * lib/pipe-safer.c: New file.
9140         * lib/creat-safer.c: New file.
9141         * lib/fcntl--.h (creat): Define to creat_safer.
9142         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
9143         * lib/unistd--.h (pipe): Define to pipe_safer.
9144         * lib/unistd-safer.h: Declare pipe_safer.
9145
9146 2005-08-26  Simon Josefsson  <jas@extundo.com>
9147
9148         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
9149         Haible <bruno@clisp.org>.
9150
9151 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
9152
9153         * lib/regex_internal.h: Remove all references to
9154         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
9155         or better.
9156         (bitset_not, bitset_merge, bitset_not_merge):
9157         (bitset_mask, re_string_allocate, re_string_construct):
9158         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
9159         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
9160         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
9161         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
9162         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
9163         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
9164         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
9165         (re_acquire_state_context):
9166         Remove unnecessary forward decls.
9167         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
9168         Put __attribute at function definition,
9169         now that the function decl has been removed.
9170         * lib/regex_internal.c (re_string_peek_byte_case):
9171         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
9172         Likewise.
9173
9174 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
9175
9176         * m4/regex.m4: Add AC_PREREQ(2.50).
9177         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
9178
9179 2005-08-25  Simon Josefsson  <jas@extundo.com>
9180
9181         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
9182         __fsetlocking.
9183
9184 2005-08-25  Simon Josefsson  <jas@extundo.com>
9185
9186         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
9187         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
9188         GLIBC specific code.
9189
9190 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9191
9192         Make regex safe for g++.  This fixes one real bug (an "err"
9193         that should have been "*err").  g++ problem reported by
9194         Sam Steingold.
9195         * lib/regex_internal.h (re_calloc): New macro, consistent with
9196         re_malloc etc.  All callers of calloc changed to use re_calloc.
9197         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
9198         not int.  All callers changed.
9199         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
9200         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
9201         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
9202         (find_recover_state): Change "err" to "*err"; this fixes what
9203         appears to be a real bug.
9204         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
9205         versus int.
9206
9207 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9208
9209         * modules/regex (Depends-on): Add malloc, since the code
9210         assumes that !malloc(0) means failure.
9211
9212 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9213
9214         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
9215
9216         alloca modernization/simplification for regex.
9217         * lib/regex.c: Remove portability cruft for alloca.  This no longer
9218         needs to be at the start of the file, and can be moved into
9219         regex_internal.h and simplified.
9220         * lib/regex_internal.h: Include <alloca.h>.
9221         (__libc_use_alloca) [!defined _LIBC]: New macro.
9222         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
9223         now works outside glibc.
9224
9225 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
9226
9227         * config/srclist.txt: Add glibc bugs 1241, 1245.
9228
9229 2005-08-25  Jim Meyering  <jim@meyering.net>
9230
9231         * lib/open-safer.c: Include <config.h>.
9232         Otherwise, we'd lose LARGEFILE support in any file using
9233         e.g. "fcntl--.h"
9234
9235 2005-08-25  Bruno Haible  <bruno@clisp.org>
9236
9237         * m4/minmax.m4: Require autoconf 2.52.
9238         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
9239         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
9240         alternatives of translit over the alphabet.
9241         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
9242
9243 2005-08-24  Simon Josefsson  <jas@extundo.com>
9244
9245         * tests/test-getpass.c: New file.
9246
9247 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9248
9249         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
9250         for GNU regex features.
9251
9252 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9253
9254         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
9255         * lib/regex.h (regerror): Likewise.
9256
9257         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
9258         requires this.  (The code never needed it.)
9259
9260         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
9261         All uses of recently-renamed identifiers changed to use the new,
9262         POSIX-compliant names.  The code will build and run just fine
9263         without these changes, but it's better to eat our own dog food
9264         and use the standard-conforming names.
9265
9266         * lib/regex.h: Fix a multitude of POSIX name space violations.
9267         These changes have an effect only for programs that define
9268         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
9269         do not change anything for programs compiled in the normal way.
9270         Also, there is no effect on the ABI.
9271
9272         (_REGEX_SOURCE): New macro.
9273         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
9274         defined and _GNU_SOURCE is not; this fixes a name space violation.
9275
9276         Rename the following macros to obey POSIX requirements.
9277         The old names are still visible as macros if _REGEX_SOURCE is defined.
9278         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
9279         RE_BACKSLASH_ESCAPE_IN_LISTS.
9280         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
9281         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
9282         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
9283         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
9284         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
9285         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
9286         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
9287         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
9288         (REG_INTERVALS): renamed from RE_INTERVALS.
9289         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
9290         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
9291         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
9292         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
9293         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
9294         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
9295         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
9296         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
9297         RE_UNMATCHED_RIGHT_PAREN_ORD.
9298         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
9299         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
9300         (REG_DEBUG): renamed from RE_DEBUG.
9301         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
9302         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
9303         unusual, since we can't clash with the POSIX REG_ICASE.
9304         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
9305         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
9306         (REG_NO_SUB): renamed from RE_NO_SUB.
9307         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
9308         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
9309         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
9310         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
9311         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
9312         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
9313         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
9314         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
9315         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
9316         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
9317         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
9318         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
9319         RE_SYNTAX_POSIX_MINIMAL_BASIC.
9320         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
9321         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
9322         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
9323         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
9324         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
9325         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
9326         (REG_FIXED): Renamed from REGS_FIXED.
9327         (REG_NREGS): Renamed from RE_NREGS.
9328
9329         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
9330         of other REG_* macros, since POSIX says the user is allowed to
9331         #undef these macros selectively.
9332
9333         (reg_errcode_t): Update comment stating what other tables need
9334         to be consistent.
9335
9336         Rename the following enum values to obey POSIX requirements.
9337         The old names are still visible as macros.
9338         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
9339         is not defined, since GNU is supposed to be a superset of POSIX as
9340         much as possible, and since we want reg_errcode_t to be a signed
9341         type for implementation consistency.
9342         (_REG_NOERROR): Renamed from REG_NOERROR.
9343         (_REG_NOMATCH): Renamed from REG_NOMATCH.
9344         (_REG_BADPAT): Renamed from REG_BADPAT.
9345         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
9346         (_REG_ECTYPE): Renamed from REG_ECTYPE.
9347         (_REG_EESCAPE): Renamed from REG_EESCAPE.
9348         (_REG_ESUBREG): Renamed from REG_ESUBREG.
9349         (_REG_EBRACK): Renamed from REG_EBRACK.
9350         (_REG_EPAREN): Renamed from REG_EPAREN.
9351         (_REG_EBRACE): Renamed from REG_EBRACE.
9352         (_REG_BADBR): Renamed from REG_BADBR.
9353         (_REG_ERANGE): Renamed from REG_ERANGE.
9354         (_REG_ESPACE): Renamed from REG_ESPACE.
9355         (_REG_BADRPT): Renamed from REG_BADRPT.
9356         (_REG_EEND): Renamed from REG_EEND.
9357         (_REG_ESIZE): Renamed from REG_ESIZE.
9358         (_REG_ERPAREN): Renamed from REG_ERPAREN.
9359         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
9360         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
9361         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
9362         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
9363
9364         (_REG_RE_NAME, _REG_RM_NAME): New macros.
9365         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
9366         changed.  But support the old name if the new one is not defined
9367         and if _REGEX_SOURCE.
9368
9369         Change the following member names in struct re_pattern_buffer.
9370         The old names are still supported if !_REGEX_SOURCE.
9371         The new names are always supported, regardless of _REGEX_SOURCE.
9372         (re_buffer): Renamed from buffer.
9373         (re_allocated): Renamed from allocated.
9374         (re_used): Renamed from used.
9375         (re_syntax): Renamed from syntax.
9376         (re_fastmap): Renamed from fastmap.
9377         (re_translate): Renamed from translate.
9378         (re_can_be_null): Renamed from can_be_null.
9379         (re_regs_allocated): Renamed from regs_allocated.
9380         (re_fastmap_accurate): Renamed from fastmap_accurate.
9381         (re_no_sub): Renamed from no_sub.
9382         (re_not_bol): Renamed from not_bol.
9383         (re_not_eol): Renamed from not_eol.
9384         (re_newline_anchor): Renamed from newline_anchor.
9385
9386         Change the following member names in struct re_registers.
9387         The old names are still supported if !_REGEX_SOURCE.
9388         The new names are always supported, regardless of _REGEX_SOURCE.
9389         (rm_num_regs): Renamed from num_regs.
9390         (rm_start): Renamed from start.
9391         (rm_end): Renamed from end.
9392
9393         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
9394         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
9395         Prepend __ to parameter names.
9396
9397         Undo yesterday's changes.
9398
9399 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
9400
9401         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
9402         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
9403         lib/regex.c.
9404
9405 2005-08-24  Jim Meyering  <jim@meyering.net>
9406
9407         Sync from coreutils.
9408         * m4/fcntl-safer.m4: New file.
9409
9410         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
9411         and object files for this module.
9412
9413 2005-08-24  Jim Meyering  <jim@meyering.net>
9414
9415         Sync from coreutils.
9416         * lib/fcntl--.h, fcntl-safer.h, open-safer.c: New files.
9417
9418 2005-08-24  Jim Meyering  <jim@meyering.net>
9419
9420         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
9421         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
9422
9423 2005-08-24  Jim Meyering  <jim@meyering.net>
9424
9425         * modules/fcntl-safer: New module.
9426         * modules/fts (Depends-on): Add fcntl-safer.
9427         * MODULES.html.sh (File descriptor based Input/Output):
9428         Add fcntl-safer.
9429
9430 2005-08-24  Bruno Haible  <bruno@clisp.org>
9431
9432         Support for unit test modules.
9433         * modules/README: Mention tests modules.
9434         * modules/TEMPLATE-TESTS: New file.
9435         * gnulib-tool: New options --extract-tests-module, --with-tests and
9436         --tests-base (unused for the moment).
9437         (testsbase, inctests): New variables.
9438         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
9439         (func_verify_module): Exclude TEMPLATE-TESTS.
9440         (func_verify_nontests_module, func_verify_tests_module): New functions.
9441         (func_get_dependencies): Add implicit dependency for tests modules.
9442         (func_get_tests_module): New function.
9443         (func_modules_transitive_closure): When --with-tests was specified,
9444         include the unit tests as well, unless explicitly avoided.
9445         (func_emit_lib_Makefile_am): Ignore the tests modules here.
9446         (func_emit_tests_Makefile_am): New function.
9447         (func_create_testdir): When --with-tests was specified, emit a
9448         tests/ directory.
9449         * MODULES.html.sh (Future developments): Update.
9450
9451 2005-08-24  Bruno Haible  <bruno@clisp.org>
9452
9453         * modules/tls-tests: New file.
9454         * tests/test-tls.c: New file, from GNU gettext.
9455
9456 2005-08-24  Bruno Haible  <bruno@clisp.org>
9457
9458         * modules/lock-tests: New file.
9459         * tests/test-lock.c: New file, from GNU gettext.
9460
9461 2005-08-24  Bruno Haible  <bruno@clisp.org>
9462
9463         * lib/lock.h: Add multiple inclusion guard.
9464         * lib/tls.h: Add multiple inclusion guard.
9465
9466 2005-08-24  Bruno Haible  <bruno@clisp.org>
9467
9468         * gnulib-tool: Add support for the --aux-dir option to
9469         --create-testdir, --create-megatestdir, --test, --megatest.
9470         (func_create_testdir, func_create_megatestdir): Optionally emit a
9471         AC_CONFIG_AUX_DIR directive.
9472         (create-testdir, create-megatestdir, test, megatest): Provide a
9473         default value for $auxdir.
9474
9475 2005-08-24  Bruno Haible  <bruno@clisp.org>
9476
9477         * gnulib-tool (import): Use compound statement instead of subshell
9478         where possible.
9479
9480 2005-08-24  Bruno Haible  <bruno@clisp.org>
9481
9482         * gnulib-tool (import): Change --aux-dir default to "build-aux".
9483
9484 2005-08-24  Bruno Haible  <bruno@clisp.org>
9485
9486         * gnulib-tool (func_version): Update.
9487
9488 2005-08-24  Bruno Haible  <bruno@clisp.org>
9489
9490         * gnulib-tool (func_import, func_create_testdir,
9491         func_create_megatestdir): Quote all autoconf macro arguments.
9492
9493 2005-08-24  Bruno Haible  <bruno@clisp.org>
9494
9495         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
9496         option --force, because --force causes the aclocal.m4 of each
9497         subdirectory to be newer than the corresponding config.h.in.
9498
9499 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9500
9501         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
9502         All contents moved to gl_REGEX.
9503         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
9504         assume that it does.
9505
9506 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9507
9508         * lib/regex.h (REG_NOSYS)
9509         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
9510         Define, since POSIX requires it as of 2001.
9511         (_REG_ENOSYS)
9512         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
9513         New private symbol, used to keep the enum signed in all cases.
9514         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
9515         Youngman in
9516         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
9517
9518         * lib/regex_internal.c (re_string_skip_chars, register_state):
9519         (calc_state_hash):
9520         Remove forward decls; no longer needed now that we use prototypes.
9521         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
9522         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
9523         (clean_state_log_if_needed): Likewise.
9524
9525 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
9526
9527         * config/srclist.txt: Add glibc bugs 1231-1233.
9528
9529 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9530
9531         Fix problems reported by Sam Steingold in
9532         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
9533         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
9534         assumed that reg_errcode_t is a signed type, which is not
9535         necessarily true if _XOPEN_SOURCE is not defined.
9536         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
9537         since some compilers warn about it otherwise.
9538
9539 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9540
9541         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
9542         (init_word_char, create_initial_state, duplicate_node_closure):
9543         (fetch_token, peek_token_bracket, build_range_exp):
9544         (build_collating_symbol): Remove forward decls; no longer needed
9545         now that we use prototypes.
9546
9547         * lib/regcomp.c:
9548         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
9549         (re_compile_fastmap_iter, regcomp, regerror, regfree):
9550         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
9551         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
9552         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
9553         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
9554         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
9555         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
9556         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
9557         (build_range_exp, build_collating_symbol, parse_bracket_exp):
9558         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
9559         (build_charclass, build_charclass_op, fetch_number, create_tree):
9560         (create_token_tree, mark_opt_subexp, duplicate_tree):
9561         Use prototypes rather than old-style definitions.
9562
9563         * lib/regex_internal.c:
9564         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
9565         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
9566         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
9567         (re_string_reconstruct, re_string_peek_byte_case):
9568         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
9569         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
9570         (re_node_set_init_copy, re_node_set_add_intersect):
9571         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
9572         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
9573         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
9574         (re_acquire_state, re_acquire_state_context, register_state):
9575         (create_ci_newstate, create_cd_newstate, free_state):
9576         Likewise.
9577         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
9578         re_search_2):
9579         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
9580         (re_search_internal, prune_impossible_nodes):
9581         (acquire_init_state_context, check_matching, static):
9582         (check_halt_node_context, check_halt_state_context, proceed_next_node):
9583         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
9584         (update_regs, sift_states_backward, build_sifted_states):
9585         (clean_state_log_if_needed, merge_state_array):
9586         (update_cur_sifted_state, add_epsilon_src_nodes):
9587         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
9588         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
9589         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
9590         (find_recover_state, check_subexp_matching_top, transit_state_mb):
9591         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
9592         (check_arrival, check_arrival_add_next_nodes):
9593         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
9594         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
9595         (check_node_accept_bytes, check_node_accept, extend_buffers):
9596         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
9597         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
9598         (sift_ctx_init):
9599         Likewise.
9600
9601         * lib/regex_internal.h:
9602         (re_string_allocate, re_string_construct, re_string_reconstruct):
9603         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
9604         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
9605         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
9606         (re_string_context_at, re_string_peek_byte_case):
9607         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
9608         is defined, since we now use prototypes always.
9609
9610         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
9611         C89 or better.  All uses removed.
9612
9613 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
9614
9615         * config/srclist.txt: Add glibc bugs 1220-1227.
9616
9617 2005-08-20  Jim Meyering  <jim@meyering.net>
9618
9619         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
9620         of unused local, dfa.
9621
9622 2005-08-20  Bruno Haible  <bruno@clisp.org>
9623
9624         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
9625
9626 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9627
9628         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
9629         (re_node_set_insert_last, re_dfa_add_node):
9630         Rename local variables to avoid GCC shadowing warnings.
9631
9632 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9633
9634         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
9635         [defined lint]: Suppress bogus uninitialized-variable warnings.
9636
9637         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
9638         and let the caller return REG_ESPACE if out of space.  This
9639         removes an uninitialied-variable warning with GCC 4.0.1, and also
9640         avoids taking the address of a local variable.  All callers
9641         changed.
9642
9643 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
9644
9645         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
9646         $LIBCSRC/posix/regexec.c.
9647         Add glibc bug 1217 for regcomp.c.
9648
9649 2005-08-19  Jim Meyering  <jim@meyering.net>
9650
9651         * lib/regexec.c (proceed_next_node): Redo local variables to
9652         avoid GCC shadowing warnings.
9653
9654 2005-08-18  Bruno Haible  <bruno@clisp.org>
9655
9656         * lib/strstr.c (strstr): Fix return value in multibyte case.
9657         * lib/strcasestr.c (strcasestr): Likewise.
9658
9659 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
9660
9661         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
9662
9663 2005-08-17  Jim Meyering  <jim@meyering.net>
9664
9665         Make the %s format (seconds since the epoch) work for a negative
9666         number and when used with a zero-padded field width, e.g. %015s.
9667
9668         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
9669         label so that it precedes the code to set `digits'.  Otherwise,
9670         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
9671         print `00-22'.  Now, it prints `-0022', as it should.
9672
9673 2005-08-17  Bruno Haible  <bruno@clisp.org>
9674
9675         * modules/strstr (Files): Add m4/mbrtowc.m4.
9676         (Depends-on): Add mbuiter.
9677
9678 2005-08-17  Bruno Haible  <bruno@clisp.org>
9679
9680         * modules/strcasestr: New file.
9681         * MODULES.html.sh (String handling, based on ANSI C 89): Add
9682         strcasestr.
9683
9684 2005-08-17  Bruno Haible  <bruno@clisp.org>
9685
9686         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
9687
9688 2005-08-17  Bruno Haible  <bruno@clisp.org>
9689
9690         * modules/mbuiter: New file.
9691         * MODULES.html.sh (Extended multibyte and wide character utilities):
9692         Add mbuiter.
9693
9694 2005-08-17  Bruno Haible  <bruno@clisp.org>
9695
9696         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
9697         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
9698
9699 2005-08-17  Bruno Haible  <bruno@clisp.org>
9700
9701         * m4/strcasestr.m4: New file.
9702
9703 2005-08-17  Bruno Haible  <bruno@clisp.org>
9704
9705         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
9706         * lib/strstr.c: Completely rewritten, with multibyte locale support.
9707
9708 2005-08-17  Bruno Haible  <bruno@clisp.org>
9709
9710         * lib/strcasestr.h: New file.
9711         * lib/strcasestr.c: New file.
9712
9713 2005-08-17  Bruno Haible  <bruno@clisp.org>
9714
9715         * lib/strcasecmp.c: Use mbuiter.h.
9716
9717 2005-08-17  Bruno Haible  <bruno@clisp.org>
9718
9719         * lib/mbuiter.h: New file.
9720
9721 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
9722
9723         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
9724         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
9725         and gl_GETOPT are both invoked via different paths (as happens
9726         with GNU tar CVS because it uses both argp and getopt), the former
9727         wins.
9728
9729 2005-08-16  Bruno Haible  <bruno@clisp.org>
9730
9731         * modules/tls: New file.
9732         * MODULES.html.sh (Multithreading): Add tls.
9733
9734 2005-08-16  Bruno Haible  <bruno@clisp.org>
9735
9736         * modules/strnlen1: New file.
9737         * MODULES.html.sh (String handling): Add strnlen1.
9738
9739 2005-08-16  Bruno Haible  <bruno@clisp.org>
9740
9741         * modules/strcase (Files): Add m4/mbrtowc.m4.
9742         (Depends-on): Add strnlen1, mbchar.
9743
9744 2005-08-16  Bruno Haible  <bruno@clisp.org>
9745
9746         * modules/mbiter: New file.
9747         * MODULES.html.sh (Extended multibyte and wide character utilities):
9748         Add mbiter.
9749
9750 2005-08-16  Bruno Haible  <bruno@clisp.org>
9751
9752         * modules/mbfile: New file.
9753         * MODULES.html.sh (Extended multibyte and wide character utilities):
9754         Add mbfile.
9755
9756 2005-08-16  Bruno Haible  <bruno@clisp.org>
9757
9758         * modules/mbchar: New file.
9759         * MODULES.html.sh (Extended multibyte and wide character utilities):
9760         New section.
9761
9762 2005-08-16  Bruno Haible  <bruno@clisp.org>
9763
9764         * m4/tls.m4: New file, from GNU gettext.
9765
9766 2005-08-16  Bruno Haible  <bruno@clisp.org>
9767
9768         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
9769         always.
9770         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
9771
9772 2005-08-16  Bruno Haible  <bruno@clisp.org>
9773
9774         * m4/mbiter.m4: New file.
9775
9776 2005-08-16  Bruno Haible  <bruno@clisp.org>
9777
9778         * m4/mbfile.m4: New file.
9779
9780 2005-08-16  Bruno Haible  <bruno@clisp.org>
9781
9782         * m4/mbchar.m4: New file.
9783
9784 2005-08-16  Bruno Haible  <bruno@clisp.org>
9785
9786         * lib/tls.h: New file, from GNU gettext.
9787         * lib/tls.c: New file, from GNU gettext.
9788
9789 2005-08-16  Bruno Haible  <bruno@clisp.org>
9790
9791         * lib/strnlen1.h: New file.
9792         * lib/strnlen1.c: New file.
9793
9794 2005-08-16  Bruno Haible  <bruno@clisp.org>
9795
9796         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
9797         (mbi_init): Update.
9798         (mbi_avail, mbi_advance): Let the iteration end before the terminating
9799         NUL byte, not after it.
9800
9801 2005-08-16  Bruno Haible  <bruno@clisp.org>
9802
9803         * lib/strcase.h (strcasecmp): Add note in comments.
9804         * lib/strncasecmp.c: Use code from strcasecmp.c.
9805         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
9806         (strcasecmp): Work correctly in multibyte locales.
9807
9808 2005-08-16  Bruno Haible  <bruno@clisp.org>
9809
9810         * lib/mbiter.h: New file.
9811
9812 2005-08-16  Bruno Haible  <bruno@clisp.org>
9813
9814         * lib/mbfile.h: New file.
9815
9816 2005-08-16  Bruno Haible  <bruno@clisp.org>
9817
9818         * lib/mbchar.h: New file.
9819         * lib/mbchar.c: New file.
9820
9821 2005-08-16  Bruno Haible  <bruno@clisp.org>
9822
9823         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
9824         the valid ones. Makes the comparison operations transitive:
9825         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
9826         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
9827
9828 2005-08-15  Simon Josefsson  <jas@extundo.com>
9829
9830         * modules/ssize_t (License): Change to 'unlimited'.
9831
9832         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
9833
9834 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
9835
9836         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
9837         Add comments for each pending glibc patch.
9838
9839 2005-08-15  Bruno Haible  <bruno@clisp.org>
9840
9841         * lib/regex.h (__restrict_arr): Don't define to __restrict if
9842         __cplusplus is defined.
9843
9844 2005-08-14  Jim Meyering  <jim@meyering.net>
9845
9846         Sync from coreutils.
9847
9848         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
9849         Use the hash-table-based cycle-detection code not just when
9850         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
9851         Reported by James Youngman in
9852         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
9853         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
9854         FTS_TIGHT_CYCLE_CHECK.
9855         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
9856         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
9857         once again.
9858         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
9859         * lib/fts.c (fd_safer): Remove decl.
9860         Include fcntl--.h rather than unistd-safer.h
9861         (fts_safe_changedir): Don't call fd_safer; no longer needed
9862         now that we include fcntl--.h.
9863
9864 2005-08-12  Simon Josefsson  <jas@extundo.com>
9865
9866         * modules/getndelim2: Use ssize_t module.
9867         * modules/getnline: Likewise.
9868         * modules/safe-read: Likewise.
9869         * modules/xreadlink: Likewise.
9870
9871         * modules/ssize_t: New file.
9872
9873 2005-08-12  Simon Josefsson  <jas@extundo.com>
9874
9875         * m4/readline.m4: Look for termcap, curses or ncurses if required.
9876
9877 2005-08-12  Simon Josefsson  <jas@extundo.com>
9878
9879         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
9880         ssize_t.
9881
9882 2005-08-12  Simon Josefsson  <jas@extundo.com>
9883
9884         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
9885         readline, getdelim and check_version.
9886         (Support for systems lacking ISO C 99: Sizes of integer types):
9887         Add size_max.
9888
9889 2005-08-12  Bruno Haible  <bruno@clisp.org>
9890
9891         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
9892
9893 2005-08-11  Simon Josefsson  <jas@extundo.com>
9894
9895         * modules/readline: New file.
9896
9897         * modules/strnlen (Files): Add strnlen.h.
9898
9899 2005-08-11  Simon Josefsson  <jas@extundo.com>
9900
9901         * m4/readline.m4: New file.
9902
9903 2005-08-11  Simon Josefsson  <jas@extundo.com>
9904
9905         * lib/readline.h, readline.c: New file.
9906
9907 2005-08-11  Simon Josefsson  <jas@extundo.com>
9908
9909         * doc/gnulib.texi (Initial import, Finishing touches): Mention
9910         gl_AVOID.
9911
9912 2005-08-11  Bruno Haible  <bruno@clisp.org>
9913
9914         * lib/strnlen.h (strnlen): Change parameter name to match comment.
9915
9916 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
9917
9918         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
9919
9920 2005-08-10  Simon Josefsson  <jas@extundo.com>
9921
9922         * tests/test-iconvme.c: New file.
9923
9924 2005-08-10  Simon Josefsson  <jas@extundo.com>
9925
9926         * m4/strnlen.m4: New file.
9927
9928         * m4/strndup.m4: Don't check for strnlen declaration, done in
9929         strnlen.m4.
9930
9931 2005-08-10  Simon Josefsson  <jas@extundo.com>
9932
9933         * lib/strndup.c: Use strnlen.h.
9934
9935         * lib/strnlen.h: New file.
9936
9937 2005-08-08  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>  (tiny change)
9938
9939         * README: Typos.
9940
9941 2005-08-02  Simon Josefsson  <jas@extundo.com>
9942
9943         * modules/readline: New file.
9944
9945 2005-08-02  Simon Josefsson  <jas@extundo.com>
9946
9947         * modules/getdelim: New file.
9948
9949         * modules/getline: Rewrite, don't use getndelim2.
9950
9951 2005-08-02  Simon Josefsson  <jas@extundo.com>
9952
9953         * m4/getline.m4: Separate out getdelim stuff into separate module.
9954
9955         * m4/getdelim.m4: New file.
9956
9957 2005-08-02  Simon Josefsson  <jas@extundo.com>
9958
9959         * lib/getline.h, getline.c: Rewrite.
9960
9961         * lib/getdelim.h, getdelim.c: New files, ported from glibc.
9962
9963 2005-07-31  Bruno Haible  <bruno@clisp.org>
9964
9965         * lib/lock.h (gl_lock_initializer): New macro.
9966         (gl_lock_define_initialized): Use it.
9967         (gl_rwlock_initializer): New macro.
9968         (gl_rwlock_define_initialized): Use it.
9969         (gl_recursive_lock_initializer): New macro.
9970         (gl_recursive_lock_define_initialized): Use it.
9971
9972 2005-07-30  Karl Berry  <karl@gnu.org>
9973
9974         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
9975         Report from Ben Pfaff, regarding getopt.
9976
9977 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
9978
9979         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
9980         normal way.
9981         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
9982         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
9983         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
9984         (gl_GETOPT): Use the new macros.  Most of the implementation
9985         is moved to the new macros.  This is for programs like Emacs
9986         that don't want all the functionality of gl_GETOPT.
9987
9988 2005-07-26  Bruno Haible  <bruno@clisp.org>
9989
9990         * m4/lock.m4: Update from GNU gettext.
9991
9992 2005-07-26  Bruno Haible  <bruno@clisp.org>
9993
9994         * lib/lock.h: Update from GNU gettext.
9995         * lib/lock.c: Update from GNU gettext.
9996
9997 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
9998
9999         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
10000         obsolescent AC_TRY_RUN.  Include the default includes files, for
10001         'exit'.
10002
10003 2005-07-24  Bruno Haible  <bruno@clisp.org>
10004
10005         * modules/visibility: New file.
10006         * MODULES.html.sh (Misc): Add visibility.
10007
10008 2005-07-24  Bruno Haible  <bruno@clisp.org>
10009
10010         * m4/visibility.m4: New file.
10011
10012 2005-07-24  Bruno Haible  <bruno@clisp.org>
10013
10014         * doc/visibility.texi: New file.
10015
10016 2005-07-22  Bruno Haible  <bruno@clisp.org>
10017
10018         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
10019         $(ALLOCA_H), redundant through BUILT_SOURCES.
10020         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
10021         redundant through BUILT_SOURCES.
10022         * modules/byteswap (Makefile.am): Remove explicit dependency on
10023         $(BYTESWAP_H), redundant through BUILT_SOURCES.
10024         * modules/fnmatch (Makefile.am): Remove explicit dependency on
10025         $(FNMATCH_H), redundant through BUILT_SOURCES.
10026         * modules/getopt (Makefile.am): Remove explicit dependency on
10027         $(GETOPT_H), redundant through BUILT_SOURCES.
10028         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
10029         redundant through BUILT_SOURCES.
10030         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
10031         redundant through BUILT_SOURCES.
10032         * modules/stdbool (Makefile.am): Remove explicit dependency on
10033         $(STDBOOL_H), redundant through BUILT_SOURCES.
10034         * modules/stdint (Makefile.am): Remove explicit dependency on
10035         $(STDINT_H), redundant through BUILT_SOURCES.
10036         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
10037         Remove explicit dependency on $(SYSEXITS_H).
10038         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
10039
10040 2005-07-18  Simon Josefsson  <jas@extundo.com>
10041
10042         * lib/check-version.c (check_version): Accept identical versions too.
10043
10044 2005-07-18  Bruno Haible  <bruno@clisp.org>
10045
10046         * modules/lock: New file.
10047         * MODULES.html.sh (Multithreading): New section.
10048
10049 2005-07-18  Bruno Haible  <bruno@clisp.org>
10050
10051         * m4/lock.m4: New file, from GNU gettext.
10052
10053 2005-07-18  Bruno Haible  <bruno@clisp.org>
10054
10055         * lib/lock.h: New file, from GNU gettext.
10056         * lib/lock.c: New file, from GNU gettext.
10057
10058 2005-07-18  Bruno Haible  <bruno@clisp.org>
10059
10060         * lib/lock.h (gl_once_t): New type.
10061         (gl_once_define, gl_once): New macros.
10062         * lib/lock.c (fresh_once): New variable.
10063         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
10064         functions.
10065
10066 2005-07-16  Simon Josefsson  <jas@extundo.com>
10067
10068         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
10069         workaround, suggested by Bruno.
10070
10071 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
10072
10073         * modules/xalloc (Depends-on): Add xalloc-die.
10074         * modules/xvasprintf (Depends-on): Add xalloc-die.
10075
10076 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
10077
10078         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
10079         with a minor change.
10080
10081 2005-07-15  Bruno Haible  <bruno@clisp.org>
10082
10083         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
10084         When using lib/poll.c, define poll as rpl_poll.
10085
10086 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
10087
10088         * modules/argp (Depends-on): Remove unlocked-io.
10089
10090 2005-07-14  Derek Price  <derek@ximbiot.com>
10091
10092         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
10093         for glob symlink bug.
10094
10095 2005-07-14  Bruno Haible  <bruno@clisp.org>
10096
10097         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
10098         Instead, test for *_unlocked function declarations directly.
10099
10100 2005-07-11  Simon Josefsson  <jas@extundo.com>
10101
10102         * modules/size_max: New file.
10103
10104         * modules/xsize: Depend on size_max module for size_max.m4.
10105
10106 2005-07-11  Simon Josefsson  <jas@extundo.com>
10107
10108         * lib/size_max.h: New file.
10109
10110 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
10111
10112         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
10113         copyright symbol and the year.
10114         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
10115         (version_etc_va): Use parameterized copyright notice.
10116         Reword to conform to the current GNU coding standards.
10117
10118 2005-07-11  Karl Berry  <karl@gnu.org>
10119
10120         * doc/gnulib.texi (Quoting): new node.
10121         (Initial import): more info, from Patrice.
10122
10123 2005-07-11  Bruno Haible  <bruno@clisp.org>
10124
10125         * gnulib-tool (func_usage): Document option --avoid.
10126         (Command line options): Handle --avoid.
10127         (func_acceptable): New function.
10128         (func_modules_transitive_closure): Use it.
10129
10130 2005-07-11  Bruno Haible  <bruno@clisp.org>
10131
10132         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
10133         Reported by Jim Meyering.
10134
10135 2005-07-10  Bruno Haible  <bruno@clisp.org>
10136
10137         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
10138         Needed when size_t is smaller than 'unsigned int'.
10139         Reported by Paul Eggert.
10140
10141 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10142
10143         * modules/argp (Depends-on): Add unlocked-io
10144
10145 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10146
10147         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
10148         block of defines.
10149
10150 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
10151
10152         * config/srclist.txt: Comment out regcomp.c, since we have a porting
10153         fix now.
10154
10155 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
10156         and Paul Eggert  <eggert@cs.ucla.edu>
10157
10158         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
10159         in wint_t, not wchar_t.  Remove now-unnecessary cast.
10160
10161 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
10162
10163         * modules/regex (Files): Add lib/regex_internal.c,
10164         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
10165         (Depends-on): Add extensions.
10166         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
10167
10168 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
10169
10170         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
10171         pathconf.
10172         * m4/same.m4 (gl_SAME): Likewise.
10173         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
10174
10175         * m4/regex.m4: Adjust to new libc regex implementation.
10176         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
10177         all the .c and .h parts of (the new) regex.
10178         Quote the m4 stuff better.
10179         Check for RE_ICASE bug of old gnulib.
10180         Check for REG_STARTEND of recent libc.
10181         Rename local variables from jm_* to gl_*.
10182         Quote operand of "test -f".
10183         Say "recent enough" version of libc, not "version 2".
10184         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
10185         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
10186         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
10187         Remove check for btowc, isascii.
10188         Require AM_LANGINFO_CODESET.
10189
10190 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
10191
10192         * lib/regex.c, regex.h: Sync from libc.
10193         * lib/regcomp.c, regexec_internal.c, regex_internal.h, regexec.c:
10194         New files, synced from libc, except that regex_internal.h
10195         currently has a small porting fix.
10196
10197 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
10198
10199         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
10200         regex_internal.c, regexec.c.
10201         Add regex_internal.h too, but as a comment, since the libc version
10202         is currently broken in gnulib mode.
10203
10204 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
10205
10206         Support programs like Emacs that use gnulib but not gettext.
10207         * MODULES.html.sh (Internationalization functions): Add gettext-h.
10208         * modules/gettext-h: New file.
10209         * modules/gettext (Files): Remove lib/gettext.h.
10210         (Depends-on): Add gettext-h.
10211         (Makefile.am): Remove lib_SOURCES.
10212         * modules/argmatch, modules/c-stack, modules/closeout:
10213         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
10214         * modules/execute, modules/file-type, modules/getaddrinfo:
10215         * modules/getopt, modules/human, modules/javacomp:
10216         * modules/javaexec, modules/mkdir-p, modules/obstack:
10217         * modules/openat, modules/pagealign_alloc, modules/pipe:
10218         * modules/quotearg, modules/regex, modules/rpmatch:
10219         * modules/unicodeio, modules/userspec, modules/version-etc:
10220         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
10221         * modules/xsetenv:
10222         Depend on gettext-h, not gettext.
10223
10224 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
10225
10226         * gnulib-tool (func_import): Add support for 'public domain' license.
10227         * modules/alloca, modules/atexit, modules/memmove:
10228         Now public domain, not GPL.
10229         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
10230         * modules/realloc, modules/strerror, modules/strtod:
10231         Now LGPL, not GPL.
10232
10233 2005-07-05  Bruno Haible  <bruno@clisp.org>
10234
10235         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
10236         autoconf CVS. Needed for mingw.
10237
10238 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10239
10240         Remove the dependency of the strftime module on the tzset module.
10241         * modules/strftime (Depends-on): Remove dependency on tzset.
10242
10243 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10244
10245         Remove the dependency of the strftime module on the tzset module.
10246         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
10247         gl_FUNC_TZSET_CLOBBER.
10248
10249 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
10250
10251         Remove the dependency of the strftime module on the tzset module.
10252         * lib/strftime.c (my_strftime)
10253         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
10254         Copy the input structure, to work around some of the bug with
10255         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
10256         Solaris releases, you should also use the tzset module, but we won't
10257         require it as a dependency any more since we don't want LGPLed code
10258         to depend on GPLed code.
10259
10260 2005-07-02  Jim Meyering  <jim@meyering.net>
10261
10262         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
10263         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
10264         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
10265         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
10266
10267 2005-07-02  Jim Meyering  <jim@meyering.net>
10268
10269         * lib/backupfile.c (backup_args): Change a `0' to NULL.
10270
10271 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
10272
10273         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
10274         declares only 'struct timespec;' (!).
10275
10276 2005-07-01  Jim Meyering  <jim@meyering.net>
10277
10278         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
10279         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
10280         * lib/save-cwd.c, tempname.c:
10281         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10282         and don't include <sys/file.h>).
10283
10284 2005-06-29  Jim Meyering  <jim@meyering.net>
10285
10286         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
10287         type name.  Use the variable name instead.
10288         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
10289         Likewise.
10290
10291 2005-06-28  Simon Josefsson  <jas@extundo.com>
10292
10293         * modules/check-version (Files): Add check-version.m4.
10294
10295 2005-06-28  Simon Josefsson  <jas@extundo.com>
10296
10297         * m4/check-version.m4: New file, suggested by Jim Meyering
10298         <jim@meyering.net>.
10299
10300 2005-06-28  Simon Josefsson  <jas@extundo.com>
10301
10302         * lib/check-version.h, check-version.c: New files.
10303
10304 2005-06-28  Simon Josefsson  <jas@extundo.com>
10305
10306         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
10307         collision with global variable.  Better indentation.  Don't
10308         increment buffer pointer beyond buffer end.  Based on comments
10309         from Paul Eggert <eggert@cs.ucla.edu>.
10310
10311         * lib/base64.h: Indent.
10312
10313 2005-06-28  Simon Josefsson  <jas@extundo.com>
10314
10315         * doc/gnulib.texi (Library version handling): New section.
10316
10317 2005-06-28  Jim Meyering  <jim@meyering.net>
10318
10319         * check-module (find_included_lib_files): Hard-code another
10320         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
10321         but modules/fts-lgpl (correctly) does not list those files.
10322
10323         * modules/canonicalize (Files): Add lib/pathmax.h.
10324
10325 2005-06-25  Simon Josefsson  <jas@extundo.com>
10326
10327         * modules/check-version: New file.
10328
10329 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
10330
10331         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
10332         initializer of struct addrinfo, as an indication that we don't
10333         care how many members the structure has.
10334
10335 2005-06-24  Derek Price  <derek@ximbiot.com>
10336         and Bruno Haible  <bruno@clisp.org>
10337
10338         Remove stat module & update lstat.
10339         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
10340         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
10341         * m4/stat.m4: Remove this file.
10342
10343 2005-06-24  Derek Price  <derek@ximbiot.com>
10344         and Bruno Haible  <bruno@clisp.org>
10345
10346         Remove stat module & update lstat.
10347         * lib/stat.c: Remove this file...
10348         (slash_aware_lstat): ...moving this content and its support...
10349         * lib/lstat.c (rpl_lstat): ...into here.
10350         * lib/lstat.h: New file.
10351
10352 2005-06-24  Derek Price  <derek@ximbiot.com>
10353         and Bruno Haible  <bruno@clisp.org>
10354
10355         Remove stat module & update lstat.
10356         * config/srclist.txt (libc sources): Remove stat.
10357
10358 2005-06-24  Derek Price  <derek@ximbiot.com>
10359         and Bruno Haible  <bruno@clisp.org>
10360
10361         Remove stat module & update lstat.
10362         * MODULES.html.sh (stat): Remove.
10363         * MODULES.html: Regenerated.
10364         * modules/lstat (Description): Correct function name.
10365         (Files): Add "lstat.h".
10366         (Depends-on): Remove stat, add xalloc, stat-macros.
10367         * modules/stat: Remove this file.
10368         (Include): Add "lstat.h", remove <sys/stat.h>.
10369
10370 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
10371
10372         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
10373         (ranged_convert): Don't save conversion in a temporary struct.
10374         This causes a warning with GCC 4.0.0, and anyway in the typical
10375         case it's not worth the extra 100 bytes or so of code.
10376         (ranged_convert, __mktime_internal): When calling a function via a
10377         pointer P, use P () rather than (*P) (), as we now assume C89 or
10378         better.
10379
10380 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
10381
10382         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
10383         "who -r" failed to give output.  Problem reported by Tim Waugh.
10384
10385         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
10386         (xcalloc): Use it to avoid needless tests.
10387         Problem reported by Jim Meyering.
10388
10389 2005-06-20  Derek Price  <derek@ximbiot.com>
10390
10391         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
10392         unnecessary for Autoconfs > 2.59c.
10393
10394 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
10395
10396         * lib/argp.h (__option_is_short): Check upper limit of
10397         __key. Isprint() requires its argument to have the value
10398         of an unsigned char or EOF.
10399
10400 2005-06-16  Jim Meyering  <jim@meyering.net>
10401
10402         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
10403         when either N or S is zero.
10404
10405 2005-06-16  Derek Price  <derek@ximbiot.com>
10406
10407         * m4/bison.m4: Declare YACC & YFLAGS precious.
10408
10409 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
10410
10411         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
10412         multibyte string or pattern, fall back on unibyte matching.
10413         Problem reported by James Youngman.
10414
10415 2005-06-08  Bruno Haible  <bruno@clisp.org>
10416
10417         * modules/csharpcomp: New file.
10418         * MODULES.html.sh (C#): Add csharpcomp.
10419
10420 2005-06-08  Bruno Haible  <bruno@clisp.org>
10421
10422         * m4/csharpcomp.m4: New file, from GNU gettext.
10423
10424 2005-06-08  Bruno Haible  <bruno@clisp.org>
10425
10426         * lib/csharpcomp.h: New file, from GNU gettext.
10427         * lib/csharpcomp.c: New file, from GNU gettext.
10428         * lib/csharpcomp.sh.in: New file, from GNU gettext.
10429
10430 2005-06-08  Bruno Haible  <bruno@clisp.org>
10431
10432         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
10433         warning on mingw.
10434
10435 2005-06-07  Derek Price  <derek@ximbiot.com>
10436
10437         Sync from CVS.
10438         * lib/glob_.h: Indent nested #ifdef.
10439
10440 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
10441
10442         Sync from coreutils.
10443         Use "file name" when talking about file names, instead of "filename"
10444         or "path", as per the GNU coding standards.
10445         * lib/mkdir-p.c: Renamed from makepath.c.
10446         (make_dir_parents): Renamed from make_path.  All callers changed.
10447         * lib/mkdir-p.h: Likewise.  All includers changed.
10448         * lib/filenamecat.c: Renamed from path-concat.c.
10449         (file_name_concat): Renamed from path_concat.  All callers changed.
10450         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
10451         * lib/filenamecat.h: Likewise.  All includers changed.
10452         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
10453         in comments or local variable names.
10454         * lib/basename.c: Likewise.
10455         * lib/canonicalize.c, canonicalize.h: Likewise.
10456         * lib/dirname.c, dirname.h: Likewise.
10457         * lib/euidaccess.c: Likewise.
10458         * lib/exclude.c: Likewise
10459         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
10460         * lib/fsusage.c, fsuage.h: Likewise.
10461         * lib/fts.c, fts_.h: Likewise.
10462         * lib/getcwd.c: Likewise.
10463         * lib/getloadavg.c: Likewise.
10464         * lib/mkstemp.c: Likewise.
10465         * lib/mountlist.c, mountlist.h: Likewise.
10466         * lib/openat.c, openat.h: Likewise.
10467         * lib/readlink-stub.c: Likewise.
10468         * lib/readutmp.c, readutmp.h: Likewise.
10469         * lib/rename.c: Likewise.
10470         * lib/rmdir.c: Likewise.
10471         * lib/same.c: Likewise.
10472         * lib/savedir.c: Likewise.
10473         * lib/stripslash.c: Likewise.
10474         * lib/tempname.c: Likewise.
10475         * lib/xreadlink.c: Likewise.
10476         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
10477         All uses changed.
10478         * lib/exclude.h: Likewise.
10479
10480         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
10481         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
10482         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
10483         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
10484         * lib/pathmax.h: Include <limits.h> unconditionally, since other
10485         files have been getting away with it for years (MORE/BSD 4.3
10486         is extinct now).
10487         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
10488         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
10489
10490         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
10491         Define to 256, not 255, as per modern POSIX.
10492
10493 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
10494
10495         Sync from coreutils.
10496         Use "file name" when talking about file names, instead of "filename"
10497         or "path", as per the GNU coding standards.
10498         * MODULES.html.sh: mkdir-p renamed from makepath.
10499         filenamecat renamed from path-concat.
10500         * modules/filenamecat: Renamed from modules/path-concat.
10501         (Files): filenamecat.h and filenamecat.c renamed from
10502         path-concat.h and path-concat.c.
10503         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
10504         (Include): filenamecat.h, not path-concat.h.
10505         * modules/mkdir-p: Renamed from modules/makepath.
10506         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
10507         makepath.c.
10508         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
10509         (Include): mkdir-p.h, not makepath.h.
10510
10511 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
10512
10513         Sync from coreutils.
10514         * m4/mkdir-p.m4: Renamed from makepath.m4.
10515         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
10516         Rename files from makepath.c to mkdir-p.c, and from
10517         makepath.h to mkdir-p.h.
10518         * m4/filenamecat.m4: Renamed from path-concat.m4.
10519         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
10520         Rename files from path-concat.c to filenamecat.c,
10521         and from path-concat.h to filenamecat.h.
10522         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
10523         "file name" in local variables or comments.
10524         * m4/rename.m4: Likewise.
10525
10526 2005-06-01  Bruno Haible  <bruno@clisp.org>
10527
10528         * modules/csharpexec: New file.
10529         * MODULES.html.sh (C#): New section.
10530
10531 2005-06-01  Bruno Haible  <bruno@clisp.org>
10532
10533         * m4/csharp.m4: New file, from GNU gettext.
10534         * m4/csharpexec.m4: New file, from GNU gettext.
10535
10536 2005-06-01  Bruno Haible  <bruno@clisp.org>
10537
10538         * lib/csharpexec.h: New file, from GNU gettext.
10539         * lib/csharpexec.c: New file, from GNU gettext.
10540         * lib/csharpexec.sh.in: New file, from GNU gettext.
10541
10542 2005-05-31  Derek Price  <derek@ximbiot.com>
10543             Paul Eggert  <eggert@cs.ucla.edu>
10544
10545         Sync from cvs.
10546         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
10547
10548 2005-05-31  Derek Price  <derek@ximbiot.com>
10549             Paul Eggert  <eggert@cs.ucla.edu>
10550
10551         Sync from cvs.
10552         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
10553
10554 2005-05-29  Derek Price  <derek@ximbiot.com>
10555
10556         * config/srclist.txt (glob_.h, glob.c): Add these files.
10557
10558 2005-05-29  Derek Price  <derek@ximbiot.com>
10559
10560         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
10561         * modules/glob: New file.
10562         * modules/getlogin_r: Add link to POSIX spec in description.
10563
10564 2005-05-29  Derek Price  <derek@ximbiot.com>
10565             Paul Eggert  <eggert@cs.ucla.edu>
10566
10567         * m4/glob.m4: New file.
10568
10569 2005-05-29  Derek Price  <derek@ximbiot.com>
10570             Paul Eggert  <eggert@cs.ucla.edu>
10571
10572         * lib/glob_.h, glob.c: New files.
10573
10574 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
10575
10576         * modules/fts (Files): Remove m4/inttypes-pri.m4.
10577         * modules/fts-lgpl (Depends-on): Remove gettext.
10578
10579 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
10580
10581         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
10582         and don't require gt_INTTYPES_PRI.
10583
10584 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
10585
10586         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
10587
10588         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
10589         the configuration hassle isn't worth it.
10590         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
10591         (LONGEST_MODIFIER, PRIuMAX): Remove.
10592
10593 2005-05-27  Bruno Haible  <bruno@clisp.org>
10594
10595         * lib/getlogin_r.h: Remove second include of <stddef.h>.
10596
10597 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
10598
10599         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
10600         _POSIX_PTHREAD_SEMANTICS for Solaris.
10601
10602 2005-05-25  Derek Price  <derek@ximbiot.com>
10603
10604         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
10605
10606 2005-05-25  Derek Price  <derek@ximbiot.com>
10607             Paul Eggert  <eggert@cs.ucla.edu>
10608
10609         * modules/getlogin_r: New files.
10610
10611 2005-05-25  Derek Price  <derek@ximbiot.com>
10612             Paul Eggert  <eggert@cs.ucla.edu>
10613
10614         * m4/getlogin_r.m4: New files.
10615
10616 2005-05-25  Derek Price  <derek@ximbiot.com>
10617             Paul Eggert  <eggert@cs.ucla.edu>
10618
10619         * lib/getlogin_r.c, getlogin_r.h: New files.
10620
10621 2005-05-25  Bruno Haible  <bruno@clisp.org>
10622             Derek Price  <derek@ximbiot.com>
10623
10624         * lib/getlogin_r.h: Simplify API documentation.
10625
10626 2005-05-23  Derek Price  <derek@ximbiot.com>
10627
10628         * modules/minmax (Files): Add m4/minmax.m4.
10629         (configure.ac): Add gl_MINMAX.
10630
10631 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
10632
10633         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
10634         so that unistd-safer.h (GPL'ed code) need not be included.
10635
10636 2005-05-22  Bruno Haible  <bruno@clisp.org>
10637
10638         * m4/minmax.m4: New file.
10639         Based on a patch by Derek Price <derek@ximbiot.com>.
10640
10641 2005-05-22  Bruno Haible  <bruno@clisp.org>
10642
10643         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
10644         (INT64_MIN): Fix definition.
10645         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
10646
10647         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
10648         NEED_SIGNED_INT_TYPES.
10649
10650         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
10651         HAVE_SYSTEM_INTTYPES.
10652
10653 2005-05-22  Bruno Haible  <bruno@clisp.org>
10654
10655         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
10656         Also include <sys/param.h> if it defines MIN, MAX.
10657         Based on a patch by Derek Price <derek@ximbiot.com>.
10658
10659 2005-05-21  Jim Meyering  <jim@meyering.net>
10660
10661         * modules/fts (Files): Add m4/inttypes-pri.m4.
10662         (Depends-on): Add lstat and remove gettext.  Alphabetize.
10663
10664 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
10665
10666         New fts module.
10667         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
10668         (setup_dir, free_dir): New functions.
10669         (enter_dir, leave_dir): Define trivial
10670         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
10671         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
10672         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
10673         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
10674         Move to fts-cycle.c.
10675         (fts_open): Use setup_dir.
10676         (fts_close): Use free_dir.
10677         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
10678         This adds a label and some gotos, but the alternatives were messier.
10679         Check for memory allocation failure when entering a dir.
10680         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
10681         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
10682         (FTS): New member fts_cycle, that is a union that contains the
10683         old active_dir_ht and cycle_state.  All uses changed to mention
10684         fts_cycle.ht and fts_cycle.state.
10685         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
10686         fts.c, with the following changes:
10687         (setup_dir, free_dir): New functions.
10688         (enter_dir): Now returns bool.  Return true if successful, false
10689         if memory exhausted.  All callers changed.
10690         Do not bother partly cleaning up on
10691         memory allocation failure; that is free_dir's job.
10692         However, free ad if hash_insert fails, to avoid memory leak.
10693         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
10694         fts->fts_options to see which union member to use.
10695
10696 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
10697
10698         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
10699         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
10700
10701 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
10702
10703         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
10704
10705 2005-05-20  Jim Meyering  <jim@meyering.net>
10706
10707         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
10708         Now a macro, to pacify GCC.
10709
10710 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
10711
10712         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
10713         of -1.
10714
10715 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
10716
10717         * lib/chown.c (rpl_chown): Return -1 on failure.
10718
10719 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
10720
10721         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
10722         Don't check for stddef.h.
10723         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
10724         don't use its results.
10725         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
10726         since we include them unconditionally.  Don't require
10727         AM_STDBOOL_H, since stdbool is a prerequisite.
10728         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
10729         since we assume C89 or better.
10730         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
10731         as we don't use their results.
10732         Don't check for fchdir, memmove, memset, strrchr, as we use
10733         them unconditionally.
10734         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
10735         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
10736
10737 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
10738
10739         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
10740         Include <stddef.h> unconditionally, since we assume C89 now.
10741         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
10742         * lib/fts.c: Include fts_.h first, to check interface.
10743         Do not include intprops.h; no longer needed.
10744         Include cycle-check.h and hash.h, since fts_.h no longer does.
10745         Remove unnecessary casts of closedir to void.
10746         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
10747         decide whether to decrement nlinks.
10748         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
10749         (FTS): Use struct hash_table * instead of Hash_table, so that
10750         we no longer need to include hash.h here.
10751
10752 2005-05-18  Jim Meyering  <jim@meyering.net>
10753
10754         * modules/dirfd (License): Change to LGPL.  Most of the code
10755         is already in the public domain.
10756
10757 2005-05-18  Jim Meyering  <jim@meyering.net>
10758
10759         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
10760         Reported by Yoann Vandoorselaere.
10761
10762 2005-05-17  Jim Meyering  <jim@meyering.net>
10763
10764         * m4/fts.m4: New file, from coreutils.
10765
10766 2005-05-17  Jim Meyering  <jim@meyering.net>
10767
10768         * lib/fts.c, fts_.h: New files, from coreutils.
10769
10770 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10771
10772         Sync from coreutils.
10773         * m4/unlinkdir.m4: New file.
10774
10775 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10776
10777         Sync from coreutils.
10778         * lib/unlinkdir.c, unlinkdir.h: New files.
10779         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
10780         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
10781         White space changes only.
10782         * lib/makepath.c (make_path): Port to hosts where leading "//" is
10783         special.
10784         * lib/yesno.c: Include getline.h, not ctype.h.
10785         (yesno): Don't remove leading white space; POSIX doesn't allow it.
10786         Use getline to remove arbitrary restriction on response length.
10787
10788 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10789
10790         * config/srclist-update: Spell out "Street" in FSF postal
10791         mail address; this is the style the FSF seems to prefer.
10792
10793         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
10794         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
10795         this updates FSF postal mail address.
10796
10797         Sync from coreutils.
10798         * modules/unlinkdir: New file.
10799         * modules/yesno (Depends-on): Add getline.
10800         * MODULES.html.sh (File system functions): Add unlinkdir.
10801
10802 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
10803
10804         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
10805         lib/strsep.h:
10806         Change the initial comment to refer to GPL, not LGPL.
10807         gnulib-tool will change it to LGPL as needed.
10808
10809         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
10810         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
10811         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
10812         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
10813         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
10814         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
10815         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
10816         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
10817         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
10818         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
10819         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
10820         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
10821         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
10822         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
10823         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
10824         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
10825         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
10826         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
10827         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
10828         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
10829         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
10830         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
10831         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
10832         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
10833         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
10834         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
10835         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
10836         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
10837         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
10838         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
10839         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
10840         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
10841         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
10842         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
10843         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
10844         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
10845         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
10846         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
10847         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
10848         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
10849         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
10850         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
10851         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
10852         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
10853         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
10854         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
10855         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
10856         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
10857         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
10858         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
10859         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
10860         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
10861         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
10862         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
10863         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
10864         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
10865         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
10866         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
10867         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
10868         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
10869         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
10870         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
10871         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
10872         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
10873         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
10874         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
10875         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
10876         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
10877         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
10878         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
10879         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
10880         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
10881         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
10882         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
10883         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
10884         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
10885         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
10886         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
10887         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
10888         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
10889         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
10890         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
10891         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
10892         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
10893         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
10894         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
10895         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
10896         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
10897         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
10898         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
10899         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
10900         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
10901         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
10902         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
10903         lib/yesno.c, lib/yesno.h:
10904         Update FSF postal mail address.
10905
10906 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
10907
10908         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
10909         tests/test-memmem.c, tests/test-stpncpy.c:
10910         Update FSF postal mail address.
10911
10912 2005-05-13  Bruno Haible  <bruno@clisp.org>
10913
10914         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
10915         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
10916         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
10917         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
10918         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
10919         Add support for 64-bit integers in the MSVC compiler.
10920
10921 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
10922
10923         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
10924
10925 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
10926
10927         * gnulib-tool (func_import): Sort and uniquify recommended includes.
10928
10929 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
10930
10931         * doc/getdate.texi (General date syntax): Don't say that date
10932         date --iso-8601=ns generates acceptable dates; it doesn't yet.
10933         Problem reported by Nic Ferrier.
10934
10935 2005-05-10  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
10936
10937         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
10938         specified in ai_socktype. Fix invalid ai_protocol
10939         check. ai_protocol is usually set to 0 or depending on
10940         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
10941         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
10942         ai_socktype / ai_protocol in the returned addrinfo structure.
10943
10944 2005-05-10  Simon Josefsson  <jas@extundo.com>
10945
10946         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
10947         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
10948
10949 2005-05-10  Karl Berry  <karl@gnu.org>
10950
10951         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
10952         (from http://www.gnu.org/licenses).
10953         * doc/COPYING.LIB: also rename to COPYING.LESSER.
10954         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
10955         fdl.texi suffices.
10956
10957 2005-05-10  Karl Berry  <karl@gnu.org>
10958
10959         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
10960         (COPYING.DOC): remove.
10961
10962         * config/srclist-update: new FSF address.
10963
10964 2005-05-10  Derek Price  <derek@ximbiot.com>
10965
10966         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
10967         possible.
10968
10969 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
10970             Bruno Haible  <bruno@clisp.org>
10971
10972         * modules/inet_ntop: New file.
10973         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10974         inet_ntop.
10975
10976 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
10977             Bruno Haible  <bruno@clisp.org>
10978
10979         * m4/inet_ntop.m4: New file.
10980
10981 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
10982             Bruno Haible  <bruno@clisp.org>
10983
10984         * lib/inet_ntop.h: New file.
10985         * lib/inet_ntop.c: New file, from glibc with modifications.
10986
10987 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
10988
10989         * modules/time_r (License): Change to LGPL.
10990         * modules/extensions (License): Change to LGPL.  Actually,
10991         the license is more permissive than that, but currently gnulib-tool
10992         doesn't know how to handle more-permissive licenses.
10993
10994         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
10995         Problem reported by Dave Love.
10996
10997 2005-05-08  Jim Meyering  <jim@meyering.net>
10998
10999         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
11000         blank.
11001
11002 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
11003
11004         * modules/argmatch (Depends-on): Add stdbool.
11005         * modules/backupfile (Depends-on): Likewise.
11006         * modules/chdir-long (Depends-on): Likewise.
11007         * modules/closeout (Depends-on): Likewise.
11008         * modules/cycle-check (Depends-on): Likewise.
11009         * modules/dirname (Depends-on): Likewise.
11010         * modules/fnmatch (Depends-on): Likewise.
11011         * modules/fsusage (Depends-on): Likewise.
11012         * modules/fwriteerror (Depends-on): Likewise.
11013         * modules/getcwd (Depends-on): Likewise.
11014         * modules/getloadavg (Depends-on): Likewise.
11015         * modules/hard-locale (Depends-on): Likewise.
11016         * modules/makepath (Depends-on): Likewise.
11017         * modules/mountlist (Depends-on): Likewise.
11018         * modules/nanosleep (Depends-on): Likewise.
11019         * modules/posixtm (Depends-on): Likewise.
11020         * modules/quotearg (Depends-on): Likewise.
11021         * modules/readtokens (Depends-on): Likewise.
11022         * modules/readtokens0 (Depends-on): Likewise.
11023         * modules/readutmp (Depends-on): Likewise.
11024         * modules/save-cwd (Depends-on): Likewise.
11025         * modules/strftime (Depends-on): Likewise.
11026         * modules/userspec (Depends-on): Likewise.
11027         * modules/utimecmp (Depends-on): Likewise.
11028         * modules/xgetcwd (Depends-on): Likewise.
11029         * modules/xnanosleep (Depends-on): Likewise.
11030         * modules/xstrtod (Depends-on): Likewise.
11031         * modules/yesno (Depends-on): Likewise.
11032
11033 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
11034
11035         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
11036         needless checks.
11037
11038 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11039
11040         Merge from coreutils.  Among other things,
11041         add bulletproofing for cases where stdin, stdout, or stderr are closed.
11042         * lib/fd-safer.c: New file.
11043         * lib/fcntl-safer.h, open-safer.c: Remove.
11044         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
11045         * lib/dup-safer.c: Include unistd-safer.h first.
11046         Don't include errno.h.
11047         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
11048         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
11049         * lib/file-type.c: Rely on file-type.h change.
11050         * lib/getloadavg.c: Include unistd-safer.h.
11051         (getloadavg): Use safer open.
11052         * lib/getusershell.c: Include "stdio-safer.h".
11053         (getusershell): Use safer fopen.
11054         * lib/long-options.c (long_options): Use NULL rather than 0.
11055         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
11056         'free'.
11057         * lib/modechange.c: Likewise.
11058         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
11059         (MODE_DONE): New constant.
11060         (struct mode_change): Remove 'next' member.
11061         (make_node_op_equals): New function; like the old one of the
11062         same name, except it allocates an array.
11063         (mode_compile, mode_create_from_ref): Use it.
11064         (mode_compile): Allocate result as an array, not a linked list.
11065         Parse octal string ourself, so that we catch mistakes like "+0".
11066         (mode_adjust): Arg is an array, not a linked list.
11067         * lib/modechange.c: Include stat-macros.h, xalloc.h.
11068         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
11069         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
11070         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
11071         Remove.  This is now stat-macros.h's job.
11072         (talloc): Remove.  All callers replaced by xalloc, so that
11073         our invokers don't have to worry about reporting memory failures.
11074         (make_node_op_equals): Remove.
11075         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
11076         New constants.
11077         (struct mode_change): Moved here from modechange.h.
11078         (mode_append_entry): Remove.
11079         (mode_compile): Remove MASKED_OPS arg, since it encouraged
11080         apps to have incorrect behavior.  Use simpler algorithm for head
11081         and tail.  Don't futz with umask; that's now the job of mode_adjust.
11082         Detect more invalid usages rather than having somewhat-random behavior.
11083         Don't insert an "a=" action, as that leads to incorrect behavior.
11084         (mode_compile, mode_create_from_ref): Return NULL on error instead
11085         of an enum, since now there's only one way to have an error.  All
11086         callers changed.
11087         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
11088         at the correct time.  Simplify calculation of "+u" and its ilk.
11089         Don't mishandle "+X".
11090         (mode_free): Remove "register" and localize decls.
11091         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
11092         (struct mode_change): Move to modechange.c; callers don't
11093         need to see this stuff.
11094         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
11095         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
11096         (mode_change, mode_adjust): Reflect the new signatures noted above.
11097         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
11098         that might redefine system include files.
11099         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
11100         (my_usleep): Use NULL rather than (void *) 0.
11101         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
11102         Use siginterrupt to specify that system calls should be interrupted.
11103         (rpl_nanosleep): Move initialization of suspended closer to call of
11104         my_usleep.
11105         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
11106         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
11107         (desirable_utmp_entry): New function.
11108         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
11109         using x2nrealloc, to simplify logic.
11110         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
11111         size calculation.  Do not assume utmp file is a regular file.
11112         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
11113         (READ_UTMP_CHECK_PIDS): New constant.
11114         * lib/save-cwd.c: Include unistd-safer.h.
11115         (save_cwd): Use fd_safer.
11116         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
11117         [!_LIBC] Include "stat-macros.h" instead.
11118         * lib/unistd-safer.h (fd_safer): New decl.
11119
11120 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11121
11122         * modules/getloadavg (Depends-on): Add unistd-safer.
11123         * modules/getusershell (Depends-on): Add stdio-safer.
11124         * modules/lstat (Depends-on): Remove xalloc.
11125         * modules/mkstemp (Depends-on): Add stat-macros.
11126         * modules/modechange (Depends-on): Remove xstrtol.
11127         Add stat-macros, xalloc.
11128         * modules/save-cwd (Depends-on): Add unistd-safer.
11129         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
11130         * modules/unistd-safer (Files): Add lib/fd-safer.c
11131         (Makefile.am): Remove lib_SOURCES.
11132
11133         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
11134         Remove fcntl-safer; unistd-safer supersedes it.
11135
11136 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11137
11138         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
11139         AC_HEADER_STAT.
11140         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
11141         (gl_PREREQ_CHOWN): Remove.
11142         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
11143         it.  Don't require AC_HEADER_STAT.
11144         (gl_PREREQ_LSTAT): Remove.
11145         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
11146         Don't require AC_HEADER_STAT.
11147         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
11148         (gl_PREREQ_RMDIR): Remove.
11149         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
11150         mention stat-macros.h or AC_HEADER_STAT, since we'll make
11151         the stat-macros module a prerequisite.
11152         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
11153         * m4/filemode.m4 (gl_FILEMODE): Likewise.
11154         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
11155         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
11156         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
11157         variable names.
11158         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
11159         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
11160         variable prefixes.
11161         * m4/fcntl-safer.m4: Remove.
11162         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
11163         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
11164         Invoke gl_PREREQ_FD_SAFER.
11165         (gl_PREREQ_FD_SAFER): New macro.
11166         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
11167         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
11168         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
11169         Remove duplicate call to AC_LIBOBJ(readutmp).
11170         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
11171
11172         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
11173         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
11174
11175 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11176
11177         * MODULES.html.sh (Misc): Add byteswap.
11178
11179 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
11180
11181         * modules/getcwd (Depends-on): Add extensions.
11182         * modules/openat (Depends-on): Likewise.
11183
11184 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
11185
11186         * modules/byteswap: New file.
11187
11188 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
11189
11190         * m4/byteswap.m4: New file.
11191
11192 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
11193
11194         * lib/byteswap_.h: New file.
11195
11196 2005-04-25  Karl Berry  <karl@gnu.org>
11197
11198         * m4/gettext.m4: Update from GNU gettext 0.14.4.
11199
11200 2005-04-25  Albert Chin  <china@thewrittenword.com>
11201
11202         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
11203         Toolkit C bug.
11204
11205 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
11206
11207         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
11208         (func_ln_if_changed) Remove forcibly for no error message
11209         in case file does not exist.
11210
11211 2005-04-19  Simon Josefsson  <jas@extundo.com>
11212
11213         * gnulib-tool (Options): Make --symlink mean --symbolic.
11214
11215 2005-04-18  Oskar Liljeblad <oskar@osk.mine.nu>
11216
11217         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
11218
11219 2005-04-16  Simon Josefsson  <jas@extundo.com>
11220
11221         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
11222
11223 2005-04-15  Simon Josefsson  <jas@extundo.com>
11224
11225         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
11226
11227 2005-04-15  Simon Josefsson  <jas@extundo.com>
11228
11229         * gnulib-tool: Rename --symlink to --symbolic.
11230
11231 2005-04-15  Oskar Liljeblad <oskar@osk.mine.nu>
11232
11233         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
11234         symbolic links to files instead of copying/moving.  Add --aux-dir,
11235         specifying directory relative --dir where auxiliary build tools
11236         are placed.
11237
11238 2005-04-14  Bruno Haible  <bruno@clisp.org>
11239
11240         * modules/allocsa (License): Change to LGPL.
11241         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
11242
11243 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
11244
11245         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
11246         that "UTC +1 second" continues to work.  Problem reported
11247         by Dmitry V. Levin.
11248         (relunit_snumber): New rule.
11249         (relunit): Use it.
11250
11251 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
11252
11253         * lib/getdate.y (universal_time_zone_table): New constant.
11254         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
11255         universal_time_zone_table.
11256         (lookup_zone): Prefer universal_time_zone_table to
11257         local_time_zone_table, so that "GMT" time stamps are allowed in
11258         London during the summer.  Problem reported by Ian Abbott.
11259
11260 2005-04-12  Jim Meyering  <jim@meyering.net>
11261
11262         * lib/human.c (humblock): Set *options even when returning due to
11263         xstrtoumax conversion failure.  Thanks to a used-uninitialized
11264         warning from gcc-4.
11265
11266 2005-04-09  Jim Meyering  <jim@meyering.net>
11267
11268         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
11269         -Wuninitialized: initialize tm0.tm_year.
11270
11271 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
11272
11273         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
11274         count, since there's no maximum.  All uses changed.
11275         Add member dsts_seen.
11276         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
11277         not being INT_MAX.
11278         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
11279         Use pc_rels_seen to decide whther a date is absolute.
11280
11281         * lib/getdate.y (number): Don't overwrite year.
11282         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
11283         check.
11284
11285 2005-04-02  Simon Josefsson  <jas@extundo.com>
11286
11287         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
11288         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
11289
11290 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
11291
11292         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
11293         where no absolute path name can be longer than PATH_MAX.
11294
11295 2005-03-27  Jim Meyering  <jim@meyering.net>
11296
11297         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
11298
11299 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
11300
11301         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
11302         "one's complement" -> "ones' complement" in comment, as per Knuth.
11303         "value of type" -> "type or expression" in comment.
11304         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
11305
11306 2005-03-26  Jim Meyering  <jim@meyering.net>
11307
11308         Comment nits.
11309         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
11310         Correct typos: s/or/of/.
11311
11312 2005-03-26  Jim Meyering  <jim@meyering.net>
11313
11314         * modules/check-include-files: Move to ../ and rename to...
11315         * check-module: ...this.
11316
11317 2005-03-25  Jim Meyering  <jim@meyering.net>
11318
11319         * modules/xvasprintf (Files): Add xalloc.h.
11320
11321 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
11322
11323         * modules/gettext (Files): config/config.rpath ->
11324         build-aux/config.rpath
11325         * modules/iconv (Files): Likewise.
11326         Problem reported by Oskar Liljeblad.
11327
11328 2005-03-23  Jim Meyering  <jim@meyering.net>
11329
11330         * modules/check-include-files: New script to check for
11331         missing dependencies, multiple includes, etc.
11332
11333         * modules/c-strtold (Depends-on): Add xalloc.
11334         * modules/c-strtod (Depends-on): Add xalloc.
11335         * modules/hash (Depends-on): Add xalloc.
11336         (Files): Remove lib/xalloc.h.
11337
11338         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
11339         * modules/userspec (Files): Add lib/inttostr.h.
11340
11341 2005-03-23  Jim Meyering  <jim@meyering.net>
11342
11343         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
11344
11345 2005-03-22  Jim Meyering  <jim@meyering.net>
11346
11347         * modules/stat-macros: New module.
11348         * modules/canonicalize, modules/euidaccess, modules/file-type,
11349         * modules/filemode, modules/lchown, modules/makepath,
11350         * modules/rmdir, modules/stat: Depend on new stat-macros module
11351         rather than listing lib/stat-macros.h manually.
11352         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
11353
11354 2005-03-22  Jim Meyering  <jim@meyering.net>
11355
11356         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
11357
11358 2005-03-22  Bruno Haible  <bruno@clisp.org>
11359
11360         * config/srclist.txt: Replace target directory 'config' with
11361         'build-aux'.
11362         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
11363         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
11364         ../build-aux/.
11365
11366 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
11367
11368         * modules/chdir-long (Depends-on): Add mempcpy.
11369
11370         * modules/acl, modules/backupfile, modules/c-strtod,
11371         modules/c-strtold, modules/canon-host, modules/canonicalize,
11372         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
11373         modules/exclude, modules/exitfail, modules/file-type,
11374         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
11375         modules/getdate, modules/getline, modules/getpagesize,
11376         modules/getpass, modules/getugroups, modules/group-member,
11377         modules/hard-locale, modules/hash, modules/human, modules/idcache,
11378         modules/inttostr, modules/long-options, modules/makepath,
11379         modules/md5, modules/memcasecmp, modules/memcoll,
11380         modules/modechange, modules/mountlist, modules/path-concat,
11381         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
11382         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
11383         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
11384         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
11385         modules/strftime, modules/strndup, modules/strverscmp,
11386         modules/timespec, modules/unlocked-io, modules/userspec,
11387         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
11388         modules/yesno:
11389         Remove lib_SOURCES line from Makefile.am section, as this is now
11390         done automatically by the corresponding Autoconf macro.
11391
11392 2005-03-21  Jim Meyering  <jim@meyering.net>
11393
11394         Changes imported from coreutils.
11395
11396         * lib/cycle-check.c: Don't include xalloc.h.
11397
11398         * lib/path-concat.c: Don't include assert.h.
11399         (path_concat): Remove assertion that would have triggered
11400         for ABASE starting with more than one slash.
11401         Reported by Andreas Schwab.
11402
11403         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
11404         properly when ABASE is an absolute file name.
11405         Correct the description of this function.
11406         Include <assert.h>.
11407         Add an assertion and a test driver.
11408         This fixes a bug introduced on 2004-07-02.
11409         Andreas Schwab reported the resulting failure of cp --parents:
11410         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
11411
11412 2005-03-21  Jim Meyering  <jim@meyering.net>
11413
11414         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
11415         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
11416
11417 2005-03-21  Jim Meyering  <jim@meyering.net>
11418         and  Paul Eggert  <eggert@cs.ucla.edu>
11419
11420         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
11421         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
11422         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
11423         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
11424         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
11425         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
11426         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
11427         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
11428         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
11429         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
11430         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
11431         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
11432         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
11433         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
11434         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
11435         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
11436         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
11437         for these modules.
11438
11439 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
11440
11441         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
11442         (which shouldn't happen), generate nothing instead of returning 0
11443         immediately, so that nstrftime (NULL, ...) doesn't return 0.
11444
11445 2005-03-16  Bruno Haible  <bruno@clisp.org>
11446
11447         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
11448         HAVE_LONGLONG_64BIT.
11449
11450 2005-03-16  Bruno Haible  <bruno@clisp.org>
11451
11452         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
11453         HAVE_LONGLONG_64BIT.
11454
11455 2005-03-16  Bruno Haible  <bruno@clisp.org>
11456
11457         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
11458         HAVE_LONGLONG_64BIT.
11459
11460 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
11461
11462         * lib/strftime.c (my_strftime): Prepend space to format so that we can
11463         reliably distinguish strftime failure from empty output on POSIX
11464         hosts.
11465
11466 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
11467
11468         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
11469         (iconv_string): Don't guess a size-zero buffer, as that might cause
11470         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
11471         result would be 'too large', where 'too large' is (heuristically)
11472         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
11473         overflow concerns.  This will prevent some unwanted malloc failures
11474         when the inputs are very large.
11475
11476 2005-03-15  Karl Berry  <karl@gnu.org>
11477
11478         * config/srclist.txt (config.rpath): from gettext.
11479         * config/config.rpath: update.
11480
11481 2005-03-15  Bruno Haible  <bruno@clisp.org>
11482
11483         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
11484         to 'negate'.
11485
11486         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
11487         variable.
11488
11489         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
11490         results.
11491
11492 2005-03-14  Simon Josefsson  <jas@extundo.com>
11493
11494         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
11495         <fx@gnu.org>.
11496
11497 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
11498
11499         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
11500         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
11501         intprops.h.
11502         * lib/strtol.c: Likewise.
11503
11504 2005-03-14  Jim Meyering  <jim@meyering.net>
11505
11506         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
11507         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
11508         to be nonzero so that we (and caller) can detect the difference
11509         between a valid zero-length expansion and an error return, even
11510         when the underlying strftime fails before writing anything into
11511         that location.
11512
11513 2005-03-14  Bruno Haible  <bruno@clisp.org>
11514
11515         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
11516         Update from GNU gettext 0.14.3.
11517
11518 2005-03-10  Jim Meyering  <jim@meyering.net>
11519
11520         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
11521
11522 2005-03-10  Jim Meyering  <jim@meyering.net>
11523
11524         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
11525         so that this module works on systems without fchdir.
11526
11527 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
11528
11529         Factor int-properties macros into a single file, except for
11530         glibc-related files.
11531         * lib/intprops.h: New file.
11532         * lib/getloadavg.c: Include it instead of limits.h.
11533         (INT_STRLEN_BOUND): Remove.
11534         * lib/human.c: Include intprops.h.
11535         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
11536         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
11537         302/1000.
11538         * lib/inttostr.h: Include intprops.h instead of limits.h.
11539         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
11540         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
11541         for consistency with intprops.h.
11542         (time_t_is_integer, twos_complement_arithmetic): Use them.
11543         * lib/sig2str.h: Include <signal.h>, intprops.h.
11544         (INT_STRLEN_BOUND): Remove.
11545         * lib/strftime.c (TYPE_SIGNED): Remove.
11546         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
11547         * lib/strtol.c: Adjust comments to match intprops.h.
11548         * lib/userspec.c: Include intprops.h.
11549         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
11550         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
11551         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
11552         instead of rolling our own expressions.
11553         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
11554
11555         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
11556         instead of int.
11557         (my_strftime): Do not mishandle years close to INT_MAX, by doing
11558         the right thing even if adding 1900 would overflow.  Similarly
11559         for tm_mon + 1 and tm_yday + 1.
11560         Make %Y always equivalent to %C%y, and similarly for %G and %g.
11561         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
11562         (DO_SIGNED_NUMBER): New macro.
11563         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
11564
11565 2005-03-07  Bruno Haible  <bruno@clisp.org>
11566
11567         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
11568
11569 2005-03-07  Bruno Haible  <bruno@clisp.org>
11570
11571         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
11572
11573 2005-03-04  Derek R. Price  <derek@ximbiot.com>
11574
11575         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
11576         (func_import): Only replace files via --import when they have actually
11577         changed.
11578
11579 2005-03-03  Derek R. Price  <derek@ximbiot.com>
11580
11581         * m4/mmap-anon.m4: New file.
11582         * m4/pagealign_alloc.m4: New file.
11583
11584 2005-03-03  Derek R. Price  <derek@ximbiot.com>
11585             Bruno Haible  <bruno@clisp.org>
11586
11587         * modules/pagealign_alloc: New file.
11588         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
11589
11590 2005-03-03  Derek R. Price  <derek@ximbiot.com>
11591             Bruno Haible  <bruno@clisp.org>
11592
11593         * lib/pagealign_alloc.h: New file.
11594         * lib/pagealign_alloc.c: New file.
11595
11596 2005-03-03  Bruno Haible  <bruno@clisp.org>
11597
11598         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
11599         Use an all-permissive copyright notice, recommended by RMS.
11600
11601 2005-03-02  Bruno Haible  <bruno@clisp.org>
11602
11603         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
11604         of AIX, the replacement has to be done only after <string.h> is
11605         included, therefore not in config.h. stpncpy.h does the replacement,
11606         and stpncpy.c uses it.
11607
11608 2005-03-02  Bruno Haible  <bruno@clisp.org>
11609
11610         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
11611         stpncpy.c uses it.
11612
11613 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11614
11615         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
11616         The workaround isn't strictly needed for POSIX conformance, and
11617         it's too much of a pain to configure and maintain.  We'll ask
11618         people to fix their kernels instead.
11619         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
11620         (NANOSLEEP_BUG_WORKAROUND): Remove.
11621         (xnanosleep): Remove the workaround.
11622
11623 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11624
11625         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
11626         Reported by Derek Price.
11627         (Include): Add "timespec.h".
11628
11629         * modules/xnanosleep (Depends-on): Remove gethrxtime.
11630
11631 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11632
11633         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
11634         to detect nanosleep bug.
11635
11636 2005-03-01  Bruno Haible  <bruno@clisp.org>
11637
11638         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
11639
11640 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
11641
11642         * modules/gethrxtime: New file.
11643         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
11644         (Depends-on): Add gethrxtime.
11645         (configure.ac): Add gl_XNANOSLEEP.
11646         (Makefile.am): Remove lib_SOURCES line.
11647
11648 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
11649
11650         * m4/gethrxtime.m4, xnanosleep.m4: New files.
11651         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
11652
11653 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
11654
11655         * lib/gethrxtime.h, gethrxtime.c, xtime.h: New files.
11656         * lib/timespec.h (gettime): Return void, since it always
11657         succeeds now.  All uses changed.
11658         * lib/gettime.c (gettime) Likewise.
11659         [HAVE_NANOTIME]: Prefer nanotime.
11660         Assume gettimeofday succeeds, as POSIX requires.
11661         Assime time () succeeds, since other code already does.
11662         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
11663         (timespec_subtract): Remove.
11664         (NANOSLEEP_BUG_WORKAROUND): New constant.
11665         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
11666         things considerably.  Use it only on GNU/Linux hosts, since the
11667         workaround shouldn't be needed elsewhere.
11668
11669 2005-02-24  Bruno Haible  <bruno@clisp.org>
11670
11671         * modules/gettext (Files): Add m4/glibc2.m4.
11672
11673 2005-02-24  Bruno Haible  <bruno@clisp.org>
11674
11675         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
11676         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
11677         * m4/progtest.m4:
11678         Update from GNU gettext 0.14.2.
11679         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
11680
11681 2005-02-24  Bruno Haible  <bruno@clisp.org>
11682
11683         * lib/localcharset.c: Update from GNU gettext 0.14.2.
11684         * lib/config.charset: Update from GNU gettext 0.14.2.
11685
11686 2005-02-24  Bruno Haible  <bruno@clisp.org>
11687
11688         * lib/gettext.h: Update from GNU gettext 0.14.2.
11689
11690 2005-02-23  Simon Josefsson  <jas@extundo.com>
11691
11692         * m4/iconvme.m4: New file.
11693
11694 2005-02-23  Jim Meyering  <jim@meyering.net>
11695
11696         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
11697         change.
11698         Thanks to Bruno Haible for catching it.
11699
11700 2005-02-22  Simon Josefsson  <jas@extundo.com>
11701
11702         * modules/iconvme: New file.
11703
11704         * MODULES.html.sh: Add iconvme.
11705
11706 2005-02-22  Simon Josefsson  <jas@extundo.com>
11707
11708         * lib/iconvme.h, iconvme.c: New files, from libc.
11709
11710 2005-02-22  Simon Josefsson  <jas@extundo.com>
11711
11712         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
11713
11714 2005-02-22  Jim Meyering  <jim@meyering.net>
11715
11716         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
11717         s/ifndef/ifdef/.
11718
11719 2005-02-20  Neil Conway  <neilc@samurai.com>
11720
11721         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
11722         returned by OSX/Darwin if the specified buffer is not large
11723         enough for the hostname.
11724
11725 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11726
11727         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
11728         pass it to _help, otherwise the latter coredumps trying to
11729         dereference state.root_argp.
11730
11731 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
11732
11733         * modules/chdir-long (Depends-on): Add memrchr.
11734         * modules/memrchr (Files): Add lib/memrchr.h.
11735         (Include): "memrchr.h".
11736
11737 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
11738
11739         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
11740
11741 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
11742
11743         * lib/memrchr.h: New file.
11744         * lib/chdir-long.c: Include it.
11745         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
11746         Don't bother including stddef.h.
11747
11748 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
11749
11750         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
11751         inclusion.
11752         Include <sys/types.h>, for dev_t.
11753         (ME_DUMMY, ME_REMOTE): Move from here....
11754         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
11755         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
11756         Dmitry V. Levin.
11757         Include mountlist.h first, to test the interface.
11758
11759 2005-01-29  Bruno Haible  <bruno@clisp.org>
11760
11761         * lib/progname.c (program_name): Initialize.
11762         Needed when linking statically on MacOS X.
11763
11764 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
11765
11766         Sync from coreutils.
11767         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
11768         (Depends-on): Add c-strtod.
11769         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
11770
11771 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
11772
11773         Sync from coreutils.
11774         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
11775
11776         Remove files that are specific to coreutils.
11777         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
11778
11779 2005-01-28  Bruno Haible  <bruno@clisp.org>
11780
11781         * modules/javacomp: New file.
11782         * MODULES.html.sh (Java): Add javacomp.
11783
11784 2005-01-28  Bruno Haible  <bruno@clisp.org>
11785
11786         * m4/javacomp.m4: New file, from GNU gettext.
11787
11788 2005-01-28  Bruno Haible  <bruno@clisp.org>
11789
11790         * lib/javacomp.sh.in: New file, from GNU gettext.
11791         * lib/javacomp.h: New file, from GNU gettext.
11792         * lib/javacomp.c: New file, from GNU gettext.
11793
11794 2005-01-26  Simon Josefsson  <jas@extundo.com>
11795
11796         * lib/gai_strerror.c: Use GPL in header.
11797
11798 2005-01-26  Bruno Haible  <bruno@clisp.org>
11799
11800         * modules/javaexec: New file.
11801         * MODULES.html.sh (Java): Add javaexec.
11802
11803 2005-01-26  Bruno Haible  <bruno@clisp.org>
11804
11805         * m4/javaexec.m4: New file, from GNU gettext.
11806
11807 2005-01-26  Bruno Haible  <bruno@clisp.org>
11808
11809         * lib/javaexec.sh.in: New file, from GNU gettext.
11810         * lib/javaexec.h: New file, from GNU gettext.
11811         * lib/javaexec.c: New file, from GNU gettext.
11812
11813 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11814
11815         * modules/lchown (Depends-on): Remove lchown.h
11816
11817 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11818
11819         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
11820         must be defined if the header file was not found, in order
11821         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
11822
11823 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11824
11825         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
11826         initializers for struct pentry_state.
11827         (__argp_error): Check return value of __asprintf
11828         (__argp_failure): Translate error message
11829
11830         * lib/argp-parse.c: Removed braces around the expansion of N_()
11831
11832 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11833
11834         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
11835         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
11836         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
11837         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
11838         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
11839         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
11840         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
11841         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
11842         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
11843         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
11844         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
11845         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
11846         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
11847         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
11848         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
11849         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
11850         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
11851         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
11852         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
11853         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
11854         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
11855         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
11856         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
11857         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
11858         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
11859         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
11860         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
11861         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
11862         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
11863         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
11864         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
11865         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
11866         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
11867         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
11868         xstrtol.m4, xstrtoumax.m4, yesno.m4:
11869         Use an all-permissive copyright notice, recommended by RMS.
11870
11871 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
11872
11873         * modules/chdir-long (Depends-on): Remove mempcpy.
11874
11875 2005-01-21  Jim Meyering  <jim@meyering.net>
11876
11877         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
11878         same value as for Solaris 9.
11879
11880         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
11881         component length.  This included changing the parameter to be
11882         of type `char *' rather than `char const *'.
11883         * lib/chdir-long.h (chdir_long): Update prototype.
11884
11885         * lib/openat.c (fdopendir, fstatat): New functions.
11886         * lib/openat.h: Include headers required for use of DIR and struct
11887         stat.
11888         [AT_SYMLINK_NOFOLLOW]: Define.
11889         (fdopendir, fstatat): Add prototypes.
11890
11891 2005-01-21  Bruno Haible  <bruno@clisp.org>
11892
11893         * modules/classpath: New file.
11894         * MODULES.html.sh (Java): Add classpath.
11895
11896 2005-01-21  Bruno Haible  <bruno@clisp.org>
11897
11898         * lib/classpath.h: New file, from GNU gettext.
11899         * lib/classpath.c: New file, from GNU gettext.
11900
11901 2005-01-20  Simon Josefsson  <jas@extundo.com>
11902
11903         * modules/version-etc-fsf: New file.
11904
11905 2005-01-20  Simon Josefsson  <jas@extundo.com>
11906
11907         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
11908         * lib/version-etc.c: Remove version_etc_copyright.
11909         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
11910         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
11911
11912 2005-01-20  Simon Josefsson  <jas@extundo.com>
11913
11914         * lib/base64.h (isbase64): Add.
11915
11916         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
11917         using a unsigned prototype, don't inline.
11918         (base64_decode): Use it.
11919
11920 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
11921
11922         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
11923         it.
11924
11925 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
11926
11927         * lib/save-cwd.c (save_cwd): Remove code to support the case
11928         where fchdir is missing or flaky.
11929
11930 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
11931
11932         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
11933
11934 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
11935
11936         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
11937         AC_LIBSOURCES now does this.
11938         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
11939         with new ullong_max module.
11940
11941 2005-01-19  Bruno Haible  <bruno@clisp.org>
11942
11943         * modules/sh-quote: New file.
11944         * MODULES.html.sh (Executing programs): Add sh-quote.
11945
11946 2005-01-19  Bruno Haible  <bruno@clisp.org>
11947
11948         * lib/sh-quote.h: New file, from GNU gettext.
11949         * lib/sh-quote.c: New file, from GNU gettext.
11950
11951 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
11952
11953         Merge from coreutils.
11954         * m4/ullong_max.m4: New file.
11955         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
11956         (gl_MACROS): Assume localeconv exists.
11957
11958 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
11959
11960         Merge changes from coreutils, as described below in several
11961         changelogs dated today.
11962
11963         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
11964         (O_DIRECTORY): Remove; not needed here, since "." must be
11965         a directory.  All uses removed.
11966         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
11967         universal on Suns, and we also need to test for IRIX.
11968         Revamp code to use 'if' rather than '#if'.
11969         Avoid unnecessary comparison of cwd->desc to 0.
11970
11971         * lib/utimens.c (futimens): Robustify the previous patch, by checking
11972         for known valid error numbers rather than observed invalid ones.
11973
11974 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
11975
11976         * modules/ullong_max: New file.
11977
11978         * modules/chdir-long, modules/openat: New files.
11979         * modules/save-cwd (Depends-on): Depend on chdir-long.
11980         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
11981
11982 2005-01-18  Jim Meyering  <jim@meyering.net>
11983
11984         Merge from coreutils.
11985         * m4/chdir-long.m4, openat.m4: New files.
11986         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
11987         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
11988         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
11989         is sane and DOES follow symlinks.  Besides, testing 20 different
11990         systems found no broken chown implementations.
11991         Prompted by a change in rsync's copy of this macro.
11992         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
11993
11994         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
11995
11996         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
11997         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
11998         NULL-means-set-to-current-time semantics.
11999         Remove temporary file immediately, rather than waiting
12000         for configure's at-exit trap code to do it.
12001
12002 2005-01-18  Jim Meyering  <jim@meyering.net>
12003
12004         * lib/version-etc.c (version_etc_copyright): Update copyright date.
12005
12006         * lib/utimens.c (futimens): Account for the fact that futimes
12007         can also fail with errno == ENOSYS or errno == ENOENT.
12008         Patch from Dmitry V. Levin.
12009
12010         Change the name of the robust chdir function from chdir to chdir_long.
12011         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
12012         (restore_cwd): Use chdir_long, not chdir.
12013         * lib/chdir-long.c: Renamed from chdir.c.
12014         * lib/chdir-long.h: Renamed from chdir.h.
12015         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
12016         Hurd.
12017
12018 2005-01-18  Bruno Haible  <bruno@clisp.org>
12019
12020         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
12021         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
12022         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
12023         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
12024         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
12025         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
12026         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
12027         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
12028         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
12029         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
12030         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
12031         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
12032         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
12033         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
12034         Use an all-permissive copyright notice, recommended by RMS.
12035
12036 2005-01-18  Bob Proulx  <bob@proulx.com>
12037
12038         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
12039         simplify offsetof() macro construct to avoid compile failure with
12040         native HP-UX 11.0 ANSI C compiler.
12041
12042 2005-01-17  Bruno Haible  <bruno@clisp.org>
12043
12044         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
12045         redundant because stpncpy.m4 takes care of it.
12046
12047 2005-01-17  Bruno Haible  <bruno@clisp.org>
12048
12049         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
12050
12051 2005-01-17  Bruno Haible  <bruno@clisp.org>
12052
12053         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
12054         used.
12055
12056 2005-01-17  Bruno Haible  <bruno@clisp.org>
12057
12058         * lib/fwriteerror.h (fwriteerror): Change specification to include
12059         fclose.
12060         * lib/fwriteerror.c: Include <stdbool.h>.
12061         (fwriteerror): At the end, close the file stream. Record whether
12062         stdout was already closed.
12063
12064 2005-01-17  Bruno Haible  <bruno@clisp.org>
12065
12066         * lib/execute.c (environ): Declare if needed.
12067         * lib/pipe.c (environ): Likewise.
12068         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
12069
12070 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12071
12072         * modules/argp: Depend on vsnprintf
12073
12074 2005-01-10  Jim Meyering  <jim@meyering.net>
12075
12076         * modules/closeout (Depends-on): Add atexit.
12077
12078 2005-01-06  Bruno Haible  <bruno@clisp.org>
12079
12080         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
12081
12082 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
12083
12084         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
12085         definitions to be after all include files, to avoid collisions.
12086         Problem reported by Bob Proulx.
12087
12088 2005-01-04  Jim Meyering  <jim@meyering.net>
12089
12090         Changes imported from coreutils.
12091         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
12092         as the mkstemp template, use a temporary directory and an
12093         8.3-friendly template to avoid trouble on systems like DJGPP.
12094         Reported by Juan M. Guerrero via Stepan Kasal.
12095         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
12096         close. Remove the temporary directory right away, rather than waiting
12097         for configure's at-exit trap code to do it.
12098         Suggestion from Stepan Kasal.
12099
12100 2005-01-01  Simon Josefsson  <jas@extundo.com>
12101
12102         * gnulib-tool: Print #include directives when --import'ing.
12103
12104 2004-12-28  Simon Josefsson  <jas@extundo.com>
12105
12106         * tests/test-base64.c: Include required header files.  Remove
12107         unused variables.
12108
12109 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
12110
12111         * modules/error (Depends-on): Remove gettext.
12112
12113 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
12114
12115         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
12116         not needed.  This removes a dependency on the gettext module.
12117         [defined _LIBC]: Do not include <libintl.h>; not needed.
12118
12119 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
12120
12121         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
12122         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
12123
12124 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
12125
12126         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
12127         HAVE_DECL_STRTOLD.
12128
12129 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
12130
12131         * modules/getdate (Depends-on): Remove alloca-opt.
12132
12133 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
12134
12135         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
12136
12137 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
12138
12139         * lib/argp-parse.c: Include <stddef.h>.
12140         (alignof, alignto): New macros.
12141         (parser_init): Don't assume that void * is aligned sufficiently
12142         for struct option.
12143
12144         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
12145         need to extend the stack.
12146         (YYINITDEPTH): New macro, so that the initial stack isn't overly
12147         large.
12148
12149 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12150
12151         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
12152
12153 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
12154
12155         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
12156         (2004-10-24) change.  Apparently this was a false alarm.
12157
12158         * modules/getdate: Depend on alloca-opt, not alloca.
12159
12160 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
12161
12162         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
12163         Remove now-obsolete comment about AIX.
12164         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
12165         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
12166         (YYMAXDEPTH): New macro.
12167
12168 2004-12-18  Simon Josefsson  <jas@extundo.com>
12169
12170         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
12171
12172 2004-12-18  Bruno Haible  <bruno@clisp.org>
12173
12174         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
12175
12176 2004-12-18  Bruno Haible  <bruno@clisp.org>
12177
12178         * lib/fatal-signal.c (fatal_signals): Make non-const.
12179         (init_fatal_signals): New function.
12180         (uninstall_handlers, install_handlers): Ignore signals that were set to
12181         SIG_IGN.
12182         (at_fatal_signal): Call init_fatal_signals.
12183         (init_fatal_signal_set): Likewise. Ignore signals that were set to
12184         SIG_IGN.
12185         Reported by Paul Eggert.
12186
12187 2004-12-18  Bruno Haible  <bruno@clisp.org>
12188
12189         * doc/alloca.texi: New file.
12190         * doc/alloca-opt.texi: New file.
12191
12192 2004-12-17  Jim Meyering  <jim@meyering.net>
12193
12194         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
12195         Otherwise, install-sh could exit with improper exit status when
12196         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
12197
12198 2004-12-16  Simon Josefsson  <jas@extundo.com>
12199
12200         * tests/test-base64.c: Add license.
12201
12202 2004-12-15  Stepan Kasal  <address@hidden>
12203
12204         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
12205
12206 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
12207
12208         * modules/getcwd (Files): Add m4/d-ino.m4.
12209         Suggested by Mark D. Baushke.
12210
12211 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
12212
12213         * lib/getdate.y (textint): New member "negative".
12214         (time_zone_hhmm): New function.
12215         Expect 14 shift-reduce conflicts, not 13.
12216         (o_colon_minutes): New rule.
12217         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
12218         (yylex): Set the "negative" member of signed numbers.
12219
12220 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
12221
12222         * doc/getdate.texi (Time of day items, Time zone items):
12223         Describe new formats +00:00, UTC+00:00.
12224
12225 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
12226
12227         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
12228         spurious "-l"s.  Problem reported by Stepan Kasal.
12229
12230 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
12231
12232         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
12233         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
12234
12235 2004-12-04  Simon Josefsson  <jas@extundo.com>
12236
12237         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
12238         Vandoorselaere <yoann@prelude-ids.org>.
12239
12240 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
12241
12242         Changes imported from coreutils.
12243         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
12244         exist.
12245         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
12246
12247 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
12248
12249         Changes imported from coreutils.
12250         * lib/hard-locale.c: Assume <locale.h> exists.
12251         Include "strdup.h".
12252         (GLIBC_VERSION): New macro.
12253         (hard_locale): Assume setlocale exists.
12254         Rewrite to avoid #ifdef.
12255         Use strdup rather than malloc + strcpy.
12256         * lib/human.c: Assume <locale.h> exists.
12257         (human_readable): Assume localeconv exists.
12258
12259 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
12260
12261         * modules/hard-locale (Depends-on): Add strdup.
12262
12263 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
12264
12265         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
12266         convert T2, not T.  (Imported from libc.)
12267
12268 2004-11-30  Simon Josefsson  <jas@extundo.com>
12269
12270         * modules/restrict (License): Change to LGPL.
12271
12272 2004-11-30  Simon Josefsson  <jas@extundo.com>
12273
12274         * m4/restrict.m4: Add copyright and copying conditions.
12275
12276 2004-11-30  Simon Josefsson  <jas@extundo.com>
12277
12278         * m4/base64.m4: New file.
12279
12280 2004-11-30  Simon Josefsson  <jas@extundo.com>
12281
12282         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
12283         base64.
12284
12285         * tests/test-base64.c: New file.
12286
12287         * modules/base64: New file.
12288
12289 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
12290
12291         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
12292         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
12293
12294         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
12295
12296 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
12297
12298         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
12299         (__getcwd.c): Don't restore errno; glibc doesn't.
12300         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
12301         first, falling back to our code only if its results look suspicious.
12302         Ensure that the resulting buffer is only as large as necessary.
12303
12304         * lib/readutmp.c: Include readutmp.h first.
12305         Include <errno.h>, since readutmp.h no longer does that.
12306         * lib/readutmp.h: Don't include <errno.h>,
12307         <sys/param.h>, <time.h>; not needed to establish interface.
12308         (errno): Remove decl.
12309         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
12310         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
12311         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
12312
12313 2004-11-28  Simon Josefsson  <jas@extundo.com>
12314
12315         * lib/base64.h, base64.c: New file.
12316
12317 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
12318
12319         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
12320
12321 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
12322
12323         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
12324         (Depends-on): Remove pathmax, same.  Add mempcpy.
12325         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
12326         (Makefile.am): Append getcwd.h to lib_SOURCES.
12327         (Include): Add getcwd.h.
12328         (Maintainer): Change from Jim Meyering to "all, glibc",
12329         since getdate now uses intended-for-glibc code.
12330         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
12331         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
12332
12333 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
12334
12335         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
12336         HP's ANSI C compiler.
12337         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
12338         Declaring int functions causes warnings on some modern systems and
12339         shouldn't be needed to compile on ancient ones.
12340         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
12341         defined.
12342
12343         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
12344         with the following changes.
12345         (__set_errno): Parenthesize properly.
12346         Include <stdbool.h>.
12347         (MIN, MAX, MATCHING_INO): New macros.
12348         (__getcwd): Define with prototype, not K&R form.
12349         Use heuristics to allocate default buffer on stack if possible.
12350         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
12351         behavior, and to avoid the PATH_MAX limit when computing
12352         ../../../../...
12353         Use MATCHING_INO to compare inode number to file.
12354         Check for arithmetic overflow in size calculations.
12355         Fix bug in reallocation of dot array that caused getcwd to fail
12356         on directories nested deeper than 75.
12357         Be more careful about saving errno on error.
12358         Do not use realloc; use only free+malloc, as this is a bit
12359         more flexible and avoids a needless copy operation.
12360         Do not inspect st_dev and st_ino for symbolic links; POSIX
12361         doesn't specify the latter.
12362         Check for closedir errors.
12363         Avoid needless casts.
12364         Use "#ifdef weak_alias" around weak_alias, to be like other
12365         glibc code.
12366         The following changes to getcwd.c have effect only when used in
12367         gnulib; they have no effect inside glibc proper.
12368         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
12369         as alloca isn't used.
12370         (alloca, __alloca): Likewise.
12371         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
12372         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
12373         unconditionally, as gnulib assumes C89 or better.
12374         Do not include <sys/param.h>.
12375         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
12376         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
12377         better.
12378         (NULL) [!defined NULL]: Remove; we assume C89 or better.
12379         Include <dirent.h> in a way that is compatible with modern Autoconf.
12380         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
12381         New macros, if not already defined.
12382         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
12383         Use "_LIBC", not "defined _LIBC", for consistency.
12384         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
12385         a mempcpy module.
12386         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
12387         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
12388         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
12389         credit only to Jim Meyering and adjust the copyright dates.
12390         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
12391         <stdlib.h>, <unistd.h>, "pathmax.h".
12392         Instead, include "xgetcwd.h" (first) and "getcwd.h".
12393         (INITIAL_BUFFER_SIZE): Remove.
12394         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
12395
12396 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
12397
12398         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
12399         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
12400         Use the _ONCE methods, for efficiency.
12401         Check for fcntl.h.  In test program, include <errno.h>
12402         and <fcntl.h> if available.  Remove old K&R cruft from
12403         test program.  Check for common errors in GNU/Linux,
12404         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
12405         don't do AC_LIBOBJ, as that's getcwd.m4's job.
12406         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
12407         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
12408         name accordingly.
12409         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
12410         accommodate new getcwd.c.
12411         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
12412         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
12413         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
12414         that's all we need now.
12415
12416 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12417
12418         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
12419         argp-parse.c depends on getopt internals, that means we should
12420         always use our getopt, to be on the safe side.
12421         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
12422         order not to spoil the result of an eventual previous invocation
12423         of gl_GETOPT_SUBSTITUTE.
12424
12425 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12426
12427         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
12428         redefinition warnings. To avoid them, include the defines
12429         in `#if !defined __need_getopt ... #endif'. The only place
12430         where __getopt_argv_const is used is in definitions
12431         of getopt_long and getopt_long_only below, which are as well
12432         protected by `#ifndef __need_getopt'.
12433         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
12434         __need_getopt after including <stdio.h> and <unistd.h> These
12435         headers might have defined it.
12436
12437 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
12438
12439         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
12440
12441 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
12442
12443         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
12444         (futimens): New function, which uses futimes if available.
12445         (futimens, utimens): Support timespec==NULL, with same semantics
12446         as utime and utimens.
12447         * lib/utimens.h (futimens): New decl.
12448
12449 2004-11-23  Jim Meyering  <jim@meyering.net>
12450
12451         * lib/getopt_.h: Remove trailing blanks.
12452
12453 2004-11-23  Jim Meyering  <jim@meyering.net>
12454
12455         * lib/__fpending.c: Add comment.
12456
12457 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
12458
12459         * modules/canonicalize (Depends-on): Add xreadlink.
12460         Problem reported by James Youngman.
12461
12462 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
12463
12464         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
12465         New macros.
12466         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
12467         optopt): Use them instead of invoking ## directly; otherwise, the
12468         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
12469
12470 2004-11-19  Bruno Haible  <bruno@clisp.org>
12471
12472         * lib/strtok_r.c: Move comments from here...
12473         * lib/strtok_r.h: ... to here.
12474
12475 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
12476
12477         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
12478         implementations that mishandle size_t overflow.
12479
12480 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
12481
12482         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
12483         might fail.  Problem reported by Yoann Vandoorselaere.
12484         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
12485         implementations that mishandle size_t overflow.
12486
12487 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12488
12489         * modules/canon-host (Depends-on): Add strdup.
12490
12491 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12492
12493         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
12494
12495 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12496
12497         * lib/canon-host.c: Include "strdup.h".
12498         (canon_host): Use getaddrinfo if available, so that IPv6 works.
12499         Use strdup instead of malloc/strcpy to duplicate strings.
12500
12501         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
12502         (human_space_before_unit): New constant.
12503         * lib/human.c (human_readable): Support it.
12504
12505         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
12506         (xgetcwd): Set errno correctly when failing.
12507         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
12508         the failure is actually due to a PATH_MAX problem.
12509
12510         Further getopt changes to make it more likely that glibc will
12511         buy the changes back.
12512         * lib/getopt.c (POSIXLY_CORRECT): New constant.
12513         (getopt): Use it, so to preserve glibc semantic
12514         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
12515         when compiling for libc.
12516         * lib/getopt_.h (__getopt_argv_const): Bring it back.
12517         (getopt_long, getopt_long_only): Use it.
12518
12519         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
12520         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
12521         (getopt): Argv is now char * const *, as per standard.
12522         (_getopt_internal_r, _getopt_internal): Argv is now char **,
12523         not char *__getopt_argv_const *.
12524         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
12525         _getopt_long_only_r): Likewise.
12526         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
12527         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
12528         _getopt_long_r, _getopt_long_only_r): Likewise.
12529         * lib/getopt_.h (__getopt_argv_const): Remove.
12530         (getopt): Argv is now char * const *, as per standard.
12531
12532         * lib/getdate.y (tORDINAL): New token.
12533         (day, relunit): Allow it for relative times.
12534         (relative_time_table): Use tORDINAL for ordinals.
12535
12536 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
12537
12538         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
12539         Document that "second" isn't allowed as an ordinal number.
12540
12541 2004-11-16  Jim Meyering  <jim@meyering.net>
12542
12543         * modules/closeout (Depends-on): Add fpending.
12544
12545 2004-11-15  Jim Meyering  <jim@meyering.net>
12546
12547         * lib/closeout.c: Include "__fpending.h" once again.
12548         Include <stdbool.h>.
12549         (close_stdout): Don't fail just because stdout was closed initially,
12550         since some programs don't write to stdout in the normal course of
12551         operation (other than --version and --help), and we don't want this
12552         function to make e.g. `touch file >&-' fail.
12553         But do fail if it was closed and someone has tried to write to it.
12554         E.g., `printf foo >&-' must fail.
12555
12556 2004-11-13  Jim Meyering  <jim@meyering.net>
12557
12558         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
12559
12560 2004-11-12  Simon Josefsson  <jas@extundo.com>
12561
12562         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
12563         small doc fix is still pending.
12564
12565 2004-11-11  Simon Josefsson  <jas@extundo.com>
12566
12567         * modules/strtok_r: New file.
12568
12569         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12570         strtok_r.
12571
12572 2004-11-11  Simon Josefsson  <jas@extundo.com>
12573
12574         * m4/strtok_r.m4: New file.
12575
12576         * m4/getopt.m4: Replace opterr.
12577
12578 2004-11-11  Simon Josefsson  <jas@extundo.com>
12579
12580         * lib/strtok_r.h, strtok_r.c: New file.
12581
12582 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
12583
12584         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
12585         of replacing opterr, getopt, etc.  This should handle the
12586         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
12587
12588 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
12589
12590         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
12591         we can stop lying to compilers about the constness of argv when we
12592         are compiled outside glibc.
12593         (getopt, getopt_long, getopt_long_only): Use it.
12594         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
12595         _getopt_internal, getopt): Likewise.
12596         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
12597         _getopt_long_only_r): Likewise.
12598         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
12599         _getopt_long_r, _getopt_long_only_r): Likewise.
12600
12601         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
12602         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
12603         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
12604         the other external symbols.
12605         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
12606         declaration, since the above renaming now works around collisions.
12607
12608 2004-11-11  Jim Meyering  <jim@meyering.net>
12609
12610         * lib/linebreak.c: Remove trailing blanks.
12611         * lib/alloca_.h: Likewise.
12612         * lib/acosl.c: Likewise.
12613         * lib/euidaccess.c: Likewise.
12614         * lib/allocsa.h: Likewise.
12615
12616 2004-11-10  Simon Josefsson  <jas@extundo.com>
12617
12618         * m4/getaddrinfo.m4: New file.
12619
12620 2004-11-10  Simon Josefsson  <jas@extundo.com>
12621
12622         * lib/getaddrinfo.h, getaddrinfo.c: New files.
12623
12624 2004-11-10  Simon Josefsson  <jas@extundo.com>
12625
12626         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12627         getaddrinfo.
12628
12629         * modules/getaddrinfo: New file.
12630
12631 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12632
12633         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
12634
12635 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12636
12637         * lib/mktime.c (SHR): New macro, which is a portable
12638         substitute for >> that should work even on Crays.
12639         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
12640         Problem reported by Mark D. Baushke in
12641         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
12642         * lib/getdate.y (SHR): Likewise.
12643         (tm_diff): Use it.
12644         * lib/strftime.c (SHR): Likewise.
12645         (tm_diff): Use it.
12646         * lib/quotearg.c (struct quoting_options): Use unsigned int for
12647         quote_these_too, so that right shifts are well defined.  All uses
12648         changed.
12649
12650 2004-11-10  Jim Meyering  <jim@meyering.net>
12651
12652         Ensure that no close failure goes unreported.
12653         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
12654         return early when it seems there's nothing to flush.
12655         Don't include __fpending.h.
12656
12657 2004-11-10  Jim Meyering  <jim@meyering.net>
12658
12659         * modules/closeout (Depends-on): Remove fpending.
12660
12661 2004-11-10  Jim Meyering  <jim@meyering.net>
12662
12663         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
12664
12665 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
12666
12667         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
12668         gl_FUNC_STRFTIME.
12669         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
12670         and AC_REQUIRE when possible, to avoid duplicate checks.
12671         Check for <wchar.h>.
12672
12673 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
12674
12675         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
12676
12677 2004-11-09  Bruno Haible  <bruno@clisp.org>
12678
12679         * m4/sockpfaf.m4: New file.
12680
12681 2004-11-05  Bruno Haible  <bruno@clisp.org>
12682
12683         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
12684         Reported by Mark D. Baushke <mdb@cvshome.org>.
12685
12686 2004-11-04  Bruno Haible  <bruno@clisp.org>
12687
12688         2004-09-11  Bruno Haible  <bruno@clisp.org>
12689                 * allocsa.valgrind: New file.
12690         2004-02-06  Bruno Haible  <bruno@clisp.org>
12691                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
12692                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
12693                 Reported by Christopher Seip <chris.seip@hp.com>.
12694
12695 2004-11-04  Bruno Haible  <bruno@clisp.org>
12696
12697         * modules/allocsa (Files): Add lib/allocsa.valgrind.
12698         (Makefile.am): Distribute it.
12699
12700 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
12701
12702         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
12703         with errno == ERANGE if the buffer is too small.
12704         Problem reported by Mark D. Baushke.
12705
12706 2004-11-03  Albert Chin <china@thewrittenword.com>
12707             Paul Eggert  <eggert@cs.ucla.edu>
12708
12709         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
12710         equivalent, substitute $ac_type for equivalent type rather than
12711         blindly using uint32_t *always* which won't work if uint32_t is not
12712         available.  Define _UINT32_T to work around typedef of uint32_t if
12713         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
12714         2.5.1.
12715
12716 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
12717
12718         * m4/jm-macros.m4: Sync from coreutils.
12719         (gl_MACROS): Check for mbrlen, for pathchk.
12720         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
12721
12722 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
12723
12724         * lib/xreadlink.c (MAXSIZE): New macro.
12725         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
12726         size does not exceed MAXSIZE.  Avoid cast.
12727         As suggested by Mark D. Baushke in
12728         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
12729         if readlink fails with buffer size just under MAXSIZE, try again
12730         with MAXSIZE.
12731
12732 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
12733
12734         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
12735
12736 2004-11-02  Derek R. Price  <derek@ximbiot.com>
12737         and  Paul Eggert  <eggert@cs.ucla.edu>
12738
12739         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
12740         (get_date): Overparenthesize to avoid GCC warning.
12741
12742 2004-11-02  Bruno Haible  <bruno@clisp.org>
12743
12744         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
12745         returns void.
12746
12747 2004-11-02  Bruno Haible  <bruno@clisp.org>
12748
12749         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
12750         function returns void.
12751
12752 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
12753
12754         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
12755         fflush_unlocked, flockfile, funlockfile, funlockfile,
12756         fputs_unlocked, putc_unlocked.
12757
12758 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
12759
12760         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
12761         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
12762         already declared.
12763
12764 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12765
12766         * modules/getdate (Files): Add doc/getdate.texi.
12767         (Depends-on): Add setenv, xalloc.
12768
12769 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12770
12771         * lib/getdate.y: Add support for TZ="foo" within a date string.
12772         Fix some bugs near time_t boundaries.  Reject dates with
12773         out-of-range components, e.g., "Sept 31".
12774         Include <stdlib.h>, "setenv.h", "xalloc.h".
12775         (ISDIGIT_LOCALE): Remove; unused.
12776         Note that the TZ and time functions used here are not reentrant.
12777         (mktime_ok, get_tz): New functions.
12778         (TZBUFSIZE): New constant.
12779         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
12780         This requires that we sometimes generate our own TZ="XXX..." setting.
12781
12782 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12783
12784         * doc/getdate.texi: New file, from coreutils with modifications for
12785         the new TZ parsing.
12786
12787 2004-10-27  Derek R. Price  <derek@ximbiot.com>
12788
12789         * lib/mktime.c (not_equal_tm): Remove redundant check.
12790
12791 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
12792
12793         * modules/regex (lib_SOURCES): Add regex.c.
12794         Reported by James Youngman in
12795         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
12796
12797 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
12798
12799         * lib/getdate.y: Use Bison 1.875 features, and some minor
12800         code cleanups.  This change does not affect semantics.
12801         Don't include <stdlib.h>; no longer needed.
12802         Don't include unlocked-io.h; only the "#if TEST" code uses
12803         stdio, and performance isn't crucial there.
12804         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
12805         Bison 1.875 features as described below.
12806         All uses of "PC." replaced by "pc->".
12807         (YYSTYPE): Add a forward declaration.
12808         (yylex, yyerror): Use full prototypes in forward decls.
12809         Use "%pure-parser" rather than obsolescent "%pure_parser".
12810         Use %parse-param and %lex-param instead of obsolescent
12811         YYPARSE_PARAM and YYLEX_PARAM.
12812         (meridian_table, month_and_day_table, time_units_table,
12813         relative_time_table, time_zone_table, military_table,
12814         lookup_zone, lookup_word, get_date):
12815         Use NULL instead of 0 where appropriate.
12816         (to_hour): Avoid abort (), to avoid a dependency on
12817         stdlib.h.
12818         (yyerror, yylex): Now accepts parser_control * arg.
12819         (main) [TEST]: Use '\0' rather than 0 for char.
12820
12821 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
12822
12823         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
12824
12825 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
12826
12827         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
12828         It's now the caller's responsibility to handle the case where
12829         !HAVE_GETPAGESIZE && !defined getpagesize.
12830
12831         * lib/mktime.c (leapyear): Arg is long int, not int.
12832
12833 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
12834
12835         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
12836
12837 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
12838
12839         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
12840         missing.  Problem reported by James Youngman.
12841
12842 2004-10-16  Simon Josefsson  <jas@extundo.com>
12843
12844         * gnulib-tool: Fix comments.  Fix parse problem.
12845         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
12846
12847 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
12848
12849         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
12850         implementation of getopt_long.  Problem reported by Alexander Taler in:
12851         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
12852
12853 2004-10-15  Bruno Haible  <bruno@clisp.org>
12854
12855         * gnulib-tool: Untabify. Initialize supplied_libname.
12856         (func_usage): More homogenous output.
12857         (func_modules_transitive_closure, func_modules_to_filelist,
12858         func_emit_lib_Makefile_am): New functions.
12859         (func_import): New function, extracted from big case statement. Use
12860         func_get_license, func_modules_transitive_closure,
12861         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
12862         opt_lgpl. Don't use test -a, as it's not portable.
12863         (func_create_testdir): Use func_modules_transitive_closure,
12864         func_modules_to_filelist, func_emit_lib_Makefile_am.
12865
12866 2004-10-15  Bruno Haible  <bruno@clisp.org>
12867
12868         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
12869
12870 2004-10-15  Bruno Haible  <bruno@clisp.org>
12871
12872         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
12873         the portions belonging to each module.
12874         Suggested by Derek Robert Price <derek@ximbiot.com>.
12875
12876 2004-10-12  Simon Josefsson  <jas@extundo.com>
12877
12878         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
12879         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
12880         to real functions.
12881
12882 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
12883
12884         * modules/vsnprintf: New file.
12885
12886 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
12887
12888         * m4/vsnprintf.m4: New file.
12889
12890 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
12891
12892         * lib/vsnprintf.h: New file.
12893         * lib/vsnprintf.c: New file.
12894
12895 2004-10-11  Bruno Haible  <bruno@clisp.org>
12896
12897         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
12898         vsnprintf.
12899
12900 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
12901
12902         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
12903
12904 2004-10-07  Bruno Haible  <bruno@clisp.org>
12905
12906         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
12907         fits into the provided buffer.
12908
12909 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
12910
12911         * lib/diacrit.c, diacrit.h: Add GPL notice.
12912
12913         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
12914         notice.
12915         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
12916         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
12917         This avoids a potential constant-folding bug.
12918
12919 2004-10-05  Bruno Haible  <bruno@clisp.org>
12920
12921         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
12922         for the declaration of strsep.
12923
12924 2004-10-05  Bruno Haible  <bruno@clisp.org>
12925
12926         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
12927
12928 2004-10-04  Simon Josefsson  <jas@extundo.com>
12929
12930         * modules/memmem: New file.
12931         * tests/test-memmem.c: New file.
12932         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
12933
12934 2004-10-04  Simon Josefsson  <jas@extundo.com>
12935
12936         * m4/memmem.m4: New file.
12937
12938 2004-10-04  Simon Josefsson  <jas@extundo.com>
12939
12940         * lib/memmem.h: New file.
12941         * lib/memmem.c: New file, taken from glibc.
12942
12943 2004-10-04  Simon Josefsson  <jas@extundo.com>
12944
12945         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
12946         '#ifdef USE_UNLOCKED_IO'.
12947
12948 2004-10-04  Simon Josefsson  <jas@extundo.com>
12949
12950         * config/srclist.txt: Add memmem from glibc.
12951
12952 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
12953
12954         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
12955
12956         * modules/argmatch, modules/argp, modules/closeout, modules/error,
12957         modules/exclude, modules/getdate, modules/getline,
12958         modules/getndelim2, modules/getpass, modules/getpass-gnu,
12959         modules/getusershell, modules/linebuffer, modules/md5,
12960         modules/mountlist, modules/posixtm, modules/readtokens,
12961         modules/readutmp, modules/regex, modules/sha1,
12962         modules/version-etc, modules/yesno:
12963         Remove dependency on unlocked-io.
12964
12965 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
12966
12967         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
12968
12969         * m4/unlocked-io.m4: Add copyright notice.
12970         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
12971
12972 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
12973
12974         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
12975         * lib/xmalloc.c (xmemdup): Likewise.
12976         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
12977         XFREE): Remove these long-obsolescent macros.
12978         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
12979         * lib/xstrdup.c: Remove.
12980
12981         * lib/regex.c (re_comp): Cast gettext return value to char *,
12982         Problem reported by Martin Neitzel via Mark D. Baushke.
12983
12984 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
12985
12986         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
12987         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
12988         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
12989         regex.c, sha1.c, version-etc.c, yesno.c:
12990         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
12991         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
12992         the includer's responsibility.
12993
12994         Sync from coreutils.
12995
12996         * lib/modechange.c (mode_compile): Don't decrement a pointer that
12997         points to the start of a string, as the C Standard says the
12998         resulting behavior is undefined.
12999
13000         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
13001         simple -> simple_backups, numbered_existing ->
13002         numbered_existing_backups, numbered -> numbered_backups
13003         to avoid shadowing problems.  All uses changed.
13004         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
13005         * lib/backupfile.c (check_extension, numbered_backup):
13006         Rename locals to avoid shadowing 'basename'.
13007         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
13008         once.
13009
13010         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
13011         * lib/.cvsignore: Add getopt.h.
13012
13013 2004-10-04  Bruno Haible  <bruno@clisp.org>
13014
13015         * modules/README: New file.
13016         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
13017         not a module.
13018
13019 2004-10-02  Jim Meyering  <jim@meyering.net>
13020
13021         * lib/dirfd.h, getpagesize.h: Add copyright notice.
13022
13023 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
13024
13025         * modules/strsep: New file.
13026
13027 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
13028
13029         * m4/strsep.m4: New file.
13030
13031 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
13032
13033         * lib/strsep.h: New file.
13034         * lib/strsep.c: New file.
13035
13036 2004-10-01  Simon Josefsson  <jas@extundo.com>
13037
13038         * lib/snprintf.c (snprintf): Handle size==0.
13039
13040 2004-10-01  Simon Josefsson  <jas@extundo.com>
13041             Bruno Haible  <bruno@clisp.org>
13042
13043         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
13044         (snprintf): Declare 'args'.
13045
13046 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
13047
13048         * lib/snprintf.c: Remove comments as to why each header is needed.
13049
13050 2004-10-01  Bruno Haible  <bruno@clisp.org>
13051
13052         * MODULES.html.sh: Add strsep.
13053
13054 2004-09-30  Simon Josefsson  <jas@extundo.com>
13055
13056         * modules/snprintf: New file.
13057
13058 2004-09-30  Simon Josefsson  <jas@extundo.com>
13059
13060         * m4/snprintf.m4: New file.
13061
13062 2004-09-30  Simon Josefsson  <jas@extundo.com>
13063
13064         * lib/snprintf.h, snprintf.c: New files.
13065
13066 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13067
13068         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
13069         (hol_entry_help): Never translate an empty string.
13070         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
13071         * lib/argp.h (OPTION_NO_TRANS): New option.
13072
13073 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13074
13075         * modules/argp (Maintainer): Replace Simon Josefsson
13076         by Sergey Poznyakoff.
13077
13078 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13079
13080         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
13081         changes merged back into glibc.
13082
13083 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
13084
13085         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
13086
13087 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
13088
13089         * lib/xvasprintf.c: Include xalloc.h.
13090         (xvasprintf): Use xalloc_die, not xmalloc_die.
13091
13092 2004-09-29  Bruno Haible  <bruno@clisp.org>
13093
13094         * modules/alloca-opt: New file, derived from modules/alloca.
13095         * modules/allocsa: Depend on alloca-opt instead of alloca.
13096         * modules/setenv: Likewise.
13097         * modules/vasnprintf: Likewise.
13098         * MODULES.html.sh: Add alloca-opt.
13099
13100 2004-09-28  Simon Josefsson  <jas@extundo.com>
13101
13102         * gnulib-tool: New parameter --lgpl, to asseert that modules are
13103         LGPL, and to replace license template from GPL to LGPL.
13104
13105 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
13106
13107         * modules/dummy: Change license to LGPL.
13108
13109 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
13110
13111         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
13112
13113 2004-09-24  Simon Josefsson  <jas@extundo.com>
13114
13115         * modules/minmax (License): Change from GPL to LGPL.
13116
13117 2004-09-23  Simon Josefsson  <jas@extundo.com>
13118
13119         * gnulib-tool (--import): Typo.
13120
13121 2004-09-23  Simon Josefsson  <jas@extundo.com>
13122
13123         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
13124
13125 2004-09-22  Bruno Haible  <bruno@clisp.org>
13126
13127         * modules/*: Add 'License' field.
13128         * gnulib-tool: Accept --extract-license option.
13129         (func_get_license): New function.
13130
13131 2004-09-21  Bruno Haible  <bruno@clisp.org>
13132
13133         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
13134         Reported by Simon Josefsson.
13135
13136 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
13137
13138         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
13139         gl_AC_TYPE_LONG_LONG.
13140
13141 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
13142
13143         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
13144
13145 2004-09-18  Simon Josefsson  <jas@extundo.com>
13146         and  Paul Eggert  <eggert@cs.ucla.edu>
13147
13148         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
13149         calls with autoreconf.  Define GL_LIB.
13150
13151 2004-09-14  Karl Berry  <karl@gnu.org>
13152
13153         * config/srclist.txt: unsync setenv.c, sigh.
13154
13155 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
13156
13157         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
13158         Problem reported by Bruno Haible in:
13159         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
13160
13161 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
13162
13163         * config/srclist.txt: Comment out argp-pvh.c.
13164
13165 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
13166
13167         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
13168         in case some system header has #define'd it.  Problem reported by
13169         Soeren D. Schulze in
13170         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
13171
13172 2004-09-09  Karl Berry  <karl@gnu.org>
13173
13174         * regex.[ch]: delete from the root.  These were supposed to be
13175                 synced with emacs cvs, but this has not happened for about
13176                 a year, and anyway nothing else uses emacs regex.[ch].
13177                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
13178                 lib/regex[.ch] is untouched.
13179
13180 2004-09-09  Bruno Haible  <bruno@clisp.org>
13181
13182         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
13183
13184 2004-09-09  Bruno Haible  <bruno@clisp.org>
13185
13186         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
13187         modifications.
13188         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
13189
13190 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
13191
13192         * modules/xvasprintf: New file.
13193         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
13194
13195 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
13196
13197         * lib/xvasprintf.h: New file.
13198         * lib/xvasprintf.c: New file.
13199         * lib/xasprintf.c: New file.
13200
13201 2004-09-08  Bruno Haible  <bruno@clisp.org>
13202
13203         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
13204
13205 2004-09-08  Bruno Haible  <bruno@clisp.org>
13206
13207         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
13208         length is > INT_MAX.
13209         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
13210         more.
13211
13212 2004-09-08  Bruno Haible  <bruno@clisp.org>
13213
13214         * lib/stdint_.h: New file, taken from GNU clisp.
13215
13216 2004-09-08  Bruno Haible  <bruno@clisp.org>
13217             Oskar Liljeblad  <oskar@osk.mine.nu>
13218
13219         * modules/stdint: New file.
13220         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
13221
13222 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13223
13224         Import from coreutils.
13225         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
13226         strings on unbounded length.  alloca's performance benefits aren't
13227         that important here.
13228         (V_STRDUP): Remove.
13229         (parse_with_separator): New function, with most of the internals
13230         of the old parse_user_spec.  Allow user to omit both user and group,
13231         for compatibility with FreeBSD.
13232         Clone only the user name, not the entire spec.
13233         Do not set *uid, *gid unless entirely successful.
13234         Avoid memory leak in some failing cases.
13235         Fix regression for USER.GROUP reported by Dmitry V. Levin in
13236         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
13237         (parse_user_spec): Rewrite to use parse_with_separator.
13238
13239 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13240
13241         * modules/userspec: Don't depend on alloca.
13242
13243 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
13244
13245         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
13246
13247 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
13248
13249         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
13250         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
13251         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
13252
13253 2004-08-16  Simon Josefsson  <jas@extundo.com>
13254
13255         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
13256         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
13257         Add --dry-run for --import.
13258         Let user provided command line parameters override configure.ac
13259         settings.
13260
13261 2004-08-12  Simon Josefsson  <jas@extundo.com>
13262
13263         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
13264         as discussed with Paul Eggert in threads rooted at
13265         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
13266         and
13267         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
13268         Before, the test was empty, and relied on ELIDE_CODE in source
13269         code.)
13270         (gl_PREREQ_GETOPT): New macro.
13271         (gl_GETOPT): Use them.
13272
13273 2004-08-12  Simon Josefsson  <jas@extundo.com>
13274
13275         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
13276         * lib/getopt_.h: Renamed from getopt.h.
13277
13278 2004-08-12  Simon Josefsson  <jas@extundo.com>
13279
13280         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
13281         Change default library name from libfoo to libgnu.
13282         Now, if you have a configure.ac that says:
13283                 gl_SOURCE_BASE(gl)
13284                 gl_M4_BASE(gl/m4)
13285                 gl_MODULES(error getopt etcetera)
13286                 gl_INIT
13287         you can import all you need by running:
13288                 ../gnulib/gnulib-tool --import
13289
13290         * modules/getopt (Files): Rename getopt.h to getopt_.h.
13291         (Makefile.am): Rewrite, use logic from argz.
13292         (Include): Use <getopt.h> instead of "getopt.h".
13293
13294 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13295
13296         * modules/argp (Files): Add m4/unlocked-io.m4.
13297         (Depends-on): Add extensions.
13298
13299 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13300
13301         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
13302         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
13303         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
13304         Check for program_invocation_name, program_invocation_short_name,
13305         flockfile, funlockfile, features.h, _getopt_long_only_r.
13306
13307 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13308
13309         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
13310         its complicated substitute.
13311         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
13312         and program_invocation_name.
13313         (__argp_basename) [!_LIBC]: Remove; the only use was
13314         replaced by its body.
13315         (__argp_short_program_name): Change condition from
13316         !defined __argp_short_program_name to
13317         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
13318         to match argp-namefrob.h.
13319         (__argp_failure): Don't assume strerror_r returns char *.
13320         * lib/argp-parse.c (N_): Define unconditionally.
13321         (argp_default_options): Fill out initializers with 0 to avoid
13322         gcc warnings.
13323
13324 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
13325
13326         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
13327         getopt1.c.
13328
13329 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13330
13331         Merge from coreutils.
13332
13333         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
13334
13335         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
13336         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
13337
13338 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13339
13340         Merge from coreutils.
13341
13342         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
13343         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
13344         for Reliant Unix 5.43.
13345
13346         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
13347         (union fooround): Use uintmax_t, not long int.
13348         The rest is a merge from libc:
13349         [defined _LIBC]: Include <shlib-compat.h>.
13350         (_obstack) [defined _LIBC]: Remove after 2.3.4.
13351
13352         * lib/settime.c (settime): Recode to avoid warning with
13353         Sun Forte C 6U2.
13354
13355         * lib/strverscmp.c: Convert to UTF-8.
13356
13357 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13358
13359         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
13360         m4/uintmax_t.m4.
13361
13362 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13363
13364         * modules/xalloc-die: New file.
13365         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
13366
13367         * modules/md5 (Files): Add m4/uint32_t.m4.
13368         * modules/sha1: Renamed from modules/sha.
13369         (Files):
13370         Rename lib/sha.h to lib/sha1.h.
13371         Rename lib/sha.c to lib/sha1.c.
13372         Rename m4/sha.m4 to m4/sha1.m4.
13373         (lib_SOURCES): Likewise.
13374         (configure.ac): Rename gl_SHA to gl_SHA1.
13375         (Include): sha.h -> sha1.h.
13376
13377 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13378
13379         * m4/uint32_t.m4, uintptr_t.m4: New files.
13380         * m4/sha1.m4: Renamed from sha.m4.
13381         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
13382
13383 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13384
13385         * lib/obstack.h (obstack_empty_p):
13386         Don't assume that chunk->contents is suitably aligned.
13387         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
13388         Likewise. Problem reported by Benno in
13389         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
13390
13391         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
13392         readable.  This could be improved further but it'd take some work.
13393
13394 2004-08-08  Simon Josefsson  <jas@extundo.com>
13395
13396         * modules/xgethostname (Depends-on): Remove exit and error (not
13397         used).
13398
13399         * modules/getpass-gnu: Add getpass.h.
13400         (Depends-on): Add stdbool.
13401         * modules/getpass: Add getpass.h.
13402
13403 2004-08-08  Simon Josefsson  <jas@extundo.com>
13404
13405         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
13406         Check getpass declaration.
13407
13408 2004-08-08  Simon Josefsson  <jas@extundo.com>
13409
13410         * lib/xgethostname.c: Don't include error.h (not used).
13411
13412         * lib/getpass.h: Add.
13413         * lib/getpass.c: Include getpass.h first.
13414
13415 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
13416
13417         * lib/xalloc-die.c: New files.
13418         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
13419         All uses removed.
13420         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
13421         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
13422         xalloc-die.c.
13423         (_, N_, xalloc_die): Move to xalloc-die.c.
13424         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
13425         so that we needn't mess with xalloc_msg_memory_exhausted.
13426
13427         * lib/sha1.h: Renamed from sha.h.
13428         (SHA1_H): Renamed from _SHA_H.
13429         (sha1_ctx): Renamed from sha_ctx.
13430         (sha1_init_ctx): Renamed from sha_init_ctx.
13431         (sha1_process_block): Renamed from sha_process_block.
13432         (sha1_process_bytes): Renamed from sha_process_bytes.
13433         (sha1_finish_ctx): Renamed from sha_finish_ctx.
13434         (sha1_read_ctx): Renamed from sha_read_ctx.
13435         (sha1_stream): Renamed from sha_stream.
13436         (sha1_buffer): Renamed from sha_buffer.
13437         * lib/sha1.c: Likewise; renamed from sha.c.
13438         Do not include <sys/types.h>.
13439         Include <stddef.h> rather than <stdlib.h>.
13440
13441 2004-08-08  Bruno Haible  <bruno@clisp.org>
13442
13443         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
13444         FILESYSTEM_PREFIX_LEN.
13445         * lib/progreloc.c: Likewise.
13446         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
13447
13448 2004-08-06  Simon Josefsson  <jas@extundo.com>
13449
13450         * modules/progname (Depends-on): Don't depend on stdbool.
13451
13452 2004-08-06  Simon Josefsson  <jas@extundo.com>
13453
13454         * modules/getsubopt: New file.
13455         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13456         getsubopt.
13457
13458 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
13459
13460         More merge from coreutils.
13461
13462         * m4/utimens.m4, utimecmp.m4: New files.
13463         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
13464         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
13465         prereq.m4, sha.m4: Import changes from coreutils.
13466
13467 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
13468
13469         More merge from coreutils.
13470         * modules/raise, modules/readtokens0, modules/utimens,
13471         modules/utimecmp, module/xnanosleep: New files.
13472         * modules/strftime: Add lib/strftime.h.
13473         Change include from <time.h> to "strftime.h".
13474         * modules/yesno: Add lib/yesno.h.
13475         * modules/backupfile: Remove lib/addext.c.
13476         * modules/euidaccess: Add stat-macros.h.
13477         * modules/canonicalize, modules/euidaccess,
13478         modules/filemode, modules/lchown, modules/makepath,
13479         modules/rmdir, modules/stat: Likewise.
13480
13481 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
13482
13483         Merge from tar.
13484         * lib/argp-help.c (make_hol, hol_append): Don't assume that
13485         SIZE_MAX is a valid preprocessor constant.
13486         (__argp_basename): Change from "#ifndef _LIBC"
13487         to "#ifndef __argp_short_program_name", so that
13488         we don't compile these functions for tar.
13489
13490         More merges from coreutils.
13491         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h,
13492         lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c,
13493         lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
13494         * lib/addext.c: Remove; no longer needed.
13495         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
13496         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
13497         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
13498         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
13499         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
13500         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
13501         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
13502         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
13503         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
13504         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13505         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
13506         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
13507         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
13508         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
13509         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
13510         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
13511         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
13512         Import changes from coreutils.
13513
13514 2004-08-05  Simon Josefsson  <jas@extundo.com>
13515
13516         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
13517
13518 2004-08-05  Simon Josefsson  <jas@extundo.com>
13519
13520         * m4/getsubopt.m4: New file.
13521
13522 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
13523
13524         Merge from coreutils.
13525
13526         * m4/c-strtod.m4, canonicalize.m4, fcntl-safer.m4, getcwd-path-max.m4:
13527         New files.
13528
13529         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
13530         FILESYSTEM_PREFIX_LEN ->
13531         FILE_SYSTEM_PREFIX_LEN.
13532         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
13533         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
13534         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
13535         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
13536
13537         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
13538         prerequisite modules now handle the DOS stuff.
13539         Don't check for unistd.h.
13540
13541 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
13542
13543         Merge from coreutils.
13544
13545         * lib/.gdb-history: Remove; this doesn't belong here.
13546
13547         * lib/c-strtod.c, c-strtod.h, c-strtold.c, cycle-check.c,
13548         cycle-check.h, dev-ino.h, canonicalize.h, canonicalize.c,
13549         fcntl-safer.h, fcntl-safer.c, getcwd.c: New files.
13550
13551         * lib/dirname.h: Include <stdbool.h>.
13552         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
13553         for consistency with POSIX terminology.  All uses changed.
13554         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
13555         (strip_trailing_slashes): Use bool for booleans.
13556         * lib/stripslash.c (strip_trailing_slashes): Likewise.
13557
13558         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
13559         sometimes returns a positive errno value even when it succeeds.
13560         (print_errno_message) [!LIBC]: Fall back on strerror if
13561         __strerror_r fails.
13562
13563         * lib/path-concat.c (mempcpy): Don't define if a system header defines
13564         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
13565         (longest_relative_suffix): New function.
13566         (path_concat): Use it.  Assume first argument is not NULL.
13567         Port to DOS.  Omit redundant separators.
13568         Report an error instead of returning NULL.
13569         Use mempcpy instead of memcpy.
13570         (xpath_concat): Remove: not declared or used.
13571
13572         * lib/same.h: Include <stdbool.h>
13573         (same_name): Return bool, not int.
13574         * lib/same.c (same_name): Likewise.
13575         (errno): Don't declare; we assume C89 or better now.
13576
13577         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
13578         if not already defined.
13579
13580         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
13581         * lib/dup-safer.c (errno): Likewise.
13582
13583 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
13584
13585         Merge from coreutils.
13586         * modules/c-strtod, modules/c-strtold, modules/canonicalize,
13587         modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
13588         * modules/path-concat: Don't depend on strdup.
13589
13590 2004-08-03  Simon Josefsson  <jas@extundo.com>
13591
13592         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
13593         * lib/progname.h: Don't include stdbool.h.
13594
13595 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
13596
13597         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
13598         * MODULES.html.sh (func_all_modules): Remove fatal.
13599
13600 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
13601
13602         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
13603
13604 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
13605
13606         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
13607         working.
13608
13609 2004-08-02  Simon Josefsson  <jas@extundo.com>
13610
13611         * lib/getsubopt.h: New file, with comments from Bruno Haible.
13612         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
13613         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
13614
13615 2004-08-01  Simon Josefsson  <jas@extundo.com>
13616
13617         * lib/xgetdomainname.c: Include stdlib.h, for free().
13618
13619 2004-07-19  Bruno Haible  <bruno@clisp.org>
13620
13621         * MODULES.html.sh (func_all_modules): Add dummy.
13622
13623 2004-07-16  Simon Josefsson  <jas@extundo.com>
13624
13625         * modules/dummy: New file.
13626
13627 2004-07-16  Simon Josefsson  <jas@extundo.com>
13628
13629         * lib/dummy.c: New file.
13630
13631 2004-07-16  Bruno Haible  <bruno@clisp.org>
13632
13633         * lib/backupfile.h: Add extern "C" for C++.
13634         * lib/closeout.h: Likewise.
13635         * lib/copy-file.h: Likewise.
13636         * lib/findprog.h: Likewise.
13637         * lib/full-write.h: Likewise.
13638         * lib/pathname.h: Likewise.
13639         * lib/progname.h: Likewise.
13640         * lib/stpcpy.h: Likewise.
13641         * lib/stpncpy.h: Likewise.
13642         * lib/strcase.h: Likewise.
13643         * lib/strstr.h: Likewise.
13644         * lib/xalloc.h: Likewise.
13645
13646         * lib/mbswidth.h: Add extern "C" for C++.
13647         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
13648
13649 2004-07-13  Robert Millan  <robertmh@gnu.org>
13650
13651         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
13652
13653 2004-07-09  Simon Josefsson  <jas@extundo.com>
13654
13655         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
13656         failed without this.)
13657
13658 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13659
13660         * modules/chown (Files): Add lib/fchown-stub.c, since
13661         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
13662
13663 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13664
13665         * lib/fchown-stub.c: New file.
13666
13667 2004-06-24  Jim Meyering  <jim@meyering.net>
13668
13669         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
13670
13671 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13672
13673         * modules/argz: Omit "#include".
13674
13675         * MODULES.html.sh (func_all_modules): Add calloc, to match
13676         2004-06-01 addition of calloc module.
13677
13678 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13679
13680         * m4/argz.m4: New file, which is autoupdated from libtool.
13681
13682 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13683
13684         * lib/argz.c, argz_.h: New files, which are autoupdated from libtool.
13685
13686 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13687
13688         * config/srclist-update: Don't insist on "USA." before the
13689         close-comment, as libtool omits the period and puts the */ on a
13690         separate line.
13691         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
13692         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
13693
13694 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
13695
13696         * modules/argz: New file.
13697         * MODULES.html.sh (func_all_modules): Add argz.
13698
13699 2004-06-12  Jim Meyering  <jim@meyering.net>
13700         and  Paul Eggert  <eggert@cs.ucla.edu>
13701
13702         * modules/hash (Files): Add lib/xalloc.h.
13703         * modules/pipe (Depends-on): Add wait-process.
13704         * modules/stat (Depends-on): Add xalloc.
13705         * modules/userspec (Files): Add lib/userspec.h.
13706         * modules/xstrto
13707
13708         Upgrade from gettext-0.13.
13709         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
13710         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
13711         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
13712
13713 2004-06-10  Jim Meyering  <jim@meyering.net>
13714
13715         * lib/calloc.c: New file.
13716
13717 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
13718
13719         * lib/getdate.y (yylex): Allow space between sign and number.
13720         Problem reported by Dan Jacobson.
13721
13722 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
13723
13724         Merge from coreutils CVS.
13725
13726         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
13727         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
13728         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
13729         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
13730         xstrtol.m4: Fix copyright date and/or serial number.
13731
13732         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
13733         See if we need an fchown replacement.
13734         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
13735         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
13736         and use the replacement function if we detect either defect.
13737
13738         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
13739         gl_UTIMECMP.
13740
13741 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
13742         and  Jim Meyering  <jim@meyering.net>
13743
13744         Merge from coreutils CVS.
13745
13746         * lib/stat-macros.h: New file, with contents from file-type.h
13747         and coreutils' system.h.
13748         * lib/file-type.c: Include "stat-macros.h".
13749         * lib/file-type.h (file_type): Move all macro definitions to new file,
13750         stat-macros.h.
13751
13752         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
13753         Wrap old code with this conditional.
13754         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
13755         function that does not dereference symlinks.
13756         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
13757
13758         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
13759         dependency problems.
13760         (xreadlink): Accept new arg SIZE, for efficiency.
13761         All decls and uses changed.
13762         * lib/xreadlink.h: Include <stddef.h>, for size_t.
13763
13764         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
13765         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
13766
13767         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
13768         sysexits.h.
13769
13770 2004-06-01  Jim Meyering  <jim@meyering.net>
13771
13772         * m4/calloc.m4: New file.
13773
13774 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
13775
13776         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
13777         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
13778         Also, fix a typo in a diagnostic.
13779
13780 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
13781
13782         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
13783         or AC_FUNC_REALLOC.
13784
13785 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
13786
13787         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
13788         macros to be defined.
13789         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
13790         the allocator returns NULL because the requested size is zero.
13791
13792 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13793
13794         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
13795         var.  Add comment explaining why libc still defines it.  This
13796         merges the following patch from glibc:
13797         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
13798
13799 2004-05-20  Andreas Schwab  <schwab@suse.de>
13800
13801         * m4/free.m4: Replace free if it not known to work, not the other
13802         way round.
13803
13804 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
13805
13806         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
13807         present in glibc since revision 1.1 of this file.
13808         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
13809         obstack_alignment_mask, obstack_alloc, obstack_base,
13810         obstack_blank, obstack_blank_fast, obstack_chunk_size,
13811         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
13812         obstack_grow0, obstack_init, obstack_int_grow,
13813         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
13814         obstack_next_free, obstack_object_size, obstack_ptr_grow,
13815         obstack_ptr_grow_fast, obstack_room): Remove declarations of
13816         nonexistent functions.
13817
13818 2004-05-18  Karl Berry  <karl@gnu.org>
13819
13820         * config/srclist.txt: break link for vasnprintf.c.
13821
13822 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
13823
13824         Port obstack to the AS/400, where pointers are 16 bytes wide and
13825         you cannot cast an integer to a valid pointer.  This patch is
13826         currently waiting to be integrated into glibc; see
13827         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
13828
13829         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
13830         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
13831         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
13832         (struct obstack): temp member is now a union of a pointer and
13833         an integer, instead of an integer.  All integer uses changed.
13834         This does not affect the physical layout of struct obstack,
13835         except on hosts (like the AS/400) where the size or alignment of
13836         void * is greater than that of ptrdiff_t.
13837         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
13838         __STDC__)]: Store temporary in pointer member of union, not
13839         integer member.
13840         * lib/obstack.c: Include <stddef.h>, for offsetof.
13841         (struct fooalign): Remove; it doesn't need a name.
13842         (union fooround): Change double to long double, and add void *.
13843         (DEFAULT_ALIGNMENT): Use offsetof to compute.
13844         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
13845         not a macro.  Hence the values are always int; so remove all
13846         casts-to-int in uses.
13847
13848 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
13849
13850         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
13851         we can get this patch merged into glibc.
13852
13853 2004-05-17  Derek R. Price  <derek@ximbiot.com>
13854             Paul Eggert  <eggert@cs.ucla.edu>
13855
13856         * m4/argp: Depend on alloca.
13857
13858 2004-05-17  Derek R. Price  <derek@ximbiot.com>
13859             Paul Eggert  <eggert@cs.ucla.edu>
13860
13861         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
13862         freecoding.
13863
13864 2004-05-17  Bruno Haible  <bruno@clisp.org>
13865
13866         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
13867         precision that consists of a '.' followed by an empty digit string.
13868         Patch by Tor Lillqvist <tml@iki.fi>.
13869
13870 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
13871
13872         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
13873         for backward compatibility with older code.  We need our own
13874         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
13875         it under some other name, and our alloca.h will define it.
13876
13877 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
13878             Derek Price  <derek@ximbiot.com>
13879
13880         * lib/alloca.c: Include <alloca.h>, to get our interface.
13881         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
13882         include <alloca.h> first.  Use C89 prototype for alloca; this
13883         requires including <stddef.h> for size_t.  Use extern "C" if C++.
13884         Use #elif for simplicity, since we can assume C89 now.
13885         Don't try to source the system alloca.h since it will not be found
13886         and to prevent recursively including its replacement.
13887         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
13888         * lib/regex.c: Likewise.
13889
13890 2004-05-16  Derek Price  <derek@ximbiot.com>
13891             Paul Eggert  <eggert@cs.ucla.edu>
13892
13893         getline cleanup.  This changes the getndelim2 API: both order of
13894         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
13895         no delimiter).
13896
13897         * lib/getline.c: Don't include stddef.h or stdio.h, since our
13898         interface does that.
13899         (getline): Always use getdelim, so that we don't have two
13900         copies of this code.
13901         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
13902         if available.
13903         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
13904         (GETNDELIM2_MAXIMUM): New macro.
13905         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
13906         instead of the old practice of delim2==0.  All callers changed.
13907         Return -1 on overflow, instead of returning junk.
13908         Do not set *linesize unless allocation succeeds.
13909         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
13910         that we include sys/types.h.
13911         * lib/getnline.h: Likewise.
13912         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
13913         (getndelim2): Reorder arguments.
13914         * lib/getnline.c (getnline, getndelim):
13915         Don't discard the NMAX argument.
13916         (getnline): Invoke getndelim, to avoid code duplication.
13917         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
13918         of (size_t) -1 by callers of the getnline family.
13919
13920 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13921
13922         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
13923         Check for gettimeofday.
13924         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
13925         Check for settimeofday, stime.
13926
13927 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13928
13929         * lib/nanosleep.c (suspended): Change its type from int to
13930         sig_atomic_t volatile.
13931         (first_call): Make it private to rpl_nanosleep, and have it
13932         be zero initially as that's a bit faster.
13933         (my_usleep): Round up fractional times instead of truncating them,
13934         as this is the usual meaning for 'sleep'.
13935
13936         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
13937         doesn't work.
13938         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
13939         (ENOSYS): Define if not defined.
13940         (settime): Fall back on stime if it exists and settimeofday fails.
13941         But don't bother with fallbacks if a method fails with errno == EPERM.
13942
13943 2004-05-11  Jim Meyering  <jim@meyering.net>
13944
13945         Prior to this change, the save_cwd caller required read access to the
13946         current directory on most systems (ones with the fchdir function).
13947
13948         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
13949         fails, try write-only, and finally, resort to using xgetcwd.
13950
13951 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13952
13953         * lib/obstack.c, obstack.h: Import changes from libc.
13954
13955 2004-04-28  Bruno Haible  <bruno@clisp.org>
13956
13957         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
13958         also implicitly appends .exe to executables.
13959         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
13960         accepts Windows pathnames.
13961         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
13962         Treat Cygwin like Windows, since it now accepts Windows pathnames.
13963         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
13964         Treat Cygwin like Windows, since it now accepts Windows pathnames.
13965         Reported by Derek Robert Price <derek@ximbiot.com>.
13966
13967 2004-04-21  Karl Berry  <karl@gnu.org>
13968
13969         * config/srclist.txt (localcharset.c): break sync.
13970
13971 2004-04-20  Paul Eggert  <eggert@twinsun.com>
13972
13973         * m4/host-os.m4: Add a copyright notice.
13974
13975 2004-04-20  Jim Meyering  <jim@meyering.net>
13976
13977         Change UTILS_ to gl_ in AC_DEFINE'd names.
13978         Change utils_- and jm_-prefixed variables, too.
13979         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
13980         UTILS_FUNC_MKDIR_TRAILING_SLASH.
13981         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
13982
13983         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
13984         Don't emit trailing blanks.
13985         Also rename jm_-prefixed variables to have gl_ prefix.
13986
13987         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
13988         Also rename jm_-prefixed variables to have gl_ prefix.
13989
13990         * m4/jm-macros.m4: Reflect the renamings.
13991         * m4/prereq.m4: Likewise.
13992
13993 2004-04-20  Jim Meyering  <jim@meyering.net>
13994
13995         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
13996         memory.
13997
13998 2004-04-20  Jim Meyering  <jim@meyering.net>
13999             Bruno Haible  <bruno@clisp.org>
14000
14001         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
14002         memory when realloc fails.
14003
14004 2004-04-19  Jim Meyering  <jim@meyering.net>
14005
14006         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
14007         now that readutmp.c may call `free (0)'.
14008
14009 2004-04-19  Bruno Haible  <bruno@clisp.org>
14010
14011         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
14012         * m4/inttypes_h.m4: Likewise.
14013         * m4/stdint_h.m4: Likewise.
14014         * m4/intmax_t.m4: Likewise.
14015         * m4/uintmax_t.m4: Likewise.
14016
14017 2004-04-18  Jim Meyering  <jim@meyering.net>
14018
14019         * m4/prereq.m4: Don't forbid jm_ prefix.
14020
14021         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
14022         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
14023         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
14024         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
14025         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
14026         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
14027         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
14028         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
14029         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
14030         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
14031         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
14032         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
14033         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
14034         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
14035         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
14036         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
14037         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
14038         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
14039         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
14040
14041 2004-04-18  Jim Meyering  <jim@meyering.net>
14042
14043         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
14044         failure, don't leak memory and do call END_UTMP_ENT.
14045
14046 2004-04-16  Jim Meyering  <jim@meyering.net>
14047
14048         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
14049         coreutils' stat program.
14050         (gl_PREREQ): Don't require jm_PREREQ_STAT.
14051
14052 2004-04-11  Paul Eggert  <eggert@twinsun.com>
14053
14054         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
14055         C89.
14056         (CHAR_BIT): Remove, since we assume C89.
14057         Include <stdint.h> if available, as per current Autoconf CVS advice.
14058
14059 2004-03-31  Jim Meyering  <jim@meyering.net>
14060
14061         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
14062         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
14063         * m4/xalloc.m4: Likewise.
14064
14065 2004-03-30  Paul Eggert  <eggert@twinsun.com>
14066
14067         Merge from coreutils.
14068
14069         * m4/inttostr.m4: New file.
14070         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
14071         Require AM_STDBOOL_H and gl_TIMESPEC instead.
14072         Require gl_CLOCK_TIME.
14073         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
14074
14075 2004-03-30  Paul Eggert  <eggert@twinsun.com>
14076
14077         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
14078         not bool, to be more consistent with Unix conventions.
14079         Suggested by Bruno Haible.
14080
14081         Merge from coreutils.
14082
14083         * lib/imaxtostr.c, inttostr.c, inttostr.h, offtostr.c, umaxtostr.c:
14084         New files.
14085
14086         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
14087         the usual <time.h> dance.
14088         (get_date): Change signature to support fractional time stamps.
14089         All callers changed.
14090         * lib/getdate.y: Include "getdate.h" first, as we can now
14091         assume C89 and don't need to worry about 'const'.
14092         Similarly, include "unlocked-io.h" near start, not in middle.
14093         Include <limits.h>.
14094         (textint.value): Use long int rather than int.
14095         (textint.digits): Use size_t rather than int.
14096         (BILLION, LOG10_BILLION): New constants.
14097         (parser_control): New member rel_ns.  Members day_ordinal,
14098         time_zone, month, day, hour, minutes, rel_year, rel_month,
14099         rel_day, rel_hour, rel_minutes, rel_seconds
14100         are now long int, not int.  Member seconds is now struct timespec,
14101         not int.  New member timespec_seen.  Members dates_seen, days_seen,
14102         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
14103         not int.
14104         (%union.intval): Now long int, not int.
14105         New member timespec.
14106         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
14107         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
14108         (spec): Now is a timespec or an item list.
14109         (timespec, items): New nonterminals.
14110         (time, rel, relunit, number, get_date):
14111         Add support for fractional seconds.
14112         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
14113         (gmtime, localtime, mktime): Remove decls; not needed with C89.
14114         (to_hour): First arg is now long int, not int.
14115         (to_year): Returns long int, not int.
14116         Don't treat year -70 like 70.
14117         (tm_diff): Returns long int, not int.
14118         (lookup_word): Use bool instead of int when appropriate.
14119         (yylex): Use size_t for count, not int.
14120         Detect overflow when parsing large integer constants.
14121         Add support for fractions.
14122         (get_date): Make pointers 'const' if possible.
14123         Use more-portable code to detect integer overflow.
14124         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
14125         Don't use ctime; it's not reliable if the year has >4 digits.
14126
14127         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
14128         This is for compatibility with BSD.
14129
14130         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
14131         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
14132         From coreutils' system.h.
14133
14134         * lib/userspec.c: Don't include "posixver.h".
14135         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
14136         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
14137         compatible extension.  Simplify code by removing a boolean int
14138         that was always nonzero if a string was nonnull.
14139
14140 2004-03-30  Jim Meyering  <jim@meyering.net>
14141
14142         Merge from coreutils.
14143
14144         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
14145         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
14146         on some systems one must include <grp.h> before it.
14147         Reported by Christian Krackowizer.
14148
14149 2004-03-30  Jim Meyering  <jim@meyering.net>
14150
14151         Merge from coreutils.
14152
14153         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
14154
14155         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
14156         an empty input stream.
14157
14158         * lib/readtokens.c: Include <stdbool.h>.
14159         (readtoken): Use `size_t' rather than int/long.
14160         All callers adjusted.
14161         Use `bool' rather than `int' where appropriate.
14162         Use memset rather than an explicit loop.
14163         Use x2nrealloc rather than xrealloc.
14164         Allow the use of `\0' as a delimiter.
14165         (readtokens): Likewise.
14166         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
14167
14168 2004-03-30  Jim Meyering  <jim@meyering.net>
14169
14170         * m4/realloc.m4: Remove file, since now it does no more than
14171         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
14172         the `configure.ac' section of module/realloc.
14173         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
14174
14175 2004-03-30  Bruno Haible  <bruno@clisp.org>
14176
14177         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
14178         nonnull.
14179
14180 2004-03-29  Paul Eggert  <eggert@twinsun.com>
14181
14182         Merge changes to getloadavg.c from coreutils and Emacs.
14183
14184         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
14185         Define to an expression, not to the empty string.
14186         Include cloexec.h and xalloc.h.
14187         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
14188         Use set_cloexec_flag rather than rolling our own.
14189         * lib/cloexec.c, cloexec.h: New files.
14190
14191 2004-03-29  Paul Eggert  <eggert@twinsun.com>
14192
14193         * m4/cloexec.m4: New file.
14194
14195 2004-03-18  Paul Eggert  <eggert@twinsun.com>
14196
14197         * lib/getopt.h: Sync with libc CVS.
14198
14199 2004-03-18  Paul Eggert  <eggert@twinsun.com>
14200             Bruno Haible  <bruno@clisp.org>
14201
14202         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
14203         mbswidth.
14204
14205 2004-03-18  Paul Eggert  <eggert@twinsun.com>
14206             Bruno Haible  <bruno@clisp.org>
14207
14208         * lib/mbswidth.h: Include <wchar.h> only if
14209         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
14210         <wchar.h>.
14211         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
14212
14213 2004-03-09  Paul Eggert  <eggert@twinsun.com>
14214
14215         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
14216         Sync with libc CVS.
14217         * lib/getopt_int.h: New file, also synced from libc.
14218
14219 2004-03-09  Paul Eggert  <eggert@twinsun.com>
14220
14221         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
14222         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
14223         Bring back getopt.c, getopt.h, getopt1.c.
14224
14225 2004-03-07  Paul Eggert  <eggert@twinsun.com>
14226
14227         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
14228         All uses changed.  Check for sa_sigaction member; this fixes
14229         a bug first reported by Jason Andrade in
14230         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
14231
14232 2004-03-07  Paul Eggert  <eggert@twinsun.com>
14233
14234         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
14235         '#if' expressions.  Unlike the code it replaces, it does not
14236         depend on (defined _SC_PAGESIZE).  However, it does depend on
14237         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
14238         first reported by Jason Andrade in
14239         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
14240
14241 2004-02-25  Simon Josefsson  <jas@extundo.com>
14242
14243         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
14244
14245 2004-02-25  Simon Josefsson  <jas@extundo.com>
14246
14247         * lib/strdup.h: New file.
14248         * lib/strdup.c: Include it.
14249         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
14250         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
14251
14252 2004-02-23  Karl Berry  <karl@gnu.org>
14253
14254         * doc/maintain.texi, standards.texi, make-stds.texi: new files
14255         (from fencepost.gnu.org:/gd/gnuorg).
14256
14257 2004-02-23  Karl Berry  <karl@gnu.org>
14258
14259         * config/srclistvars.sh (GNUORG) [karl]: redefine.
14260         * config/srclist.txt: add maintain/standards documents.
14261
14262 2004-02-18  Bruno Haible  <bruno@clisp.org>
14263
14264         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
14265         Reported by Derek Robert Price <derek@ximbiot.com>.
14266
14267 2004-02-16  Karl Berry  <karl@gnu.org>
14268
14269         * config/mkinstalldirs, install-sh: update from automake.
14270
14271 2004-02-06  Karl Berry  <karl@gnu.org>
14272
14273         * m4/po.m4: update from gettext 0.14.1.
14274
14275 2004-02-06  Karl Berry  <karl@gnu.org>
14276
14277         * lib/config.charset: update from gettext 0.14.1.
14278
14279 2004-02-05  Paul Eggert  <eggert@twinsun.com>
14280
14281         Add comments and code, prompted by suggestions from Bruno Haible
14282         for sh-quote.
14283         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
14284         describing the enum quoting_style values.
14285         * lib/quotearg.c (quotearg_alloc): New function.
14286         (quotearg_buffer_restyled): Treat lone { and } as special.
14287         Treat = as special.  Work around bug with older shells
14288         that "see" a '\' that is really the 2nd byte of a multibyte char.
14289         Quote empty string with shell_quoting_style.
14290
14291 2004-02-03  Bruno Haible  <bruno@clisp.org>
14292
14293         * m4/pipe.m4: New file, from GNU gettext.
14294
14295 2004-02-03  Bruno Haible  <bruno@clisp.org>
14296
14297         * lib/pipe.h: New file, from GNU gettext.
14298         * lib/pipe.c: New file, from GNU gettext.
14299
14300 2004-01-27  Bruno Haible  <bruno@clisp.org>
14301
14302         * m4/execute.m4: New file, from GNU gettext.
14303
14304 2004-01-27  Bruno Haible  <bruno@clisp.org>
14305
14306         * lib/execute.h: New file, from GNU gettext.
14307         * lib/execute.c: New file, from GNU gettext.
14308         * lib/w32spawn.h: New file, from GNU gettext.
14309
14310 2004-01-24  Paul Eggert  <eggert@twinsun.com>
14311
14312         Merge from diffutils.
14313
14314         * lib/file-type.c (file_type): Add typed memory objects.
14315         * lib/file-type.h (S_TYPEISTMO): New macro.
14316
14317         * lib/c-stack.h (c_stack_action): Remove argv argument.
14318         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
14319         (die): Don't calculate message unless segv_action returns.
14320         (get_stack_location, min_address_from_argv, max_address_from_argv,
14321         volatile stack_base, volatile_stack_size): Remove.
14322         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
14323         that every segmentation violation is a stack overflow.  (Ouch!)
14324         See Debian bug 136249 (still outstanding) for more info about why
14325         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
14326
14327 2004-01-24  Paul Eggert  <eggert@twinsun.com>
14328
14329         Exit-status fix from coreutils.
14330
14331         Use exit_failure consistently in place of EXIT_FAILURE,
14332         so that program exit statuses are consistent on failure.
14333
14334         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
14335         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
14336         * lib/argmatch.h: Comment fix to match the above.
14337         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
14338         Now a macro referring to exit_failure, instead of a separate
14339         variable.  Include "exitfail.h" to get it.
14340         * lib/xstrtol.h: Include "exitfail.h".
14341         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
14342
14343         * lib/long-options.c (parse_long_options): Use prototype
14344         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
14345         for clarity.
14346
14347 2004-01-21  Jim Meyering  <jim@meyering.net>
14348
14349         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
14350         so as not to conflict with a different-sized __mktime_internal
14351         function in GNU libc.
14352         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
14353         Problem building statically-linked `ls' reported by Michael Brunnbauer.
14354
14355 2004-01-20  Karl Berry  <karl@gnu.org>
14356
14357         * config/config.guess: update from config.
14358
14359         * config/srclistvars.sh: GNUWWWLICENSES for karl.
14360
14361 2004-01-20  Bruno Haible  <bruno@clisp.org>
14362
14363         Safer stack allocation.
14364         * lib/setenv.c: Include allocsa.h.
14365         (alloca): Remove fallback definition.
14366         (freea): Remove macro.
14367         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
14368         instead of freea.
14369
14370 2004-01-20  Bruno Haible  <bruno@clisp.org>
14371
14372         * m4/eealloc.m4: New file, from GNU gettext.
14373
14374 2004-01-20  Bruno Haible  <bruno@clisp.org>
14375
14376         * m4/allocsa.m4: New file, from GNU gettext.
14377
14378 2004-01-20  Bruno Haible  <bruno@clisp.org>
14379
14380         * lib/xallocsa.h: New file, from GNU gettext.
14381         * lib/xallocsa.c: New file, from GNU gettext.
14382
14383 2004-01-20  Bruno Haible  <bruno@clisp.org>
14384
14385         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
14386
14387 2004-01-20  Bruno Haible  <bruno@clisp.org>
14388
14389         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
14390         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
14391         specially.
14392
14393 2004-01-20  Bruno Haible  <bruno@clisp.org>
14394
14395         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
14396         patch.
14397
14398 2004-01-20  Bruno Haible  <bruno@clisp.org>
14399
14400         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
14401
14402 2004-01-20  Bruno Haible  <bruno@clisp.org>
14403
14404         * lib/eealloc.h: New file.
14405
14406 2004-01-20  Bruno Haible  <bruno@clisp.org>
14407
14408         * lib/binary-io.h: Avoid warnings on Cygwin.
14409
14410 2004-01-20  Bruno Haible  <bruno@clisp.org>
14411
14412         * lib/allocsa.h: New file, from GNU gettext.
14413         * lib/allocsa.c: New file, from GNU gettext.
14414
14415 2004-01-18  Karl Berry  <karl@gnu.org>
14416
14417         * doc/gpl.texi, lgpl.texi: new files.
14418
14419 2004-01-18  Karl Berry  <karl@gnu.org>
14420
14421         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
14422         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
14423
14424 2004-01-15  Paul Eggert  <eggert@twinsun.com>
14425
14426         Merge from coreutils.
14427
14428         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
14429         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
14430         (gl_DEFAULT_POSIX2_VERSION): Move
14431         the documentation from 'configure' into 'config.hin',
14432         so that 'configure --help' isn't burdened by it and
14433         we don't have to worry about its formatting there.
14434         Reword the documentation so that it's more succinct
14435         and can be run together into a single paragraph.
14436         * m4/same.m4 (gl_SAME): Check for pathconf.
14437
14438 2004-01-15  Paul Eggert  <eggert@twinsun.com>
14439
14440         Merge from coreutils.
14441
14442         * lib/posixver.c: Include posixver.h.
14443
14444         * lib/same.c: Include <stdbool.h>, <limits.h>.
14445         (_POSIX_NAME_MAX): Define if not defined.
14446         (MIN): New macro.
14447         (same_name): If file names are silently truncated, report
14448         that the file names are the same if they are the same after
14449         the silent truncation.
14450
14451         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
14452         conversion function.
14453         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
14454         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
14455         longer needed.
14456
14457 2004-01-15  Jim Meyering  <jim@meyering.net>
14458
14459         Merge from coreutils.
14460
14461         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
14462         if no library is required.
14463         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
14464         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
14465         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
14466         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
14467         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
14468         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
14469         value, $ac_cv_search_crypt, if it's "none required".
14470         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
14471         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
14472         not gl_FUNC_GETLOADAVG.
14473         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
14474         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
14475
14476 2004-01-15  Jim Meyering  <jim@meyering.net>
14477
14478         Merge from coreutils.
14479
14480         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
14481         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
14482         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
14483
14484         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
14485         optional configure-time default.
14486
14487         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14488
14489         * lib/xreadlink.c (xreadlink): Correct outdated comment.
14490
14491 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
14492
14493         Merge from coreutils.
14494
14495         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
14496         value, $ac_cv_search_nanosleep, if it's "none required".
14497
14498 2004-01-14  Paul Eggert  <eggert@twinsun.com>
14499
14500         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
14501         with like-named macro in fnmatch.c.
14502         (EXT): Use an internal constant instead.
14503
14504         Merge fnmatch patches from glibc.
14505         * lib/fnmatch.c (mbsinit): Remove define.
14506         Add libc_hidden_ver (__fnmatch, fnmatch).
14507         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
14508         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
14509
14510 2004-01-14  Karl Berry  <karl@gnu.org>
14511
14512         * config/install-sh: update from automake.
14513
14514 2004-01-13  Karl Berry  <karl@gnu.org>
14515
14516         * config/install-sh: update from automake.
14517
14518 2004-01-09  Karl Berry  <karl@gnu.org>
14519
14520         * config/install-sh: update from automake.
14521
14522 2004-01-05  Karl Berry  <karl@gnu.org>
14523
14524         * config/config.{sub,guess}: update from config.
14525
14526 2003-12-31  Karl Berry  <karl@gnu.org>
14527
14528         * config/depcomp: update from automake.
14529
14530 2003-12-14  Karl Berry  <karl@gnu.org>
14531
14532         * lib/config.charset: update from gettext-runtime.
14533
14534 2003-12-03  Paul Eggert  <eggert@twinsun.com>
14535
14536         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
14537         Bug reported by Alfred M. Szmidt.
14538
14539 2003-12-03  Bruno Haible  <bruno@clisp.org>
14540
14541         * m4/gettext.m4: Upgrade from gettext-0.13.
14542         * m4/po.m4: Upgrade from gettext-0.13.
14543         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
14544         * m4/intmax.m4: New file, from gettext-0.13.
14545         * m4/printf-posix.m4: New file, from gettext-0.13.
14546
14547 2003-11-29  Karl Berry  <karl@gnu.org>
14548
14549         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
14550
14551 2003-11-25  Paul Eggert  <eggert@twinsun.com>
14552             Bruno Haible  <bruno@clisp.org>
14553
14554         * lib/printf-parse.h: Don't include sys/types.h.
14555         (ARG_NONE): New macro.
14556         (char_directive): Change type of *arg_index fields to size_t.
14557         * lib/printf-parse.c: Don't include sys/types.h.
14558         (SSIZE_MAX): Remove macro.
14559         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
14560         Remove unnecessary overflow check.
14561         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
14562         fields.
14563
14564 2003-11-25  Bruno Haible  <bruno@clisp.org>
14565
14566         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
14567
14568 2003-11-25  Bruno Haible  <bruno@clisp.org>
14569
14570         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
14571         gt_TYPE_SSIZE_T.
14572
14573 2003-11-24  Paul Eggert  <eggert@twinsun.com>
14574
14575         * modules/alloca: Remove dependency on xalloc.
14576
14577 2003-11-24  Paul Eggert  <eggert@twinsun.com>
14578
14579         * lib/alloca.c: Remove dependency on xalloc module.
14580         (xalloc_die): Remove.
14581         (memory_full) [!defined emacs]: New macro.
14582         [!defined emacs]: Don't include xalloc.h.
14583         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
14584         address arithmetic overflows.  Change datatypes a bit to avoid
14585         unnecessary casts.
14586
14587 2003-11-22  Jim Meyering  <jim@meyering.net>
14588
14589         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
14590         s/size/size_t/.
14591
14592 2003-11-21  Karl Berry  <karl@gnu.org>
14593
14594         * config/config.{sub,guess}: update from config.
14595
14596 2003-11-18  Karl Berry  <karl@gnu.org>
14597
14598         * config/config.{sub,guess}: update from config.
14599
14600         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
14601
14602 2003-11-17  Paul Eggert  <eggert@twinsun.com>
14603
14604         * README: Mention that S+T cannot overflow if S is the size of
14605         an existing object and T is sufficiently small.
14606
14607 2003-11-17  Jim Meyering  <jim@meyering.net>
14608
14609         On systems without utime and without a utimes function capable of
14610         dealing with a NULL struct utimbuf* argument, this utime replacement
14611         could -- in unusual circumstances -- leak a file descriptor.
14612         * lib/utime.c: Include <unistd.h> and <errno.h>.
14613         (utime_null): Be sure to close `fd' and to preserve errno.
14614         Reported by Geoff Collyer via Arnold Robbins.
14615
14616 2003-11-17  Bruno Haible  <bruno@clisp.org>
14617
14618         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
14619         (Depends-on): Add xsize.
14620
14621 2003-11-17  Bruno Haible  <bruno@clisp.org>
14622
14623         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
14624
14625 2003-11-17  Bruno Haible  <bruno@clisp.org>
14626
14627         * lib/vasnprintf.c (alloca): Remove fallback definition.
14628         (freea): Remove definition.
14629         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
14630         Reported by Paul Eggert.
14631
14632 2003-11-16  Paul Eggert  <eggert@twinsun.com>
14633             Bruno Haible  <bruno@clisp.org>
14634
14635         Protect against address arithmetic overflow.
14636         * lib/printf-args.h: Include stddef.h.
14637         (arguments): Change type of field 'count' to size_t.
14638         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
14639         'unsigned int' where appropriate.
14640         * lib/printf-parse.h: Include sys/types.h.
14641         (char_directive): Change type of *arg_index fields to ssize_t.
14642         (char_directives): Change type of fields 'count', max_*_length to
14643         size_t.
14644         * lib/printf-parse.c: Include sys/types.h and xsize.h.
14645         (SSIZE_MAX): Define fallback value.
14646         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
14647         instead of 'int' where appropriate. Check a_allocated, d_allocated
14648         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
14649         * lib/vasnprintf.c: Include xsize.h.
14650         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
14651         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
14652         overflow. Avoid wraparound when converting a width or precision from
14653         decimal to binary.
14654
14655 2003-11-16  Bruno Haible  <bruno@clisp.org>
14656
14657         Update from GNU gettext.
14658         * lib/printf-parse.c: Generalize to it can be compiled for wide
14659         strings.
14660         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
14661         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
14662         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
14663         SNPRINTF): New macros.
14664         Don't include <alloca.h> if the file is used inside libintl.
14665         (local_wcslen): New function, for Solaris 2.5.1.
14666         (VASNPRINTF): Use it instead of wcslen.
14667
14668 2003-11-16  Bruno Haible  <bruno@clisp.org>
14669
14670         * lib/xsize.h (xmax): New function.
14671         (xsum, xsum3, xsum4): Declare as "pure" functions.
14672
14673 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14674
14675         * modules/xalloc (Files): Undo latest change, since xalloc.h
14676         no longer needs SIZE_MAX or PTRDIFF_MAX.
14677
14678 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14679
14680         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
14681         gl_PTRDIFF_MAX.
14682
14683 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14684
14685         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
14686         "return", to pacify some unknown compiler.  Problem reported
14687         by Joerg Schilling.
14688
14689 2003-11-12  Paul Eggert  <eggert@twinsun.com>
14690
14691         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
14692         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
14693         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
14694         heuristic is just as accurate as far as we know, and it removes a
14695         dependency on size_max.m4 and ptrdiff_max.m4.
14696
14697 2003-11-11  Bruno Haible  <bruno@clisp.org>
14698
14699         * modules/xsize (Files): Add m4/size_max.m4.
14700         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
14701
14702 2003-11-11  Bruno Haible  <bruno@clisp.org>
14703
14704         * m4/size_max.m4: New file.
14705         * m4/ptrdiff_max.m4: New file.
14706         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
14707         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
14708         (gl_XALLOC): Invoke it.
14709
14710 2003-11-11  Bruno Haible  <bruno@clisp.org>
14711
14712         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
14713         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
14714         defined.
14715
14716 2003-11-10  Paul Eggert  <eggert@twinsun.com>
14717
14718         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
14719         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
14720         rejected some allocations of exactly SIZE_MAX - 2 bytes.
14721         From Bruno Haible.
14722         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
14723         not (size_t) -1, since it's defined here.
14724
14725 2003-11-09  Karl Berry  <karl@gnu.org>
14726
14727         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
14728
14729 2003-11-06  Paul Eggert  <eggert@twinsun.com>
14730
14731         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
14732         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
14733         Reject sizes of exactly SIZE_MAX bytes.
14734         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
14735         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
14736
14737 2003-11-05  Bruno Haible  <bruno@clisp.org>
14738
14739         * lib/xsize.h: Include limits.h, to avoid a possible collision with
14740         SIZE_MAX defined in <limits.h> on Solaris.
14741
14742 2003-11-04  Jim Meyering  <jim@meyering.net>
14743
14744         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
14745         variable names, rather than @VAR@.
14746         * modules/poll: Likewise.
14747
14748 2003-11-04  Bruno Haible  <bruno@clisp.org>
14749
14750         * modules/xsize: New file.
14751         * modules/linebreak: Depend on xsize.
14752         * MODULES.html.sh (func_all_modules): Add xsize.
14753
14754 2003-11-04  Bruno Haible  <bruno@clisp.org>
14755
14756         * m4/xsize.m4: New file.
14757
14758 2003-11-04  Bruno Haible  <bruno@clisp.org>
14759
14760         * lib/xsize.h: New file.
14761         * lib/linebreak.c: Include xsize.h.
14762         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
14763         argument for overflow.
14764         Suggested by Paul Eggert.
14765
14766 2003-11-03  Karl Berry  <karl@gnu.org>
14767
14768         * config/config.{guess,sub}: update from config.
14769
14770 2003-11-03  Jim Meyering  <jim@meyering.net>
14771
14772         * modules/userspec (lib_SOURCES): Add userspec.h.
14773         (Include): Add "userspec.h".
14774         Improve description.
14775
14776 2003-11-03  Jim Meyering  <jim@meyering.net>
14777
14778         * lib/userspec.c: Include "userspec.h".
14779         * lib/userspec.h: New file.
14780
14781 2003-11-03  Bruno Haible  <bruno@clisp.org>
14782
14783         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
14784
14785 2003-11-03  Bruno Haible  <bruno@clisp.org>
14786
14787         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
14788         available, to avoid (extremely rare) race condition.
14789         Suggested by Paul Eggert.
14790
14791 2003-11-02  Karl Berry  <karl@gnu.org>
14792
14793         * config/srclist.txt (vasprintf.c): sync broken, sigh.
14794
14795 2003-10-31  Paul Eggert  <eggert@twinsun.com>
14796
14797         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
14798         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
14799         (read_filesystem_list): Set and use me_type_malloced.
14800         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
14801         whatever the type happens to be), for brevity and consistency.
14802         Check for size calculation overflow on Alphas running OSF/1.
14803
14804 2003-10-31  Jim Meyering  <jim@meyering.net>
14805
14806         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
14807
14808         * lib/linebuffer.c: Include <string.h> for declaration of memset.
14809
14810 2003-10-30  Paul Eggert  <eggert@twinsun.com>
14811             Bruno Haible  <bruno@clisp.org>
14812
14813         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
14814         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
14815
14816 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
14817
14818         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
14819         netbsd*-gnu*.  Suggested by Robert Millan.
14820
14821 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14822
14823         * modules/group-member: Depend on stdbool.
14824
14825 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14826
14827         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
14828
14829 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14830
14831         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
14832         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
14833         after the 'gnu' in these cases.  This fixes some bugs in the
14834         previous change, and is based on suggestions by Robert Millan.
14835
14836 2003-10-29  Paul Eggert  <eggert@twinsun.com>
14837
14838         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
14839         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
14840         no longer needed.
14841         * lib/quotearg.c (quotearg_n_options): Use it.
14842         * lib/group-member.c: Include <stdbool.h>.
14843         (free_group_info): Arg is now const *; don't free arg.
14844         (get_group_info): Now returns bool and accepts struct group_info *,
14845         rather than returning a malloc'ed struct group_info *.
14846         All uses changed.  Check for overflow in internal size calculation.
14847
14848         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
14849         rather than xmalloc/xrealloc.
14850         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
14851         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
14852         conformance bug: the old code used a pointer after freeing the
14853         storage that it addressed.
14854         * lib/hash.c (hash_initialize): Simplify the code by using
14855         xalloc_oversized rather than doing it by hand.
14856         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
14857         the buffer preserved.  Use free and xmalloc instead.
14858         * lib/quotearg.c (quotearg_n_options): Likewise.
14859         Use a simpler test for size overflow.  Don't use xalloc_oversized
14860         because unsigned int might be wider than size_t (!); this suggests
14861         that we should switch from unsigned int to size_t for slot numbers.
14862
14863 2003-10-28  Paul Eggert  <eggert@twinsun.com>
14864
14865         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
14866         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
14867         NetBSD kernels.  Requested by Richard Stallman.
14868
14869 2003-10-27  Paul Eggert  <eggert@twinsun.com>
14870
14871         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
14872         to allocate the returned structure.  Do not allocate a subarray,
14873         as x2nrealloc will do that.
14874         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
14875         instead of xnrealloc.
14876         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
14877
14878 2003-10-27  Bruno Haible  <bruno@clisp.org>
14879
14880         * lib/stdbool_.h: Better support for BeOS.
14881
14882 2003-10-26  Paul Eggert  <eggert@twinsun.com>
14883
14884         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
14885         now uses inline.
14886
14887 2003-10-26  Paul Eggert  <eggert@twinsun.com>
14888
14889         * lib/xalloc.h (xalloc_oversized): New static inline function, for
14890         callers that want to do their own size-overflow checking.  Include
14891         <stdbool.h>, since xalloc_oversized returns bool.
14892         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
14893         to use xalloc_oversized.
14894
14895         Add two functions x2realloc, x2nrealloc, for programs that grow
14896         arrays dynamically by doubling their sizes.
14897         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
14898         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
14899         New functions.
14900
14901         Port to C99 semantics for 'inline' of external functions.
14902         Bug reported by Bruno Haible.
14903         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
14904         with the old contents of xnmalloc.
14905         (xnmalloc, xmalloc): Use it.
14906         (xnrealloc_inline): New static inline function,
14907         with the old contents of xnrealloc.
14908         (xnrealloc, xrealloc): Use it.
14909
14910         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
14911         that.
14912
14913 2003-10-26  Karl Berry  <karl@gnu.org>
14914
14915         * config/srclist.txt (COPYING.DOC): no longer available from
14916         /gd/gnuorg; don't know where the ultimate source is.
14917
14918 2003-10-25  Paul Eggert  <eggert@twinsun.com>
14919
14920         Fix several address-calculation bugs in the hash modules,
14921         plus some minor code cleanup.
14922
14923         * lib/hash.h: Include <stdbool.h>, for bool.
14924         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
14925         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
14926         hash_get_n_entries, hash_get_max_bucket_length,
14927         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
14928         hash_rehash): Use size_t rather than unsigned.
14929         * lib/hash.c (struct hash_table, hash_get_n_buckets,
14930         hash_get_n_buckets_used, hash_get_n_entries,
14931         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
14932         hash_get_entries, hash_do_for_each, hash_string, is_prime,
14933         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
14934         Likewise.
14935         (SIZE_MAX): Define if not defined.
14936         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
14937         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
14938         hash_print):
14939         Use const * when possible.
14940         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
14941         (check_tuning): Fix bug: if tuning parameters were very close to
14942         0 or 1, rounding errors could have caused subscript violations.
14943         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
14944         (hash_initialize): Add 'fail:' label
14945         to free table and return NULL, and use it to simplify code.
14946         Use calloc rather than clearing the storage ourself.
14947         (hash_initialize, hash_rehash): Check for arithmetic overflow in
14948         buffer size calculations.
14949         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
14950         Include <stddef.h>, for size_t.
14951         * lib/hash-pjw.c (hash_pjw): Likewise.
14952         Switch to method described by Bruno Haible.
14953         Include <limits.h>, for CHAR_BIT.
14954         (SIZE_BITS): New macro.
14955
14956 2003-10-23  Paul Eggert  <eggert@twinsun.com>
14957
14958         * m4/getline.m4 (AM_FUNC_GETLINE):
14959         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
14960         hosts.  Problem reported by Derek Robert Price in
14961         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
14962         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
14963         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
14964
14965 2003-10-21  Paul Eggert  <eggert@twinsun.com>
14966
14967         * lib/getndelim2.c (getndelim2): When size calculation overflows,
14968         ceiling the allocation at NMAX bytes rather than silently
14969         discarding input bytes before NMAX is reached.  This makes
14970         a difference only if NMAX exceeds SIZE_MAX / 2.
14971
14972         * lib/obstack.c: Merge from glibc.
14973         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
14974         Add libc_hidden_def (_obstack_newchunk).
14975         (_obstack_free) [! defined _LIBC]: Remove.
14976         [defined _LIBC]: Make a strong alias from obstack_free, rather than
14977         a clone of the function body.
14978         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
14979         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
14980
14981         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
14982         glibc.
14983         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
14984         arg to memcpy.
14985
14986         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
14987         (obstack_ptr_grow_fast, obstack_int_grow_fast):
14988         Don't use lvalue casts, as GCC plans to remove support for them
14989         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
14990         was also present in the non-GCC version, indicating that this
14991         code had always been buggy and had never been widely used.
14992         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
14993         Use the fast variant of each macro, rather than copying the
14994         definiens of the fast variant; that way, we'll be more likely to
14995         catch future bugs in the fast variants.
14996
14997 2003-10-20  Bruno Haible  <bruno@clisp.org>
14998
14999         * modules/wait-process: New file.
15000         * MODULES.html.sh (func_all_modules): Add wait-process.
15001
15002 2003-10-20  Bruno Haible  <bruno@clisp.org>
15003
15004         * m4/wait-process.m4: New file.
15005
15006 2003-10-20  Bruno Haible  <bruno@clisp.org>
15007
15008         * lib/wait-process.h: New file, from GNU gettext.
15009         * lib/wait-process.c: New file, from GNU gettext.
15010
15011 2003-10-19  Jim Meyering  <jim@meyering.net>
15012
15013         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
15014         HPUX 10.20.
15015
15016 2003-10-18  Karl Berry  <karl@gnu.org>
15017
15018         * config/config.guess: update from config.
15019
15020 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15021
15022         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
15023         (getgroups): First arg is int, not size_t.
15024         Don't let 'free' mangle errno.
15025
15026 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15027
15028         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
15029
15030 2003-10-16  Karl Berry  <karl@gnu.org>
15031
15032         * config/config.{guess,sub}: update from config.
15033
15034 2003-10-16  Jim Meyering  <jim@meyering.net>
15035
15036         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
15037         memcpy.
15038
15039 2003-10-15  Paul Eggert  <eggert@twinsun.com>
15040
15041         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
15042         (SIZE_MAX): Remove.
15043         (new_exclude, add_exclude_file): Initial size no longer needs to
15044         be a power of 2.
15045         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
15046         our own address arithmetic overflow checking.
15047
15048         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
15049         (fnmatch): Do not alloca more than 2000 wide characters;
15050         instead, use malloc for large buffers.
15051         Check for address arithmetic overflow, and return -1
15052         with errno set to ENOMEM in that case.
15053         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
15054         (NEW_PATTERN): Do not alloca more than 8000 bytes;
15055         instead, return -1.  Check for address arithmetic overflow.
15056
15057 2003-10-14  Paul Eggert  <eggert@twinsun.com>
15058
15059         Handle invalid suffixes and overflow independently, so that
15060         callers can treat them independently as needed.  Fix some bugs in
15061         suffix handling, e.g., "100k@" was not diagnosed as an invalid
15062         suffix for a human-readable blocksize.  The major caller-visible
15063         change is the addition of a new
15064         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
15065         that both overflow and suffix chars were found.
15066
15067         * lib/human.c (humblock): Don't check separately for invalid suffix
15068         char; that is xstrtoumax's job (now that its bug is fixed).
15069         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
15070         INTMAX_MAX]: New macros.
15071         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
15072         TYPE_MAXIMUM): New macros.
15073         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
15074         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
15075         if overflow occurs, as it's what __strtol does and it's more useful
15076         in practice.
15077         (__xstrtol): If __strtol reports some error other than ERANGE,
15078         reflect it to the caller as LONGINT_INVALID.  If it reports
15079         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
15080         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
15081         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
15082         value.
15083         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
15084         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
15085         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
15086         [defined UINTMAX_MAX]: New macros.
15087
15088 2003-10-14  Bruno Haible  <bruno@clisp.org>
15089
15090         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
15091
15092 2003-10-14  Bruno Haible  <bruno@clisp.org>
15093
15094         * m4/sig_atomic_t: New file, from GNU gettext.
15095         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
15096
15097 2003-10-14  Bruno Haible  <bruno@clisp.org>
15098
15099         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
15100         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
15101         Also use volatile where needed.
15102
15103 2003-10-12  Paul Eggert  <eggert@twinsun.com>
15104
15105         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
15106         Change maintainer from Bruno Haible to 'all'.
15107
15108 2003-10-12  Paul Eggert  <eggert@twinsun.com>
15109
15110         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
15111
15112 2003-10-12  Paul Eggert  <eggert@twinsun.com>
15113
15114         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
15115         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
15116         and define in terms of the other primitives.
15117         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
15118         (SIZE_MAX): Define if not already defined.
15119         (array_size_overflow): New function.
15120         (xalloc_die): Abort instead of exiting if 'error' returns.
15121         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
15122         (xmalloc, xrealloc): Use them.
15123         (xcalloc): Check for address arithmetic overflow.
15124         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
15125         a bit faster than strcpy.
15126
15127 2003-10-10  Simon Josefsson  <jas@extundo.com>
15128
15129         * modules/argp (Depends-on): Add restrict and strcase.
15130
15131 2003-10-10  Simon Josefsson  <jas@extundo.com>
15132
15133         * m4/argp.m4: Add AC_C_INLINE.
15134
15135 2003-10-08  Paul Eggert  <eggert@twinsun.com>
15136
15137         Merge getpass from libc, plus a few fixes.
15138
15139         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
15140         Include <stdbool.h>.
15141         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
15142         __fsetlocking to empty.
15143         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
15144         do include <bits/libc-lock.h>.
15145         Do not include <fcntl.h>; not needed.
15146         [_LIBC]: Include <wchar.h>.
15147         (NOTCANCEL_MODE): New macro.
15148         (flockfile, funlockfile) [_LIBC]: New macros.
15149         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
15150         [!_LIBC]: New macros.
15151         (call_fclose): New function.
15152         (getpass): Use it.  Save tty stream separately; this simplifies the
15153         code and makes it more reliable if stdin happens to equal stdout.
15154         Invoke __fsetlocking on tty.
15155         Handle thread cancellation if needed.
15156         Namespace cleanup (use __tcgetattr, __getline).
15157         Use bool for Booleans.
15158         [USE_IN_LIBIO]: Handle wide streams.
15159         [!_LIBC]: Unconditionally do the fseek, since we don't know what
15160         stream might go where.
15161
15162         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
15163         doesn't have to include <stdio.h> before us.
15164         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
15165         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
15166         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
15167         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
15168         if not declared, so that we can use getpass.c code from libc without
15169         rewriting it.
15170         (flockfile, ftrylockfile, funlockfile): New macros.
15171
15172 2003-10-08  Paul Eggert  <eggert@twinsun.com>
15173
15174         * modules/getpass: Depend on stdbool.
15175
15176 2003-10-08  Paul Eggert  <eggert@twinsun.com>
15177
15178         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
15179
15180 2003-10-07  Karl Berry  <karl@gnu.org>
15181
15182         * config/config.{guess,sub}: update from config.
15183
15184 2003-10-06  Jim Meyering  <jim@meyering.net>
15185             Bruno Haible  <bruno@clisp.org>
15186
15187         This lets translators provide better translations for the
15188         "Written by ..." part of --version output.
15189         * lib/version-etc.h: Include stdarg.h.
15190         (version_etc_copyright): Declare as readonly.
15191         (version_etc): Make this function variadic with a NULL-terminated list
15192         of author name strings.
15193         (version_etc_va): New declaration.
15194         * lib/version-etc.c: Include stdarg.h, stdlib.h.
15195         (version_etc_copyright): Declare as readonly.
15196         (version_etc_va): New function. Provide a different translatable string
15197         for each possible number of authors < 10. Abbreviate when there are 10
15198         authors or more.
15199         (version_etc): Make this function variadic. Call version_etc_va.
15200         Suggestion from Gary V. Vaughan.
15201
15202         * lib/long-options.h (parse_long_options): Change prototype: the
15203         authors string is moved to the end and becomes variadic.
15204         * lib/long-options.c: Include stdarg.h.
15205         (parse_long_options): Make this function variadic, too.
15206         Call version_etc_va, not version_etc.
15207
15208 2003-10-06  Bruno Haible  <bruno@clisp.org>
15209
15210         * modules/version-etc-2: Remove file.
15211         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
15212
15213 2003-10-06  Bruno Haible  <bruno@clisp.org>
15214
15215         * modules/fatal-signal: New file.
15216         * MODULES.html.sh (func_all_modules): Add fatal-signal.
15217
15218 2003-10-06  Bruno Haible  <bruno@clisp.org>
15219
15220         * m4/fatal-signal.m4: New file.
15221         * m4/signalblocking.m4: New file, from GNU gettext.
15222
15223 2003-10-06  Bruno Haible  <bruno@clisp.org>
15224
15225         * lib/version-etc-2.h: Remove file.
15226         * lib/version-etc-2.c: Remove file.
15227
15228 2003-10-06  Bruno Haible  <bruno@clisp.org>
15229
15230         * lib/fatal-signal.h: New file, from GNU gettext.
15231         * lib/fatal-signal.c: New file, from GNU gettext.
15232
15233 2003-10-05  Paul Eggert  <eggert@twinsun.com>
15234
15235         * README: Rework advice for preventing empty .o files.
15236         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
15237         not <sys/types.h>.
15238
15239 2003-10-04  Karl Berry  <karl@gnu.org>
15240
15241         * lib/argp*: update from libc.
15242
15243 2003-10-04  Karl Berry  <karl@gnu.org>
15244
15245         * config/config.{guess,sub}: update from config.
15246
15247 2003-10-02  Bruno Haible  <bruno@clisp.org>
15248
15249         * modules/lchown (Include): Add lchown.h.
15250         * modules/time_r (Include): Use "..." syntax.
15251         * modules/xgetdomainname (Include): Add xgetdomainname.h.
15252
15253 2003-10-01  Simon Josefsson  <jas@extundo.com>
15254
15255         * MODULES.html.sh (func_all_modules): Move gethostname from section
15256         'based on' to section 'lacking' POSIX:2001.
15257
15258 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
15259
15260         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
15261         to output mode on the same stream.
15262
15263 2003-09-29  Paul Eggert  <eggert@twinsun.com>
15264
15265         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
15266         Fix arg typo in previous patch.
15267
15268 2003-09-28  Jim Meyering  <jim@meyering.net>
15269
15270         * lib/error.c: Correct cpp indentation.
15271
15272 2003-09-27  Paul Eggert  <eggert@twinsun.com>
15273
15274         * modules/free: New file.
15275
15276 2003-09-27  Paul Eggert  <eggert@twinsun.com>
15277
15278         * m4/free.m4: New file.
15279
15280 2003-09-27  Paul Eggert  <eggert@twinsun.com>
15281
15282         * lib/minmax.h (MIN, MAX)
15283         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
15284         Omit the special code that used __typeof__, since we worry that
15285         it could be more trouble than it's worth.  See:
15286         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
15287         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
15288
15289         * lib/free.c: New file.
15290
15291 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
15292
15293         Trivial fixes to Makefile.am parts of module listings.
15294         * modules/strstr: Append strstr.h to lib_SOURCES.
15295         * modules/strcase: Likewise, for strcase.h.
15296
15297 2003-09-27  Karl Berry  <karl@gnu.org>
15298
15299         * config/mkinstalldirs: update from automake.
15300
15301 2003-09-26  Paul Eggert  <eggert@twinsun.com>
15302
15303         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
15304         (error_tail): Do not loop, reallocating temporary buffer, since
15305         the output cannot contain more wide characters than the input
15306         contains bytes, the size must be big enough already.  This avoids
15307         one potential size overflow calculation.  Check for size overflow
15308         when calculating temporary buffer size.  Free temporary buffer
15309         when done, if it was allocated with malloc; this plugs a memory
15310         leak.  Remove casts from void * to pointers, that are no longer
15311         needed now that we're assuming C89 or better.
15312
15313         Merge error changes from glibc.
15314
15315         * lib/error.c, error.h: Update copyright notice header to match glibc.
15316         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
15317         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
15318         Disable cancellation while printing error.
15319         * lib/error.h: Prepend __ to parameter names.
15320
15321 2003-09-26  Jim Meyering  <jim@meyering.net>
15322
15323         * lib/error.c (error_tail): Move some declarations
15324         into inner scope where the local variables are used.
15325
15326 2003-09-26  Bruno Haible  <bruno@clisp.org>
15327
15328         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
15329         stpncpy().
15330         Don't define stpncpy through config.h; it's now done through stpncpy.h.
15331
15332 2003-09-26  Bruno Haible  <bruno@clisp.org>
15333
15334         * lib/stpncpy.h (gnu_stpncpy): New declaration.
15335         (stpncpy): Define as alias for gnu_stpncpy.
15336         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
15337
15338 2003-09-25  Simon Josefsson  <jas@extundo.com>
15339
15340         * lib/xgetdomainname.h: New file.
15341         * lib/xgetdomainname.c: New file.
15342
15343 2003-09-25  Simon Josefsson  <jas@extundo.com>
15344             Bruno Haible  <bruno@clisp.org>
15345
15346         * modules/getdomainname: New file.
15347         * modules/xgetdomainname: New file.
15348         * MODULES.html.sh (func_all_modules): Add getdomainname,
15349         xgetdomainname.
15350
15351 2003-09-25  Simon Josefsson  <jas@extundo.com>
15352             Bruno Haible  <bruno@clisp.org>
15353
15354         * m4/getdomainname.m4: New file.
15355
15356 2003-09-25  Simon Josefsson  <jas@extundo.com>
15357             Bruno Haible  <bruno@clisp.org>
15358
15359         * lib/getdomainname.h: New file.
15360         * lib/getdomainname.c: New file.
15361
15362 2003-09-25  Karl Berry  <karl@gnu.org>
15363
15364         * lib/argp-fmtstream.c, argp-help.c: update from libc.
15365
15366 2003-09-25  Karl Berry  <karl@gnu.org>
15367
15368         * config/install-sh: update from automake.
15369
15370 2003-09-25  Bruno Haible  <bruno@clisp.org>
15371
15372         * modules/version-etc-2: New file, from modules/version-etc with
15373         modifications.
15374         * MODULES.html.sh (func_all_modules): Add version-etc-2.
15375
15376 2003-09-25  Bruno Haible  <bruno@clisp.org>
15377
15378         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
15379         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
15380
15381 2003-09-24  Simon Josefsson  <jas@extundo.com>
15382
15383         * modules/xgethostname: Add xgethostname.h.
15384
15385 2003-09-24  Paul Eggert  <eggert@twinsun.com>
15386
15387         * lib/linebuffer.c (freebuffer): Don't free the argument, just
15388         the buffer associated with the argument.  Bug reported by
15389         Simon Josefsson.
15390
15391 2003-09-24  Paul Eggert  <eggert@twinsun.com>
15392
15393         * README: Document assumptions that 'int' is at least 32 bits
15394         wide, that integer arithmetic is 2's complement without overflow,
15395         that there are no holes in integer values, that adding sizes of
15396         two nonoverlapping objects can't overflow, and that all-bits-zero
15397         yields scalar zero.  Fix spelling and capitalization typos.
15398
15399 2003-09-19  Karl Berry  <karl@gnu.org>
15400
15401         * lib/argp.h: update from libc.
15402
15403 2003-09-17  Paul Eggert  <eggert@twinsun.com>
15404
15405         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
15406         to avoid spurious warnings like "AC_RUN_IFELSE was called before
15407         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
15408
15409 2003-09-17  Paul Eggert  <eggert@twinsun.com>
15410
15411         * gnulib-tool: Use "test -h", not "test -L", for portability
15412         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
15413         (tags_regexp): Remove, since \| doesn't conform to POSIX.
15414         (sed_extract_prog): Issue s commands one-by-one, rather than
15415         using \| in one s command.
15416
15417 2003-09-16  Paul Eggert  <eggert@twinsun.com>
15418
15419         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
15420         input error, instead of returning NULL the next time we are called
15421         (and therefore losing track of errno).
15422
15423 2003-09-16  Bruno Haible  <bruno@clisp.org>
15424
15425         * gnulib-tool (func_create_testdir): Warn about duplicated
15426         dependencies.
15427
15428 2003-09-15  Paul Eggert  <eggert@twinsun.com>
15429
15430         * modules/argmatch, modules/fatal, modules/obstack,
15431         modules/xalloc, modules/xgethostname: Sort dependencies by
15432         importance, not alphabetically.
15433
15434 2003-09-15  Paul Eggert  <eggert@twinsun.com>
15435
15436         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
15437         fails, so that the caller gets the proper errno.
15438
15439         * lib/readutmp.c (read_utmp): Likewise.
15440         Check for fstat error.  Close stream and free storage
15441         when failing.
15442
15443 2003-09-14  Karl Berry  <karl@gnu.org>
15444
15445         * config/srclist.txt (strdup.c): disable for c89 changes.
15446
15447 2003-09-14  Jim Meyering  <jim@meyering.net>
15448
15449         * lib/getloadavg.c: Correct cpp indentation.
15450         * lib/strdup.c: Likewise.
15451         * lib/vasnprintf.c: Likewise.
15452
15453 2003-09-14  Bruno Haible  <bruno@clisp.org>
15454
15455         * modules/fwriteerror: New file.
15456         * MODULES.html.sh (func_all_modules): Add fwriteerror.
15457
15458 2003-09-14  Bruno Haible  <bruno@clisp.org>
15459
15460         * lib/fwriteerror.h: New file.
15461         * lib/fwriteerror.c: New file.
15462
15463 2003-09-12  Paul Eggert  <eggert@twinsun.com>
15464
15465         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
15466         modules/xgethostname, modules/xalloc: Depend on exit.
15467
15468 2003-09-12  Paul Eggert  <eggert@twinsun.com>
15469
15470         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
15471
15472         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
15473         and AC_MINIX, too, so that their extensions are available.
15474
15475         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
15476         This macro has been superseded by gl_BACKUPFILE.
15477
15478         More patches to assume C89 or better.
15479
15480         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
15481
15482         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
15483         unconditionally.
15484         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
15485         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
15486         Include <string.h>, <stdlib.h> unconditionally.
15487         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
15488         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
15489         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
15490         headers or for string.h.
15491         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
15492         or strtoul.
15493
15494         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
15495         headers.
15496         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
15497         * m4/userspec.m4 (gl_USERSPEC): Likewise.
15498         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
15499         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
15500         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
15501         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
15502         memcpy, memset.
15503         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
15504         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
15505         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
15506         strtol.
15507         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
15508         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
15509         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
15510         strtoul.
15511
15512 2003-09-12  Paul Eggert  <eggert@twinsun.com>
15513
15514         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
15515         * lib/obstack.c [!defined _LIBC]: Likewise.
15516         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
15517         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
15518         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
15519
15520         More changes to assume C89 or better.
15521
15522         * lib/error.c (error_tail): Assume vprintf.
15523
15524         * lib/argmatch.c (getenv): Remove decl.
15525         * lib/progreloc.c (get_full_program_name): Define via prototype.
15526         * lib/setenv.c (clearenv): Likewise.
15527         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
15528         needed.
15529         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
15530         (malloc, memcpy): Remove decls.
15531         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
15532         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
15533         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
15534         (memcpy): Remove macro.
15535         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
15536         (__P): Remove.  All uses removed.
15537         (PTR): Remove.  All uses changed to void *.
15538         (CHAR_BIT, NULL): Remove.
15539         (spaces, zeros, memset_space, memset_zero)
15540         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
15541         Remove.
15542         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
15543         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
15544         Define with prototype.
15545         Remove now-unnecessary prototype decl.
15546         (extra_args_spec): Assume ANSI C.  All uses changed.
15547         (extra_args_spec_iso): Remove.
15548         (my_strftime, emacs_strftimeu): Define via prototype.
15549         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
15550         unconditionally.
15551         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
15552         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
15553         (strtoul, strtol): Remove decls.
15554         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
15555         LONG_MAX): Remove.
15556         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
15557         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
15558         (LOCALE_PARAM_PROTO): New macro.
15559         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
15560         (INTERNAL (strtol), strtol): Define with a prototype.
15561         (PARAMS): Remove.  All uses removed.
15562         * lib/tempname.c: Include <string.h> unconditionally.
15563         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
15564         * lib/xgethostname.c (main): Define with a prototype.
15565         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
15566         Include <stdlib.h> unconditionally.
15567         (calloc, malloc, realloc, free): Remove decls.
15568         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
15569         Include <stdlib.h> unconditionally.  Sort include file names.
15570         (strtod): Remove.
15571         (xstrtod): Define with a prototype.
15572         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
15573         (strtol, strtoul): Remove decls.
15574
15575 2003-09-11  Paul Eggert  <eggert@twinsun.com>
15576
15577         More patches to assume C89 or better.
15578         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
15579         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
15580         string.h, memchr, STDC_HEADERS.
15581
15582 2003-09-11  Paul Eggert  <eggert@twinsun.com>
15583
15584         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
15585         Include <stdlib.h>, <string.h> unconditionally.
15586         Remove now-unnecessary cast to char *.
15587         * lib/strnlen.c: Include <string.h> unconditionally.
15588         * lib/yesno.c (yesno): Define with a prototype.
15589
15590 2003-09-11  Bruno Haible  <bruno@clisp.org>
15591
15592         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
15593
15594 2003-09-10  Jim Meyering  <jim@meyering.net>
15595
15596         * lib/error.c: Correct indentation of cpp directives.
15597
15598 2003-09-10  Bruno Haible  <bruno@clisp.org>
15599
15600         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
15601         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
15602         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
15603         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
15604         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
15605         <stdlib.h> and <string.h> checks.
15606         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
15607         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
15608
15609 2003-09-10  Bruno Haible  <bruno@clisp.org>
15610
15611         * lib/strcspn.c: Include <string.h> unconditionally.
15612         * lib/strpbrk.c: Include <string.h> unconditionally.
15613         * lib/strstr.c: Include <string.h> unconditionally.
15614         * lib/unicodeio.c: Include <string.h> unconditionally.
15615         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
15616         * lib/unsetenv.c: Likewise.
15617         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
15618         * lib/yesno.c: Include <stdlib.h> unconditionally.
15619         (rpmatch): Add prototype.
15620
15621 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15622
15623         More patches to assume C89 or better.
15624         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
15625         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
15626         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
15627         or for string.h.
15628         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
15629         stdlib.h.
15630         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
15631         C headers.
15632         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
15633         string.h.
15634         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
15635         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
15636         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
15637         or for string.h.
15638         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
15639         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
15640         C headers.
15641         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
15642         memcpy.
15643         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
15644         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
15645         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
15646         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
15647         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
15648         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
15649         string.h, free.
15650         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
15651         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
15652         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
15653         C headers, or for string.h.
15654         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
15655         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
15656         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
15657         headers, memory.h, stdlib.h, string.h, strings.h.
15658         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
15659         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
15660         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
15661         strchr.
15662         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
15663         headers, memory.h, string.h.
15664         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
15665         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
15666         free.
15667         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
15668         headers.
15669         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
15670         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
15671         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
15672         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
15673         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
15674
15675 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15676
15677         More K&R removal.
15678
15679         * lib/acosl.c (main): Use a prototype.
15680         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
15681         tanl.c: Likewise.
15682
15683         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
15684
15685         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
15686         (getopt, etopt_long, getopt_long_only, _getopt_internal)
15687         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
15688         with a prototype.
15689         * lib/getopt.c (const): Remove macro.
15690         Include <string.h> unconditionally.
15691         (my_index): Remove; all uses changed to strchr.
15692         (strlen): Remove decl.
15693         (exchange): Remove forward decl; no longer needed.
15694         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
15695         Define with prototype.
15696         * lib/getopt1.c (const): Remove macro.
15697         (getopt_long, getopt_long_only, main): Define with prototype.
15698
15699         * lib/getugroups.c: Include <string.h> unconditionally.
15700
15701         * lib/getusershell.c: Include <stdlib.h> unconditionally.
15702         (getusershell, setusershell, endusershell, readname, main):
15703         Define with prototypes.
15704
15705         * lib/group-member.c: Include group-member.h first.
15706         Include <stdlib.h> unconditionally.
15707
15708         * lib/hard-locale.c: Include hard-locale.h first.
15709         Include <stdlib.h>, <string.h> unconditionally.
15710
15711         * lib/hash.c (free, malloc): Remove decls.
15712         Include <stdlib.h> unconditionally.
15713
15714         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
15715         (getenv): Do not declare.
15716
15717         * lib/idcache.c: Include <string.h> unconditionally.
15718
15719         * lib/long-options.c: Include long-options.h first, to test interface.
15720         Include <stdlib.h> unconditionally.
15721
15722         * lib/makepath.c: Include makepath.h first, to test interface.
15723         Include <stdlib.h> and <string.h> unconditionally.
15724
15725         * lib/linebuffer.c: Include <stdlib.h>.
15726         (free): Remove decl.
15727
15728         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
15729         stddef.h. rpl_malloc returns void *, not char *.
15730         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
15731         prototype.
15732
15733         * lib/md5.h: Include <limits.h> unconditionally.
15734         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
15735         (__P): Remove; all uses removed.
15736         * lib/md5.c: Include "md5.h" first.
15737         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
15738         md5_buffer, md5_process_bytes, md5_process_block):
15739         Define with prototypes.
15740         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
15741         * lib/sha.c: Include "sha.h" first.
15742         Include <stdlib.h>, <string.h> unconditionally.
15743
15744         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
15745         * lib/memcmp.c (__ptr_t): Likewise.
15746         * lib/memrchr.c (__ptr_t): Likewise.
15747         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
15748         Include <string.h> unconditionally.
15749         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
15750         * lib/memchr.c: Include <stdlib.h> unconditionally.
15751         * lib/memchr.c (LONG_MAX): Remove.
15752         * lib/memrchr.c (LONG_MAX): Likewise.
15753         * lib/memchr.c (__memchr): Define via a prototype.
15754         * lib/memrchr.c (__memrchr): Likewise.
15755         * lib/memcmp.c (__P): Remove, and remove all uses.
15756         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
15757         Remove forward decls; no longer needed.
15758         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
15759         Use types required by C89 in prototype.
15760
15761         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
15762         * lib/savedir.c: Likewise.
15763         * lib/mkdir.c (free): Remove decl.
15764         * lib/rmdir.c (rmdir): Define with a prototype.
15765         * lib/savedir.c: Include savedir.h first, to test interface.
15766
15767         * lib/mktime.c (STDC_HEADERS): Remove.
15768         Include <stdlib.h>, <string.h> unconditionally.
15769
15770         * lib/modechange.c: Include <stdlib.h> unconditionally.
15771         (malloc): Remove decl.
15772
15773         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
15774         (free): Remove decl.
15775
15776         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
15777         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
15778         (This type really should be intptr_t, but that's a C99ism.)
15779         (_obstack_memcpy): Remove: all uses changed to memcpy.
15780         Include <string.h> unconditionally.
15781         (struct obstack): Assume __STDC__ for types of members
15782         chunkfun, freefun, extra_arg.
15783         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
15784         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
15785         obstack_begin, obstack_specify_allocation,
15786         obstack_specify_allocation_with_arg, obstack_chunkfun,
15787         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
15788         Remove unprototyped decls and the macros that use them.
15789         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
15790         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
15791         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
15792         (defined __STDC__ && __STDC__)]:
15793         Remove nonprototyped code.
15794         Include <stdlib.h> unconditionally.
15795         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
15796         _obstack_allocated_p, _obstack_free, obstack_free,
15797         _obstack_memory_used, print_and_abort):
15798         Define using prototypes.
15799         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
15800         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
15801         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
15802         obstack_next_free, obstack_object_size, obstack_room) [0]:
15803         Remove unused, unprototyped code.
15804
15805         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
15806
15807         * lib/physmem.c (physmem_total, physmem_available, main): Define
15808         with prototypes.
15809
15810         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
15811         (main): Define with a prototype.
15812
15813         * lib/posixver.c (getenv): Remove decl.
15814
15815         * lib/putenv.c (malloc): Returns void *, not char *.
15816         Include <string.h> unconditionally.
15817         (strchr, memcpy, NULL): Do not define.
15818
15819         * lib/readtokens.c: Include readtokens.h first, to test interface.
15820         Include <stdlib.h>, <string.h> unconditionally.
15821         (init_tokenbuffer): Define with a prototype.
15822
15823         * lib/regex.c (PARAMS): Remove.  All uses removed.
15824         All uses of _RE_ARGS removed, too.
15825         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15826         unconditionally.
15827         (bzero): Assume memset exists.
15828         (memcmp, memcpy, NULL): Remove.
15829         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
15830         char, or assignments to local vars of type signed char.
15831         (init_syntax_once, PREFIX(extract_number_and_incr),
15832         PREFIX(print_partial_compiled_pattern),
15833         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
15834         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
15835         PREFIX(regex_grow_registers), PREFIX(regex_compile),
15836         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
15837         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
15838         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
15839         wcs_compile_range, byte_compile_range, truncate_wchar,
15840         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
15841         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
15842         count_mbs_length, wcs_re_match_2_internal,
15843         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
15844         PREFIX(alt_match_null_string_p),
15845         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
15846         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
15847         regfree, PREFIX(extract_number)): Define with prototype.  Remove
15848         now-unnecessary declaration, if any.
15849         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
15850         regcomp, regexec):
15851         Remove now-unnecessary casts among pointer types.
15852         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
15853
15854         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
15855         (free): Remove decl.
15856
15857         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
15858
15859         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
15860         (free): Remove decl.
15861
15862         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
15863         * lib/xgetcwd.c: Likewise.
15864
15865         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
15866         (free): Remove decl.
15867
15868         * lib/strchrnul.c (strchrnul): Define with a prototype.
15869         Fix bug: c_in was not converted to char before searching.
15870
15871         The following changes are not K&R related:
15872
15873         * lib/group-member.h: Include <sys/types.h>, so that this file is
15874         self-contained.
15875         * lib/makepath.h: Likewise.
15876
15877         * lib/getusershell.c (readname, default_index, line_size, readname):
15878         Use size_t, not int, for sizes.
15879         (readname): If the size overflows, report an error instead of
15880         looping forever.
15881
15882 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15883
15884         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
15885         libc.
15886
15887 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15888
15889         * README: New section: portability guidelines.
15890
15891 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
15892
15893         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
15894         C89 spec.
15895
15896 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
15897
15898         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
15899
15900 2003-09-08  Paul Eggert  <eggert@twinsun.com>
15901
15902         Assume C89 or better; remove K&R cruft.
15903         A few of these changes were first proposed by Derek Robert Price
15904         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
15905
15906         * lib/addext.c: Include <string.h> unconditionally.
15907         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
15908         Don't declare getenv or malloc.
15909
15910         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
15911         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
15912         (NULL): Remove.
15913         (find_stack_direction, alloca): Use prototypes.
15914
15915         * lib/atexit.c (atexit): Define using a prototype.
15916
15917         * lib/basename.c, dirname.c, stripslash.c:
15918         Include <string.h> unconditionally.
15919
15920         * lib/bcopy.c: Include <stddef.h>.
15921         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
15922
15923         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
15924
15925         * lib/error.h (error, error_at_line, error_print_progname)
15926         [! (defined (__STDC__) && __STDC__)]: Remove decls.
15927         * lib/error.c: Include error.h first, to check interface.
15928         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
15929         (VA_START): Remove; all uses changeed to va_start.
15930         (exit, strerror): Remove decls.
15931         (error_print_progname): Prototype uncondionally.
15932         Don't include <errno.h>; no longer needed.
15933         (private_strerror): Remove.
15934         (error_tail): Always define.
15935         (error, error_at_line): Assume C89 or better; always use prototypes.
15936         * lib/fatal.c: Include "fatal.h" first, to test interface.
15937         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
15938         (VA_START): Remove; all uses changed to va_start.
15939         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
15940         this case.
15941         (exit): Remove decl.
15942         (fatal): Prototype unconditionally.  Assume va_start works.
15943         Abort at end, to pacify gcc.
15944
15945         * lib/euidaccess.c (main): Define with a prototype.
15946
15947         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
15948
15949         * lib/exitfail.c: Include <stdlib.h> unconditionally.
15950
15951         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
15952         prototypes.
15953         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
15954         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
15955         (getenv): Remove decl.
15956         (fnmatch): Define using a prototype.
15957         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
15958         (FCT): Define using a prototype.
15959
15960         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
15961
15962         * lib/gethostname.c: Include <stddef.h>.
15963         (gethostname): Define with prototype.  Length is size_t, not int.
15964
15965 2003-09-08  Paul Eggert  <eggert@twinsun.com>
15966
15967         Assume C89 or better; remove K&R cruft.
15968         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
15969         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
15970         string.h, getenv, malloc.
15971         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
15972         headers.
15973         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
15974         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
15975         do not check for strerror.
15976         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
15977         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
15978         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
15979         do not check for doprnt or vprintf.
15980         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
15981         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
15982
15983 2003-09-08  Paul Eggert  <eggert@twinsun.com>
15984
15985         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
15986         getversion.c should have been removed then, but was accidentally
15987         preserved.
15988
15989         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
15990         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
15991
15992 2003-09-08  Karl Berry  <karl@gnu.org>
15993
15994         * config/config.sub, config.guess, srclistvars.sh: update from savannah
15995                 config, forget about prep.
15996
15997         * config/depcomp, missing: update from automake.
15998
15999 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16000
16001         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
16002         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16003
16004 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16005
16006         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
16007         copy_tm_result.  Bug reported by Simon Josefsson in
16008         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16009
16010 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16011
16012         * m4/time_r.m4: New file.
16013         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
16014         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
16015         is. Check for timegm declaration.
16016         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
16017         Do not check for gmtime_r.
16018         Replace mktime if __mktime_internal does not exist and if mktime
16019         hasn't been replaced already.
16020
16021 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16022
16023         * lib/time_r.c, time_r.h: New files.
16024
16025         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
16026         __localtime_r.
16027         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
16028         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
16029
16030         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
16031         __gmtime_r.
16032         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
16033         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
16034         Include <time_r.h>.
16035
16036         * lib/timegm.c: Switch to glibc implementation, with the following
16037         changes:
16038         [defined HAVE_CONFIG_H]: Include <config.h>.
16039         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
16040         (__mktime_internal) [!defined _LIBC]: New decl.
16041         (__gmtime_r) [!defined _LIBC]: New macro and function.
16042         (timegm): Use a prototype, since gnulib assumes C89.
16043         Do not bother declaring tmp to be const, as it's not really usefu.
16044         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
16045         (timegm): Declare only if HAVE_DECL_TIMEGM.
16046
16047 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16048
16049         * MODULES.html.sh (func_all_modules): Add time_r.
16050         * modules/time_r: New file.
16051         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
16052         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
16053
16054 2003-09-03  Paul Eggert  <eggert@twinsun.com>
16055
16056         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
16057         Bug reported by Lute Kamstra in
16058         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
16059
16060         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
16061         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
16062         course with correspondingly smaller numbers for tomorrow and
16063         yesterday.  From Tadayoshi Funaba.  Originally installed into
16064         sh-utils on 1999-08-07, but the patch got lost (I guess during the
16065         coreutils merge?).
16066
16067 2003-08-31  Simon Josefsson  <jas@extundo.com>
16068
16069         * modules/timegm: New file.
16070         * MODULES.html.sh (func_all_modules): Add timegm.
16071
16072 2003-08-31  Simon Josefsson  <jas@extundo.com>
16073
16074         * m4/timegm.m4: New file.
16075
16076 2003-08-31  Simon Josefsson  <jas@extundo.com>
16077
16078         * lib/timegm.h: New file.
16079         * lib/timegm.c: New file.  Based on
16080         wget-1.8.2/src/http.c:mktime_from_utc.
16081
16082 2003-08-31  Karl Berry  <karl@gnu.org>
16083
16084         * lib/argp.h: update from libc.
16085
16086 2003-08-28  Bruno Haible  <bruno@clisp.org>
16087
16088         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
16089         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
16090         followed by '#define fnmatch fnmatch_posix' gives an error.
16091
16092 2003-08-28  Bruno Haible  <bruno@clisp.org>
16093
16094         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
16095         warning on QNX, which defines O_BINARY to 000000.
16096
16097 2003-08-27  Jim Meyering  <jim@meyering.net>
16098
16099         * m4/mkstemp.m4: Require that the system mkstemp be able to create
16100         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
16101         would fail after 32.  Reported by Danny Levinson.  Details here:
16102         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
16103
16104 2003-08-24  Bruno Haible  <bruno@clisp.org>
16105
16106         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
16107         MSVC7 <stdio.h> is included later.
16108
16109 2003-08-22  Simon Josefsson  <jas@extundo.com>
16110
16111         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
16112
16113 2003-08-20  Karl Berry  <karl@gnu.org>
16114
16115         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
16116
16117 2003-08-20  Bruno Haible  <bruno@clisp.org>
16118
16119         * modules/progname: New file.
16120         * MODULES.html.sh (func_all_modules): Add progname.
16121
16122 2003-08-20  Bruno Haible  <bruno@clisp.org>
16123
16124         * lib/progname.h: New file, from GNU gettext.
16125         * lib/progname.c: New file, from GNU gettext.
16126         * lib/progreloc.c: New file, from GNU gettext.
16127
16128 2003-08-19  Jim Meyering  <jim@meyering.net>
16129
16130         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
16131         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
16132
16133 2003-08-19  Bruno Haible  <bruno@clisp.org>
16134
16135         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
16136         more.
16137
16138 2003-08-19  Bruno Haible  <bruno@clisp.org>
16139
16140         * lib/xstrdup.c: Assume <string.h> exists.
16141
16142 2003-08-18  Paul Eggert  <eggert@twinsun.com>
16143
16144         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
16145         in makefile rules.
16146
16147 2003-08-18  Jim Meyering  <jim@meyering.net>
16148
16149         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
16150         * m4/lib-ld.m4: Likewise.
16151
16152 2003-08-18  Jim Meyering  <jim@meyering.net>
16153
16154         * lib/setenv.h: Indent nested cpp directive.
16155         * lib/vasnprintf.c: Remove trailing blanks.
16156
16157 2003-08-17  Simon Josefsson  <jas@extundo.com>
16158
16159         * modules/xstrndup: New file.
16160         * MODULES.html.sh (func_all_modules): Add xstrndup.
16161
16162 2003-08-17  Simon Josefsson  <jas@extundo.com>
16163
16164         * modules/argp: Fix autoconf macro name. Add more dependencies.
16165
16166 2003-08-17  Simon Josefsson  <jas@extundo.com>
16167
16168         * m4/xstrndup.m4: New file.
16169
16170 2003-08-17  Simon Josefsson  <jas@extundo.com>
16171
16172         * m4/argp.m4: New file.
16173
16174 2003-08-17  Simon Josefsson  <jas@extundo.com>
16175             Bruno Haible  <bruno@clisp.org>
16176
16177         * lib/xstrndup.h: New file.
16178         * lib/xstrndup.c: New file.
16179
16180 2003-08-17  Bruno Haible  <bruno@clisp.org>
16181
16182         * modules/strndup (Files, Include): Add lib/strndup.h.
16183
16184 2003-08-17  Bruno Haible  <bruno@clisp.org>
16185
16186         * modules/euidaccess (Files): Add lib/euidaccess.h.
16187
16188 2003-08-17  Bruno Haible  <bruno@clisp.org>
16189
16190         * lib/strndup.h: New file.
16191
16192 2003-08-17  Bruno Haible  <bruno@clisp.org>
16193
16194         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
16195         like AC_GNU_SOURCE.
16196         * modules/extensions (configure.ac): Comment out the invocation of
16197         gl_USE_SYSTEM_EXTENSIONS.
16198
16199 2003-08-16  Paul Eggert  <eggert@twinsun.com>
16200
16201         Merges from coreutils, etc.
16202         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
16203         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
16204         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
16205         fixing a typo.
16206         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
16207         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
16208
16209 2003-08-16  Paul Eggert  <eggert@twinsun.com>
16210
16211         Document merge from coreutils.
16212         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
16213         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
16214         * modules/utime: Add m4/utimes-null.m4.
16215
16216 2003-08-16  Paul Eggert  <eggert@twinsun.com>
16217
16218         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
16219         space, undoing this 2003-08-12 change:
16220         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
16221
16222 2003-08-16  Paul Eggert  <eggert@twinsun.com>
16223
16224         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
16225         strtoul.c from libc, undoing this 2003-08-12 change:
16226         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
16227
16228 2003-08-16  Jim Meyering  <jim@meyering.net>
16229
16230         Merges from coreutils.
16231         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
16232         prefix.  Adjust cache variables similarly.  Create 500 rather than
16233         just 300 files, to exercise bug on Darwin6.5, too.
16234         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
16235         $missing_dir.
16236         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
16237         AM_SYS_POSIX_TERMIOS.
16238         Reported by mkc@mathdogs.com.
16239         Also change use of $am_cv_sys_posix_termios
16240         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
16241         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
16242         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
16243         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
16244         in /proc/mounts until it finds one with matching device number.  This
16245         is unnecessary when the FILE argument *is* a mount point.  No stat call
16246         is necessary in that case.  So, disable the statvfs-testing code on
16247         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
16248         as RedHat bug# 84846.
16249         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
16250         to 1MB, so as not to render systems with no stack size limit (e.g.,
16251         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
16252         Include <unistd.h>.  On some systems,
16253         it is required for the definition of _SC_PAGESIZE.
16254
16255 2003-08-16  Jim Meyering  <jim@meyering.net>
16256
16257         Merge from coreutils.
16258         * lib/xstrtoimax.c: #else #if -> #elif.
16259         * lib/xstrtoumax.c: Likewise.
16260
16261 2003-08-16  Jim Meyering  <jim@meyering.net>
16262
16263         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
16264         * m4/utimes.m4: Removed.
16265         * m4/utimes-null.m4: Renamed from utimes.m4.
16266
16267         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
16268         to 1MB, so as not to render systems with no stack size limit (e.g.,
16269         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
16270         Include <unistd.h>.  On some systems,
16271         it is required for the definition of _SC_PAGESIZE.
16272
16273 2003-08-16  Jim Meyering  <jim@meyering.net>
16274         and Paul Eggert  <eggert@cs.ucla.edu>
16275
16276         Merges from coreutils, etc.
16277
16278         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
16279         using the latest version from cvs.  This avoids problems with #line
16280         directives using a vendor (Sun) compiler.
16281         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
16282         Don't set GETGROUPS_LIB here; now it's
16283         done via getgroups.m4's wrapper function.
16284         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
16285         rather than just in sh-util/configure.in, so that the
16286         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
16287         same.
16288         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
16289         AC_FUNC_GETLOADAVG where to find getloadavg.c.
16290         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
16291         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
16292         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
16293         Remove code that is now done by the newly-required macros.
16294         Append $(EXEEXT) to DF_PROG.
16295         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
16296         Do not invoke or require the following here,
16297         since prereq.m4 or some gnulib .m4 now does this for us:
16298         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
16299         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
16300         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
16301         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
16302         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
16303         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
16304         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
16305         AC_FUNC_OBSTACK.
16306         Do not replace the following functions, as this is now the job
16307         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
16308         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
16309         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
16310         atexit getpass, strdup, getpagesize.
16311         Replace 'raise'.
16312         Do not check for the following functions, as this is now the job
16313         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
16314         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
16315         setregid.
16316         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
16317         Check for sys/sysctl.h.
16318         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
16319         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
16320         of checking for ssize_t ourselves.
16321
16322         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
16323         Require every macro that gnulib/modules/* suggests for us.
16324         (jm_PREREQ_ADDEXT): New macro.
16325         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
16326         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
16327
16328         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
16329         (gl_PHYSMEM): Use it.
16330         Also check for `table' function.
16331         Check for new headers and functions.
16332         Add check for sys/sysmp.h.
16333         With suggestions from Kaveh Ghazi.
16334         Ignore headers that are present but cannot be compiled.  This
16335         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
16336         C 5.4.
16337
16338 2003-08-15  Paul Eggert  <eggert@twinsun.com>
16339
16340         Document merge from coreutils.
16341         * modules/userspec: Depend on posixver.
16342         * modules/strftime: Depend on tzset.
16343
16344 2003-08-15  Paul Eggert  <eggert@twinsun.com>
16345
16346         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
16347         rather than tab, after '#' in shell-script copyright notices.
16348         Suggested by Bruno Haible.
16349
16350 2003-08-15  Paul Eggert  <eggert@twinsun.com>
16351
16352         * config/srclist-update: Use three spaces, rather than tab, after '#'
16353         in shell-script copyright notices.  Suggested by Bruno Haible.
16354         Remove unnecessary parenthesization in regular expression.
16355
16356 2003-08-15  Jim Meyering  <jim@meyering.net>
16357
16358         Merge from coreutils.
16359         * lib/xgethostname.c: Include <stdlib.h>.
16360         (xghostname): Don't exit for anything other than memory-related
16361         failure; just return NULL.
16362         * lib/userspec.c: Include "posixver.h".
16363         (parse_user_spec): Accept `.' as a separator only
16364         in pre-POSIX-200112 mode.
16365         * lib/strtoimax.c: Use #elif rather than #else #if.
16366         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
16367         Remove function, now that we can rely on a working tzset function.
16368         [!_LIBC]: Ensure that the required autoconf test has been run.
16369         [!defined _NL_CURRENT && HAVE_STRFTIME]:
16370         Use underlying_strftime for %r.
16371         * lib/sha.c: Merge in some clean-up and optimization changes from
16372         glibc.
16373         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
16374         Ensure that it is a multiple of 64.
16375         Rearrange loop exit tests so as to avoid performing an
16376         additional fread after encountering an error or EOF.
16377         * lib/realloc.c: Update copyright date.
16378
16379 2003-08-15  Jim Meyering  <jim@meyering.net>
16380         and Paul Eggert  <eggert@twinsun.com>
16381
16382         Merge from coreutils.
16383         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
16384         member but strut utmpx does not.  Needed for AIX 4.3.3.
16385         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
16386
16387 2003-08-15  Jim Meyering  <jim@meyering.net>
16388         and Paul Eggert  <eggert@cs.ucla.edu>
16389
16390         Merges from coreutils, etc.
16391         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
16392         Require gl_FUNC_TZSET_CLOBBER.
16393         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
16394         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
16395         members.
16396
16397 2003-08-14  Paul Eggert  <eggert@twinsun.com>
16398
16399         Help the merge from coreutils.
16400         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
16401         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
16402         * m4/tzset.m4: Use it too.
16403
16404 2003-08-14  Paul Eggert  <eggert@twinsun.com>
16405
16406         * modules/tzset: New file.
16407
16408 2003-08-14  Jim Meyering  <jim@meyering.net>
16409
16410         Merges from coreutils.
16411         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
16412         variable names, rather than @FNMATCH_H@.
16413         * modules/alloca: Likewise for $(ALLOCA_H).
16414
16415         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
16416         the three copies of the literal target, `fnmatch.h'.
16417         * modules/alloca (alloca.h): Likewise.
16418
16419 2003-08-14  Jim Meyering  <jim@meyering.net>
16420
16421         Merge from coreutils.
16422         * m4/tzset.m4: New file.
16423         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
16424         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
16425         otherwise, AIX 5.1 systems would end up using the latter.
16426         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
16427         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
16428         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
16429         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
16430
16431 2003-08-14  Jim Meyering  <jim@meyering.net>
16432
16433         Merge from coreutils.
16434         * lib/obstack.h: Whitespace changes.
16435         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
16436         and xcalloc return values.
16437         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
16438         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
16439         hang on OSF/1 5.1 for DIR on both local and remote file systems.
16440         Reported by (and fix confirmed by) Nelson H. F. Beebe.
16441         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
16442         error from mntctl.
16443         Use mntctl's return value to drive the entry-processing loop, since
16444         we can't rely on the value of the vmt_length member in the last
16445         entry.  On some systems doing so could result in exhausting
16446         virtual memory.  Based in part on a patch from Mike Jetzer.
16447
16448 2003-08-14  Jim Meyering  <jim@meyering.net>
16449         and Paul Eggert  <eggert@twinsun.com>
16450
16451         Merges from coreutils, plus other fixes.
16452         * lib/physmem.c: Merge in portability changes from gcc/libiberty
16453         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
16454         for credits and details.  Thanks to Kaveh Ghazi for helping
16455         to keep these files in sync.
16456         (ARRAY_SIZE): Define it.
16457         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
16458         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
16459         (memcasecmp): Don't assume size_t fits in unsigned int.
16460         Remove casts and duplicate code.
16461         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
16462         (memcpy): Remove definition.
16463         Merge in some clean-up and optimization changes from glibc.
16464         [BLOCKSIZE]: Move definition to top of file.
16465         Ensure that it is a multiple of 64.
16466         Rearrange loop exit tests so as to avoid performing an
16467         additional fread after encountering an error or EOF.
16468         * lib/md5.h (md5_uintptr): Define.
16469         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
16470         return to the initial working directory.  Preserve errno
16471         for caller.
16472         * lib/idcache.c: Include "xalloc.h".
16473         (xmalloc, xrealloc): Remove decls.
16474         (getuser): Remove casts no longer required in C89.
16475         * lib/human.c: Include stdio.h, for sprintf.
16476         * lib/group-member.c: Include "xalloc.h".
16477         (xmalloc, xrealloc): Remove decls.
16478         (get_group_info): Remove casts no longer required in C89.
16479         * lib/getusershell.c (readname): Remove casts no longer required in
16480         C89.
16481         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
16482         * lib/getline.c: Whitespace fix, from coreutils.
16483
16484 2003-08-13  Paul Eggert  <eggert@twinsun.com>
16485
16486         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
16487         Check for isascii.
16488
16489         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
16490         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
16491         Undo previous (whitespace-only) change.
16492
16493 2003-08-13  Paul Eggert  <eggert@twinsun.com>
16494
16495         * lib/exclude.c: Include <ctype.h>
16496         (IN_CTYPE_DOMAIN): New macro.
16497         (is_space): New fn.
16498         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
16499         and empty lines.
16500
16501         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
16502         Undo previous (whitespace-only) change.
16503
16504 2003-08-13  Paul Eggert  <eggert@twinsun.com>
16505
16506         * config/srclist-update: Change update back to the old behavior,
16507         leaving whitespace alone.  Use one 'sed' command rather than a
16508         pipeline.
16509         (fixlicense): Now a variable, not a function.
16510         (remove_trailing_blanks): Remove.
16511         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
16512         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
16513         Undo previous (whitespace-only) change.
16514
16515 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16516
16517         Merge from coreutils.
16518         * modules/euidaccess: Add lib_SOURCES, include for new
16519         file euidaccess.h
16520
16521 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16522
16523         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
16524         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
16525         Normalize leading white space and remove trailing white space.
16526
16527         Merge from coreutils
16528         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
16529
16530         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
16531         0.12.1.  These files are now being upgraded automatically by
16532         ../config/srclist-update.
16533
16534 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16535
16536         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
16537         Normalize leading white space and remove trailing white space.
16538         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
16539         notice, as per ../config/srclist-update.
16540
16541         Merge from coreutils.
16542         * lib/euidaccess.h: New file.
16543         * lib/euidaccess.c: Include it.
16544         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
16545         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
16546         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
16547
16548 2003-08-12  Paul Eggert  <eggert@twinsun.com>
16549
16550         * config/srclist-update: Add copyright notice.
16551         (remove_id_lines, remove_trailing_blanks): New constants.
16552         (fixfile): Use them to normalize spacing a bit in copied files.
16553         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
16554         Normalize leading white space and remove trailing white space.
16555
16556         * config/texinfo.tex: Sync with texinfo.
16557
16558         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
16559         strtoul.c from libc, to merge coreutils whitespace changes.
16560
16561         * config/srclist.txt: Get the following m4 files from gettext:
16562         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
16563         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
16564         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
16565         wint_t.m4.
16566
16567 2003-08-12  Karl Berry  <karl@gnu.org>
16568
16569         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
16570         been made.
16571
16572 2003-08-11  Paul Eggert  <eggert@twinsun.com>
16573
16574         * modules/gnu-source, m4/gnu-source.m4:
16575         Remove; we're assuming Autoconf 2.54 or later now.
16576         Suggested by Bruno Haible.
16577         * MODULES.html.sh (func_all_modules): Remove gnu-source.
16578
16579 2003-08-11  Bruno Haible  <bruno@clisp.org>
16580
16581         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
16582
16583 2003-08-11  Bruno Haible  <bruno@clisp.org>
16584
16585         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
16586         (vasnprintf): Use it instead of wcslen.
16587
16588 2003-08-11  Bruno Haible  <bruno@clisp.org>
16589
16590         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
16591         value to ensure that _Bool promotes to int. Use #define for _Bool when
16592         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
16593
16594 2003-08-10  Karl Berry  <karl@gnu.org>
16595
16596         * lib/regex.h: update from libc (whitespace fix).
16597
16598 2003-08-09  Paul Eggert  <eggert@twinsun.com>
16599
16600         Merge some files from coreutils.  These changes were
16601         originally made by Jim Meyering.
16602         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
16603         many older Unixes require this.
16604         * lib/alloca.c (alloca): Remove cast to argument of free;
16605         no longer needed in C89.
16606         * lib/alloca_.h, regex.h: Fix white space to match
16607         what GNU indent does.
16608
16609 2003-08-09  Paul Eggert  <eggert@twinsun.com>
16610
16611         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
16612         apparently Emacs's Unicode mode got confused before my 2003-08-05
16613         checkin.
16614
16615 2003-08-08  Paul Eggert  <eggert@twinsun.com>
16616
16617         * m4/extensions.m4: New file.
16618         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
16619         Require gl_USE_SYSTEM_EXTENSIONS.
16620         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
16621         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
16622
16623 2003-08-08  Paul Eggert  <eggert@twinsun.com>
16624
16625         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
16626         * modules/extensions, modules/gnu-source: New files.
16627         * modules/timespec, modules/unlocked-io: Depend on extensions.
16628
16629 2003-08-07 Paul Eggert  <eggert@twinsun.com>
16630
16631         * modules/restrict: New file.
16632         * MODULES.html.sh (func_all_modules): Add restrict.
16633         * modules/regex: Depend on restrict.
16634
16635 2003-08-07  Paul Eggert  <eggert@twinsun.com>
16636
16637         * m4/restrict.m4: New file.
16638         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
16639
16640 2003-08-07  Bruno Haible  <bruno@clisp.org>
16641
16642         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
16643         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
16644
16645 2003-08-07  Bruno Haible  <bruno@clisp.org>
16646
16647         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
16648         makes the module 'getndelim2' compatible with the module 'getline'.
16649
16650 2003-08-05  Paul Eggert  <eggert@twinsun.com>
16651
16652         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
16653         byte with "\201" to avoid glitches when editing that source file
16654         with multi-gnome-terminal.
16655
16656 2003-08-05  Paul Eggert  <eggert@twinsun.com>
16657
16658         * lib/bumpalloc.h: Remove.
16659
16660 2003-08-05  Paul Eggert  <eggert@twinsun.com>
16661
16662         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
16663         * modules/bumpalloc: Remove.
16664
16665 2003-08-04  Paul Eggert  <eggert@twinsun.com>
16666
16667         * lib/getloadavg.c: Change copyright notice and spacing to conform to
16668         GNU coding style.
16669
16670         Merge from coreutils.
16671         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
16672         1. From glibc.
16673         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
16674         from Karl Berry, implemented by Jim Meyering.
16675         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
16676         from Dmitry V. Levin.
16677         Remove anachronistic cast of xrealloc.
16678         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
16679         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
16680         type. Otherwise, it wouldn't compile with at least /bin/cc on
16681         ymp-cray-unicos9.0.2.X.
16682         Combine two mostly-identical uses of alloca into one.
16683         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
16684
16685 2003-08-04  Dave Love <d.love@dl.ac.uk>
16686
16687         [From Emacs.]
16688
16689         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
16690         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
16691         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
16692         obsolete NLIST_NAME_UNION.
16693         [__GNU__]: Undef BSD and FSCALE.
16694         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
16695
16696 2003-08-03  Paul Eggert  <eggert@twinsun.com>
16697
16698         * lib/stdbool_.h (_Bool): Make it signed char, instead of
16699         an enum type, so that it's guaranteed to promote to int.  See:
16700         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
16701
16702 2003-08-03  Karl Berry  <karl@gnu.org>
16703
16704         * config/depcomp: update from automake.
16705
16706 2003-07-31  Paul Eggert  <eggert@twinsun.com>
16707
16708         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
16709         (strerror): Don't assume that a printable int fits in 14 bytes.
16710
16711 2003-07-31  Bruno Haible  <bruno@clisp.org>
16712
16713         * modules/getpass-gnu: New file.
16714         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
16715
16716 2003-07-31  Bruno Haible  <bruno@clisp.org>
16717
16718         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
16719
16720 2003-07-24  Karl Berry  <karl@gnu.org>
16721
16722         * config/missing: update from automake.
16723
16724 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
16725             Bruno Haible  <bruno@clisp.org>
16726
16727         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
16728         * lib/getline.c (getline, getdelim): Likewise.
16729         Remove _GNU_SOURCE define; now it's defined in config.h through
16730         m4/getline.m4.
16731
16732 2003-07-23  Karl Berry  <karl@gnu.org>
16733
16734         * config/config.sub: update from prep.
16735
16736 2003-07-22  Paul Eggert  <eggert@twinsun.com>
16737
16738         * modules/xalloc (Depends-on): Add exitfail.
16739         * modules/xmemcoll: Likewise.
16740
16741 2003-07-22  Paul Eggert  <eggert@twinsun.com>
16742
16743         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
16744         over-parenthesization in macros.
16745
16746         Sync with coreutils.
16747
16748         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
16749         required by C99.
16750
16751         Use `exit_failure' for xalloc and xmemcoll instead of their own
16752         private exit-failure variables.
16753         * lib/xalloc.h (xalloc_exit_failure): Remove.
16754         * lib/xmalloc.c: Likewise.  Include exitfail.h.
16755         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
16756         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
16757         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
16758         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
16759
16760 2003-07-20  Jim Meyering  <jim@meyering.net>
16761
16762         * modules/closeout (Depends-on): Add exitfail.
16763         Suggestion from Bruno Haible.
16764
16765 2003-07-19  Karl Berry  <karl@gnu.org>
16766
16767         * config/config.sub: update from prep.
16768
16769 2003-07-18  Paul Eggert  <eggert@twinsun.com>
16770
16771         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
16772         Remove.
16773         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
16774         to test that it can stand by itself.  Include "exitfail.h".
16775         Clients should set exit_failure instead.
16776         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
16777
16778 2003-07-18  Bruno Haible  <bruno@clisp.org>
16779
16780         * modules/getndelim2: New file.
16781         * modules/getline: Share files with module getndelim2.
16782         * modules/getnline: Depend on getndelim2 instead of sharing files with
16783         it. Add getnline.c to lib_SOURCES.
16784         * MODULES.html.sh (func_all_modules): Add getndelim2.
16785
16786 2003-07-18  Bruno Haible  <bruno@clisp.org>
16787
16788         * m4/getndelim2.m4: New file.
16789         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
16790         invoke gl_PREREQ_GETNDELIM2.
16791         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
16792         gl_PREREQ_GETNDELIM2.
16793         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
16794         gl_GETNDELIM2.
16795
16796 2003-07-18  Bruno Haible  <bruno@clisp.org>
16797
16798         * lib/getndelim2.h: New file.
16799         * lib/getndelim2.c: Make into a module of its own. Include config.h,
16800         getndelim2.h.
16801         (getndelim2): Make non-static. Change return type to ssize_t.
16802         * lib/getline.h: Change argument names.
16803         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
16804         * lib/getnline.c: Include getndelim2.h.
16805
16806 2003-07-18  Andreas Schwab  <schwab@suse.de>
16807
16808         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
16809
16810 2003-07-17  Karl Berry  <karl@gnu.org>
16811
16812         * config/config.sub: update from prep.
16813
16814 2003-07-17  Bruno Haible  <bruno@clisp.org>
16815
16816         * modules/getnline: New file.
16817         * modules/getline: Add lib/getndelim2.c to source file list.
16818         * MODULES.html.sh (func_all_modules): Add getnline.
16819
16820 2003-07-17  Bruno Haible  <bruno@clisp.org>
16821
16822         * m4/getnline.m4: New file.
16823
16824 2003-07-17  Bruno Haible  <bruno@clisp.org>
16825
16826         * m4/Makefile.am.in: Remove file.
16827         * m4/Makefile.am: Remove file.
16828         * m4/Makefile.in: Remove file.
16829
16830 2003-07-17  Bruno Haible  <bruno@clisp.org>
16831
16832         * lib/getnline.h: New file.
16833         * lib/getnline.c: New file.
16834         * lib/getndelim2.c: New file, extracted from getline.c.
16835         (getndelim2): Renamed from getdelim2, with added nmax argument.
16836         * lib/getline.c: Include getndelim2.c.
16837         (getdelim2): Moved out to getndelim2.c.
16838         (getline, getdelim): Update.
16839
16840 2003-07-17  Bruno Haible  <bruno@clisp.org>
16841
16842         * lib/Makefile.am: Remove file.
16843         * lib/Makefile.in: Remove file.
16844
16845 2003-07-17  Bruno Haible  <bruno@clisp.org>
16846
16847         * configure.in: Remove file.
16848         * Makefile.in: Remove file.
16849
16850 2003-07-17  Bruno Haible  <bruno@clisp.org>
16851
16852         * MODULES.html.sh: Put the </BODY> right before </HTML>.
16853
16854 2003-07-16  Karl Berry  <karl@gnu.org>
16855
16856         * config/srclist-update: was running fixlicense twice, which caused
16857                 texinfo.tex to be nullified for some reason.  Simplify,
16858                 $gplsrc is no longer needed as far as I can see?
16859
16860 2003-07-16  Jim Meyering  <jim@meyering.net>
16861
16862         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
16863
16864 2003-07-15  Paul Eggert  <eggert@twinsun.com>
16865
16866         * config/srclist.txt: Get the following files from gettext-runtime/intl
16867         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
16868         ref-del.sin.  From Bruno Haible.
16869         * config/srclist-update (fixfile): Change grep pattern again, since the
16870         previous fix didn't work (there was another trailing $).  Use
16871         '[$]' to escape the $s.
16872
16873 2003-07-15  Karl Berry  <karl@gnu.org>
16874
16875         * lib/vasnprintf.c: update from gettext.
16876
16877 2003-07-15  Karl Berry  <karl@gnu.org>
16878
16879         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
16880         gets expanded when surrounded by '$'.
16881
16882 2003-07-15  Jim Meyering  <jim@meyering.net>
16883
16884         * modules/save-cwd: Don't depend on error.  From Derek Price.
16885
16886 2003-07-15  Jim Meyering  <jim@meyering.net>
16887
16888         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
16889
16890 2003-07-14  Simon Josefsson  <jas@extundo.com>
16891
16892         * modules/mempcpy: New file.
16893         * MODULES.html.sh (func_all_modules): Add mempcpy.
16894
16895 2003-07-14  Simon Josefsson  <jas@extundo.com>
16896
16897         * m4/mempcpy.m4: New file.
16898
16899 2003-07-14  Simon Josefsson  <jas@extundo.com>
16900
16901         * lib/mempcpy.h: New file.
16902         * lib/mempcpy.c: New file.
16903
16904 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16905
16906         * modules/getdate, modules/posixtm: Depend on mktime.
16907
16908 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16909
16910         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
16911         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
16912         unicodeio.c, unicodeio.h, unlocked-io.h:
16913         Switch from LGPL to GPL.
16914
16915 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16916
16917         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
16918         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
16919         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
16920         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
16921         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
16922         updated automatically by ../config/srclist-update.  This changes
16923         their license from LPGL to GPL.
16924
16925 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16926
16927         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
16928         assumed to refer to the root of the most recent stable gettext version.
16929         * config/srclistvars.sh: Add defaults for eggert.
16930         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
16931         Match "This program" as well as "The program".  This is needed
16932         for gettext.
16933
16934 2003-07-14  Jim Meyering  <jim@meyering.net>
16935
16936         Don't emit diagnostics.  Let callers do that.
16937         * lib/save-cwd.c: Don't include "error.h".
16938         (save_cwd): Don't call error.  Ensure that errno is valid
16939         when returning nonzero.
16940
16941         * lib/save-cwd.h (restore_cwd): Update prototype.
16942         * lib/save-cwd.c (restore_cwd): Remove two parameters.
16943         Simplify.  Don't call error upon failure.  Let callers do that.
16944         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
16945         when auditing is enabled.  But don't bother updating the #if.
16946
16947 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
16948
16949         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
16950         it breaks C++ compilation.
16951         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
16952
16953 2003-07-10  Simon Josefsson  <jas@extundo.com>
16954
16955         * modules/strchrnul (Makefile.am): Add strchrnul.h.
16956
16957 2003-07-10  Jim Meyering  <jim@meyering.net>
16958
16959         * m4/clock_time.m4: Remove trailing blank.
16960         * m4/intmax_t.m4: Likewise.
16961
16962 2003-07-10  Jim Meyering  <jim@meyering.net>
16963
16964         * lib/vasnprintf.c: Remove trailing blanks.
16965         Make cpp indentation consistent.
16966
16967 2003-07-09  Paul Eggert  <eggert@twinsun.com>
16968
16969         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
16970         posixver.c, strftime.c, strnlen.c, strverscmp.c:
16971         Switch from LGPL to GPL.
16972
16973 2003-07-09  Paul Eggert  <eggert@twinsun.com>
16974
16975         * config/srclist.txt: Sort sublists.  Add
16976         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
16977         that differ from gnulib for one reason or another; we'd like this list
16978         to be smaller but for now let's document what we have.
16979
16980 2003-07-08  Paul Eggert  <eggert@twinsun.com>
16981
16982         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
16983         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
16984         and sweeter "eval x=$x".
16985         * config/srclist.txt: Get lib/argp* from glibc.
16986
16987 2003-07-07  Paul Eggert  <eggert@twinsun.com>
16988
16989         * lib/mktime.c: Fix some boundary cases and remove need for floating
16990         point.
16991
16992         Issue a compile-time diagnostic if time_t is floating point, or if
16993         two's complement arithmetic is not in effect, or if arithmetic
16994         right shift does not propagate the sign.  These assumptions were
16995         all in the original code but they weren't checked.
16996
16997         (TIME_T_MIDPOINT, verify): New macros.
16998         (__isleap): Remove; it has integer overflow problems.
16999         (leapyear): New function, without those problems.
17000         (ydhms_tm_diff): Remove; splitting into two parts.
17001         (ydhms_diff): New function, containing the arithmetic part of
17002         the old ydhms_tm_diff function.  Issue a compile-time
17003         diagnostic if we are not using C99 integer division.
17004         Avoid casts when possible.
17005         (guess_time_tm): New function, containing the checking part of
17006         the old ydhms_tm_diff function.  Return the new value, rather than
17007         the difference between it and the old.  Accept a new argument T
17008         so that *T specifies the old value.  Check for overflow in the result.
17009
17010         (__mktime_internal): Use a time_t offset, not a long int offset.
17011         This undoes the 2003-06-04 change, which is no longer needed now
17012         that we have better overflow checking.
17013         (localtime_offset): Likewise.
17014
17015         (__mktime_internal): Avoid harmful overflow on hosts where time_t
17016         and long are 64-bit but int is only 32-bit.
17017         (ydhms_diff): Use long int to store year1 and yday1.
17018         Issue a compile-time diagnostic if long int is not wide enough.
17019
17020         (__mktime_internal): Use long int to store adjusted year and yday.
17021         Use plain C rather than preprocessor commands, if that doesn't
17022         affect efficiency.
17023         Check for overflow (and try to repair) after each probe
17024         rather than checking only at the very end.  This avoids some bugs
17025         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
17026         does not equal GMT offset at maximum time).
17027         Use integer to check for overflow rather than floating point; this
17028         is more portable to non-IEEE hosts, and is a tad faster.
17029         When we detect that we are oscillating between two values,
17030         don't check whether tm_isdst has the requested value, since
17031         we already know the answer.  When tm_isdst has the wrong value,
17032         use a different heuristic to find the right one, based on the
17033         extreme values actually observed in practice in tz2003a,
17034         rather than the (overly optimistic) "previous 3 calendar quarters".
17035
17036         (not_equal_tm, print_tm, check_result): Use "const T" rather than
17037         "T const" to accommodate glibc style.
17038         (check_result): Use less-confusing report format.  "long" -> "long int.
17039         (main): Likewise.
17040         Don't loop if the iteration overflows time_t.
17041         Allow a negative step in the iteration.
17042
17043 2003-07-06  Karl Berry  <karl@gnu.org>
17044
17045         * config/depcomp: update from automake.
17046         * config/config.sub: update from prep.
17047
17048 2003-07-03  Karl Berry  <karl@gnu.org>
17049
17050         * config/config.guess: update from prep.
17051
17052 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17053
17054         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
17055         xreadlink.c now includes it unconditionally.
17056
17057 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17058
17059         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
17060         having it depend on HAVE_SYS_TYPES_H.
17061
17062 2003-07-01  Bruno Haible  <bruno@clisp.org>
17063
17064         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
17065         <sys/types.h> should be sufficient.
17066         Reported by Paul Eggert.
17067
17068 2003-06-26  Karl Berry  <karl@gnu.org>
17069
17070         * config/depcomp: update from automake.
17071
17072 2003-06-26  Bruno Haible  <bruno@clisp.org>
17073
17074         * modules/human: Depend on module stdbool.
17075
17076 2003-06-25  Bruno Haible  <bruno@clisp.org>
17077
17078         * modules/readlink: New file.
17079         * modules/xreadlink: Depend on it.
17080         * MODULES.html.sh (func_all_modules): Add readlink.
17081
17082 2003-06-25  Bruno Haible  <bruno@clisp.org>
17083
17084         * m4/readlink.m4: New file.
17085
17086 2003-06-25  Bruno Haible  <bruno@clisp.org>
17087
17088         * lib/readlink.c: New file.
17089
17090 2003-06-22  Karl Berry  <karl@gnu.org>
17091
17092         * config/srclist.txt: update mkinstalldirs from automake.
17093         * config/mkinstalldirs: update.
17094
17095 2003-06-22  Bruno Haible  <bruno@clisp.org>
17096
17097         Portability to mingw32.
17098         * m4/ssize_t.m4: New file, from GNU gettext.
17099         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
17100         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
17101
17102 2003-06-22  Bruno Haible  <bruno@clisp.org>
17103
17104         * modules/safe-read: Add m4/ssize_t.m4.
17105         * modules/xreadlink: Add m4/ssize_t.m4.
17106
17107 2003-06-20  Bruno Haible  <bruno@clisp.org>
17108
17109         Assume C89, so PARAMS isn't needed.
17110         * lib/unicodeio.h (PARAMS): Remove.
17111         * lib/unicodeio.c: Don't use PARAMS.
17112
17113 2003-06-18  Karl Berry  <karl@gnu.org>
17114
17115         * config/config.{guess,sub}: update from prep.
17116
17117 2003-06-18  Jim Meyering  <jim@meyering.net>
17118
17119         Merge changes from coreutils.
17120         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
17121         Remove explicit declarations of xmalloc and realloc.
17122         Include xalloc.h.
17123         (read_utmp): Remove anachronistic cast of xmalloc.
17124
17125 2003-06-17  Paul Eggert  <eggert@twinsun.com>
17126
17127         Assume C89, so PARAMS isn't needed.
17128         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
17129         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
17130         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
17131         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
17132         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
17133         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
17134         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
17135         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
17136         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
17137         lib/xstrtod.h, lib/xstrtol.h: Likewise.
17138         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
17139         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
17140         no longer needed. Anyway, config.h should always be included before any
17141         other file.
17142
17143 2003-06-11  Simon Josefsson  <jas@extundo.com>
17144
17145         * modules/sysexits: New file.
17146         * MODULES.html.sh (func_all_modules): Add sysexits.
17147
17148 2003-06-11  Simon Josefsson  <jas@extundo.com>
17149
17150         * lib/sysexit_.h: New file.
17151
17152 2003-06-11  Derek Price  <derek@ximbiot.com>
17153
17154         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
17155         necessary.
17156
17157 2003-06-11  Bruno Haible  <bruno@clisp.org>
17158
17159         * m4/sysexits.m4: New file.
17160
17161 2003-06-10  Simon Josefsson <jas@extundo.com>
17162
17163         * lib/argp.h: New file, from glibc.
17164         * lib/argp-ba.c: New file, from glibc.
17165         * lib/argp-eexst.c: New file, from glibc.
17166         * lib/argp-fmtstream.c: New file, from glibc.
17167         * lib/argp-fmtstream.h: New file, from glibc.
17168         * lib/argp-fs-xinl.c: New file, from glibc.
17169         * lib/argp-help.c: New file, from glibc.
17170         * lib/argp-namefrob.h: New file, from glibc.
17171         * lib/argp-parse.c: New file, from glibc.
17172         * lib/argp-pv.c: New file, from glibc.
17173         * lib/argp-pvh.c: New file, from glibc.
17174         * lib/argp-xinl.c: New file, from glibc.
17175
17176 2003-06-10  Simon Josefsson  <jas@extundo.com>
17177
17178         * modules/strchrnul: New file.
17179
17180 2003-06-10  Simon Josefsson  <jas@extundo.com>
17181
17182         * modules/argp: New file.
17183
17184 2003-06-10  Simon Josefsson  <jas@extundo.com>
17185
17186         * m4/strchrnul.m4: New file.
17187
17188 2003-06-10  Simon Josefsson  <jas@extundo.com>
17189
17190         * lib/strchrnul.h: New file.
17191         * lib/strchrnul.c: New file.
17192
17193 2003-06-10  Bruno Haible  <bruno@clisp.org>
17194
17195         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
17196
17197 2003-06-07  Karl Berry  <karl@gnu.org>
17198
17199         * config/config.{guess,sub}: update from prep.
17200
17201 2003-06-07  Jim Meyering  <jim@meyering.net>
17202
17203         * modules/strtod: Use $(...) notation, not @...@ for
17204         AC_REPLACE'd variables.
17205         * modules/localcharset: Likewise.
17206
17207 2003-06-07  Jim Meyering  <jim@meyering.net>
17208
17209         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
17210         in place of my name in the copyright comment.
17211         Remove definition and uses of __P.
17212
17213         From coreutils.
17214         * lib/stat.c: Don't declare xmalloc explicitly.
17215         Instead, include "xalloc.h".
17216         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
17217         xrealloc, and xcalloc return values.
17218         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
17219         Improve comment.
17220         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
17221
17222 2003-06-07  Bruno Haible  <bruno@clisp.org>
17223
17224         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
17225         avoid AC_CONFIG_LINKS.
17226         * modules/fnmatch (Makefile.am): Use explicit creation rule for
17227         fnmatch.h, to avoid AC_CONFIG_LINKS.
17228         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
17229
17230 2003-06-07  Bruno Haible  <bruno@clisp.org>
17231
17232         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
17233         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
17234         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
17235         directory.
17236         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
17237         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
17238         directory.
17239
17240 2003-06-06  Jim Meyering  <jim@meyering.net>
17241
17242         Merge from coreutils.
17243         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
17244         Consolidate declarations and initializations of *_base* locals.
17245
17246         Merge from coreutils.
17247         This avoids a core dump on systems without GNU putenv,
17248         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
17249         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
17250         (unsetenv): New static function, from GNU libc.
17251         (rpl_putenv): Use it.
17252
17253         * lib/modechange.c: Remove trailing blanks.
17254
17255         Merge from coreutils.
17256         * lib/fsusage.c: Remove declaration of statfs.
17257         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
17258
17259         * lib/posixtm.c: Include <stdbool.h> unconditionally.
17260
17261 2003-06-06  Jim Meyering  <jim@meyering.net>
17262
17263         * lib/stdbool_.h: Renamed from stdbool.h.in.
17264
17265 2003-06-06  Jim Meyering  <jim@meyering.net>
17266             Bruno Haible  <bruno@clisp.org>
17267
17268         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
17269         Adjust Makefile.am snippet not to redirect directly to target.
17270         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
17271
17272 2003-06-05  Paul Eggert  <eggert@twinsun.com>
17273
17274         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
17275         mismatch, look in future quarters as well as past.  This fixes a
17276         bug when processing fall-backwards gaps immediately after a long
17277         period of daylight-saving time.
17278
17279         * lib/mktime.c: Assume freestanding C89 or better.
17280         (HAVE_LIMITS_H): Remove.  Assume it's 1.
17281         (__P): Remove; not used.
17282         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
17283         (mktime, not_equal_tm, print_tm, check_result,
17284         main): Use prototypes.  Use const * where appropriate.
17285         (main): Fix typo in testing code that uncovered by above changes.
17286         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
17287
17288 2003-06-04  Paul Eggert  <eggert@twinsun.com>
17289
17290         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
17291         locale.h, localeconv.  This merges changes from coreutils.
17292
17293         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
17294         It can be removed after the next Autoconf is released.
17295         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
17296         needed.
17297
17298 2003-06-04  Paul Eggert  <eggert@twinsun.com>
17299
17300         * lib/mktime.c: Fix Debian bug 177940
17301         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
17302         (localtime_offset): Now long int, not time_t, because we want it
17303         to be guaranteed to be signed.  All uses changed.
17304         (__mktime_internal): If overflow would occur when adding offset,
17305         don't add it.
17306
17307         Merge 'human' changes from coreutils.  Rewrite to support
17308         locale-specific notations like thousands separators.
17309         * lib/human.c: Simplify authorship notice.
17310         Include human.h immediately after config.h.
17311         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
17312         <limits.h>: Do not include, since human.h does.
17313         (SIZE_MAX, UINTMAX_MAX): New macros.
17314         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
17315         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
17316         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
17317         (power_letter): Renamed from suffixes.
17318         (generate_suffix_backwards): Remove.
17319         (adjust_value): Now takes int style (because of human.h changes)
17320         and long double value (for greater precision on some platforms).
17321         (group_number): New function.
17322         (human_readable): Use it.  Use integer options, not enum.
17323         Put the options before the sizes in the arg list.
17324         Support all the new options.
17325         The old human_readable function has been removed;
17326         use inttostr.h instead.
17327         (human_readable, default_block_size, humblock):
17328         Use uintmax_t, not int, for block sizes.
17329         (human_readable_inexact, block_size_types): Remove.
17330         (block_size_opts): New constant.
17331         (human_options): Renamed from human_block_size, with new signature
17332         that allows block sizes up to UINTMAX_MAX.  All callers changed.
17333         * lib/human.h: Add copyright and authorship notice.
17334         Include <limits.h> and <stdbool.h> unconditionally.
17335         (PARAMS): Remove.  All uses removed.
17336         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
17337         (enum human_inexact_style): Remove tag; now a nameless enum.
17338         (human_floor, human_ceiling, human_round_to_even): Now have
17339         values 2, 0, 1 rather than -1, 1, 0.
17340         (human_group_digits, human_suppress_point_zero, human_autoscale,
17341         human_base_1024, human_SI, human_B): New constants.
17342         (human_readable_inexact, human_block_size): Remove.
17343         (human_readable): Size args are now uintmax_t, not int.
17344         (human_options): New decl.
17345
17346         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
17347         unnecessary now that we assume C89 or better.  This change
17348         imported from coreutils.
17349
17350         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
17351         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
17352         in the 2003-05-30 sync from glibc.
17353
17354         .h files should stand alone, but we shouldn't include <sys/types.h>
17355         if we can get away with just <stddef.h>.
17356
17357         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
17358         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
17359         rather than <sys/types.h>, as we merely need size_t.
17360         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
17361         to get size_t.
17362         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
17363         Include <stdio.h>, to get FILE.
17364         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
17365         memcasecmp.h has included <stddef.h> and all we need is size_t.
17366         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
17367         our interface, instead of including <sys/types.h>
17368
17369 2003-06-04  Paul Eggert  <eggert@twinsun.com>
17370
17371         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
17372         now, as glibc mktime is buggy on non-glibc systems.
17373
17374 2003-06-03  Karl Berry  <karl@gnu.org>
17375
17376         * config/config.sub: update from prep.
17377
17378 2003-06-02  Paul Eggert  <eggert@twinsun.com>
17379
17380         [from coreutils]
17381         Fix some minor time-related bugs with POSIX time arguments.
17382         Some valid time stamps were being rejected (notably -1, and
17383         time stamps before 1900 on 64-bit hosts).  And some invalid
17384         time stamps were being accepted, e.g. September 31.
17385
17386         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
17387         that we can return (time_t) -1 successfully.
17388         * lib/posixtm.c: Likewise.
17389         [HAVE_STDBOOL_H]: Include <stdbool.h>.
17390         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
17391         (t): Remove static var.
17392         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
17393         of static var.  All uses changed.
17394         (year): Do not reject years before 1900; they can occur with
17395         64-bit time_t.
17396         (posix_time_parse): Do not check for out-of-range components;
17397         that is now the caller's responsibility, since our checks were
17398         only approximations.
17399         (posixtime): Use mktime to check for out-of-range components,
17400         since it knows them exactly.
17401         If mktime returns (time_t) -1, check whether an error actually occurred
17402         by invoking localtime on -1.
17403         (main) [TEST_POSIXTIME]: Check for input data errors, and report
17404         posixtime failures better.
17405         Improve the test data (in comments only).
17406
17407 2003-06-02  Karl Berry  <karl@gnu.org>
17408
17409         * config/mkinstalldirs (version): new variable.
17410         (--version): new option.
17411         (usage): improve message.
17412
17413 2003-05-30  Karl Berry  <karl@gnu.org>
17414
17415         * lib/mktime.c: update from libc.
17416
17417 2003-05-30  Bruno Haible  <bruno@clisp.org>
17418
17419         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
17420         * config/config.rpath: Upgrade to gettext-0.12.1.
17421
17422 2003-05-30  Bruno Haible  <bruno@clisp.org>
17423
17424         * m4/gettext.m4: Upgrade to gettext-0.12.1.
17425         * m4/nls.m4: New file, from gettext-0.12.1.
17426         * m4/po.m4: New file, from gettext-0.12.1.
17427         * m4/progtest.m4: Upgrade to gettext-0.12.1.
17428
17429 2003-05-30  Bruno Haible  <bruno@clisp.org>
17430
17431         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
17432         * lib/localcharset.h: Likewise.
17433         * lib/localcharset.c: Likewise.
17434
17435 2003-05-29  Karl Berry  <karl@gnu.org>
17436
17437         * config/config.rpath: update from gettext.
17438
17439 2003-05-28  Paul Eggert  <eggert@twinsun.com>
17440
17441         Assume the headers required for C89 freestanding compilers.
17442         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
17443         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
17444         * m4/human.m4 (gl_HUMAN): Likewise.
17445         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
17446         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
17447         * m4/userspec.m4 (gl_USERSPEC): Likewise.
17448         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
17449         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
17450         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
17451
17452 2003-05-28  Paul Eggert  <eggert@twinsun.com>
17453
17454         Assume the headers required for C89 freestanding compilers.
17455         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
17456         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
17457         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
17458         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
17459         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
17460         define, since <limits.h> is guaranteed to do that.
17461         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
17462         * lib/exclude.c: Include <stdbool.h> unconditionally.
17463         * lib/tempname.c: Include <stddef.h> unconditionally.
17464         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
17465         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
17466         <stddef.h> does that.
17467         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
17468         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
17469         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
17470         needed.
17471         * lib/xstrtol.c: Likewise.
17472         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
17473         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
17474
17475         * lib/addext.c (addext): Use assignment rather than cast, to avoid
17476         warnings on some platforms.
17477
17478         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
17479         arbitrarily.
17480
17481 2003-05-26  Jim Meyering  <jim@meyering.net>
17482
17483         Merge in a change from coreutils:
17484         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
17485         that is guaranteed to be `no'.  Use `no_such_member' to indicate
17486         that condition, rather than `-1' which is slightly misleading.
17487         Change the name of the cache variable to have the gl_ prefix.
17488         Prompted by a patch from Richard Dawe for DJGPP.
17489
17490 2003-05-24  Karl Berry  <karl@gnu.org>
17491
17492         * config/config.guess: update from prep.
17493
17494 2003-05-22  Karl Berry  <karl@gnu.org>
17495
17496         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
17497
17498 2003-05-20  Karl Berry  <karl@gnu.org>
17499
17500         * config/config.guess: update from prep.
17501
17502 2003-05-18  Karl Berry  <karl@gnu.org>
17503
17504         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
17505         might actually be set by the user.
17506
17507         * config/depcomp, install-sh, mdate-sh: update from automake.
17508
17509 2003-05-17  Bruno Haible  <bruno@clisp.org>
17510
17511         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
17512         invalid expansion for AC_EGREP_CPP.
17513         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
17514         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
17515         Suggested by Akim Demaille <akim@epita.fr> in
17516         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
17517
17518 2003-05-12  Jim Meyering  <jim@meyering.net>
17519
17520         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
17521         the space-padded-by-default conversion specifiers, %e, %k, %l.
17522
17523 2003-05-12  Bruno Haible  <bruno@clisp.org>
17524
17525         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
17526         the string is longer than 4 KB.
17527
17528 2003-05-11  Karl Berry  <karl@gnu.org>
17529
17530         * config/config.{guess,sub}: update from prep.
17531
17532 2003-05-09  Bruno Haible  <bruno@clisp.org>
17533
17534         * modules/error: Add m4/strerror_r.m4 to file list.
17535
17536 2003-05-03  Bruno Haible  <bruno@clisp.org>
17537
17538         Upgrade to Unicode-4.0.
17539         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
17540         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
17541         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
17542         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
17543         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
17544         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
17545         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
17546         Change width of U+E0100..U+E01EF from 1 to 0.
17547
17548 2003-04-25  Jim Meyering  <jim@meyering.net>
17549
17550         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
17551         of type size_t, not int.
17552
17553 2003-04-25  Bruno Haible  <bruno@clisp.org>
17554
17555         * lib/copy-file.c: Include <stddef.h>, for size_t.
17556
17557 2003-04-21  Paul Eggert  <eggert@twinsun.com>
17558
17559         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
17560         code which expansion is under static control.  Patch imported from
17561         Akim Demaille's patch to Bison; see
17562         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
17563
17564 2003-04-14  Bruno Haible  <bruno@clisp.org>
17565
17566         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
17567
17568 2003-04-11  Jim Meyering  <jim@meyering.net>
17569
17570         Merge changes from Coreutils.
17571
17572         2003-03-22  Jim Meyering  <jim@meyering.net>
17573
17574         * lib/strftime.c (widen): Cast alloca return value to proper type.
17575
17576         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
17577
17578         From GNU libc.
17579         * lib/strftime.c (my_strftime): Handle very large width
17580         specifications for numeric values correctly.  Improve checks for
17581         overflow.
17582
17583         2003-01-19  Jim Meyering  <jim@meyering.net>
17584
17585         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
17586         definitions.
17587         (nl_get_alt_digit) [! defined my_strftime]: Define.
17588         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
17589         _nl_get_alt_digit and _nl_get_walt_digit.
17590
17591         * lib/strftime.c (my_strftime): Merge in locale-related changes from
17592         libc. These changes have no effect outside of _LIBC.
17593
17594 2003-04-10  Bruno Haible  <bruno@clisp.org>
17595
17596         * modules/findprog: New file.
17597         * MODULES.html.sh (func_all_modules): Add it.
17598
17599 2003-04-10  Bruno Haible  <bruno@clisp.org>
17600
17601         * m4/findprog.m4: New file.
17602         * m4/eaccess.m4: New file.
17603
17604 2003-04-10  Bruno Haible  <bruno@clisp.org>
17605
17606         * lib/findprog.h: New file, from GNU gettext.
17607         * lib/findprog.c: New file, from GNU gettext.
17608
17609 2003-04-05  Jim Meyering  <jim@meyering.net>
17610
17611         Merge changes from Coreutils.
17612
17613         * lib/exclude.h (PARAMS): Remove definition and uses.
17614         * lib/exclude.c: Remove uses of `PARAMS'.
17615
17616         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
17617         Add test-cases for DOS filenames. Declare program_name.
17618         (main): Set up program_name.  Patch by Rich Dawe.
17619
17620         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
17621         error from mntctl.
17622         Use mntctl's return value to drive the entry-processing loop, since
17623         we can't rely on the value of the vmt_length member in the last
17624         entry.  On some systems doing so could result in exhausting
17625         virtual memory.  Based in part on a patch from Mike Jetzer.
17626
17627 2003-04-04  Bruno Haible  <bruno@clisp.org>
17628
17629         * modules/linebreak: New file.
17630         * MODULES.html.sh (func_all_modules): Add it.
17631
17632 2003-04-04  Bruno Haible  <bruno@clisp.org>
17633
17634         * m4/linebreak.m4: New file.
17635
17636 2003-04-04  Bruno Haible  <bruno@clisp.org>
17637
17638         * lib/linebreak.h: New file, from GNU gettext.
17639         * lib/linebreak.c: New file, from GNU gettext with slight
17640         modifications.
17641         * lib/lbrkprop.h: New file, from GNU gettext.
17642
17643 2003-04-03  Bruno Haible  <bruno@clisp.org>
17644
17645         * modules/utf8-ucs4: New file.
17646         * modules/utf16-ucs4: New file.
17647         * modules/ucs4-utf8: New file.
17648         * modules/ucs4-utf16: New file.
17649         * MODULES.html.sh (func_all_modules): Add them.
17650
17651 2003-04-03  Bruno Haible  <bruno@clisp.org>
17652
17653         * m4/utf-ucs4.m4: New file.
17654         * m4/ucs4-utf.m4: New file.
17655
17656 2003-04-03  Bruno Haible  <bruno@clisp.org>
17657
17658         * lib/utf8-ucs4.h: New file, from GNU gettext.
17659         * lib/utf16-ucs4.h: New file, from GNU gettext.
17660         * lib/ucs4-utf8.h: New file, from GNU gettext.
17661         * lib/ucs4-utf16.h: New file, from GNU gettext.
17662
17663 2003-04-02  Bruno Haible  <bruno@clisp.org>
17664
17665         * modules/binary-io: New file.
17666         * MODULES.html.sh (func_all_modules): Add it.
17667
17668 2003-04-02  Bruno Haible  <bruno@clisp.org>
17669
17670         * lib/binary-io.h: New file, from GNU gettext.
17671
17672 2003-04-01  Bruno Haible  <bruno@clisp.org>
17673
17674         * modules/pathname: New file.
17675         * MODULES.html.sh (func_all_modules): Add it.
17676
17677 2003-04-01  Bruno Haible  <bruno@clisp.org>
17678
17679         * lib/pathname.h: New file, from GNU gettext.
17680         * lib/concatpath.c: New file, from GNU gettext.
17681
17682 2003-03-30  Bruno Haible  <bruno@clisp.org>
17683
17684         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
17685
17686 2003-03-30  Bruno Haible  <bruno@clisp.org>
17687
17688         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
17689         function chown() doesn't exist.
17690
17691 2003-03-28  Bruno Haible  <bruno@clisp.org>
17692
17693         * modules/copy-file: New file.
17694         * MODULES.html.sh (func_all_modules): Add it.
17695
17696 2003-03-28  Bruno Haible  <bruno@clisp.org>
17697
17698         * m4/copy-file.m4: New file.
17699
17700 2003-03-28  Bruno Haible  <bruno@clisp.org>
17701
17702         * lib/copy-file.h: New file, from GNU gettext.
17703         * lib/copy-file.c: New file, from GNU gettext.
17704
17705 2003-03-18  Jim Meyering  <jim@meyering.net>
17706
17707         * lib/quote.c (quote_n): Fix typo in comment.
17708
17709 2003-03-18  Bruno Haible  <bruno@clisp.org>
17710
17711         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
17712         checking.
17713         * m4/onceonly_2_57.m4: Likewise.
17714
17715 2003-03-17  Bruno Haible  <bruno@clisp.org>
17716
17717         * m4/onceonly.m4: Require autoconf 2.54 or newer.
17718         (m4_quote): Remove macro.
17719         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
17720
17721 2003-03-14  Jim Meyering  <jim@meyering.net>
17722
17723         Merge changes from Coreutils.
17724         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
17725         to be const, in order to avoid warnings.
17726         (obstack_room): Likewise.
17727         (obstack_empty_p): Likewise.
17728
17729 2003-03-14  Bruno Haible  <bruno@clisp.org>
17730
17731         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
17732         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
17733
17734 2003-03-13  Paul Eggert  <eggert@twinsun.com>
17735
17736         Merge changes from Bison.
17737         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
17738         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
17739         when compiling Bison 1.875's `bitset bset = obstack_alloc
17740         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
17741         * lib/hash.c: Include <stdbool.h> unconditionally.
17742
17743 2003-03-13  Paul Eggert  <eggert@twinsun.com>
17744
17745         * m4/onceonly.m4 (m4_quote): New macro.
17746         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
17747         Quote AC_FOREACH variable-expansions properly.
17748
17749 2003-03-13  Paul Eggert  <eggert@twinsun.com>
17750
17751         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
17752
17753 2003-03-09  Paul Eggert  <eggert@twinsun.com>
17754
17755         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
17756         Reported by Bruce Becker; see:
17757         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
17758
17759 2003-03-03  Paul Eggert  <eggert@twinsun.com>
17760             Bruno Haible  <bruno@clisp.org>
17761
17762         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
17763         Reported by John Hughes, see
17764         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
17765
17766 2003-02-20  Bruno Haible  <bruno@clisp.org>
17767
17768         * MODULES.html.sh (func_all_modules): Add poll.
17769
17770 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
17771
17772         * modules/poll: New file.
17773
17774 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
17775
17776         * lib/poll_.h: New file.
17777         * lib/poll.c: New file.
17778
17779 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
17780
17781         * m4/poll.m4: New file.
17782
17783 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
17784
17785         * modules/mathl: New file.
17786
17787 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
17788
17789         * lib/mathl.h: New file.
17790         * lib/acosl.c: New file.
17791         * lib/asinl.c: New file.
17792         * lib/atanl.c: New file.
17793         * lib/ceill.c: New file.
17794         * lib/cosl.c: New file.
17795         * lib/expl.c: New file.
17796         * lib/floorl.c: New file.
17797         * lib/frexpl.c: New file.
17798         * lib/ldexpl.c: New file.
17799         * lib/logl.c: New file.
17800         * lib/sincosl.c: New file.
17801         * lib/sinl.c: New file.
17802         * lib/sqrtl.c: New file.
17803         * lib/tanl.c: New file.
17804         * lib/trigl.c: New file.
17805         * lib/trigl.h: New file.
17806
17807 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
17808
17809         * m4/mathl.m4: New file.
17810
17811 2003-02-18  Bruno Haible  <bruno@clisp.org>
17812
17813         * MODULES.html.sh (func_all_modules): Add mathl.
17814
17815 2003-02-17  Bruno Haible  <bruno@clisp.org>
17816
17817         * modules/mkdtemp: New module.
17818         * MODULES.html.sh (func_all_modules): Add it.
17819
17820 2003-02-17  Bruno Haible  <bruno@clisp.org>
17821
17822         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
17823
17824 2003-02-17  Bruno Haible  <bruno@clisp.org>
17825
17826         * lib/mkdtemp.h: New file, from GNU gettext.
17827         * lib/mkdtemp.c: New file, from GNU gettext.
17828
17829 2003-02-02  Jim Meyering  <jim@meyering.net>
17830
17831         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
17832         e.g. glibc-2.2.93.
17833
17834 2003-01-31  Bruno Haible  <bruno@clisp.org>
17835
17836         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
17837         'rpl_rename'.
17838         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
17839         'rpl_strnlen'.
17840         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
17841         'rpl_strtod'.
17842         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
17843         'rpl_utime'.
17844
17845 2003-01-31  Bruno Haible  <bruno@clisp.org>
17846
17847         * lib/rename.c: #undef rename before defining rpl_rename.
17848         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
17849
17850 2003-01-30  Bruno Haible  <bruno@clisp.org>
17851
17852         * modules/vasnprintf, modules/vasprintf: New modules.
17853         * MODULES.html.sh (func_all_modules): Add them.
17854
17855 2003-01-30  Bruno Haible  <bruno@clisp.org>
17856
17857         * m4/signed.m4: New file, from GNU gettext.
17858         * m4/longdouble.m4: New file, from GNU gettext.
17859         * m4/wchar_t.m4: New file, from GNU gettext.
17860         * m4/wint_t.m4: New file, from GNU gettext.
17861         * m4/vasnprintf.m4: New file.
17862         * m4/vasprintf.m4: New file.
17863
17864 2003-01-30  Bruno Haible  <bruno@clisp.org>
17865
17866         * lib/printf-args.h: New file, from GNU gettext.
17867         * lib/printf-args.c: New file, from GNU gettext.
17868         * lib/printf-parse.h: New file, from GNU gettext.
17869         * lib/printf-parse.c: New file, from GNU gettext.
17870         * lib/vasnprintf.h: New file, from GNU gettext.
17871         * lib/vasnprintf.c: New file, from GNU gettext.
17872         * lib/asnprintf.c: New file, from GNU gettext.
17873         * lib/vasprintf.h: New file, from GNU gettext with modifications.
17874         * lib/vasprintf.c: New file, from GNU gettext.
17875         * lib/asprintf.c: New file, from GNU gettext.
17876
17877 2003-01-29  Bruno Haible  <bruno@clisp.org>
17878
17879         * modules/stpncpy: New module.
17880         * MODULES.html.sh (func_all_modules): Add it.
17881
17882 2003-01-29  Bruno Haible  <bruno@clisp.org>
17883
17884         * m4/stpncpy.m4: New file.
17885
17886 2003-01-29  Bruno Haible  <bruno@clisp.org>
17887
17888         * lib/stpncpy.h: New file, from GNU gettext with modifications.
17889         * lib/stpncpy.c: New file, from GNU gettext with modifications.
17890
17891 2003-01-28  Bruno Haible  <bruno@clisp.org>
17892
17893         * modules/c-ctype: New module.
17894         * MODULES.html.sh (func_all_modules): Add it.
17895
17896 2003-01-28  Bruno Haible  <bruno@clisp.org>
17897
17898         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
17899         Paul Eggert.
17900         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
17901         Paul Eggert.
17902
17903 2003-01-27  Bruno Haible  <bruno@clisp.org>
17904
17905         * modules/xsetenv: New module.
17906         * MODULES.html.sh (func_all_modules): Add it.
17907
17908 2003-01-27  Bruno Haible  <bruno@clisp.org>
17909
17910         * lib/xsetenv.h: New file, from GNU gettext.
17911         * lib/xsetenv.c: New file, from GNU gettext.
17912
17913 2003-01-23  Jim Meyering  <jim@meyering.net>
17914
17915         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
17916         from working on systems without dirfd (at least Irix and OSF1/Tru64).
17917
17918 2003-01-23  Bruno Haible  <bruno@clisp.org>
17919
17920         * modules/minmax: New module.
17921         * MODULES.html.sh (func_all_modules): Add it.
17922
17923 2003-01-23  Bruno Haible  <bruno@clisp.org>
17924
17925         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
17926         Eggert.
17927
17928 2003-01-22  Bruno Haible  <bruno@clisp.org>
17929
17930         * modules/exit: New module.
17931         * MODULES.html.sh (func_all_modules): Add it.
17932
17933 2003-01-22  Bruno Haible  <bruno@clisp.org>
17934
17935         * lib/exit.h: New file, from GNU gettext.
17936
17937 2003-01-19  Bruno Haible  <bruno@clisp.org>
17938
17939         * gnulib-tool: Recognize option --extract-maintainer.
17940         (func_get_maintainer): New function.
17941         * modules/*: Add Maintainer entry.
17942
17943 2003-01-16  Jim Meyering  <jim@meyering.net>
17944
17945         * m4/regex.m4: The `regex' struct is both input and output.
17946         Initialize it before each use.  Patch by Tim Waugh.
17947
17948 2003-01-16  Bruno Haible  <bruno@clisp.org>
17949
17950         * MODULES.html.sh: Add a table of contents. Add the module name as
17951         leftmost column. Add hyperlinks.
17952
17953 2003-01-15  Bruno Haible  <bruno@clisp.org>
17954
17955         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
17956
17957 2003-01-15  Bruno Haible  <bruno@clisp.org>
17958
17959         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
17960         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
17961         suffix.
17962
17963 2003-01-15  Bruno Haible  <bruno@clisp.org>
17964
17965         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
17966
17967 2003-01-15  Bruno Haible  <bruno@clisp.org>
17968
17969         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
17970         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
17971
17972 2003-01-14  Jim Meyering  <jim@meyering.net>
17973
17974         * lib/same.c (same_name): Tweak a comment.
17975
17976 2003-01-14  Bruno Haible  <bruno@clisp.org>
17977
17978         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
17979         when a string comparison is sufficient.
17980
17981 2003-01-14  Bruno Haible  <bruno@clisp.org>
17982
17983         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
17984         'unsigned int'.
17985
17986 2003-01-14  Bruno Haible  <bruno@clisp.org>
17987
17988         * lib/hash-pjw.c: Add comment about low quality of this function.
17989
17990 2003-01-13  Bruno Haible  <bruno@clisp.org>
17991
17992         * modules/stpcpy: Distribute lib/stpcpy.h.
17993         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
17994
17995 2003-01-13  Bruno Haible  <bruno@clisp.org>
17996
17997         * modules/*: Add a description.
17998         * modules/strpbrk: Fix Makefile.am snippet.
17999         * modules/strtoimax: Fix dependencies.
18000         * modules/strtoumax: Likewise.
18001
18002 2003-01-13  Bruno Haible  <bruno@clisp.org>
18003
18004         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
18005         * modules/alloca (Makefile.am): All object files depend on alloca.h.
18006         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
18007
18008 2003-01-13  Bruno Haible  <bruno@clisp.org>
18009
18010         * gnulib-tool (func_create_testdir): Store config/* files in the main
18011         directory.
18012         * config.rpath: Move to ...
18013         * config/config.rpath: ... here.
18014         * modules/gettext: Contains config/config.rpath, not config.rpath.
18015         * modules/iconv: Likewise.
18016
18017 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18018
18019         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18020         to avoid collisions with libcurses and libreadline.
18021
18022         * m4/getstr.m4: Remove.
18023         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
18024
18025 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18026
18027         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18028         to avoid collisions with libcurses and libreadline.
18029
18030         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
18031         * lib/getstr.h, getstr.c: Remove.
18032         * lib/getline.c: Include "getline.h", to check interface.
18033         Move body of old getstr.c here: this defines MIN_CHUNK and
18034         declares getdelim2, which is renamed from getstr.
18035         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
18036
18037         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
18038         All uses changed.
18039         * lib/linebuffer.h: Likewise.
18040         (readline): Remove backward-compatibility macro.
18041
18042 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18043
18044         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18045         to avoid collisions with libcurses and libreadline.
18046         * getstr: Remove.
18047         * MODULES.html.sh: Remove getstr.
18048         * modules/getline: Depend on unlocked-io, not getstr.
18049
18050 2003-01-12  Jim Meyering  <jim@meyering.net>
18051
18052         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
18053
18054 2003-01-10  Bruno Haible  <bruno@clisp.org>
18055
18056         * modules/alloca: Change Makefile.am requirements. Simplify Include
18057         requirements. Add lib/alloca_.h to file list.
18058
18059 2003-01-10  Bruno Haible  <bruno@clisp.org>
18060
18061         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
18062
18063 2003-01-10  Bruno Haible  <bruno@clisp.org>
18064
18065         * lib/alloca_.h: New file.
18066         * lib/getdate.y: Unconditionally include alloca.h.
18067         * lib/makepath.c: Likewise.
18068         * lib/setenv.c: Likewise.
18069         * lib/userspec.c: Likewise.
18070
18071 2003-01-09  Karl Berry  <karl@gnu.org>
18072
18073         * MODULES.html.sh: include `dirname $0` in PATH, to find
18074         gnulib-tool.
18075
18076 2003-01-09  Bruno Haible  <bruno@clisp.org>
18077
18078         * modules/stdbool: Change configure.ac, Makefile.am requirements.
18079         Simplify Include requirements. Add lib/stdbool.h.in to file list.
18080
18081 2003-01-09  Bruno Haible  <bruno@clisp.org>
18082
18083         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
18084
18085 2003-01-09  Bruno Haible  <bruno@clisp.org>
18086
18087         * lib/stdbool.h.in: New file.
18088
18089 2003-01-09  Bruno Haible  <bruno@clisp.org>
18090
18091         * gnulib-tool (func_all_modules): Ignore files ending in ~.
18092         * MODULES.html.sh: Likewise.
18093
18094 2003-01-08  Jim Meyering  <jim@meyering.net>
18095
18096         * lib/full-write.c: Undefine and define-away `const' after inclusion
18097         of errno.h, not before.  Suggestion from Bruno Haible.
18098
18099 2003-01-08  Bruno Haible  <bruno@clisp.org>
18100
18101         * modules/full-read: Depend on full-write.
18102
18103 2003-01-08  Bruno Haible  <bruno@clisp.org>
18104
18105         * lib/safe-read.c: Include specification header first, to ensure its
18106         selfcontainedness.
18107         * lib/full-write.c: Likewise.
18108
18109 2003-01-07  Jim Meyering  <jim@meyering.net>
18110
18111         * lib/full-write.c: Rework so that it may serve to define full_read,
18112         too.
18113         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
18114
18115 2003-01-07  Bruno Haible  <bruno@clisp.org>
18116
18117         * lib/strtoimax.c: Include <stdint.h> as an alternative to
18118         <inttypes.h>.
18119         * lib/xstrtol.h: Likewise.
18120         * lib/xstrtoimax.c: Likewise.
18121         * lib/xstrtoumax.c: Likewise.
18122         * lib/human.h: Likewise.
18123
18124         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
18125         on systems that have <inttypes.h> but not <stdint.h>.
18126
18127 2003-01-07  Bruno Haible  <bruno@clisp.org>
18128
18129         * MODULES.html.sh: Add copyright notice.
18130         (missed_files): Omit CVS directory entries.
18131         (func_module): Make it work with sed-3.02.
18132         * MODULES.txt: Remove file.
18133
18134 2003-01-06  Jim Meyering  <jim@meyering.net>
18135
18136         * lib/version-etc.c: Update year in translatable copyright string.
18137
18138 2003-01-03  Karl Berry  <karl@gnu.org>
18139
18140         * config/config.{guess,sub}: update from prep.
18141
18142 2003-01-02  Karl Berry  <karl@gnu.org>
18143
18144         * doc/COPYING.DOC: belatedly updated to 1.2.
18145
18146 2003-01-01  Karl Berry  <karl@gnu.org>
18147
18148         * gnulib-tool (func_verify_module): report module name $module in
18149         error message, not $1.
18150         * gnulib-tool (create-testdir): don't complain if destdir couldn't
18151         be created, only if it doesn't exist.
18152         * gnulib-tool (last_checkin_date): don't expand the $Date here.
18153
18154 2002-12-31  Paul Eggert  <eggert@twinsun.com>
18155
18156         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
18157
18158 2002-12-31  Paul Eggert  <eggert@twinsun.com>
18159
18160         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
18161         memcmp if strcoll doesn't work.
18162
18163 2002-12-31  Bruno Haible  <bruno@clisp.org>
18164
18165         * lib/utime.c (utime_null): No need to call ftruncate if the file was
18166         nonempty.
18167
18168 2002-12-31  Bruno Haible  <bruno@clisp.org>
18169
18170         * lib/memcoll.c (STRCOLL): New macro.
18171         (memcoll): Use it.
18172
18173 2002-12-31  Bruno Haible  <bruno@clisp.org>
18174
18175         * lib/localcharset.h: New file.
18176         * lib/localcharset.c: Include it.
18177         * lib/unicodeio.c: Likewise.
18178
18179 2002-12-31  Bruno Haible  <bruno@clisp.org>
18180
18181         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
18182         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
18183
18184 2002-12-31  Bruno Haible  <bruno@clisp.org>
18185
18186         * lib/getline.h: Include <stddef.h>, for size_t.
18187
18188         * lib/unicodeio.h: Include <stddef.h>, for size_t.
18189         * lib/unicodeio.c: Don't include <stddef.h>.
18190
18191 2002-12-31  Bruno Haible  <bruno@clisp.org>
18192
18193         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
18194         HAVE_TM_ZONE.
18195
18196 2002-12-24  Karl Berry  <karl@gnu.org>
18197
18198         * config/config.guess: update from prep.
18199
18200 2002-12-24  Bruno Haible  <bruno@clisp.org>
18201
18202         General infrasructure.
18203         * m4/README: Rewritten.
18204         * m4/onceonly.m4: New file.
18205         * m4/onceonly_2_57.m4: New file.
18206
18207         Module atexit.
18208         * m4/atexit.m4: New file.
18209
18210         Module strtod.
18211         * m4/strtod.m4: New file.
18212
18213         Module strtol.
18214         * m4/strtol.m4: New file.
18215
18216         Module strtoul.
18217         * m4/strtoul.m4: New file.
18218
18219         Module memchr.
18220         * m4/memchr.m4: New file.
18221
18222         Module memcmp.
18223         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
18224         (jm_FUNC_MEMCMP): Invoke it.
18225
18226         Module memcpy.
18227         * m4/memcpy.m4: New file.
18228
18229         Module memmove.
18230         * m4/memmove.m4: New file.
18231
18232         Module memset.
18233         * m4/memset.m4: New file.
18234
18235         Module strcspn.
18236         * m4/strcspn.m4: New file.
18237
18238         Module strpbrk.
18239         * m4/strpbrk.m4: New file.
18240
18241         Module strstr.
18242         * m4/strstr.m4: New file.
18243
18244         Module strerror.
18245         * m4/strerror.m4: New file.
18246
18247         Module mktime.
18248         * m4/mktime.m4: Renamed from jm-mktime.m4.
18249         (gl_PREREQ_MKTIME): New macro.
18250         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
18251
18252         Module malloc.
18253         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
18254         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
18255         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
18256
18257         Module realloc.
18258         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
18259         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
18260         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
18261
18262         Module strftime.
18263         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
18264         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
18265         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
18266         gl_TM_GMTOFF.
18267         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
18268
18269         Module xalloc.
18270         * m4/xalloc.m4: New file.
18271
18272         Module alloca.
18273         * m4/alloca.m4: New file.
18274
18275         Module putenv.
18276         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
18277         (jm_FUNC_PUTENV): Invoke it.
18278
18279         Module setenv.
18280         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
18281         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
18282         when invoked twice.
18283         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
18284         gt_FUNC_SETENV.
18285
18286         Module memrchr.
18287         * m4/memrchr.m4: New file.
18288
18289         Module stpcpy.
18290         * m4/stpcpy.m4: New file.
18291
18292         Module strcase.
18293         * m4/strcase.m4: New file.
18294
18295         Module strdup.
18296         * m4/strdup.m4: New file.
18297
18298         Module strnlen.
18299         * m4/strnlen.m4: New file.
18300
18301         Module strndup.
18302         * m4/strndup.m4: New file.
18303
18304         Module xstrtod.
18305         * m4/xstrtod.m4: New file.
18306
18307         Module xstrtol.
18308         * m4/xstrtol.m4: New file.
18309
18310         Module getdate.
18311         * m4/getdate.m4: New file.
18312
18313         Module unlocked-io.
18314         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
18315         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
18316         * m4/jm-glibc-io.m4n: Remove file.
18317
18318         Module long-options.
18319         * m4/long-options.m4: New file.
18320
18321         Module md5.
18322         * m4/md5.m4: New file.
18323
18324         Module sha.
18325         * m4/sha.m4: New file.
18326
18327         Module getstr.
18328         * m4/getstr.m4: New file.
18329
18330         Module getline.
18331         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
18332         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
18333         <sys/types.h>, for size_t. Use the function name gnu_getline, not
18334         simply getline. Infoke gl_PREREQ_GETLINE.
18335
18336         Module obstack.
18337         * m4/obstack.m4: New file.
18338
18339         Module hash.
18340         * m4/hash.m4: New file.
18341
18342         Module readtokens.
18343         * m4/readtokens.m4: New file.
18344
18345         Module strverscmp.
18346         * m4/strverscmp.m4: New file.
18347
18348         Module stdbool.
18349         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
18350         OSF/1.
18351
18352         Module strtoll.
18353         * m4/strtoll.m4: New file.
18354
18355         Module strtoull.
18356         * m4/strtoull.m4: New file.
18357
18358         Module strtoimax.
18359         * m4/strtoimax.m4: New file.
18360
18361         Module strtoumax.
18362         * m4/strtoumax.m4: New file.
18363
18364         Module xstrtoimax.
18365         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
18366         jm_AC_PREREQ_XSTRTOIMAX.
18367         Moved the strtol prerequisites to strtol.m4.
18368         Moved the strtoll prerequisites to strtoll.m4.
18369         Moved the strtoimax prerequisites to strtoimax.m4.
18370
18371         Module xstrtoumax.
18372         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
18373         jm_AC_PREREQ_XSTRTOUMAX.
18374         Moved the strtoul prerequisites to strtoul.m4.
18375         Moved the strtoull prerequisites to strtoull.m4.
18376         Moved the strtoumax prerequisites to strtoumax.m4.
18377
18378         Module chown.
18379         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
18380         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
18381
18382         Module dup2.
18383         * m4/dup2.m4: New file.
18384
18385         Module ftruncate.
18386         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
18387         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
18388
18389         Module getgroups.
18390         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
18391         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
18392
18393         Module gettimeofday.
18394         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
18395         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
18396         gl_PREREQ_GETTIMEOFDAY.
18397
18398         Module mkdir.
18399         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
18400         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
18401
18402         Module mkstemp.
18403         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
18404         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
18405         jm_AC_TYPE_UINTMAX_T.
18406         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
18407
18408         Module stat.
18409         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
18410         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
18411
18412         Module lstat.
18413         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
18414         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
18415
18416         Module timespec.
18417         * m4/timespec.m4 (gl_TIMESPEC): New macro.
18418         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
18419         * m4/st_mtim.m4: Indentation.
18420
18421         Module nanosleep.
18422         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
18423         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
18424         gl_PREREQ_NANOSLEEP.
18425
18426         Module regex.
18427         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
18428         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
18429         (gl_REGEX): New macro.
18430
18431         Module rename.
18432         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
18433         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
18434
18435         Module rmdir.
18436         * m4/rmdir.m4: New file.
18437
18438         Module utime.
18439         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
18440         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
18441         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
18442
18443         Module dirname.
18444         * m4/dirname.m4: New file.
18445
18446         Module getopt.
18447         * m4/getopt.m4: New file.
18448
18449         Module unistd-safer.
18450         * m4/unistd-safer.m4: New file.
18451
18452         Module fnmatch.
18453         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
18454         declaration.
18455         (gl_PREREQ_FNMATCH_EXTRA): New macro.
18456         (gl_FUNC_FNMATCH_POSIX): New macro.
18457         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
18458         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
18459         simply fnmatch.
18460
18461         Module exclude.
18462         * m4/exclude.m4: New file.
18463
18464         Module human.
18465         * m4/human.m4: New file.
18466
18467         Module acl.
18468         * m4/acl.m4: Nop.
18469
18470         Module backupfile.
18471         * m4/backupfile.m4: New file.
18472         * m4/d-ino.m4: Indentation.
18473
18474         Module fsusage.
18475         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
18476         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
18477         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
18478
18479         Module dirfd.
18480         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
18481         requirements.
18482
18483         Module euidaccess.
18484         * m4/euidaccess.m4: New file.
18485
18486         Module file-type.
18487         * m4/file-type.m4: New file.
18488
18489         Module fileblocks.
18490         * m4/fileblocks.m4: New file.
18491
18492         Module filemode.
18493         * m4/filemode.m4: New file.
18494
18495         Module isdir.
18496         * m4/isdir.m4: New file.
18497
18498         Module lchown.
18499         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
18500         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
18501
18502         Module makepath.
18503         * m4/makepath.m4: New file.
18504
18505         Module modechange.
18506         * m4/modechange.m4: New file.
18507
18508         Module mountlist.
18509         * m4/mountlist.m4: New file.
18510         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
18511         Indentation.
18512
18513         Module path-concat.
18514         * m4/path-concat.m4: New file.
18515
18516         Module pathmax.
18517         * m4/pathmax.m4: New file.
18518
18519         Module same.
18520         * m4/same.m4: New file.
18521
18522         Module save-cwd.
18523         * m4/save-cwd.m4: New file.
18524
18525         Module savedir.
18526         * m4/savedir.m4: New file.
18527
18528         Module xgetcwd.
18529         * m4/xgetcwd.m4: New file.
18530         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
18531
18532         Module xreadlink.
18533         * m4/xreadlink.m4: New file.
18534
18535         Module safe-read.
18536         * m4/safe-read.m4: New file.
18537
18538         Module safe-write.
18539         * m4/safe-write.m4: New file.
18540
18541         Module closeout.
18542         * m4/closeout.m4: New file.
18543
18544         Module stdio-safer.
18545         * m4/stdio-safer.m4: New file.
18546
18547         Module getpass.
18548         * m4/getpass.m4: New file.
18549
18550         Module getugroups.
18551         * m4/getugroups.m4: New file.
18552
18553         Module group-member.
18554         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
18555         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
18556
18557         Module idcache.
18558         * m4/idcache.m4: New file.
18559
18560         Module userspec.
18561         * m4/userspec.m4: New file.
18562
18563         Module gettime.
18564         * m4/clock_time.m4: New file.
18565         * m4/gettime.m4: New file.
18566
18567         Module settime.
18568         * m4/settime.m4: New file.
18569
18570         Module posixtm.
18571         * m4/posixtm.m4: New file.
18572
18573         Module gethostname.
18574         * m4/gethostname.m4: New file.
18575
18576         Module canon-host.
18577         * m4/canon-host.m4: New file.
18578
18579         Module gettext.
18580         * m4/codeset.m4: New file, from gettext-0.11.5.
18581         * m4/gettext.m4: New file, from gettext-0.11.5.
18582         * m4/glibc21.m4: New file, from gettext-0.11.5.
18583         * m4/iconv.m4: New file, from gettext-0.11.5.
18584         * m4/intdiv0.m4: New file, from gettext-0.11.5.
18585         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
18586         * m4/inttypes.m4: New file, from gettext-0.11.5.
18587         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
18588         * m4/isc-posix.m4: New file, from gettext-0.11.5.
18589         * m4/lcmessage.m4: New file, from gettext-0.11.5.
18590         * m4/lib-ld.m4: New file, from gettext-0.11.5.
18591         * m4/lib-link.m4: New file, from gettext-0.11.5.
18592         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
18593         * m4/progtest.m4: New file, from gettext-0.11.5.
18594         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
18595         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
18596         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
18597
18598         Module localcharset.
18599         * m4/localcharset.m4: New file.
18600
18601         Module hard-locale.
18602         * m4/hard-locale.m4: New file.
18603
18604         Module mbswidth.
18605         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
18606         onceonly macros.
18607         * m4/mbrtowc.m4: Add comment.
18608
18609         Module memcasecmp.
18610         * m4/memcasecmp.m4: New file.
18611
18612         Module memcoll.
18613         * m4/memcoll.m4: New file.
18614
18615         Module unicodeio.
18616         * m4/unicodeio.m4: New file.
18617
18618         Module rpmatch.
18619         * m4/rpmatch.m4: New file.
18620
18621         Module yesno.
18622         * m4/yesno.m4: New file.
18623
18624         Module exitfail.
18625         * m4/exitfail.m4: New file.
18626
18627         Module c-stack.
18628         * m4/c-stack.m4 (gl_C_STACK): New macro.
18629         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
18630
18631         Module error.
18632         * m4/error.m4 (gl_ERROR): New macro.
18633         (jm_PREREQ_ERROR): Use onceonly macros.
18634
18635         Module fatal.
18636         * m4/fatal.m4: New file.
18637
18638         Module getloadavg.
18639         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
18640         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
18641
18642         Module getpagesize.
18643         * m4/getpagesize.m4: New file.
18644
18645         Module getusershell.
18646         * m4/getusershell.m4: New file.
18647
18648         Module physmem.
18649         * m4/physmem.m4: New file.
18650
18651         Module posixver.
18652         * m4/posixver.m4: New file.
18653
18654         Module quotearg.
18655         * m4/quotearg.m4: New file.
18656
18657         Module quote.
18658         * m4/quote.m4: New file.
18659
18660         Module readutmp.
18661         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
18662
18663         Module sig2str.
18664         * m4/sig2str.m4: New file.
18665
18666         Other.
18667         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
18668         ulonglong.m4.
18669         * m4/intmax_t.m4: New file.
18670         * m4/d-type.m4: Indentation.
18671         * m4/jm-macros.m4: Update.
18672         * m4/prereq.m4 (jm_PREREQ): Update.
18673         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
18674         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
18675         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
18676         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
18677         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
18678         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
18679         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
18680         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
18681         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
18682         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
18683         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
18684         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
18685         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
18686         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
18687         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
18688         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
18689         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
18690         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
18691         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
18692
18693 2002-12-24  Bruno Haible  <bruno@clisp.org>
18694
18695         * MODULES.txt: Update according to m4/ changes.
18696
18697         Module gettext.
18698         * config.rpath: New file, from gettext-0.11.5.
18699
18700         * modules/*: New module descriptions.
18701         * gnulib-tool: New file.
18702         * MODULES.html.sh: New file.
18703
18704 2002-12-21  Karl Berry  <karl@gnu.org>
18705
18706         * doc/fdl.texi: update to version 1.2.
18707
18708 2002-12-19  Karl Berry  <karl@gnu.org>
18709
18710         * config/config.guess: update from prep.
18711
18712 2002-12-18  Bruno Haible  <bruno@clisp.org>
18713
18714         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
18715         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
18716
18717 2002-12-17  Bruno Haible  <bruno@clisp.org>
18718
18719         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
18720         stdlib.h, string.h.
18721
18722 2002-12-17  Bruno Haible  <bruno@clisp.org>
18723
18724         * lib/canon-host.c (strdup): Remove unused declaration.
18725
18726         * lib/fsusage.c: Include full_read.h.
18727         (get_fs_usage): Use full_read instead of safe_read.
18728
18729         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
18730
18731 2002-12-12  Karl Berry  <karl@gnu.org>
18732
18733         * config/config.guess: update from prep.
18734
18735 2002-12-11  Bruno Haible  <bruno@clisp.org>
18736
18737         * m4/setenv.m4: New file, from gettext-0.11.5.
18738
18739 2002-12-11  Bruno Haible  <bruno@clisp.org>
18740
18741         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
18742         not unsetenv().
18743         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
18744         modifications:
18745
18746         2002-12-11  Bruno Haible  <bruno@clisp.org>
18747
18748                 * setenv.c (alloca): Fall back to malloc.
18749                 (freea): New macro.
18750                 (setenv): Use freea() to free memory allocated with alloca().
18751
18752         2002-11-13  Bruno Haible  <bruno@clisp.org>
18753
18754                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
18755                 function declarations.
18756                 * unsetenv.c (unsetenv): Likewise.
18757
18758         2002-03-04  Bruno Haible  <bruno@clisp.org>
18759
18760                 Portability to AIX 4.3.3.
18761                 * unsetenv.c: New file, extracted from setenv.c.
18762                 * setenv.c: Move the unsetenv() function to unsetenv.c.
18763
18764         2001-12-20  Bruno Haible  <bruno@clisp.org>
18765
18766                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
18767                 use malloc instead. For SunOS 4.
18768
18769         2001-12-11  Bruno Haible  <bruno@clisp.org>
18770
18771                 * setenv.c: Declare alloca.
18772                 (compar_fn_t): New typedef.
18773                 (KNOWN_VALUE, STORE_VALUE): Use it.
18774
18775         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
18776         setenv.h.
18777
18778 2002-12-10  Paul Eggert  <eggert@twinsun.com>
18779
18780         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
18781         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
18782         Choose values that are less likely to collide with system fnmatch
18783         options.
18784         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
18785         defined (e.g., a pure POSIX system).
18786         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
18787         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
18788
18789 2002-12-06  Paul Eggert  <eggert@twinsun.com>
18790
18791         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
18792         a pain in practice to deal with generated m4 files.  This change
18793         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
18794
18795         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
18796         and jm-glibc-io.m4, as they are no longer a special case.
18797         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
18798         kludge and the auto-generation stuff.  Check only whether the
18799         functions are declared, not whether they exist, since older hosts
18800         that don't declare the functions can't use the optimization anyway.
18801
18802 2002-12-06  Jim Meyering  <jim@meyering.net>
18803
18804         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
18805
18806         Merge in changes from libc's misc/error.c, in preparation
18807         for the merge of gnulib's changes back into libc.
18808
18809         * lib/error.c (_): Define only if not already defined.
18810         Move definition to follow all #include directives.
18811         Include unlocked-io.h only if !_LIBC.
18812         [_LIBC]: Include <libio/libioP.h>.
18813         [USE_IN_LIBIO]: Include <libio/iolibio.h>
18814         (fflush): Tweak definition to use INTUSE.
18815         (putc): Define.
18816
18817 2002-12-05  Paul Eggert  <eggert@twinsun.com>
18818
18819         * lib/alloca.c [defined emacs]: Include "lisp.h".
18820         (xalloc_die) [defined emacs]: New macro.
18821         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
18822         [! defined emacs]: Include <xalloc.h>.
18823         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
18824         (pointer): Typedef to POINTER_TYPE *.
18825         (malloc): Remove decl; we now always use xmalloc.
18826         (alloca): Use old-style definition, since Emacs needs this.
18827         Check for arithmetic overflow when computing combined size.
18828
18829 2002-12-04  Paul Eggert  <eggert@twinsun.com>
18830
18831         Do not generate unlocked-io.h automatically, since it's easier to
18832         maintain it by hand.
18833
18834         * lib/unlocked-io.h: New file, from GNU diffutils,
18835         but with proper copyright notice and attribution.
18836         * lib/gen-uio: Remove.
18837         * lib/Makefile.am: Add copyright notice.
18838         (libfetish_a_SOURCES): Add unlocked-io.h.
18839         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
18840         (DISTCLEANFILES, io_functions): Remove macros.
18841         (EXTRA_DIST): Remove gen_uio.
18842         (unlocked-io.h): Remove rule.
18843
18844 2002-12-04  Jim Meyering  <jim@meyering.net>
18845
18846         Reflect the fact that stat.c and lstat.c are no longer generated.
18847         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
18848         (DISTCLEANFILES): Likewise.
18849         (EXTRA_DIST): Likewise.
18850         (all_local): Don't depend on stat.c or lstat.c.
18851         (stat.c, lstat.c): Remove rules.
18852         (EXTRA_DIST): Remove xstat.in.
18853
18854         * lib/xstat.in: Remove file.  Contents moved into stat.c.
18855         * lib/stat.c: New file.  Contents mostly from xstat.in.
18856         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
18857         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
18858
18859         * lib/safe-read.c: Rework so that it may serve to define safe_write,
18860         too.
18861         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
18862
18863 2002-12-03  Jim Meyering  <jim@meyering.net>
18864
18865         * lib/safe-read.c, safe-write.c: Change variable names and comments,
18866         but not semantics, to minimize the differences between these two files.
18867         (safe_read): Change comment to mention SAFE_READ_ERROR.
18868
18869         * lib/safe-read.c (IS_EINTR): Define.
18870         (safe_read): Use IS_EINTR in place of in-function cpp directives.
18871
18872 2002-12-02  Jim Meyering  <jim@meyering.net>
18873
18874         * lib/safe-read.c (EINTR): Define.
18875         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
18876         (INT_MAX): Provide fallback.
18877         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
18878
18879         * lib/safe-read.h (SAFE_READ_ERROR): Define.
18880
18881 2002-12-02  Bruno Haible  <bruno@clisp.org>
18882
18883         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
18884         Define, taken from safe-read.c.
18885         (INT_MAX): Provide fallback.
18886         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
18887         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
18888
18889         * lib/safe-read.c (EINTR): Remove definition.
18890         (safe_read): Don't use EINTR if it is absent.
18891
18892 2002-12-01  Jim Meyering  <jim@meyering.net>
18893
18894         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
18895         zero.
18896         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
18897
18898 2002-11-27  Paul Eggert  <eggert@twinsun.com>
18899
18900         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
18901         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
18902         with `if (! (value < limit)) abort ();', for readability.
18903
18904 2002-11-26  Karl Berry  <karl@gnu.org>
18905
18906         * lib/strdup.c: copy from libc again, with jim's ok.
18907         * lib/.cppi-disable: re-add strdup.c
18908
18909 2002-11-25  Karl Berry  <karl@gnu.org>
18910
18911         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
18912         instead of "strtol.c".
18913
18914 2002-11-25  Karl Berry  <karl@gnu.org>
18915
18916         * config/install-sh: update from automake for variable quoting, $0 in
18917         error msgs, etc.
18918
18919         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
18920         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
18921         entry.
18922
18923 2002-11-25  Jim Meyering  <jim@meyering.net>
18924
18925         * lib/mktime.c: Sync from libc, now that it has the latest fix.
18926
18927 2002-11-24  Karl Berry  <karl@gnu.org>
18928
18929         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
18930         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
18931
18932 2002-11-24  Jim Meyering  <jim@meyering.net>
18933
18934         Update from coreutils:
18935
18936         * lib/mktime.c: Merge in changes from libc.
18937
18938         Avoid a link-time failure on some Linux systems.
18939         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
18940         (otherwise).
18941         (__mon_yday): Declare with the STATIC attribute.
18942         (__mktime_internal): Likewise.
18943         Based on a report from Greg Schafer.
18944
18945 2002-11-23  Jim Meyering  <jim@meyering.net>
18946
18947         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
18948         Use `unsigned', not `int', as type of index.
18949
18950         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
18951
18952         * lib/fsusage.c: Remove unneeded parentheses around operands of
18953         `defined'.
18954
18955 2002-11-22  Paul Eggert  <eggert@twinsun.com>
18956
18957         * lib/quotearg.h: Allow multiple inclusion by surrounding with
18958         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
18959         so that we can be included first.
18960         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
18961         * lib/quotearg.c: Include quotearg.h immediately after config.h.
18962         No need to include stddef.h or sys/types.h any more.
18963         Surround local include files with "", not "<>".
18964         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
18965         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
18966         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
18967         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
18968         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
18969         (ISPRINT): Remove; no longer needed now that we assume C89.
18970
18971         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
18972         Preserve errno.
18973
18974         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
18975         quotearg_char): Use SIZE_MAX rather than
18976         (size_t) -1 when we are talking about "infinity".
18977
18978         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
18979
18980 2002-11-22  Paul Eggert  <eggert@twinsun.com>
18981
18982         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
18983         hint that one should use `if (! x) abort ();' rather than `assert
18984         (x);', and anyway it's one less thing to worry about configuring.
18985         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
18986         hash_rehash, hash_insert): Use abort rather than assert.
18987
18988 2002-11-22  Bruno Haible  <bruno@clisp.org>
18989
18990         * lib/safe-read.h: Assume C89. Add comments.
18991         (safe_read): Change return type to size_t.
18992         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
18993         byte counts > SSIZE_MAX correctly.
18994         * lib/safe-write.h: New file.
18995         * lib/safe-write.c: New file.
18996         * lib/full-read.h: New file.
18997         * lib/full-read.c: New file.
18998         * lib/full-write.h: Assume C89. Add comments.
18999         * lib/full-write.c: Include safe-write.h.
19000         (full_write): Rewritten to use safe_write.
19001         Suggested by Jim Meyering and Paul Eggert.
19002
19003 2002-11-21  Jim Meyering  <jim@meyering.net>
19004
19005         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
19006
19007         Merge in changes from the coreutils.
19008
19009         2002-09-25  Paul Eggert  <eggert@twinsun.com>
19010         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
19011         <stdint.h>.
19012         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
19013         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
19014         int.  Work more efficiently if X is the same width as uintmax_t.
19015         Do not compare X to -1, to avoid bogus compiler warning.
19016         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
19017         Don't assume that f_frsize and f_bsize are the same type.
19018
19019         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
19020         warning on FreeBSD.
19021
19022         * lib/makepath.c (make_path): Restore umask *before* creating the final
19023         component.
19024         (make_path): Minor reformatting.
19025
19026         * lib/xmalloc.c: Adjust to work with new autoconf macros,
19027         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
19028         HAVE_MALLOC/HAVE_REALLOC.
19029
19030         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
19031         dummy ones.  At least on GNU/Linux systems, `auto' means something
19032         else.
19033         From Michael Stone.
19034
19035 2002-11-21  Bruno Haible  <bruno@clisp.org>
19036
19037         Remove case insensitive option matching.
19038         * lib/argmatch.h (argcasematch): Remove declaration.
19039         (ARGCASEMATCH): Remove macro.
19040         (__xargmatch_internal): Remove case_sensitive argument.
19041         (XARGMATCH): Update.
19042         (XARGCASEMATCH): Remove macro.
19043         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
19044         case_sensitive argument.
19045         (argcasematch): Remove function.
19046         (__xargmatch_internal): Remove case_sensitive argument.
19047         (main): Use XARGMATCH instead of XARGCASEMATCH.
19048
19049         * lib/xmalloc.c: Change compile-time error message. Add comment about
19050         required autoconf version.
19051
19052 2002-11-20  Paul Eggert  <eggert@twinsun.com>
19053
19054         Merge argmatch cleanups from Bison.  Assume C89.
19055
19056         * lib/argmatch.c: Include config.h here, not in argmatch.h.
19057         Include stdlib.h, for EXIT_FAILURE.
19058         Always include <string.h>, since we assume C89.
19059         (EXIT_FAILURE): Remove pre-C89 bug workaround.
19060         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
19061         Include <stddef.h> instead, since it's all we need for size_t.
19062         (PARAMS): Remove.  All uses removed.
19063         (ARRAY_CARDINALITY): Do not bother to #undef.
19064         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
19065         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
19066         Remove unnecessary parentheses.
19067         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
19068         Insert necessary parentheses.
19069         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
19070         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
19071
19072 2002-11-19  Bruno Haible  <bruno@clisp.org>
19073
19074         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
19075         * lib/mbswidth.h: Include <stddef.h>, for size_t.
19076
19077         * lib/mbswidth.h (PARAMS): Remove macro.
19078         (mbswidth, mbsnwidth): Use ANSI C function declarations.
19079         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
19080
19081         * lib/gcd.h (PARAMS): Remove macro.
19082         (gcd): Use ANSI C function declarations.
19083         * lib/gcd.c (gcd): Likewise.
19084
19085 2002-11-15  Bruno Haible  <bruno@clisp.org>
19086
19087         * lib/strcspn.c: Include <stddef.h>.
19088         (strcspn): Use ANSI C function declaration. Change return type to
19089         size_t. Use NULL.
19090         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
19091         (strpbrk): Use NULL.
19092         * lib/strpbrk.h (PARAMS): Remove macro.
19093         (strpbrk): Use ANSI C function declaration.
19094         * lib/strstr.c: Don't include <sys/types.h>.
19095         * lib/strstr.h (PARAMS): Remove macro.
19096         (strstr): Use ANSI C function declarations.
19097
19098 2002-11-14  Karl Berry  <karl@gnu.org>
19099
19100         * config/mkinstalldirs: `do' on separate line, instead of
19101         `for var; do'.
19102
19103 2002-11-06  Bruno Haible  <bruno@clisp.org>
19104
19105         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
19106         * lib/gcd.c (gcd): Likewise.
19107
19108 2002-11-05  Bruno Haible  <bruno@clisp.org>
19109
19110         * lib/gcd.h: New file, from gettext-0.11.5.
19111         * lib/gcd.c: New file, from gettext-0.11.5.
19112
19113 2002-11-05  Bruno Haible  <bruno@clisp.org>
19114
19115         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19116         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19117         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19118         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
19119
19120         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
19121         <libintl.h>.
19122         * lib/makepath.c: Include gettext.h instead of <locale.h> and
19123         <libintl.h>.
19124
19125         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
19126         * lib/human.c: Include gettext.h instead of <libintl.h>.
19127         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
19128         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
19129         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
19130         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
19131         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
19132         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
19133         (textdomain): Remove definition.
19134         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
19135
19136         * lib/long-options.c: Remove include of <libintl.h> and definition of
19137         _.
19138         * lib/same.c: Remove include of <libintl.h> and definition of _.
19139
19140 2002-11-04  Owen Taylor  <otaylor@redhat.com>
19141
19142         * lib/config.charset: A few additions for Solaris.
19143
19144 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
19145
19146         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
19147         * lib/localcharset.c (locale_charset): Declare as extern "C".
19148
19149 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
19150
19151         * lib/config.charset: msdos in uk_UA uses CP1125.
19152
19153 2002-11-04  Bruno Haible  <bruno@clisp.org>
19154
19155         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
19156         * lib/strcase.h: New file, from GNU gettext-0.11.5.
19157         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
19158         * lib/strstr.h: New file, from GNU gettext-0.11.5.
19159         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
19160
19161 2002-11-04  Bruno Haible  <bruno@clisp.org>
19162
19163         * lib/localcharset.c (locale_charset): Don't return an empty string.
19164
19165 2002-11-04  Bruno Haible  <bruno@clisp.org>
19166
19167         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
19168         aliases.
19169
19170 2002-11-04  Bruno Haible  <bruno@clisp.org>
19171
19172         * lib/config.charset: Update for newest glibc. Add canonical names
19173         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
19174
19175 2002-11-04  Bruno Haible  <bruno@clisp.org>
19176
19177         * lib/config.charset: Add support for NetBSD.
19178
19179 2002-11-04  Bruno Haible  <bruno@clisp.org>
19180
19181         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
19182
19183 2002-11-01  Bruno Haible  <bruno@clisp.org>
19184
19185         * configure.in: Add AC_CONFIG_AUX_DIR call.
19186         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
19187         test/Makefile.
19188         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
19189
19190 2002-09-28  Karl Berry  <karl@gnu.org>
19191
19192         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
19193         installed automake until the next release, since changes have been
19194         made.
19195
19196 2002-09-25  Karl Berry  <karl@gnu.org>
19197
19198         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
19199         * lib/getopt*: copy from libc/posix.
19200         * lib/gettext.h: copy from gettext.
19201         * lib/.cppi-disable: add strdup.c, gettext.h.
19202
19203 2002-09-25  Karl Berry  <karl@gnu.org>
19204
19205         * config/srclist.txt: enable gettext.h check.
19206         * config/config.{guess,sub}: update from prep.
19207         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
19208                 from automake 1.6.3.
19209         See srclist*.
19210
19211 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
19212
19213         * regex.c (PATFETCH): Remove the translating fetch.
19214         (PATFETCH_RAW): Rename to PATFETCH.
19215         (set_image_of_range): New fun.
19216         (SET_RANGE_TABLE_WORK_AREA): Use it.
19217         (regex_compile): Don't translate the pattern chars so eagerly.
19218         Only do it when inserting an `exactn' bytecode or when handling
19219         a char-range.
19220         (mutually_exclusive_p): Avoid empty statement.
19221
19222 2002-07-06  Jim Meyering  <meyering@lucent.com>
19223
19224         * m4/README: Don't mention Makefile.am.in.
19225         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
19226
19227 2002-07-01  Jim Meyering  <meyering@lucent.com>
19228
19229         * lib/c-stack.c: Include sys/time.h.
19230         From Volker Borchert.
19231
19232 2002-06-26  Paul Eggert  <eggert@twinsun.com>
19233
19234         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
19235
19236 2002-06-26  Paul Eggert  <eggert@twinsun.com>
19237
19238         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
19239         New macro.  Use it uniformly instead of
19240         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
19241         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
19242         reported by Vin Shelton.
19243
19244 2002-06-22  Paul Eggert  <eggert@twinsun.com>
19245
19246         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
19247         Do not assume SA_SIGINFO behavior.
19248         Bug reported by Jim Meyering on NetBSD 1.5.2.
19249
19250 2002-06-22  Jim Meyering  <meyering@lucent.com>
19251
19252         * m4/c-stack.m4: New file, from diffutils-2.8.2.
19253         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
19254
19255         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
19256         now that configure.ac uses AC_GNU_SOURCE.
19257         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
19258         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
19259
19260         Update to latest tools.  Suggestions from Paul Eggert.
19261         * m4/stdbool.m4: New file, from diffutils-2.8.2.
19262         * m4/gnu-source.m4: Update from diffutils-2.8.2.
19263         * m4/fnmatch.m4: Likewise.
19264         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
19265         to AC_HEADER_STDBOOL
19266
19267 2002-06-22  Jim Meyering  <meyering@lucent.com>
19268
19269         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
19270         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
19271
19272 2002-06-22  Jim Meyering  <meyering@lucent.com>
19273
19274         * lib/c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
19275
19276         * lib/exitfail.c, exitfail.h: Likewise.
19277         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
19278
19279         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
19280         of fnmatch.h.
19281         (EXTRA_DIST): Add fnmatch_loop.c.
19282         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
19283
19284         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
19285         * lib/fnmatch.c: Update from diffutils-2.8.2.
19286         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
19287         * lib/fnmatch.h: Remove file.
19288
19289 2002-06-21  Jim Meyering  <meyering@lucent.com>
19290
19291         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
19292         * m4/mbrtowc.m4: Likewise.
19293
19294         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
19295         * m4/mbswidth.m4: Reflect name change:
19296         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
19297         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
19298
19299         * m4/lib-link.m4: Update from gettext-0.11.2.
19300         * m4/gettext.m4: Likewise.
19301
19302         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
19303         From Alfred M. Szmidt.
19304
19305 2002-06-18  Paul Eggert  <eggert@twinsun.com>
19306
19307         * lib/file-type.h: Report an error if neither S_ISREG nor
19308         S_IFREG is defined, instead of using a test specific to glibc
19309         2.2.  This should be safe, since POSIX requires S_ISREG and
19310         Unix Version 7 had S_IFREG.  We don't need to check for
19311         <sys/types.h> since we don't use any symbols that it defines.
19312
19313 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
19314
19315         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
19316         $@-t, so that each temporary file name is unique and valid in the first
19317         8 characters, for operation under DOS.
19318
19319 2002-06-15  Paul Eggert  <eggert@twinsun.com>
19320
19321         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
19322
19323 2002-06-15  Jim Meyering  <meyering@lucent.com>
19324
19325         Work even with DJGPP 2.03, which lacks support for symlinks.
19326         From Richard Dawe.
19327         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
19328         is defined.
19329         * lib/lchown.c (S_ISLNK): Likewise.
19330
19331 2002-06-15  Jim Meyering  <meyering@lucent.com>
19332
19333         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
19334         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
19335         have been included before this file.
19336
19337 2002-06-14  Jim Meyering  <meyering@lucent.com>
19338
19339         * lib/file-type.h: Use the version from diffutils-2.8.2.
19340         * lib/file-type.c: Likewise.
19341
19342 2002-06-07  Jim Meyering  <meyering@lucent.com>
19343
19344         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
19345         They're needed at least for NetBSD 1.5.2.
19346         ($statxfs_includes): Include those same headers.
19347         ($statxfs_includes): Include sys/vfs.h if available.
19348         ($statxfs_includes): Likewise for sys/statvfs.h.
19349         Check for the following members in both structs statfs and statvfs:
19350         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
19351
19352 2002-06-01  Jim Meyering  <meyering@lucent.com>
19353
19354         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
19355         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
19356
19357 2002-05-28  Jim Meyering  <meyering@lucent.com>
19358
19359         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
19360         Reported by Volker Borchert.
19361
19362 2002-05-27  Jim Meyering  <meyering@lucent.com>
19363
19364         Fix a problem seen only on nonconforming systems whereby ls.c's
19365         use of localtime, and then of gettimeofday would cause trouble:
19366         the localtime call used to initialize rpl_gettimeofday's save
19367         mechanism would clobber ls's current local time information so
19368         that in any long listing the first file would always be listed
19369         with date 1970-01-01.  Analysis by Volker Borchert.
19370
19371         * lib/gettimeofday.c (localtime): Undefine.
19372         (rpl_localtime): New function.
19373
19374 2002-05-27  Jim Meyering  <meyering@lucent.com>
19375
19376         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
19377         localtime.
19378
19379         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
19380         use the replacement function; it wouldn't resolve at link time.
19381         Reported by Volker Borchert.
19382
19383 2002-05-22  Jim Meyering  <meyering@lucent.com>
19384
19385         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
19386         file-type.h.
19387         * lib/file-type.h: New file.
19388         * lib/file-type.c (file_type): New file/function.  Extracted from
19389         diffutils.
19390
19391 2002-04-30  Jim Meyering  <meyering@lucent.com>
19392
19393         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
19394
19395 2002-04-29  Paul Eggert  <eggert@twinsun.com>
19396
19397         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
19398
19399 2002-04-29  Paul Eggert  <eggert@twinsun.com>
19400
19401         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
19402         Do not check for alloca.h (no longer used) or stdbool.h (was never
19403         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
19404
19405 2002-04-29  Paul Eggert  <eggert@twinsun.com>
19406
19407         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
19408
19409 2002-04-29  Jim Meyering  <meyering@lucent.com>
19410
19411         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
19412         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
19413         Use AC_FUNC_STRNLEN here instead.
19414
19415         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
19416         With autoconf-2.53a, it's part of AC_PROG_CC.
19417
19418 2002-04-28  Paul Eggert  <eggert@twinsun.com>
19419
19420         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
19421         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
19422
19423 2002-04-28  Paul Eggert  <eggert@twinsun.com>
19424
19425         * lib/sig2str.h, sig2str.c: New files.
19426         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
19427
19428 2002-04-28  Paul Eggert  <eggert@twinsun.com>
19429
19430         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
19431         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
19432         of 127, since 64 is the largest conceivable number for ancient
19433         nonstandard hosts.
19434         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
19435
19436 2002-04-28  Jim Meyering  <meyering@lucent.com>
19437
19438         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
19439
19440 2002-04-24  Jim Meyering  <meyering@lucent.com>
19441
19442         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
19443         (jm_PREREQ): Use it.
19444
19445         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
19446         mach/mach.h fcntl.h.
19447         Check for this function: setlocale.
19448
19449 2002-04-24  Jim Meyering  <meyering@lucent.com>
19450
19451         * lib/gettext.h: New file, from Gettext.
19452         * lib/Makefile.am (INCLUDES): Remove -I../intl.
19453         (libfetish_a_SOURCES): Add gettext.h.
19454
19455 2002-04-16  Jim Meyering  <meyering@lucent.com>
19456
19457         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
19458         ut_pid, ut_id, ut_exit.
19459
19460 2002-04-16  Jim Meyering  <meyering@lucent.com>
19461
19462         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
19463         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
19464         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
19465
19466 2002-04-12  Jim Meyering  <meyering@lucent.com>
19467
19468         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
19469         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
19470         existence of the getmntinfo function.  Needed for Darwin 5.3.
19471
19472         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
19473         This is necessary at least on Darwin 5.3.
19474
19475         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
19476         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
19477         strnlen.o in the library, and that makes some versions of ranlib
19478         object.
19479
19480 2002-04-12  Jim Meyering  <meyering@lucent.com>
19481
19482         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
19483
19484 2002-04-09  Jim Meyering  <meyering@lucent.com>
19485
19486         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
19487         to be more precise.  Rather than saying we're checking whether the
19488         function `works', say what we're testing.
19489         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
19490         Reported by Bruno Haible.
19491
19492 2002-03-10  Jim Meyering  <meyering@lucent.com>
19493
19494         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
19495         Suggestion from Santiago Vila.
19496
19497 2002-03-08  Jim Meyering  <meyering@lucent.com>
19498
19499         * lib/rename.c: Mention that this wrapper is needed also on
19500         mips-dec-ultrix4.4 systems.
19501
19502 2002-03-02  Jim Meyering  <meyering@lucent.com>
19503
19504         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
19505         not HAVE_CLOCK_SETTIME.
19506
19507 2002-02-27  Paul Eggert  <eggert@twinsun.com>
19508
19509         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
19510         Check for clock_settime.
19511
19512 2002-02-27  Paul Eggert  <eggert@twinsun.com>
19513
19514         * lib/nanosleep.h: Rename to....
19515         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
19516
19517         * lib/gettime.c: New file.
19518         * lib/settime.c: New file.
19519         * lib/stime.c: Remove.
19520
19521         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
19522         timespec.h.  Remove nanosleep.h.
19523
19524 2002-02-25  Paul Eggert  <eggert@twinsun.com>
19525
19526         * m4/acl.m4: New file.
19527         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
19528         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
19529
19530 2002-02-25  Paul Eggert  <eggert@twinsun.com>
19531
19532         * lib/acl.c, acl.h: New files.
19533         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
19534
19535 2002-02-24  Jim Meyering  <meyering@lucent.com>
19536
19537         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
19538         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
19539         cause trouble.  Reported by Nelson Beebe.
19540
19541 2002-02-23  Paul Eggert  <eggert@twinsun.com>
19542
19543         * lib/path-concat.c (xpath_concat): Reorder code to pacify
19544         compilers that don't know that xalloc_die never returns.
19545
19546 2002-02-20  Jim Meyering  <meyering@lucent.com>
19547
19548         * lib/getdate.c: Regenerate using bison-1.33.
19549
19550 2002-02-17  Jim Meyering  <meyering@lucent.com>
19551
19552         * config/config.guess (main): Don't use `head -1'; it's no longer
19553         portable. Use `sed 1q' instead.
19554
19555 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
19556
19557         * m4/codeset.m4: Upgrade to gettext-0.11.
19558         * m4/gettext.m4: Upgrade to gettext-0.11.
19559         * m4/glibc21.m4: Upgrade to gettext-0.11.
19560         * m4/iconv.m4: Upgrade to gettext-0.11.
19561         * m4/isc-posix.m4: Upgrade to gettext-0.11.
19562         * m4/lcmessage.m4: Upgrade to gettext-0.11.
19563         * m4/lib-ld.m4: New file, from gettext-0.11.
19564         * m4/lib-link.m4: New file, from gettext-0.11.
19565         * m4/lib-prefix.m4: New file, from gettext-0.11.
19566         * m4/progtest.m4: Upgrade to gettext-0.11.
19567
19568 2002-02-15  Paul Eggert  <eggert@twinsun.com>
19569
19570         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
19571         (jm_PREREQ): Use it.
19572
19573 2002-02-15  Paul Eggert  <eggert@twinsun.com>
19574
19575         * lib/posixver.c, posixver.h: New files.
19576         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
19577
19578 2002-02-02  Paul Eggert  <eggert@twinsun.com>
19579             Bruno Haible  <bruno@clisp.org>
19580
19581         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
19582         (fwrite_success_callback): New declaration.
19583         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
19584         print_unicode_char. Call failure callback instead of error.
19585         (fwrite_success_callback): New function.
19586         (exit_failure_callback): New function.
19587         (fallback_failure_callback): New function.
19588         (print_unicode_char): Call unicode_to_mb.
19589
19590 2002-01-26  Jim Meyering  <meyering@lucent.com>
19591
19592         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
19593         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
19594
19595 2002-01-26  Jim Meyering  <meyering@lucent.com>
19596
19597         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
19598
19599 2002-01-22  Paul Eggert  <eggert@twinsun.com>
19600
19601         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
19602
19603 2002-01-22  Jim Meyering  <meyering@lucent.com>
19604
19605         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
19606         Otherwise, some versions of automake would omit the rule that makes
19607         Makefile from Makefile.in.
19608
19609 2002-01-21  Paul Eggert  <eggert@twinsun.com>
19610
19611         * lib/xmemcoll.h, xmemcoll.c: New files.
19612         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
19613         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
19614         (memcoll): Set errno to zero if there is no error.
19615
19616         * lib/quotearg.c (quotearg_buffer_restyled):
19617         Fix bug with quoting buffers containing NUL when backslashing escapes.
19618         This bug was exposed by the other changes in this patch.
19619         (quotearg_n_options): New arg ARGSIZE.
19620         All callers changed.
19621         (quoting_options_from_style): New function.
19622         (quotearg_n_style): Use it.
19623         (quotearg_n_style_mem): New function.
19624
19625         * lib/quotearg.h (quotearg_n_style_mem): New function.
19626
19627 2002-01-19  Jim Meyering  <meyering@lucent.com>
19628
19629         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
19630         Remove useless quotes: DF_PROG="df".
19631         * m4/strnlen.m4: New file.
19632
19633 2002-01-16  Paul Eggert  <eggert@twinsun.com>
19634
19635         * lib/backupfile.c (ISDIGIT): Comment fix.
19636         * lib/getdate.y (ISDIGIT): Likewise.
19637         * lib/posixtm.c (ISDIGIT, year): Likewise.
19638         * lib/strverscmp.c (ISDIGIT): Likewise.
19639         * lib/userspec.c (ISDIGIT): Likewise.
19640
19641 2002-01-16  Jim Meyering  <meyering@lucent.com>
19642
19643         * lib/getdate.y: Add three semicolons, each just before a closing
19644         brace. Bison (as of version 1.31) no longer papers over that mistake.
19645
19646 2002-01-05  Jim Meyering  <meyering@lucent.com>
19647
19648         * lib/version-etc.c (version_etc_copyright): Update copyright year.
19649
19650 2001-12-19  Paul Eggert  <eggert@twinsun.com>
19651
19652         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
19653         not silently exit merely because the output buffer happens to
19654         have nothing pending.
19655
19656 2001-12-18  Paul Eggert  <eggert@twinsun.com>
19657
19658         See the big note in ../ChangeLog.
19659         * lib/human.c (suffixes): Prefer K to k for 1024.
19660         (generate_suffix_backwards): New function.
19661         (human_readable_inexact): Use it.
19662         * lib/xstrtol.c (__xstrtol): If there is no number but there
19663         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
19664         Accept 'K' as well as 'k'.
19665
19666 2001-12-15  Jim Meyering  <meyering@lucent.com>
19667
19668         * lib/regex.h (__restrict_arr): Update from libc.
19669
19670         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
19671         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
19672         (STREQ): Define.
19673
19674 2001-12-14  Jim Meyering  <meyering@lucent.com>
19675
19676         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
19677         Suggestion from Bruno Haible.
19678
19679 2001-12-10  Jim Meyering  <meyering@lucent.com>
19680
19681         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
19682         xrealloc, Instead, include "xalloc.h".
19683         (initbuffer): Don't cast xmalloc return value to char*.
19684         (readline): Reword comment.
19685         Don't cast xrealloc return value to char*
19686         Return NULL, not 0.
19687
19688 2001-12-09  Jim Meyering  <meyering@lucent.com>
19689
19690         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
19691         about `signed and unsigned type in conditional expression'.
19692         * lib/posixtm.c (posix_time_parse): Likewise.
19693
19694         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
19695
19696         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
19697         to avoid a pedantic warning.
19698
19699         * lib/getstr.c: Don't include assert.h.
19700         (getstr): Remove warning-evoking assertions.
19701         Return -1 if offset parameter is out of bounds.
19702         Change the type of a local from int to size_t.
19703
19704         * lib/strftime.c (my_strftime_localtime_r): Include this function
19705         definition in the `#if ! HAVE_TM_GMTOFF' block.
19706
19707         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
19708         Include xalloc.h instead.
19709
19710 2001-12-02  Jim Meyering  <meyering@lucent.com>
19711
19712         * lib/tempname.c: Don't declare getenv, thus reverting the change of
19713         2001-11-18.  It's no longer necessary, now that stdlib.h is always
19714         included.
19715
19716         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
19717         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
19718
19719 2001-11-30  Akim Demaille  <akim@epita.fr>
19720
19721         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
19722         before being defined.
19723
19724 2001-11-27  Paul Eggert  <eggert@twinsun.com>
19725
19726         * lib/quotearg.h (quotearg_n, quotearg_n_style):
19727         First arg is int, not unsigned.
19728         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19729         (SIZE_MAX, UINT_MAX): New macros.
19730         (quotearg_n_options): Abort if N is negative.
19731         Avoid overflow check on hosts where size_t is 64 bits and int
19732         is 32 bits, as overflow is impossible there.
19733         Fix off-by-one typo that caused unnecessary reallocation.
19734
19735 2001-11-27  Jim Meyering  <meyering@lucent.com>
19736
19737         * lib/tempname.c: Merge with version from libc.
19738         * lib/regex.c: Likewise.
19739
19740         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
19741         systems for which STDC_HEADERS is 0, it was not included, resulting in
19742         a warning about an integer-to-pointer conversion problem with getenv.
19743         Reported by Volker Borchert.
19744
19745 2001-11-26  Jim Meyering  <meyering@lucent.com>
19746
19747         * lib/gtod.h: Remove file.
19748         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
19749         * lib/gettimeofday.c: Don't include gtod.h.
19750         (GTOD_init): Remove function.
19751         (rpl_gettimeofday): Do its job here instead, rather than aborting.
19752         Suggestion from Volker Borchert.
19753
19754 2001-11-23  Jim Meyering  <meyering@lucent.com>
19755
19756         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
19757         it.
19758         * lib/hash.c (struct hash_table): Define it here instead.
19759
19760 2001-11-22  Jim Meyering  <meyering@lucent.com>
19761
19762         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
19763
19764 2001-11-20  Jim Meyering  <meyering@lucent.com>
19765
19766         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
19767         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
19768
19769 2001-11-19  Jim Meyering  <meyering@lucent.com>
19770
19771         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
19772         directory.  Use "conftestXXXXXX" as the template.
19773         Suggestion from Paul Eggert.
19774
19775         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
19776         immediately, so the test doesn't mistakenly hit the max-open-files
19777         limit.
19778
19779 2001-11-18  Paul Eggert  <eggert@twinsun.com>
19780
19781         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
19782         (TEMPORARIES): New macro.
19783         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
19784         removes an artificial limitation (e.g. HP-UX 10.20, where
19785         TMP_MAX is 17576).
19786
19787 2001-11-18  Jim Meyering  <meyering@lucent.com>
19788
19789         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
19790
19791 2001-11-18  Jim Meyering  <meyering@lucent.com>
19792
19793         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
19794         on SunOS 4.
19795
19796         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
19797         files will be created before anything else.
19798
19799 2001-11-17 Paul Eggert  <eggert@twinsun.com>
19800
19801         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
19802         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
19803
19804 2001-11-17  Jim Meyering  <meyering@lucent.com>
19805
19806         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
19807         Prompted by a report from Bob Proulx.
19808
19809         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
19810         Instead, require UTILS_FUNC_MKSTEMP.
19811
19812 2001-11-17  Jim Meyering  <meyering@lucent.com>
19813
19814         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
19815         Now, that's done as part of AC_FUNC_STRTOD.
19816
19817 2001-11-17  Jim Meyering  <meyering@lucent.com>
19818
19819         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
19820         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
19821         rather than group writable.  Patch by Juan F. Codagnone.
19822
19823         * lib/readtokens.c: Remove explicit declarations of xmalloc and
19824         xrealloc, Instead, include "xalloc.h".
19825
19826         * lib/mountlist.c: Include unlocked-io.h after all system headers.
19827         Remove explicit declarations of xmalloc, xrealloc,
19828         and xstrdup.  Instead, include "xalloc.h".
19829
19830         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
19831         unlocked-io.h.
19832         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
19833         Likewise.
19834         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
19835
19836         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
19837         Reported by Padraig Brady.
19838
19839         * lib/mkstemp.c: #undef mkstemp.
19840         Include config.h.
19841         (rpl_mkstemp): Rename from mkstemp.
19842         Protoize.
19843
19844 2001-11-16  Jim Meyering  <meyering@lucent.com>
19845
19846         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
19847         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
19848         determine the amount of total physical memory, use pstat_getstatic.
19849         HPUX-11 doesn't define _SC_PHYS_PAGES.
19850         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
19851         If sysconf couldn't be used to determine the amount of available
19852         physical memory, use both pstat_getstatic and pstat_getdynamic.
19853         Based on a patch from Bob Proulx.
19854
19855 2001-11-10  Jim Meyering  <meyering@lucent.com>
19856
19857         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
19858         (jm_PREREQ): Use it.
19859
19860 2001-11-09  Jim Meyering  <meyering@lucent.com>
19861
19862         * m4/jm-macros.m4: Require autoconf-2.52f.
19863         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
19864         Use these AC_-prefixed names, not the AM_-prefixed ones.
19865
19866         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
19867
19868 2001-11-05  Jim Meyering  <meyering@lucent.com>
19869
19870         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
19871
19872 2001-11-04  Jim Meyering  <meyering@lucent.com>
19873
19874         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
19875         $DEFS.
19876
19877 2001-11-03  Jim Meyering  <meyering@lucent.com>
19878
19879         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
19880         of AC_DEFUN.
19881
19882         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
19883         know the name of the variable in the macro definition.
19884
19885 2001-11-03  Jim Meyering  <meyering@lucent.com>
19886
19887         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
19888         in argmatch_to_argument call.
19889
19890         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
19891         argument.
19892
19893         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
19894         e.g., a fault due to an attempt to free a NULL pointer.
19895
19896 2001-11-01  Jim Meyering  <meyering@lucent.com>
19897
19898         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
19899         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
19900
19901 2001-11-01  Jim Meyering  <meyering@lucent.com>
19902
19903         * lib/dirfd.c, dirfd.h: New files.
19904         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
19905
19906         * lib/hash.c (hash_print) [TESTING]: Clean up.
19907
19908 2001-10-22  Paul Eggert  <eggert@twinsun.com>
19909
19910         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
19911         to avoid a warning if -Wall.
19912
19913 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
19914
19915         * README: New file
19916         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
19917         (per RMS's instructions, this is now the canonical source)
19918         * lgpl/, gpl/: New directories.
19919
19920 2001-10-21  Paul Eggert  <eggert@twinsun.com>
19921
19922         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
19923
19924 2001-10-21  Jim Meyering  <meyering@lucent.com>
19925
19926         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
19927         this code would end up calling gettext even in packages built
19928         with --disable-nls.
19929         * lib/getopt.c (_): Likewise.
19930         * lib/regex.c (_): Likewise.
19931
19932 2001-10-20  Paul Eggert  <eggert@twinsun.com>
19933
19934         * m4/error.m4 (jm_PREREQ_ERROR):
19935         Do not invoke AC_CHECK_FUNCS with strerror_r, as
19936         AC_FUNC_STRERROR_R does that.
19937         Check for strerror declaration.
19938
19939         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
19940         are supposed to have them these days.
19941         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
19942         Merge changes from latest Autoconf CVS.
19943         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
19944         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
19945         POSIX decided to standardize on the int flavor of strerror_r.
19946
19947 2001-10-20  Paul Eggert  <eggert@twinsun.com>
19948
19949         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
19950         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
19951         Use strerror_r that is only a macro, even if it is not a function.
19952         (strerror): Check for HAVE_DECL_STRERROR before declaring.
19953         (private_strerror): Use prototypes, not old-style function definition.
19954         (print_errno_message): New function.
19955         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
19956         char*-flavored one.
19957         (error_tail, error, error_at_line): Use it.
19958
19959 2001-10-11  Jim Meyering  <meyering@lucent.com>
19960
19961         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
19962         and quote_n (1, ... to avoid clobbering a buffer.
19963
19964 2001-10-05  Jim Meyering  <meyering@lucent.com>
19965
19966         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
19967         hash-pjw.h.
19968         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
19969         * lib/hash-pjw.h: New file.
19970
19971 2001-09-30  Jim Meyering  <meyering@lucent.com>
19972
19973         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
19974         `struct fsstat' has the `f_fstypename' member.
19975         Use that to define FS_TYPE, which is now used to make
19976         the getfsstat link test tighter.
19977
19978 2001-09-30  Jim Meyering  <meyering@lucent.com>
19979
19980         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
19981         Include <sys/ucred.h>, for Apple Darwin.
19982         Include sys/mount.h and sys/fs_types.h only if available.
19983         (FS_TYPE): Define.
19984         (read_filesystem_list): Use FS_TYPE.
19985
19986 2001-09-29  Paul Eggert  <eggert@twinsun.com>
19987
19988         * lib/exclude.c (excluded_filename): 0 -> false, since it's
19989         a boolean context.
19990
19991 2001-09-29  Jim Meyering  <meyering@lucent.com>
19992
19993         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
19994         [one-argument getmntent function]): Include stdio.h before mntent.h.
19995         SunOS 4.1.x needs it for the declaration of `FILE'.
19996         Patch by Volker Borchert.
19997
19998         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
19999         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
20000         sys/fs_types.h, and make the link-test for getfsstat guard #include
20001         directives with appropriate #if HAVE_*_H tests so that we can
20002         detect getfsstat on Apple Darwin1.3.7 systems.
20003         Reported by Nelson Beebe.
20004         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
20005
20006 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20007
20008         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20009         #defines strtoimax.  Also treat the other strto* functions
20010         like strtoimax.
20011
20012         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
20013         Check for strtoul and strtoumax,
20014         as those declarations are made even in the signed case.
20015         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
20016         Likewise, for strtol and strtoimax.
20017
20018 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20019
20020         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20021         #defines strtoimax.  Also treat the other strto* functions
20022         like strtoimax.
20023
20024         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
20025         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
20026         (strtoimax, strtoumax): Do not declare if already defined as a macro.
20027
20028 2001-09-26  Jim Meyering  <meyering@lucent.com>
20029
20030         Most macros in unlocked-io.h had the wrong number of arguments.
20031         * lib/gen-uio: New script.
20032         (USE_UNLOCKED_IO): Define to 1 if not already defined.
20033         * lib/unlocked-io.hin: Remove file.
20034         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
20035         rather than trying to embed it here.
20036         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
20037         Reported by Padraig Brady.
20038
20039 2001-09-25  Volker Borchert  <bt@teknon.de>
20040
20041         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
20042         `result'.
20043
20044 2001-09-24  Jim Meyering  <meyering@lucent.com>
20045
20046         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
20047
20048 2001-09-23  Jim Meyering  <meyering@lucent.com>
20049
20050         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
20051         instead of the mere test for existence of mntent.h.  The latter
20052         would get a false-positive on AIX 3.4 systems.
20053         In the outer getmntent if-block, don't die if neither of the getmntent
20054         tests succeeds.  Instead, just fall through and continue with the
20055         remaining tests.
20056
20057 2001-09-23  Jim Meyering  <meyering@lucent.com>
20058
20059         * lib/mountlist.c: Remove useless parentheses in #if directives.
20060         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
20061         the deprecated MOUNTED symbol is no longer defined in mntent.h.
20062
20063 2001-09-22  Jim Meyering  <meyering@lucent.com>
20064
20065         * m4/gettext.m4: New file.  From gettext.
20066         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
20067         * m4/progtest.m4: Likewise
20068         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
20069         * m4/glibc21.m4: Likewise.
20070
20071         * m4/libintl.m4: Remove.  No longer used.
20072
20073 2001-09-22  Jim Meyering  <meyering@lucent.com>
20074
20075         * lib/localcharset.c: Update from latest gettext.
20076         * lib/config.charset: Likewise.
20077
20078 2001-09-20  Jim Meyering  <meyering@lucent.com>
20079
20080         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
20081         strtoimax.
20082         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
20083         strtoumax.
20084
20085 2001-09-20  Jim Meyering  <meyering@lucent.com>
20086
20087         * lib/xstrtol.c (strtoimax): Guard declaration with
20088         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
20089         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
20090         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
20091         (strtoumax): Likewise, for completeness (it wasn't necessary).
20092
20093 2001-09-17  Paul Eggert  <eggert@twinsun.com>
20094
20095         * lib/strtoimax.c (HAVE_LONG_LONG):
20096         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
20097         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
20098         to work around bug in IBM C compiler.
20099
20100 2001-09-17  Jim Meyering  <meyering@lucent.com>
20101
20102         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
20103         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
20104         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
20105         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
20106         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
20107         whenever the right hand side need not be expanded by the shell.
20108
20109 2001-09-16  Paul Eggert  <eggert@twinsun.com>
20110
20111         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
20112         library.  It's not correct, as some older glibcs are buggy.
20113         fnmatch wasn't fixed until glibc 2.2.
20114
20115         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
20116         special shell magic here.
20117
20118 2001-09-16  Jim Meyering  <meyering@lucent.com>
20119
20120         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
20121         * m4/jm-macros.m4: Require it.
20122
20123 2001-09-16  Jim Meyering  <meyering@lucent.com>
20124
20125         * lib/mkdir.c: New file.
20126
20127 2001-09-15  Jim Meyering  <meyering@lucent.com>
20128
20129         * m4/jm-macros.m4: Check for help2man.
20130
20131 2001-09-11  Jim Meyering  <meyering@lucent.com>
20132
20133         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
20134         The body, by Paul Eggert, was moved here from configure.in.
20135         * m4/jm-macros.m4: Require UTILS_HOST_OS.
20136
20137 2001-09-04  Paul Eggert  <eggert@twinsun.com>
20138
20139         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
20140         (jm_PREREQ): Use it.
20141
20142 2001-09-04  Paul Eggert  <eggert@twinsun.com>
20143
20144         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
20145         Use ssize_t, not int, to store result of readlink.
20146         Check for ssize_t overflow as well as size_t overflow,
20147         as POSIX says the result of readlink is implementation-defined
20148         when ssize_t overflows.
20149         Remove unnecessary cast to char*.
20150         Use free+malloc instead of realloc, as the storage doesn't need
20151         to be preserved and it's clearer and can be more efficient that way.
20152         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
20153         * lib/xreadlink.h (xreadlink): Update prototype.
20154
20155 2001-09-04  Paul Eggert  <eggert@twinsun.com>
20156
20157         * lib/xgetcwd.c: Revert some of the previous change; intead,
20158         fix the HAVE_GETCWD_NULL code to behave more like the
20159         !HAVE_GETCWD_NULL code used to.
20160
20161         Include "xalloc.h".
20162         (xgetcwd): Do not return NULL when memory is exhausted; instead,
20163         invoke xalloc_die.
20164
20165 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20166
20167         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
20168         sys/param.h, as pathmax.h includes them.
20169
20170 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20171
20172         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
20173         (jm_PREREQ_XGETCWD): New macro.
20174
20175         * m4/getcwd.m4: New file.
20176
20177 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20178
20179         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
20180         like the HAVE_GETCWD_NULL code.
20181         Include pathmax.h if not HAVE_GETCWD.
20182         Do not include xalloc.h.
20183         (INITIAL_BUFFER_SIZE): New symbol.
20184         Do not use xmalloc / xrealloc, since the caller is responsible for
20185         handling errors.  Preserve errno around `free' during failure.
20186         Do not overrun buffer when using getwd.
20187
20188 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20189
20190         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
20191         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
20192         getcwd (NULL, 0).
20193
20194 2001-09-03  Paul Eggert  <eggert@twinsun.com>
20195
20196         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
20197         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
20198         spotted by Jim Meyering.
20199
20200 2001-09-03  Jim Meyering  <meyering@lucent.com>
20201
20202         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
20203         failure.
20204
20205 2001-09-02  Jim Meyering  <meyering@lucent.com>
20206
20207         * lib/error.c: Update from GNU libc.
20208
20209 2001-09-01  Jim Meyering  <meyering@lucent.com>
20210
20211         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
20212         Used by df.
20213
20214 2001-09-01  Jim Meyering  <meyering@lucent.com>
20215
20216         * lib/xreadlink.c: New file.
20217         * lib/xreadlink.h: New file.
20218         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
20219         xreadlink.h.
20220
20221         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
20222         doesn't conflict with sparc Solaris 7's definition in
20223         /usr/include/sys/int_types.h.
20224
20225         * lib/exclude.c: Use `""', not `<>' to #include non-system header
20226         files.
20227         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
20228         and strncasecmp as r-values.  Unixware didn't have declarations.
20229
20230 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20231
20232         * lib/xstrtol.h: Add copyright notice.
20233         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
20234         LONGINT_INVALID_SUFFIX_CHAR.
20235
20236 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20237
20238         * lib/xstrtol.c (strtoimax): New decl.
20239
20240 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20241
20242         * lib/xgetcwd.c: Don't include pathmax.h.
20243         Include stdlib.h and unistd.h if available.
20244         Include xalloc.h.
20245         (xmalloc, xstrdup, free): Remove decls.
20246         (xgetcwd): Don't assume sizes fit in unsigned.
20247         Check for overflow when computing sizes.
20248         Simplify reallocation code.
20249
20250 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20251
20252         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
20253         a directory's st_size can have an arbitrary value, so the old
20254         usage could waste an arbitrary amount of memory.  All uses
20255         changed.
20256         * lib/savedir.h: Update prototype.
20257
20258 2001-08-31  Paul Eggert  <eggert@twinsun.com>
20259
20260         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
20261
20262         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
20263         old strtoimax.c.
20264
20265         Also, make the following further changes to make this file's
20266         configuration more similar to that of strtol.c:
20267         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
20268         (strtoumax, uintmax_t, strtoull, strtol): Remove.
20269         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
20270         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
20271         changed to signed values.
20272
20273         And make the following changes as well:
20274         Fix copyright notice, as 1999 was missing.
20275         (verify): New macro.
20276         (strtoimax): Check sizes at compile-time, not run-time.
20277         Prefer strtol to strtoll if both work.
20278         (main): Remove; it was not that useful and was a pain to maintain.
20279
20280         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
20281
20282 2001-08-31  Jim Meyering  <meyering@lucent.com>
20283
20284         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
20285         Use an initial, malloc'd, buffer of length 128 rather than
20286         a statically allocated one of length 1024.
20287
20288 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20289
20290         Simplify code, partly by assuming autoconf 2.52 semantics.
20291
20292         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
20293
20294         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
20295         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
20296         All uses removed.
20297         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
20298         Move AC_REQUIRE to next-to-top level, to avoid confusion.
20299         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
20300         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
20301         jm_AC_HEADER_INTTYPES_H.
20302         * m4/jm-macros.m4 (jm_MACROS): Likewise.
20303
20304         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
20305
20306         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
20307         Quote first arg of AC_DEFUN.
20308         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
20309         since they are needed to parse the include file even if we need
20310         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
20311         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
20312         but with opposite signedness.
20313
20314 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20315
20316         Merge 'exclude' changes from tar 1.13.22.
20317         This fixes one or two unlikely storage allocation overflow bugs,
20318         but doesn't change user-visible behavior otherwise.
20319
20320 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20321
20322         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
20323         (jm_PREREQ_EXCLUDE): New macro.
20324
20325 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20326
20327         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20328         tm to be declared.
20329
20330 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20331
20332         * lib/hash.c: Remove '2001' from copyright notice.
20333
20334 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20335
20336         * lib/full-write.h: New file.
20337         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
20338         * lib/full-write.c: Correct credits, as cccp.c no longer
20339         exists and anyway it was so heavily changed from the old cccp
20340         code as to be unrecognizable.  Include full-write.h.
20341         (full_write) Return size_t, with short writes meaning failure.
20342         All callers changed.  This fixes a bug with large buffers
20343         on 64-bit hosts.
20344         * lib/utime.c: Include full-write.h.
20345
20346 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20347
20348         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
20349         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
20350         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
20351         Include if available.
20352         (<xalloc.h>): Include
20353         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
20354         (verify): New macro.  Use it to verify that EXCLUDE macros do not
20355         collide with FNM macros.
20356         (struct patopts): New struct.
20357         (struct exclude): Use it, as exclude patterns now come with options.
20358         (new_exclude): Support above changes.
20359         (new_exclude, add_exclude_file):
20360         Initial size must now be a power of two to simplify overflow checking.
20361         (free_exclude, fnmatch_no_wildcards): New function.
20362         (excluded_filename): No longer requires options arg, as the options
20363         are determined by add_exclude.  Now returns bool, not int.
20364         (excluded_filename, add_exclude):
20365         Add support for the fancy new exclusion options.
20366         (add_exclude, add_exclude_file): Now takes int options arg.
20367         Check for arithmetic overflow when computing sizes.
20368         (add_exclude_file): xrealloc might modify errno, so don't
20369         realloc until after errno might be used.
20370
20371         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
20372         New macros.
20373         (free_exclude): New decl.
20374         (add_exclude, add_exclude_file): Now takes int options arg.
20375         (excluded_filename): No longer requires options arg, as the options
20376         are determined by add_exclude.  Now returns bool, not int.
20377
20378 2001-08-30  Paul Eggert  <eggert@twinsun.com>
20379
20380         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
20381
20382 2001-08-27  Jim Meyering  <meyering@lucent.com>
20383
20384         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
20385
20386         * lib/version-etc.c (N_): Remove definition.
20387         Revert most of last change.
20388         Instead, simply don't mark the `Copyright...' string for translation.
20389         Based on advice from Paul Eggert.
20390
20391         * lib/strtoxmax.c: Tweak comment.
20392
20393 2001-08-26  Jim Meyering  <meyering@lucent.com>
20394
20395         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
20396
20397         * m4/xstrtoimax.m4: New file.
20398         * m4/xstrtoumax.m4: Add comments explaining why we
20399         AC_REPLACE_FUNCS(strtol).
20400
20401 2001-08-26  Jim Meyering  <meyering@lucent.com>
20402
20403         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
20404         of copyright with `%s' so translators don't get an untranslated
20405         message in 2002.
20406         (COPYRIGHT_YEAR): Define.
20407         (version_etc): Use fprintf rather than fputs.
20408         Suggestion from Ulrich Drepper.
20409
20410         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
20411
20412         * lib/strtoll.c: New file, from GNU libc.
20413         * lib/xstrtoimax.c: New file.
20414
20415         * lib/xstrtol.h: Add xstrtoimax.
20416         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
20417         * lib/strtoimax.c: New file.  Likewise, but first define
20418         STRTOUXMAX_SIGNED.
20419
20420         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
20421         ...
20422         * lib/strtoxmax.c: ... then renamed to this.
20423
20424 2001-08-18  Paul Eggert  <eggert@twinsun.com>
20425
20426         * m4/inttypes.m4: Add AC_PREREQ(2.13).
20427         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
20428         (jm_AC_TYPE_INTMAX_T): New macro.
20429         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
20430
20431         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
20432
20433         * m4/longlong.m4: Renamed from ulonglong.m4.
20434         * m4/inttypes.m4: Renamed from inttypes_h.m4.
20435         * m4/uintmax_t.m4: Removed.
20436
20437 2001-08-13  Paul Eggert  <eggert@twinsun.com>
20438
20439         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
20440         Port to Solaris 8, where 'sed' requires a space after the 'r'
20441         command, and where sh dislikes "$/".  Clean up the spacing a bit.
20442         Redirect output to $tmp just once.
20443
20444 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
20445
20446         * lib/addext.c (<errno.h>): Include.
20447         (errno): Declare if not defined.
20448         (addext): Work correctly when pathconf returns -1 and leaves
20449         errno alone because there is no limit.  Also, work even if
20450         pathconf returns a value greater than SIZE_MAX.
20451
20452 2001-08-12  Jim Meyering  <meyering@lucent.com>
20453
20454         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
20455         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
20456         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
20457         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
20458         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
20459         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
20460         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
20461         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
20462         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
20463         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
20464         utime.m4, utimes.m4, xstrtoumax.m4:
20465         Quote the first argument in each use of AC_DEFUN.
20466
20467 2001-08-12  Jim Meyering  <meyering@lucent.com>
20468
20469         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
20470         Simply `return getcwd (NULL, 0);'.
20471         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
20472         Use 1300 as initial value for length, not PATH_MAX.
20473
20474         * lib/pathmax.h: Clean up cpp syntax.
20475
20476 2001-08-12  Jim Meyering  <meyering@lucent.com>
20477
20478         * lib/gettimeofday.c: New file.
20479         * lib/gtod.h: New file.
20480         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
20481
20482 2001-08-05  Jim Meyering  <meyering@lucent.com>
20483
20484         * m4/jm-macros.m4: Require autoconf-2.52.
20485
20486 2001-08-04  Jim Meyering  <meyering@lucent.com>
20487
20488         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
20489         stmt, to get in sync with glibc.
20490
20491 2001-08-03  Paul Eggert  <eggert@twinsun.com>
20492
20493         The following changes are from gettext 0.10.39 as maintained by
20494         Bruno Haible.
20495
20496         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
20497         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
20498         with inverted sense.  All uses changed.
20499
20500         * lib/mbswidth.c: Don't include <limits.h>.
20501         Include <stdlib.h> and <string.h> unconditionally.
20502         (iswcntrl, mbsinit, ISCNTRL): New macros.
20503         (mbsnwidth): Use K&R style function declarations.
20504         Don't bother checking for MB_LEN_MAX == 1, since the compiler
20505         can optimize it when MB_CUR_MAX == 1.
20506         The width of control characters is zero, not 1.
20507
20508 2001-08-03  Paul Eggert  <eggert@twinsun.com>
20509
20510         The following changes are from gettext 0.10.39 as maintained by
20511         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
20512
20513         * m4/codeset.m4: Upgrade to serial AM1.
20514         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
20515         all uses changed.  Quote first arg of AC_DEFUN.
20516         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
20517
20518         * m4/iconv.m4: Upgrade to serial AM2.
20519         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
20520         Add --with-libconv-prefix.
20521         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
20522         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
20523         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
20524         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
20525         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
20526
20527         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
20528         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
20529         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
20530         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
20531         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
20532         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
20533         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
20534         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
20535         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
20536
20537         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
20538         string.h any more.
20539
20540         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
20541         not the default value.
20542
20543         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
20544         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
20545         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
20546         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
20547         Also check for iswcntrl, used for wcwidth fallback.
20548         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
20549         to Autoconf 2.13.
20550
20551 2001-08-03  Jim Meyering  <meyering@lucent.com>
20552
20553         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
20554         as it was in the original.  Reported by Paul Eggert.
20555
20556 2001-07-16  Jim Meyering  <meyering@lucent.com>
20557
20558         * m4/gettimeofday.m4: New file.
20559         Prompted by a report from Bernhard Baehr.
20560
20561 2001-07-15  Jim Meyering  <meyering@lucent.com>
20562
20563         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
20564         stuff. Now it's in ../Makefile.cfg.
20565
20566 2001-07-15  Jim Meyering  <meyering@lucent.com>
20567
20568         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
20569         (BUILT_SOURCES): Add unlocked-io.h.
20570         (io_functions): Define.
20571         (unlocked-io.h): New rule.
20572         (DISTCLEANFILES): Add unlocked-io.h.
20573         (all-local): Depend on unlocked-io.h, to ensure it is created.
20574
20575         * lib/unlocked-io.hin: New file
20576
20577         * lib/regex.c: Update from glibc.
20578
20579 2001-07-05  Jim Meyering  <meyering@lucent.com>
20580
20581         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
20582         recommendation.
20583         (libfetish_a_SOURCES): Put all .h files here instead.
20584         Remove a thus-exposed (better checks in automake) duplicate and
20585         two unnecessary .h files.
20586
20587 2001-07-04  Jim Meyering  <meyering@lucent.com>
20588
20589         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
20590         that generates jm-glibc-io.m4 so that it doesn't trigger any make
20591         distcheck failure.
20592
20593 2001-07-02  Jim Meyering  <meyering@lucent.com>
20594
20595         The following changes were prompted by suggestions from Bruno Haible.
20596
20597         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
20598         is now generated.
20599         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
20600         definition of EXTRA_DIST.
20601         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
20602         ensure that the generated file is created/updated whenever the list
20603         of $(unlocked_functions) is changed.
20604         (jm-glibc-io.m4): New rule.
20605         (unlocked-io.h): New rule -- currently unused.
20606
20607 2001-06-24  Jim Meyering  <meyering@lucent.com>
20608
20609         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
20610         unmatched right bracket, rather than kludging it with an extra,
20611         falsely-matching quote in a comment.  Patch by Akim Demaille.
20612
20613 2001-06-11  Jim Meyering  <meyering@lucent.com>
20614
20615         * lib/regex.c: Update from GNU libc.
20616
20617 2001-05-27  Jim Meyering  <meyering@lucent.com>
20618
20619         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
20620         Check for ut_type in struct utmp.
20621
20622 2001-05-27  Jim Meyering  <meyering@lucent.com>
20623
20624         * lib/readutmp.h (UT_TYPE): Define.
20625
20626 2001-05-24  Jim Meyering  <meyering@lucent.com>
20627
20628         * lib/argmatch.c: Include "quote.h".
20629         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
20630         quote function.  Reported by Göran Uddeborg.
20631
20632 2001-05-22  Jim Meyering  <meyering@lucent.com>
20633
20634         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
20635         now that we use the package-supplied version unconditionally.
20636         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
20637
20638 2001-05-21  Jim Meyering  <meyering@lucent.com>
20639
20640         * m4/regex.m4: Change a couple backticks to single quotes to avoid
20641         shell syntax errors.
20642
20643 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
20644
20645         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
20646
20647 2001-05-20  Paul Eggert  <eggert@twinsun.com>
20648
20649         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
20650         Don't bother to check library strftime, since
20651         we'll be using our own my_strftime function anyway.
20652         Define my_strftime instead of strftime.
20653
20654 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
20655
20656         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
20657         which is not yet declared.
20658
20659 2001-05-15  Jim Meyering  <meyering@lucent.com>
20660
20661         * m4/regex.m4: Use proper quoting so brackets appear in the test
20662         program.
20663         Reported by, and with help from, Bruno Haible.
20664
20665 2001-05-13  Jim Meyering  <meyering@lucent.com>
20666
20667         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
20668         undefined.
20669
20670 2001-05-11  Paul Eggert  <eggert@twinsun.com>
20671
20672         dirname code cleanup.  base_name now behaves more compatibly
20673         with POSIX basename when given file names that have trailing
20674         slashes, and similarly for dir_name.  Add new primitives
20675         base_len and dir_len.  Put the directory-name-related decls
20676         into dirname.h.
20677
20678         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
20679         * lib/backupfile.c (base_name): Likewise.
20680         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
20681         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
20682         * lib/makepath.c (strip_trailing_slashes): Likewise.
20683         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
20684         ISSLASH): Likewise.
20685         * lib/rename.c (strip_trailing_slashes): Likewise.
20686         * lib/same.c (base_name): Likewise.
20687         * lib/stripslash.c (ISSLASH): Likewise.
20688
20689         * lib/addext.c: Include <dirname.h> after size_t is defined.
20690         * lib/backupfile.c: Likewise.
20691
20692         * lib/addext.c (addext): Use base_len to trim redundant
20693         trailing slashes instead of doing it ourselves.
20694         But do not trim the last slash if it is not redundant.
20695
20696         * lib/backupfile.c (find_backup_file_name,
20697         max_backup_version): Use base_len instead of rolling it ourselves.
20698         Handle the case of "" and (on DOS) "C:" correctly.
20699
20700         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
20701         needed. Include <string.h>, <dirname.h>.
20702         (base_name): Allow file names ending in slashes, other than names
20703         that are all slashes.  In this case, return the basename followed
20704         by the slashes.  This is more general, and can be used in places
20705         where the original base_name purposely had an assertion failure.
20706         (base_len): New function.
20707
20708         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
20709         Do not include <assert.h>; no longer needed.
20710         Include xalloc.h.
20711         (memrchr): Remove decl.
20712         (dir_name_r): Remove.
20713         (dir_len): Renamed from dirlen.  All callers changed.
20714         Rewrite in terms of base_name, for simplicity and consistency.
20715         (dir_name): Never return NULL.  All callers changed.
20716         Do not include <stdlib.h> in test program; no longer needed.
20717         return 0; is fine for test program.
20718
20719         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
20720         New macros.
20721         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
20722
20723         * lib/path-concat.c (path_concat): Use base_len to compute
20724         base length, not strlen; this means we cannot rely on memcpy
20725         to null-terminate.
20726
20727         * lib/same.c (STREQ): Remove.
20728         (same_name): Handle the case where the basename ends in trailing '/'.
20729
20730         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
20731         a slash was stripped.  Do not strip the last slash after a
20732         file system prefix.
20733
20734 2001-05-11  Paul Eggert  <eggert@twinsun.com>
20735
20736         * lib/Makefile.am (libfetish_a_SOURCES):
20737         Add strftime.c, since we now compile it on all hosts.
20738
20739         * lib/strftime.c (my_strftime):
20740         Define to nstrftime if emacs, but only if my_strftime is not defined.
20741         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
20742         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
20743         Add one more extra argument: a nanoseconds value.
20744         All uses changed.
20745         (ns): New macro.
20746         (my_strftime function): Add %N format.
20747         (emacs_strftimeu): Renamed from emacs_strftime,
20748         with extra ut argument.
20749
20750 2001-05-09  Paul Eggert  <eggert@twinsun.com>
20751
20752         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
20753
20754 2001-04-21  Jim Meyering  <meyering@lucent.com>
20755
20756         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
20757         doesn't interfere.
20758
20759 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
20760
20761         * m4/ftruncate.m4: Check for chsize.
20762         Link with ftruncate.o unconditionally if ftruncate is missing.
20763         This was required when cross-compiling to i586-mingw32msvc.
20764
20765 2001-04-08  Jim Meyering  <meyering@lucent.com>
20766
20767         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
20768         recomputed; that's necessary when the offset spans a DST transition.
20769         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
20770
20771 2001-04-02  Jim Meyering  <meyering@lucent.com>
20772
20773         * lib/regex.h, regex.c: Update from GNU libc.
20774
20775 2001-03-24  Jim Meyering  <meyering@lucent.com>
20776
20777         * m4/jm-macros.m4: Require autoconf-2.49d.
20778
20779 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
20780
20781         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
20782
20783 2001-03-19  Paul Eggert  <eggert@twinsun.com>
20784
20785         * lib/version-etc.c (version_etc_copyright): Update to 2001.
20786
20787 2001-03-17  Jim Meyering  <meyering@lucent.com>
20788
20789         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
20790         now that the version in autoconf is equivalent.
20791         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
20792
20793         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
20794         Suggestion from Akim Demaille.
20795
20796         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
20797         (jm_PREREQ_TEMPNAME): New function.
20798
20799 2001-03-16  Paul Eggert  <eggert@twinsun.com>
20800
20801         * lib/tempname.c (uint64_t): Define to uintmax_t if
20802         not defined, and if UINT64_MAX is not defined.
20803         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
20804         Reported by John David Anglin.
20805
20806 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
20807
20808         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
20809         resolve alias if codeset is empty.
20810         * lib/config.charset (BeOS): Use wildcard syntax.
20811
20812 2001-03-13  Jim Meyering  <meyering@lucent.com>
20813
20814         * lib/path-concat.c (path_concat)
20815         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
20816         concatenating e.g., `C:' and `foo'.
20817         From Bruno Haible.
20818
20819 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
20820
20821         * lib/localcharset.c (locale_charset): Don't use
20822         setlocale(LC_CTYPE,NULL). Don't return NULL.
20823         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
20824
20825 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
20826
20827         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
20828         support for DOS/DJGPP.
20829
20830 2001-03-01  Paul Eggert  <eggert@twinsun.com>
20831
20832         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
20833         lacks mkstemp.  Compile our own tempname.c if we compile our own
20834         mkstemp.c, as mkstemp relies on tempname.
20835
20836 2001-03-01  Jim Meyering  <meyering@lucent.com>
20837
20838         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
20839         AH_VERBATIM really does output its argument verbatim.
20840
20841 2001-02-28  Paul Eggert  <eggert@twinsun.com>
20842
20843         * lib/Makefile.am (libfetish_a_SOURCES):
20844         Add dup-safer.c, fopen-safer.c.
20845         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
20846
20847         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h,
20848         lib/unistd-safer.h: New files.
20849
20850 2001-02-25  Paul Eggert  <eggert@twinsun.com>
20851
20852         The mkstemp replacement is taken from glibc 2.2.2, with some
20853         portability fixes for use outside glibc, as follows:
20854
20855         * lib/tempname.c (struct_stat64): New macro.
20856         (direxists, __gen_tempname): Use it.
20857         This avoids a portability problem with Solaris 8.
20858
20859         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
20860         (<stddef.h>, <stdint.h>, <string.h>):
20861         Include only if STDC_HEADERS || _LIBC.
20862         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
20863         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
20864         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
20865         (__set_errno): Define this macro if <errno.h> doesn't.
20866         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
20867         Define these macros if <stdio.h> doesn't.
20868         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
20869         Define these macros if <sys/stat.h>
20870         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
20871         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
20872         __xstat64): Define if not _LIBC.
20873         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
20874         (__gen_tempname): Invoke gettimeofday only if
20875         HAVE_GETTIMEOFDAY || _LIBC;
20876         otherwise, fall back on plain "time".
20877         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
20878
20879         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
20880
20881         * lib/mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
20882
20883 2001-02-18  Paul Eggert  <eggert@twinsun.com>
20884
20885         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
20886
20887 2001-02-17  Paul Eggert  <eggert@twinsun.com>
20888
20889         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
20890         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
20891         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
20892         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
20893
20894 2001-02-17  Paul Eggert  <eggert@twinsun.com>
20895
20896         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
20897         Remove workaround macros for hosts that have mbrtowc but not
20898         mbstate_t, as we now insist on proper declarations for both
20899         before using mbrtowc.
20900
20901 2001-02-17  Jim Meyering  <meyering@lucent.com>
20902
20903         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
20904         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
20905         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
20906         UnixWare 7.1.1.
20907
20908         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
20909         rather than AC_CACHE_VAL.
20910
20911 2001-02-17  Jim Meyering  <meyering@lucent.com>
20912
20913         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
20914         around included file name.
20915
20916         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
20917
20918         * lib/strftime.c: Update from GNU libc (the only changes were to
20919         comments).
20920
20921 2001-02-17  Jim Meyering  <meyering@lucent.com>
20922
20923         * lib/regex.c: Update from libc.
20924
20925 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
20926
20927         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
20928         clash.
20929
20930 2001-02-16  Paul Eggert  <eggert@twinsun.com>
20931
20932         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
20933         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
20934         Reported by Mark Hounschell via Paul Eggert.
20935
20936 2001-02-07  Jim Meyering  <meyering@lucent.com>
20937
20938         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
20939
20940 2001-02-05  Jim Meyering  <meyering@lucent.com>
20941
20942         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
20943         it includes the patch required for `large file' support with at least
20944         HP-UX's 10.20 /bin/cc.
20945
20946 2001-02-03  Jim Meyering  <meyering@lucent.com>
20947
20948         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
20949         AS_IF, now that it works once again (mysteriously).
20950         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
20951
20952 2001-01-30  Jim Meyering  <meyering@lucent.com>
20953
20954         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
20955         * m4/chown.m4: Rename conftestchown to conftest.chown.
20956         * m4/rename.m4: s/conftestdir/conftest.d1/ and
20957         s/conftestdir2/conftest.d2/.
20958         * m4/utimes.m4: s/conftestdata/conftest.data/
20959         Inspired by Pavel Roskin's change in autoconf.
20960
20961 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
20962
20963         * lib/config.charset: Update for FreeBSD 4.2.
20964
20965 2001-01-27  Jim Meyering  <meyering@lucent.com>
20966
20967         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
20968         a use of AS_IF.
20969         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
20970
20971 2001-01-26  Jim Meyering  <meyering@lucent.com>
20972
20973         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
20974         quotearg.c includes it.
20975
20976 2001-01-26  Jim Meyering  <meyering@lucent.com>
20977
20978         * lib/quotearg.c: Include stddef.h.
20979         * lib/quote.c: Include stddef.h.
20980         Reported by Axel Kittenberger.
20981
20982         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
20983         line in double quotes so that it evokes a better diagnostic.
20984         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
20985         Reported by Axel Kittenberger.
20986
20987 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
20988
20989         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
20990         as if it was a `charset'.
20991
20992 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
20993
20994         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
20995         has const.
20996
20997 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
20998
20999         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
21000         to avoid a warning.  Add back 'const' to inptr.
21001
21002 2001-01-20  Jim Meyering  <meyering@lucent.com>
21003
21004         Be sure that headers are checked before used in code compiled
21005         for the type checks.
21006         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
21007         In place of that, invoke jm_CHECK_ALL_TYPES.
21008         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
21009         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
21010         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
21011         The check for ssize_t was mistakenly run before the test for unistd.h.
21012
21013         The configure-time check for stdbool.h was missing.
21014         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
21015         (jm_PREREQ_HASH): New function.
21016
21017 2001-01-17  Jim Meyering  <meyering@lucent.com>
21018
21019         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
21020         for autoconf-2.49c.
21021         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
21022
21023 2001-01-16  Jim Meyering  <meyering@lucent.com>
21024
21025         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
21026         From Bruno Haible.
21027
21028 2001-01-14  Jim Meyering  <meyering@lucent.com>
21029
21030         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
21031         foo and bar.  Create conftestdir/ in the script, not in the C code.
21032         Remove directories in the script, not in the C code.
21033         Remove conftestdir{,2} before trying to create the directory.
21034         Make the entire configure script fail if the mkdir fails.
21035
21036 2001-01-14  Jim Meyering  <meyering@lucent.com>
21037
21038         * lib/rename.c: New file.  From Volker Borchert.
21039         Include stdlib.h, string.h or strings.h, and xalloc.h.
21040         Use strip_trailing_slashes rather than open-coding it.
21041
21042 2001-01-03  Paul Eggert  <eggert@twinsun.com>
21043
21044         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
21045
21046 2001-01-03  Jim Meyering  <meyering@lucent.com>
21047
21048         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
21049         of local `inptr' to avoid warning with some system declarations of
21050         iconv.
21051
21052 2001-01-02  Volker Borchert  <bt@teknon.de>
21053
21054         * m4/rename.m4: New file.
21055         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
21056
21057 2001-01-01  Jim Meyering  <meyering@lucent.com>
21058
21059         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
21060         even on systems with utmpx.h.  It's necessary for the declaration of
21061         utmp's ut_user member.  Reported by Andreas Jaeger.
21062
21063         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
21064         available. They are required for the declarations of getgrgid and
21065         getpwuid resp.
21066         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
21067         Reported by Andreas Jaeger.
21068
21069 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
21070
21071         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
21072         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
21073         so `make install' also works in VPATH builds.
21074
21075 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
21076
21077         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
21078         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
21079         can be used in subdirectories.
21080
21081 2000-12-29  Paul Eggert  <eggert@twinsun.com>
21082
21083         * lib/modechange.c: Do not assume that mode_t uses the
21084         traditional octal encoding.  E.g. "chmod 1 FOO" should set
21085         the other-execute bit of FOO even if S_IXOTH != 1.
21086
21087         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
21088         WOTH, XOTH, ALLM): New macros.
21089         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
21090          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
21091         Use them.
21092         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
21093         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
21094         (mode_compile):
21095         No need to use uintmax_t; unsigned long is long enough.
21096         Don't bother to get suffix since we don't use it.
21097
21098 2000-12-26  Jim Meyering  <meyering@lucent.com>
21099
21100         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
21101         better with autoheader.
21102
21103 2000-12-24  Jim Meyering  <meyering@lucent.com>
21104
21105         * lib/hash.c (is_prime): Return explicit boolean values.
21106         (hash_get_first): Return NULL to appease Irix5.6's 89.
21107         Reported by Nelson Beebe.
21108
21109 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
21110
21111         * lib/localcharset.c (locale_charset): Add support for Win32.
21112
21113 2000-12-18  Paul Eggert  <eggert@twinsun.com>
21114
21115         * lib/physmem.h, physmem.c: New files.
21116
21117         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
21118         (noinst_HEADERS): Add physmem.h.
21119
21120         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
21121         't' for compatibility with Solaris 8 sort.
21122
21123 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
21124
21125         * lib/config.charset: Add support for BeOS.
21126
21127 2000-12-17  Jim Meyering  <meyering@lucent.com>
21128
21129         * m4/dos.m4 (jm_AC_DOS): New file and macro.
21130         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
21131
21132 2000-12-16  Jim Meyering  <meyering@lucent.com>
21133
21134         This bug had a serious impact on chown: `chown N:M FILE' (for integer
21135         N and M) would have treated it like `chown N:N FILE'.
21136
21137         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
21138
21139 2000-12-16  Jim Meyering  <meyering@lucent.com>
21140
21141         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
21142         SHELLS_FILE to a file name that's useful on djgpp systems.
21143         Include stdlib.h.
21144         (ADDITIONAL_DEFAULT_SHELLS): Define.
21145         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
21146         Based mostly on a patch from Prashant TR.
21147
21148 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
21149
21150         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
21151         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
21152         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
21153
21154 2000-12-08  Andreas Schwab  <schwab@suse.de>
21155
21156         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
21157         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
21158
21159 2000-12-07  Jim Meyering  <meyering@lucent.com>
21160
21161         * lib/stripslash.c (ISSLASH): Define.
21162         (strip_trailing_slashes): Use ISSLASH rather than comparing against
21163         `/'.
21164         From Prashant TR.
21165
21166         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
21167         (dir_name_r): Declare this function as static.
21168         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
21169         manifest itself on a name containing a mix of slashes and
21170         backslashes.
21171         Make this function work with names starting with a DOS-style
21172         drive letter and colon prefix.
21173         (dir_name): Append `.' if necessary.
21174         Based mostly on patches from Prashant TR and Eli Zaretskii.
21175
21176         * lib/dirname.h (dir_name_r): Remove prototype.
21177
21178 2000-12-06  Paul Eggert  <eggert@twinsun.com>
21179
21180         * m4/off_t-format.m4: Remove this file.
21181         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
21182
21183 2000-12-06  Jim Meyering  <meyering@lucent.com>
21184
21185         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
21186         replacement strtoull, we may well need the replacement strtoul, too.
21187         Check for declarations of strtoul and strtoull.
21188         Check for strtol.  Mainly as a cue to cause automake to include
21189         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
21190         Check for limits.h -- strtol.c needs it.
21191
21192 2000-12-05  Jim Meyering  <meyering@lucent.com>
21193
21194         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
21195
21196 2000-12-04  Jim Meyering  <meyering@lucent.com>
21197
21198         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
21199         Also include memory.h, stdlib.h, unistd.h if appropriate.
21200         Reported by Andreas Jaeger (conflicting declaration of malloc).
21201
21202 2000-12-02  Jim Meyering  <meyering@lucent.com>
21203
21204         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
21205         * m4/jm-macros.m4 (jm_MACROS): require it.
21206
21207 2000-12-02  Jim Meyering  <meyering@lucent.com>
21208
21209         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
21210
21211 2000-12-01  Paul Eggert  <eggert@twinsun.com>
21212
21213         * lib/memrchr.c: Include <config.h> before any system include file.
21214
21215 2000-11-30  Jim Meyering  <meyering@lucent.com>
21216
21217         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
21218
21219 2000-11-30  Jim Meyering  <meyering@lucent.com>
21220
21221         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
21222
21223 2000-11-29  Paul Eggert  <eggert@twinsun.com>
21224
21225         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
21226
21227 2000-11-26  Jim Meyering  <meyering@lucent.com>
21228
21229         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
21230
21231 2000-11-22  Paul Eggert  <eggert@twinsun.com>
21232
21233         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
21234         size of (size_t) -1; it's not portable.
21235
21236 2000-11-17  Jim Meyering  <meyering@lucent.com>
21237
21238         * lib/strstr.c: Update from GNU libc.
21239
21240 2000-11-17  Akim Demaille  <akim@epita.fr>
21241
21242         * lib/obstack.h: Formatting changes.
21243         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
21244         prevent type checking.
21245         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21246         cast the value to (void *): assigning a `foo *' to a `void *'
21247         variable is valid.
21248         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21249
21250 2000-11-16  Jim Meyering  <meyering@lucent.com>
21251
21252         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
21253
21254 2000-11-11  Jim Meyering  <meyering@lucent.com>
21255
21256         * lib/error.c: Add a couple #includes, merging from GNU libc version.
21257
21258 2000-11-10  Jim Meyering  <meyering@lucent.com>
21259
21260         * lib/obstack.h: Update from GNU libc.
21261         * lib/obstack.c: Likewise.
21262
21263 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
21264
21265         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
21266
21267 2000-11-06  Paul Eggert  <eggert@twinsun.com>
21268
21269         * lib/getusershell.c (setusershell): Use rewind rather than
21270         fseek/fseeko, to avoid configuration hassles with fseeko.
21271         Don't bother opening SHELLS_FILE if shellstream is NULL;
21272         it's not necessary.
21273
21274 2000-11-05  Jim Meyering  <meyering@lucent.com>
21275
21276         * lib/makepath.h (make_dir): Declare.
21277         * lib/makepath.c (make_dir): Remove `static' attribute.
21278         Tweak a comment.
21279
21280 2000-11-04  Jim Meyering  <meyering@lucent.com>
21281
21282         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
21283
21284 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
21285
21286         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
21287         last one in a bucket, advance to the next bucket.
21288
21289 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
21290
21291         * lib/fnmatch.c: Do not comment out all the code if we are using
21292         the GNU C library, because in some cases we are replacing buggy
21293         code in the GNU C library itself.
21294
21295 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
21296
21297         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
21298         (regex_compile): Catch bogus \(\1\).
21299
21300 2000-10-30  Paul Eggert  <eggert@twinsun.com>
21301
21302         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
21303         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
21304         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
21305
21306 2000-10-30  Paul Eggert  <eggert@twinsun.com>
21307
21308         * lib/error.h, getline.h, modechange.h:
21309         Remove "2000" from Copyright line, as the file hasn't been
21310         changed this year other than in the copyright notice.
21311
21312         * lib/xalloc.h: Add "2000" to Copyright line, as this file
21313         was changed this year.
21314
21315 2000-10-29  Jim Meyering  <meyering@lucent.com>
21316
21317         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
21318         renaming.
21319         * m4/ls-mntd-fs.m4: Likewise
21320
21321 2000-10-29  Jim Meyering  <meyering@lucent.com>
21322
21323         * lib/xstat.in: Fix grammar in comment.
21324
21325 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
21326
21327         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
21328         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
21329         doesn't define __restrict_arr.
21330
21331 2000-10-28  Jim Meyering  <meyering@lucent.com>
21332
21333         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
21334         (jm_PREREQ_MEMCHR): New function.
21335
21336 2000-10-28  Jim Meyering  <meyering@lucent.com>
21337
21338         * lib/memchr.c: Update from libc.
21339         Adjust for portability:
21340         [HAVE_STDLIB_H]: Include stdlib.h.
21341         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
21342         Undef __memchr, too.
21343         [!weak_alias]: Define __memchr to memchr.
21344
21345         * lib/regex.c: Update from libc.
21346         * lib/regex.h: Likewise.
21347         * lib/getopt1.c: Likewise.
21348         * lib/memcmp.c: Likewise.
21349
21350         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
21351         Avoid using fseek, when possible -- it's broken by design.
21352         Patch by Ulrich Drepper.
21353
21354 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
21355
21356         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
21357         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
21358         Giving in to popular pressure to shut up the compiler with casts.
21359
21360 2000-10-26  Jim Meyering  <meyering@lucent.com>
21361
21362         * lib/strftime.c: Update from libc.
21363
21364 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
21365
21366         * regex.c: More `unsigned char' -> `re_char' changes.
21367         Also change several `int' into `re_wchar_t'.
21368         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
21369         (PUSH_FAILURE_POINTER): Don't cast any more.
21370         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
21371         We want GCC to complain, since this piece of code makes
21372         re_match non-reentrant, which *should* be fixed.
21373         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
21374         (EXTEND_BUFFER): Use RETALLOC.
21375         (SET_LIST_BIT): Don't cast.
21376         (re_wchar_t): New type.
21377         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
21378         that those two functions will always properly return.
21379         (IMMEDIATE_QUIT_CHECK): Cast to void.
21380         (analyse_first): Use recursion rather than an explicit stack.
21381         (re_compile_fastmap): Can't fail anymore.
21382         (re_search_2): Don't check re_compile_fastmap for failure.
21383         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
21384         Now also sets the new value (passed in a new argument).
21385         (re_match_2_internal): Use it.
21386         Also, use a new var `reg' of type size_t when looping through regs
21387         rather than reuse the inappropriate `mcnt'.
21388
21389 2000-10-25  Jim Meyering  <meyering@lucent.com>
21390
21391         * lib/obstack.c: Update from libc.
21392
21393 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
21394
21395         * regex.c (regex_compile): Change the way of handling a range from
21396         a char less than 256 to a char not less than 256.
21397
21398 2000-10-24  Andrew Innes  <andrewi@gnu.org>
21399
21400         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
21401         NT-Emacs only.
21402         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
21403         so that re_search functions only quit when callers expect them to.
21404
21405 2000-10-23  Jim Meyering  <meyering@lucent.com>
21406
21407         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
21408         wrong.  That set_locale call must not have any side effects.
21409         From Paul Eggert.
21410
21411 2000-10-22  Jim Meyering  <meyering@lucent.com>
21412
21413         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
21414         [CYCLIC]: Remove now-unused definition.
21415
21416         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
21417         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
21418         Suggestion from Ulrich Drepper.
21419
21420 2000-10-21  Jim Meyering  <meyering@lucent.com>
21421
21422         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
21423         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
21424         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
21425
21426 2000-10-21  Jim Meyering  <meyering@lucent.com>
21427
21428         * lib/dirname.c (memrchr): Declare if necessary.
21429         (dir_name): Remove the restriction that there be no
21430         trailing slashes.  Now, this code skips past them, effectively
21431         ignoring them.
21432         [TEST_DIRNAME] (main): New unit tests.
21433
21434         * lib/memrchr.c: New file from GNU libc.
21435         Undef __memrchr, too.
21436         [!weak_alias]: Define __memrchr to memrchr.
21437         Guard weak_alias use with `#ifdef weak_alias'.
21438
21439 2000-10-21  Jim Meyering  <meyering@lucent.com>
21440
21441         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
21442         (dir_name): Use dir_name_r.
21443         * lib/dirname.h (dir_name_r): Declare it.
21444
21445 2000-10-17  Jim Meyering  <meyering@lucent.com>
21446
21447         * lib/quote.h (PARAMS): Define and use.
21448         Reported by Akim Demaille.
21449
21450         * lib/getopt.c: Update from libc.
21451
21452 2000-10-16  Jim Meyering  <meyering@lucent.com>
21453
21454         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
21455         setlocale.
21456         From Jan Fedak.
21457
21458 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
21459
21460         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
21461
21462 2000-09-25  Jim Meyering  <meyering@lucent.com>
21463
21464         * lib/md5.h (rol): Define (from GnuPG).
21465
21466         * lib/sha.c: Give credit (GnuPG) where due.
21467         (M): Use rol rather than open-coding it.
21468         Add a FIXME comment.
21469
21470 2000-09-21  Jim Meyering  <meyering@lucent.com>
21471
21472         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
21473         Reported by Michael Stone.
21474
21475 2000-09-20  Jim Meyering  <meyering@lucent.com>
21476
21477         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
21478         (noinst_HEADERS): Add sha.h.
21479         Based on code from Scott G. Miller and from GnuPG.
21480
21481 2000-09-18  Jim Meyering  <meyering@lucent.com>
21482
21483         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
21484         LIBS. Otherwise, everyone ends up linking with -lelf for some
21485         configurations.
21486         Reported by Mike Stone.
21487
21488 2000-09-15  Jim Meyering  <meyering@lucent.com>
21489
21490         * lib/regex.c: Update from libc.
21491
21492 2000-09-10  Jim Meyering  <meyering@lucent.com>
21493
21494         * lib/getopt.c (_getopt_internal): Update from glibc.
21495
21496 2000-09-09  Jim Meyering  <meyering@lucent.com>
21497
21498         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
21499         think it should be used as a general replacement for isascii.
21500         * lib/fnmatch.c: Likewise.
21501         * lib/mbswidth.c: Likewise
21502         * lib/regex.c: Likewise.
21503
21504         Don't use atoi.
21505         * lib/userspec.c: Include sys/param.h and limits.h.
21506         Include xstrtol.h.
21507         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21508         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
21509         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
21510         UID, GID.  Check range.
21511
21512 2000-09-06  Jim Meyering  <meyering@lucent.com>
21513
21514         * lib/getopt.c (_getopt_internal): Update from glibc.
21515
21516 2000-08-30  Jim Meyering  <meyering@lucent.com>
21517
21518         * lib/strftime.c: Merge in changes from GNU libc.
21519
21520 2000-08-26  Jim Meyering  <meyering@lucent.com>
21521
21522         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
21523         * m4/fpending.m4: New file.
21524
21525 2000-08-26  Jim Meyering  <meyering@lucent.com>
21526
21527         * lib/closeout.c: Include "__fpending.h".
21528         (close_stdout_status): Return right away if there's nothing to flush.
21529
21530         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
21531         * lib/__fpending.c: New file.
21532         * lib/__fpending.h: New file.
21533
21534 2000-08-20  Jim Meyering  <meyering@lucent.com>
21535
21536         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
21537         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
21538         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
21539
21540 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
21541
21542         Improve fileutils installation on systems where running
21543         programs (like install) can't be unlinked.
21544         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
21545         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
21546
21547 2000-08-07  Paul Eggert  <eggert@twinsun.com>
21548
21549         Standardize on "memory exhausted" instead of "Memory exhausted"
21550         or "virtual memory exhausted".
21551         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
21552         "virtual memory exhausted".
21553         * lib/same.c (same_name): Invoke xalloc_die instead of printing
21554         our own message.
21555         * lib/userspec.c (parse_user_spec): Likewise.
21556         * lib/bumpalloc.h: comment fix
21557         * lib/same.c, userspec.c: Include xalloc.h.
21558
21559         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
21560         not char *const and pointing to a constant array.
21561         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
21562         (xrealloc): Comment fix.
21563
21564         * lib/userspec.c (parse_user_spec):
21565         Don't translate a message until just before returning,
21566         to avoid unnecessary translation.
21567
21568 2000-08-07  Jim Meyering  <meyering@lucent.com>
21569
21570         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
21571         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
21572         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
21573         getgroups.c, gethostname.c, getopt.h, group-member.c,
21574         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
21575         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
21576         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
21577         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
21578         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
21579         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
21580         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
21581         yesno.c: Back out Copyright date changes for each file with no change
21582         this year.  This eases coordination with other programs using the same
21583         source code modules.  From Paul Eggert.
21584
21585 2000-08-06  Paul Eggert  <eggert@twinsun.com>
21586
21587         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
21588         not char, for compatibility with glibc 2.1.3 strftime.c.
21589
21590 2000-08-03  Greg McGary  <greg@mcgary.org>
21591
21592         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
21593         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
21594         (EXTEND_BUFFER): Use them.
21595
21596 2000-08-01  Jim Meyering  <meyering@lucent.com>
21597
21598         * lib/dirname.c (ISSLASH): Define.
21599         (BACKSLASH_IS_PATH_SEPARATOR): Define.
21600         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
21601         both `\' and `/' may be use as path separators.
21602         Based on a patch from Prashant TR.
21603
21604 2000-07-31  Paul Eggert  <eggert@twinsun.com>
21605
21606         * lib/quotearg.c (quotearg_n_options): Don't make the initial
21607         slot vector a constant, since it might get modified.
21608
21609 2000-07-31  Jim Meyering  <meyering@lucent.com>
21610
21611         * lib/xmalloc.c: Use `virtual memory exhausted', not
21612         `Memory exhausted'.
21613         * lib/obstack.c (print_and_abort): Likewise.
21614
21615 2000-07-30  Paul Eggert  <eggert@twinsun.com>
21616
21617         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
21618         buffer, so that the caller can always quote one small
21619         component of a "memory exhausted" message in slot 0.
21620         From a suggestion by Jim Meyering.
21621
21622 2000-07-30  Jim Meyering  <meyering@lucent.com>
21623
21624         * lib/makepath.c (make_path): Quote the other instance, too.
21625
21626         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
21627         (STATIC_BUF_SIZE): Define.
21628         (quotearg_n_options): Use only statically allocated storage when
21629         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
21630         than STATIC_BUF_SIZE.
21631
21632 2000-07-29  Jim Meyering  <meyering@lucent.com>
21633
21634         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
21635         * lib/dirname.c (dir_name): Likewise.
21636
21637         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
21638         `/'.
21639
21640         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
21641         (dir_name): Assert that there are no trailing slashes.
21642
21643 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
21644
21645         * lib/mbswidth.h (mbswidth): Add a flags argument.
21646         (mbswidth): New declaration.
21647         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
21648         * lib/mbswidth.c (mbswidth): Add a flags argument.
21649         (mbsnwidth): New function.
21650
21651 2000-07-24  Jim Meyering  <meyering@lucent.com>
21652
21653         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
21654
21655 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21656
21657         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
21658
21659 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21660
21661         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
21662         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
21663         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
21664         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
21665         invoke multibyte primitives.
21666
21667 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21668
21669         * lib/quotearg.c:
21670         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
21671         so that mbstate_t is always defined.
21672
21673         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
21674         be 1 in at least one GCC installation, and this configuration
21675         error is likely to be common.  Ignoring MB_LEN_MAX hurts
21676         performance on hosts that have mbrtowc but have only unibyte
21677         locales, but I assume these hosts are rare.
21678
21679 2000-07-23  Paul Eggert  <eggert@twinsun.com>
21680
21681         * lib/mbswidth.c (_XOPEN_SOURCE):
21682         Don't define; this causes problems on Solaris 7.
21683         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
21684
21685 2000-07-23  Jim Meyering  <meyering@lucent.com>
21686
21687         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
21688         too: getgrgid, getpwuid, getuid.
21689
21690 2000-07-23  Jim Meyering  <meyering@lucent.com>
21691
21692         * lib/basename.c (base_name): Add an assertion.
21693
21694 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
21695
21696         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
21697         shadow its mbsinit function.
21698
21699 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
21700
21701         * lib/mbswidth.h: New file.
21702         * lib/mbswidth.c: New file.
21703         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
21704         (noinst_HEADERS): Add mbswidth.h.
21705
21706 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
21707
21708         * lib/config.charset: Add support for FreeBSD. Improve support for
21709         HP-UX and IRIX 6.
21710
21711 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
21712
21713         * m4/mbswidth.m4: New file.
21714         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
21715
21716 2000-07-15  Jim Meyering  <meyering@lucent.com>
21717
21718         * lib/makepath.c: Include quote.h.
21719         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
21720         corresponding argument in a `quote (...)' call.
21721         Give better diagnostics.
21722
21723         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
21724         (noinst_HEADERS): Add quote.h.
21725
21726         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
21727         from tar's src/misc.c.
21728         * lib/quote.h: New file.  Prototypes for same.
21729
21730 2000-07-14  Paul Eggert  <eggert@twinsun.com>
21731
21732         From a suggestion by Bruno Haible.
21733         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
21734         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
21735         to decide whether to define the BeOS workaround macro;
21736         this adjusts to the change to AC_MBSTATE_T.
21737
21738 2000-07-14  Jim Meyering  <meyering@lucent.com>
21739
21740         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
21741         jm_AC_TYPE_UINTMAX_T.
21742
21743 2000-07-13  Paul Eggert  <eggert@twinsun.com>
21744
21745         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
21746
21747         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
21748         quotearg_buffer_restyled): Add support for
21749         clocale_quoting_style.  Undo previous change to
21750         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
21751         and "{RIGHT QUOTATION MARK}" msgids.
21752
21753 2000-07-10  Paul Eggert  <eggert@twinsun.com>
21754
21755         From a suggestion by Bruno Haible.
21756         * m4/mbstate_t.m4 (AC_MBSTATE_T):
21757         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
21758         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
21759         and mbstate_t, to a single-part test that simply defines mbstate_t.
21760         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
21761         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
21762
21763 2000-07-10  Jim Meyering  <meyering@lucent.com>
21764
21765         * m4/strerror_r.m4: Mirror the correction made in autoconf.
21766
21767         * m4/gnu-source.m4: Output to confdefs.h directly.
21768         Suggestion from Akim Demaille.
21769
21770 2000-07-09  Paul Eggert  <eggert@twinsun.com>
21771
21772         The old behavior of quoting `like this' doesn't look good with
21773         newer, ISO-style fonts.  See:
21774         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
21775
21776         Instead, quote "like this" by default.  Let the translator
21777         tailor the locale-specific quoting behavior by providing
21778         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
21779
21780         * lib/quotearg.c (N_): New macro.
21781         (gettext_default): New function.
21782         (quotearg_buffer_restyled): Use
21783         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
21784         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
21785
21786 2000-07-09  Jim Meyering  <meyering@lucent.com>
21787
21788         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
21789         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
21790
21791         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
21792         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
21793
21794 2000-07-09  Jim Meyering  <meyering@lucent.com>
21795
21796         * lib/Most files: Update copyright dates to include 2000.
21797
21798 2000-07-08  Jim Meyering  <meyering@lucent.com>
21799
21800         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
21801         if not defined.
21802         (xgethostname): Remove now-unnecessary #ifdef.
21803         Move declaration of `err' into loop where it's used.
21804
21805 2000-07-05  Paul Eggert  <eggert@twinsun.com>
21806         and Bruno Haible  <haible@clisp.cons.org>
21807
21808         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
21809         only if the test for an object-type mbstate_t fails.  This
21810         prevents us from mistakenly reporting that mbstate_t is a
21811         system object type after we "#define mbstate_t int" to work
21812         around its lack.
21813
21814 2000-07-05  Paul Eggert  <eggert@twinsun.com>
21815         and Bruno Haible  <haible@clisp.cons.org>
21816
21817         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
21818
21819 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
21820
21821         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
21822         to strerror_r.
21823         Include <ctype.h> for use of isalpha.
21824
21825 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
21826
21827         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
21828         by allocating a larger buffer. Test the gethostname return value for
21829         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
21830         returns an error and ENAMETOOLONG isn't defined.
21831
21832 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
21833
21834         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
21835         dimension.
21836
21837 2000-07-04  Jim Meyering  <meyering@lucent.com>
21838
21839         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
21840         of the deprecated AC_CHECKING.
21841
21842 2000-07-04  Jim Meyering  <meyering@lucent.com>
21843
21844         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
21845         Reported by Bruno Haible.
21846
21847 2000-07-04  Jim Meyering  <meyering@lucent.com>
21848
21849         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
21850         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
21851         lacks mbrtowc.
21852
21853 2000-07-03  Paul Eggert  <eggert@twinsun.com>
21854
21855         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
21856         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
21857
21858 2000-07-03  Paul Eggert  <eggert@twinsun.com>
21859         and Bruno Haible  <haible@clisp.cons.org>
21860
21861         * lib/quotearg.c (mbrtowc):
21862         Assign to *pwc, and return 1 only if result is nonzero.
21863         (iswprint): Use ISPRINT when substituting our own mbrtowc.
21864
21865 2000-07-03  Jim Meyering  <meyering@lucent.com>
21866
21867         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
21868
21869 2000-07-03  Jim Meyering  <meyering@lucent.com>
21870
21871         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
21872         This is necessary to get a definition of e.g., UTMP_FILE on
21873         HP-UX 10.20.
21874         From Bob Proulx.
21875
21876 2000-07-02  Jim Meyering  <meyering@lucent.com>
21877
21878         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
21879
21880         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
21881         AC_LIBOBJ(function_name).
21882         * m4/chown.m4: Likewise.
21883         * m4/fnmatch.m4: Likewise.
21884         * m4/ftruncate.m4: Likewise.
21885         * m4/getgroups.m4: Likewise.
21886         * m4/getline.m4: Likewise.
21887         * m4/group-member.m4: Likewise.
21888         * m4/jm-macros.m4: Likewise.
21889         * m4/lstat.m4: Likewise.
21890         * m4/malloc.m4: Likewise.
21891         * m4/memcmp.m4: Likewise.
21892         * m4/nanosleep.m4: Likewise.
21893         * m4/putenv.m4: Likewise.
21894         * m4/realloc.m4: Likewise.
21895         * m4/regex.m4: Likewise.
21896         * m4/stat.m4: Likewise.
21897         * m4/strftime.m4: Likewise.
21898
21899 2000-07-02  Jim Meyering  <meyering@lucent.com>
21900
21901         * lib/quotearg.c (mbstate_t): Don't define here.
21902
21903 2000-07-02  Jim Meyering  <meyering@lucent.com>
21904
21905         * lib/nanosleep.c (SIGCONT): Define if not already defined.
21906
21907 2000-07-01  Jim Meyering  <meyering@lucent.com>
21908
21909         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
21910
21911 2000-07-01  Jim Meyering  <meyering@lucent.com>
21912
21913         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
21914         problem.
21915
21916 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
21917
21918         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
21919         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
21920
21921 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
21922
21923         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
21924         per change in ../m4/ls-mntd-fs.m4.
21925         (read_filesystem_list): Ignore symbolic links.
21926
21927 2000-06-29  Jim Meyering  <meyering@lucent.com>
21928
21929         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
21930         for declaration of strcmp.
21931
21932         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
21933
21934         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
21935         Avoid warning by casting result to `char *' to remove `const'.
21936
21937 2000-06-28  Jim Meyering  <meyering@lucent.com>
21938
21939         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
21940         included by quotearg.c, for which we perform this test.  From
21941         Bruno Haible.
21942
21943 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
21944
21945         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
21946         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
21947         <utmpx.h> exists, put readutmp.o into LIBOBJS.
21948
21949 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
21950
21951         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
21952
21953 2000-06-26  Paul Eggert  <eggert@twinsun.com>
21954
21955         savedir now sets errno on failure and invokes xmalloc to get memory.
21956         Fix a couple of other minor bugs while we're at it.
21957
21958         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
21959         (NAMLEN): Remove macro.
21960         (malloc, realloc): Remove decls.
21961         (stpcpy): Likewise.
21962         ("xalloc.h"): Include.
21963         (NAME_SIZE_DEFAULT): New macro.
21964         (savedir): Use xmalloc / xrealloc to allocate memory.
21965         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
21966         Skip "" directory entries.
21967         Use strlen to calculate directory entry length, since the old method
21968         is rarely used these days and isn't worth supporting.
21969         Don't use a pointer after freeing it.
21970         Check for integer overflow when calculating allocation size.
21971         Use memcpy to copy entries, instead of stpcpy.
21972         Set errno properly when returning NULL.
21973         Check for readdir error.
21974
21975 2000-06-26  Jim Meyering  <meyering@lucent.com>
21976
21977         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
21978
21979 2000-06-25  Jim Meyering  <meyering@lucent.com>
21980
21981         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
21982         Linux header bug when _XOPEN_SOURCE is defined to 500.
21983
21984 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
21985
21986         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
21987         deficiency.
21988
21989 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
21990
21991         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
21992         Include xalloc.h.
21993         Don't include <stdlib.h>.  Don't declare malloc, realloc.
21994
21995 2000-06-24  Jim Meyering  <meyering@lucent.com>
21996
21997         * m4/strerror_r.m4: Revive this file -- to try out an experimental
21998         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
21999         for which strerror does return char*, but which lacks a conveniently
22000         accessible declaration of the function.  If the compile-test says
22001         strerror_r doesn't work, then resort to a `run'-test that works on
22002         BeOS and segfaults on DEC Unix.
22003
22004 2000-06-24  Jim Meyering  <meyering@lucent.com>
22005
22006         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
22007
22008 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22009
22010         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
22011         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
22012
22013 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22014
22015         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
22016         (mbrtowc, mbstate_t): Define substitutes if
22017         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
22018         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
22019         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
22020
22021 2000-06-23  Jim Meyering  <meyering@lucent.com>
22022
22023         * m4/afs.m4: Add missing AC_MSG_RESULT.
22024         Reported by Bruno Haible.
22025
22026         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
22027         Suggestion from Bruno Haible.
22028
22029 2000-06-23  Jim Meyering  <meyering@lucent.com>
22030
22031         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
22032
22033 2000-06-21  Jim Meyering  <meyering@lucent.com>
22034
22035         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
22036
22037 2000-06-21  Jim Meyering  <meyering@lucent.com>
22038
22039         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
22040         (noinst_HEADERS): Add getstr.h.
22041
22042         * lib/getline.c (getstr): Move into a separate file.
22043         * lib/getstr.c (getstr): New file, extracted from getline.c, with
22044         the following changes: new parameter, delim2; both delim[12]
22045         parameters have type `int', not `char'.  The latter would lose
22046         with 8-bit delimiters.
22047         * lib/getstr.h: New file.
22048
22049 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22050
22051         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
22052         than 1024, return a memory chunk of least possible size, instead
22053         of size PATH_MAX + 2. In the loop, increment the size proportionally.
22054         Use free/xmalloc instead of xrealloc to avoid copying for very long
22055         paths.
22056
22057 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22058
22059         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
22060         the empty string.
22061
22062 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22063
22064         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
22065         address, not strdup.  Include <stdlib.h> and don't declare free().
22066
22067 2000-06-19  Jim Meyering  <meyering@lucent.com>
22068
22069         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
22070
22071 2000-06-18  Jim Meyering  <meyering@lucent.com>
22072
22073         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
22074
22075         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
22076         `checking whether...' message to be consistent with that of the
22077         lstat test.
22078
22079 2000-06-18  Jim Meyering  <meyering@lucent.com>
22080
22081         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
22082         Besides, these days every porting target provides a mkdir function.
22083
22084         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
22085         needed. (this snippet comes from src/system.h).
22086
22087 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
22088
22089         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
22090
22091 2000-06-15  Paul Eggert  <eggert@twinsun.com>
22092
22093         * lib/human.c (adjust_value): New function.
22094         (human_readable_inexact): Apply rounding style even when
22095         printing approximate values.
22096
22097 2000-06-14  Paul Eggert  <eggert@twinsun.com>
22098
22099         * lib/human.c (human_readable_inexact): Allow an input block
22100         size that is not a multiple of the output block size, and vice versa.
22101         Reported by Piergiorgio Sartor.
22102
22103 2000-06-14  Paul Eggert  <eggert@twinsun.com>
22104
22105         * lib/getdate.y (get_date): Apply relative times after time
22106         zone indicator, not before.  Reported by Todd A. Jacobs.
22107
22108 2000-06-13  Jim Meyering  <meyering@lucent.com>
22109
22110         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
22111
22112         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
22113
22114 2000-06-12  Paul Eggert  <eggert@twinsun.com>
22115
22116         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
22117
22118 2000-06-12  Jim Meyering  <meyering@lucent.com>
22119
22120         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
22121         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
22122         optional argument.
22123         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
22124         the optional argument, `lib'.
22125
22126 2000-06-08  Jim Meyering  <meyering@lucent.com>
22127
22128         * m4/largefile.m4: Remove file (now that it's part of autoconf).
22129
22130 2000-06-04  Paul Eggert  <eggert@twinsun.com>
22131
22132         Rewrite largefile configuration so that we don't need to run
22133         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
22134         AC_CANONICAL_HOST in configure.in -- jmm]
22135
22136         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
22137         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
22138         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
22139         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
22140         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
22141         All uses changed.
22142         Instead of inspecting the output of getconf, try to compile the
22143         test program without and with the macro definition.
22144         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
22145         for getconf.  Instead, check for the needed flags by compiling
22146         test programs.
22147
22148 2000-06-04  Paul Eggert  <eggert@twinsun.com>
22149
22150         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
22151
22152 2000-06-04  Jim Meyering  <meyering@lucent.com>
22153
22154         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
22155         SunOS 4.1.4 for which gid_t is an unsigned type.
22156
22157 2000-06-03  Jim Meyering  <meyering@lucent.com>
22158
22159         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
22160         now that autoconf requires that.
22161
22162         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
22163         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
22164         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
22165
22166 2000-06-03  Jim Meyering  <meyering@lucent.com>
22167
22168         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
22169
22170 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
22171
22172         * m4/glibc21.m4: New file.
22173         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
22174
22175 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
22176
22177         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
22178         newer, don't install charset.alias.
22179         * lib/config.charset: Change the Linux/glibc rules so they become empty
22180         on glibc-2.1 or newer.
22181
22182 2000-06-02  Jim Meyering  <meyering@lucent.com>
22183
22184         * lib/mountlist.c: Back out last change.  Instead, do this...
22185         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
22186         me_dummy member using the same `ignore'-testing code.
22187         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
22188         fs_type strings.
22189         From Mark D. Roth.
22190
22191 2000-05-29  Jim Meyering  <meyering@lucent.com>
22192
22193         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
22194         mounts with the `ignore' attribute.  Based on a patch from
22195         Mark D. Roth.
22196
22197 2000-05-28  Jim Meyering  <meyering@lucent.com>
22198
22199         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
22200         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
22201         * m4/stat.m4: Likewise.
22202         * m4/lstat.m4: Likewise.
22203         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
22204
22205         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
22206         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
22207
22208 2000-05-26  Jim Meyering  <meyering@lucent.com>
22209
22210         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
22211
22212 2000-05-24  Jim Meyering  <meyering@lucent.com>
22213
22214         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
22215         autoconf requires that.
22216         * m4/lib-check.m4: Likewise.
22217         * m4/jm-macros.m4: Likewise.
22218         * m4/strftime.m4: Likewise.
22219
22220         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
22221         AC_CHECK_DECLS, now that autoconf requires that.
22222
22223 2000-05-22  Jim Meyering  <meyering@lucent.com>
22224
22225         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
22226         * m4/lstat.m4: Likewise.
22227
22228 2000-05-22  Jim Meyering  <meyering@lucent.com>
22229
22230         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
22231
22232 2000-05-20  Jim Meyering  <meyering@lucent.com>
22233
22234         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
22235         (jm_PREREQ): Use it.
22236
22237 2000-05-18  Jim Meyering  <meyering@lucent.com>
22238
22239         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
22240         back, too, since it may have been modified by allocate_entry.
22241         (hash_delete): Rewrite to use neither the assignment operator
22242         nor the comma operator in an if-expression.
22243
22244 2000-05-15  Paul Eggert  <eggert@twinsun.com>
22245
22246         * lib/closeout.c:
22247         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
22248         Remove; no longer needed.
22249         "quotearg.h": Add include.
22250         (file_name): Do not bother to explicitly initialize to NULL; it's less
22251         efficient on some hosts.
22252         (close_stdout_status): Remove test as to whether stdout was already
22253         closed; it breaks for the case "echo x | sort >&-".
22254         Quote file name colons.
22255         Do not assume that _("write error") lacks format strings.
22256
22257 2000-05-15  Jim Meyering  <meyering@lucent.com>
22258
22259         * lib/version-etc.c (version_etc_copyright): Update the copyright
22260         string used in all --version output.
22261
22262 2000-05-14  Jim Meyering  <meyering@lucent.com>
22263
22264         * lib/closeout.c (close_stdout_set_file_name): New function.
22265         (close_stdout_status): Use new file-scoped global.
22266         Return right away if fstat says the stdout file descriptor is invalid.
22267         * lib/closeout.h (close_stdout_set_file_name): Declare.
22268
22269 2000-05-10  Jim Meyering  <meyering@lucent.com>
22270
22271         * lib/closeout.c [default_exit_status]: New file-scoped variable.
22272         (close_stdout_set_status): New function.
22273         * lib/closeout.h (close_stdout_set_status): Declare.
22274
22275 2000-05-09  Jim Meyering  <meyering@lucent.com>
22276
22277         * m4/gettext.m4: Rename this...
22278         * m4/libintl.m4: ...to this.
22279
22280 2000-05-08  Jim Meyering  <meyering@lucent.com>
22281
22282         * lib/long-options.c: Don't include closeout.h.
22283         (parse_long_options): Don't call close_stdout for --version.
22284
22285 2000-05-06  Paul Eggert  <eggert@twinsun.com>
22286
22287         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
22288         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
22289         2.1.3 bug.  This avoids a clash when files like regex.c define
22290         _GNU_SOURCE.
22291
22292 2000-05-06  Jim Meyering  <meyering@lucent.com>
22293
22294         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
22295         (AC_REPLACE_FUNCS): Add strnlen.
22296
22297         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
22298         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
22299
22300         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
22301         AC_SEARCH_LIBS call for nanosleep.
22302         (LIB_NANOSLEEP): Set and AC_SUBST.
22303
22304 2000-05-06  Jim Meyering  <meyering@lucent.com>
22305
22306         * lib/strnlen.c: Undefine __strnlen and strnlen.
22307         [!weak_alias]: Define __strnlen to strnlen.
22308
22309         * lib/atexit.c: New file, from libiberty.
22310
22311 2000-05-06  Jim Meyering  <meyering@lucent.com>
22312
22313         * lib/closeout.c (close_stdout_status): Also check for errors on the
22314         stderr stream.
22315
22316 2000-05-05  Jim Meyering  <meyering@lucent.com>
22317
22318         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
22319         AC_SEARCH_LIBS call for clock_gettime.
22320         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
22321
22322         * m4/search-libs.m4: Update from autoconf.
22323
22324         su doesn't work on Solaris 2.6.
22325         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
22326         <shadow.h>.  Reported by Dragos Harabor.
22327
22328 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
22329
22330         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
22331         memcpy instead of xmalloc, xrealloc, path_concat.
22332         (locale_charset): Treat empty environment variables as absent.
22333         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
22334
22335 2000-05-04  Jim Meyering  <meyering@lucent.com>
22336
22337         * lib/getopt.c: Update from glibc.
22338         * lib/obstack.c: Likewise.
22339         * lib/obstack.h: Likewise.
22340         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
22341         file
22342
22343         * lib/regex.h: Likewise.
22344         * lib/strndup.c: Likewise.
22345         * lib/strnlen.c: New file, from glibc.
22346
22347 2000-05-03  Jim Meyering  <meyering@lucent.com>
22348
22349         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
22350
22351 2000-05-02  Paul Eggert  <eggert@twinsun.com>
22352
22353         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
22354         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
22355         compile-time test, rather than inspecting host and OS, to
22356         decide whether to define _LARGEFILE_SOURCE.
22357
22358 2000-05-01  Jim Meyering  <meyering@lucent.com>
22359
22360         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
22361
22362         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
22363         Based on a patch from Bruno Haible.
22364
22365 2000-05-01  Jim Meyering  <meyering@lucent.com>
22366
22367         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
22368
22369 2000-04-29  Jim Meyering  <meyering@lucent.com>
22370
22371         * lib/path-concat.c: Declare strdup only if it's not defined.
22372         * lib/canon-host.c: Likewise.
22373
22374 2000-04-28  Jim Meyering  <meyering@lucent.com>
22375
22376         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
22377         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
22378         is included first, then limits.h is included by locale.h by libintl.h.
22379         From John David Anglin.
22380
22381 2000-04-25  Jim Meyering  <meyering@lucent.com>
22382
22383         * lib/makepath.c (S_IRWXUGO): Define.
22384         (make_path): Always perform explicit chmod if MODE specifies any
22385         of the `special' permission bits.  Prompted by a bug report against
22386         install from Mate Wierdl and Joost van Baal.
22387
22388 2000-04-18  Jim Meyering  <meyering@lucent.com>
22389
22390         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
22391         (jm_PREREQ): Use it.
22392
22393 2000-04-18  Jim Meyering  <meyering@lucent.com>
22394
22395         * lib/README: New file.
22396
22397         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
22398         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
22399
22400 2000-04-17  Jim Meyering  <meyering@lucent.com>
22401
22402         Get it right :-)
22403         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
22404         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
22405         Suggestion from Akim Demaille.
22406
22407 2000-04-17  Jim Meyering  <meyering@lucent.com>
22408
22409         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
22410         the definition of it to rpl_strftime also defined-away the system's
22411         declaration.
22412
22413 2000-04-15  Jim Meyering  <meyering@lucent.com>
22414
22415         Use `C' to denote so-called `contiguous' files, the same way
22416         that tar does.
22417         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
22418         (ftypelet): Use S_ISCTG.
22419         From Michael Deutschmann.
22420
22421 2000-04-14  Jim Meyering  <meyering@lucent.com>
22422
22423         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
22424         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
22425         clobbered.
22426
22427 2000-04-14  Jim Meyering  <meyering@lucent.com>
22428
22429         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
22430
22431 2000-04-13  Jim Meyering  <meyering@lucent.com>
22432
22433         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
22434         AH_VERBATIM to insert required #ifndef into config.h.in.
22435         Suggestion from Akim Demaille.
22436
22437 2000-04-12  Jim Meyering  <meyering@lucent.com>
22438
22439         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
22440         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
22441         Christian Krackowizer.
22442
22443         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
22444         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
22445         (AC_SYS_LARGEFILE): Require.
22446         (AM_C_PROTOTYPES): Require.
22447
22448 2000-04-08  Jim Meyering  <meyering@lucent.com>
22449
22450         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
22451         names don't conflict.  Reported by Eli Zaretskii.
22452
22453 2000-04-07  Jim Meyering  <meyering@lucent.com>
22454
22455         * lib/putenv.c: Move inclusion of errno.h so it follows that of
22456         sys/types.h, to work around system header problems on AIX 3.2.5.
22457         From Bruno Haible.
22458
22459 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
22460
22461         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
22462         bug.  Deal with the different error behavior of Irix iconv.
22463
22464 2000-04-05  Paul Eggert  <eggert@twinsun.com>
22465
22466         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
22467         IRIX if the installer said otherwise.
22468
22469 2000-04-05  Jim Meyering  <meyering@lucent.com>
22470
22471         Portability tweaks required for ultrix4.3.
22472         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
22473         (jm_CHECK_DECLS): Add getutent to the list of functions.
22474         (_jm_DECL_HEADERS): Add utmpx.h.
22475         From John David Anglin.
22476
22477         * m4/strftime.m4: Back out the 2000-04-02 change.
22478         Instead of that change, simply undefine putenv in the test program.
22479
22480 2000-04-05  Jim Meyering  <meyering@lucent.com>
22481
22482         Portability tweaks required for ultrix4.3.
22483         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
22484         getutent.
22485         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
22486         * lib/canon-host.c: Declare strdup.
22487         * lib/path-concat.c: Likewise.
22488         From John David Anglin.
22489
22490 2000-04-04  Jim Meyering  <meyering@lucent.com>
22491
22492         Be more DOS 8.3-friendly.
22493         * lib/ref-add.sin: Renamed from ref-add.sed.in.
22494         * lib/ref-del.sin: Renamed from ref-del.sed.in.
22495         * lib/Makefile.am: Reflect renaming.
22496         Reported by Eli Zaretskii.
22497
22498         Use a temporary file name that won't clash with `charset.alias'
22499         in the DOS 8.3 name space.
22500         * lib/Makefile.am (charset_tmp): Define.
22501         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
22502         (uninstall-local): Likewise.
22503         Reported by Eli Zaretskii.
22504
22505 2000-04-03  Jim Meyering  <meyering@lucent.com>
22506
22507         * m4/gettext.m4: Fix typo in comment.
22508
22509         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
22510         textutils/configure.in).  Suggestion from Paul Eggert.
22511         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
22512
22513 2000-04-02  Paul Eggert  <eggert@twinsun.com>
22514
22515         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
22516         variable in the shell rather than using putenv, which isn't
22517         portable.  This avoids the configure-time inter-test dependency
22518         on the potentially-renamed putenv function.
22519
22520 2000-03-30  Paul Eggert  <eggert@twinsun.com>
22521
22522         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
22523         before checking struct stat.st_blksize, so that
22524         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
22525
22526 2000-03-29  Paul Eggert  <eggert@twinsun.com>
22527
22528         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
22529         since strftime.c uses HAVE_STRFTIME to decide whether to use
22530         the underlying strftime.
22531
22532 2000-03-29  Paul Eggert  <eggert@twinsun.com>
22533
22534         * lib/time/strftime.c (my_strftime): Make sure we call the system
22535         strftime, not ourselves, when invoking the underlying strftime.
22536
22537 2000-03-24  Jim Meyering  <meyering@lucent.com>
22538
22539         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
22540         (charset_alias): Define.
22541         (install-exec-local): Factor out common code.
22542         (uninstall-local): Split lines longer than 80.
22543         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
22544         (SUFFIXES): Define.
22545         (.sed.in.sed): New rule.  Don't redirect directly to $@.
22546         (CLEANFILES): Add ref-add.sed and ref-del.sed.
22547
22548 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
22549
22550         * lib/config.charset: Output a line containing "Packages using this
22551         file".
22552         * lib/ref-add.sed.in, ref-del.sed.in: New files.
22553         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
22554         ref-del.sed): New rules.
22555
22556 2000-03-17  Jim Meyering  <meyering@lucent.com>
22557
22558         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
22559         Otherwise, include <strings.h>
22560
22561 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
22562
22563         * lib/unicodeio.c (utf8_wctomb): New function.
22564         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
22565         format instead of in UCS-4 with platform dependent endianness.
22566
22567 2000-03-10  Jim Meyering  <meyering@lucent.com>
22568
22569         * m4/lib-check.m4: Look for getspnam in -lgen, too.
22570         From Marco Franzen.
22571
22572 2000-03-07  Paul Eggert  <eggert@twinsun.com>
22573
22574         * lib/savedir.c (savedir): Work even if directory size is
22575         negative; this can happen with some screwy NFS configurations.
22576
22577 2000-03-06  Jim Meyering  <meyering@lucent.com>
22578
22579         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
22580         if it's NULL (because we ran out of memory).  From Bruno Haible.
22581
22582 2000-03-05  Jim Meyering  <meyering@lucent.com>
22583
22584         * lib/localcharset.c ("path-concat.h"): Include.
22585         (get_charset_aliases): Use path_concat instead of ANSI string
22586         concatenation.
22587
22588         * lib/unicodeio.h (PARAMS): Define.
22589         Use it to guard prototype.
22590
22591 2000-03-04  Jim Meyering  <meyering@lucent.com>
22592
22593         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
22594         for lib/localcharset.c.
22595
22596 2000-03-04  Jim Meyering  <meyering@lucent.com>
22597
22598         * lib/Makefile.am (install-exec-local): Create $(libdir) before
22599         installing into it.
22600         (uninstall-local): Uncomment this rule so `make distcheck' works
22601         once again.
22602
22603         * lib/unicodeio.c (<errno.h>): Include it.
22604         (errno): Declare if not defined.
22605
22606         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
22607
22608         * lib/config.charset: New version, incorporating remarks from a linux
22609         i18n mailing list.  From Bruno Haible.
22610
22611 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
22612
22613         * m4/codeset.m4: New file.
22614         * m4/iconv.m4: New file.
22615         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
22616
22617 2000-03-03  Jim Meyering  <meyering@lucent.com>
22618
22619         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
22620
22621 2000-03-02  Jim Meyering  <meyering@lucent.com>
22622
22623         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
22624         the messages come out on separate lines.
22625
22626         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
22627         rather than jm_CHECK_DECLARATIONS.
22628         * m4/decl.m4: Remove now-unused file.
22629
22630         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
22631         geteuid.
22632
22633 2000-03-02  Jim Meyering  <meyering@lucent.com>
22634
22635         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
22636
22637 2000-03-01  Jim Meyering  <meyering@lucent.com>
22638
22639         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
22640         * lib/unicodeio.c: Likewise.
22641
22642 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
22643
22644         * lib/config.charset: New file.
22645         * lib/localcharset.c: New file.
22646         * lib/unicodeio.h, unicodeio.c: New files.
22647         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
22648         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
22649         (noinst_HEADERS): Add unicodeio.h.
22650         (all-local, install-exec-local, charset.alias): New targets.
22651
22652 2000-02-28  Paul Eggert  <eggert@twinsun.com>
22653
22654         * lib/quotearg.c (ALERT_CHAR): New macro.
22655         (quotearg_buffer_restyled): Use it.
22656
22657 2000-02-27  Jim Meyering  <meyering@lucent.com>
22658
22659         * m4/check-decl.m4: Add getenv to the list.
22660
22661 2000-02-27  Jim Meyering  <meyering@lucent.com>
22662
22663         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
22664         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
22665
22666         * lib/backupfile.c: Guard inclusion of stdlib.h with
22667         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
22668         Declare malloc if needed.
22669
22670         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
22671         `#ifndef HAVE_DECL..'
22672         now that autoconf always defines the HAVE_DECL_ symbols.
22673         * lib/human.c: Likewise.
22674         * lib/same.c: Likewise.
22675         * lib/strtoumax.c: Likewise.
22676
22677         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
22678         declaration check was not run.
22679         * lib/hash.c: Likewise.
22680         * lib/human.c: Likewise.
22681         * lib/same.c: Likewise.
22682         * lib/strtoumax.c: Likewise.
22683
22684         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
22685         `.', then first look up the entire `.'-containing string as a login
22686         name.
22687
22688 2000-02-23  Jim Meyering  <meyering@lucent.com>
22689
22690         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
22691         in place of my hack.
22692
22693 2000-02-18  Paul Eggert  <eggert@twinsun.com>
22694
22695         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
22696         (textint): New typedef.
22697         (parser_control): Member year changed from int to textint.
22698         All uses changed.
22699         (YYSTYPE): Removed; replaced by %union with int and textint members.
22700         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
22701         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
22702         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
22703         (tSNUMBER, tUNUMBER): Now of type <textintval>.
22704         (date, number, to_year): Use width of number in digits, not its value,
22705         to determine whether it's a 2-digit year, or a 2-digit time.
22706         (yylex): Store number of digits of numeric tokens.
22707         Reported by John Kendall.
22708
22709         (parser_control): Changed from struct parser_control to typedef (for
22710         consistency).  All uses changed.
22711
22712         (tID): Removed; not used.
22713         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
22714
22715 2000-02-14  Paul Eggert  <eggert@twinsun.com>
22716
22717         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
22718         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
22719
22720 2000-02-12  Jim Meyering  <meyering@lucent.com>
22721
22722         * lib/userspec.c (ISDIGIT): Define it.
22723         (isdigit): Remove definition.
22724         (is_number): Use ISDIGIT, not isdigit.
22725         <libintl.h>: Include.
22726         (_ and N_): Define.
22727         (parse_user_spec): Mark translatable strings.
22728
22729 2000-02-10  Jim Meyering  <meyering@lucent.com>
22730
22731         With these changes, nanosleep.[ch] are finally enough like the other
22732         lib/* replacement files to compile on a few more losing systems.
22733
22734         * lib/nanosleep.h: Don't include config.h.
22735         Remove prototype from declaration of nanosleep.
22736         (PARAMS): Remove now-unneeded definition.
22737         * lib/nanosleep.c: #undef nanosleep.
22738         (rpl_nanosleep): Rename from nanosleep.
22739
22740 2000-02-10  Jim Meyering  <meyering@lucent.com>
22741
22742         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
22743         gnu_nanosleep to rpl_nanosleep.
22744
22745 2000-02-09  Jim Meyering  <meyering@lucent.com>
22746
22747         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
22748         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
22749
22750 2000-02-08  Akim Demaille  <akim@epita.fr>
22751
22752         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
22753         `[' and `]' and remove uses of `changequote'.
22754         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
22755         (AC_SYS_LARGEFILE): Likewise.
22756         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
22757         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
22758         of changequote.
22759         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
22760         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
22761         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
22762         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
22763
22764 2000-02-05  Jim Meyering  <meyering@lucent.com>
22765
22766         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
22767         Remove explicit use of AC_HEADER_TIME.  It is required by
22768         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
22769         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
22770         in autoconf whereby the expansion of the latter ended up preceding
22771         the expansion of its prerequisite, AC_HEADER_TIME.
22772         Reported by Volker Borchert.
22773
22774 2000-02-03  Jim Meyering  <meyering@lucent.com>
22775
22776         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
22777
22778 2000-02-03  Jim Meyering  <meyering@lucent.com>
22779
22780         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
22781         rather than with `#if HAVE_UTMPNAME'.
22782
22783 2000-02-02  Jim Meyering  <meyering@lucent.com>
22784
22785         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
22786         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
22787         Reported by Eli Zaretskii.
22788
22789 2000-02-01  Jim Meyering  <meyering@lucent.com>
22790
22791         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
22792
22793 2000-01-31  Jim Meyering  <meyering@lucent.com>
22794
22795         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
22796         functions.  Add the time.h and sys/time.h headers along with the
22797         AC_REQUIRE'ment of AC_HEADER_TIME.
22798
22799 2000-01-31  Jim Meyering  <meyering@lucent.com>
22800
22801         * lib/nanosleep.h (nanosleep): Guard declaration with
22802         `#if ! HAVE_DECL_NANOSLEEP'.
22803         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
22804         the declaration in that vendor's sys/timers.h.
22805         Reported by Christian Krackowizer.
22806
22807         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
22808         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
22809         (ISPRINT): Likewise.
22810         Reported by Tom Tromey.
22811
22812 2000-01-30  Jim Meyering  <meyering@lucent.com>
22813
22814         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
22815
22816         * m4/prereq.m4 (utmp_includes): Define.
22817         Check for ut_user and ut_name members in both struct utmpx
22818         and struct utmp.
22819
22820 2000-01-30  Jim Meyering  <meyering@lucent.com>
22821
22822         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
22823         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
22824         header files where only utmpx.ut_user is declared.
22825
22826         * lib/readutmp.h (UT_USER): Define.
22827
22828 2000-01-29  Jim Meyering  <meyering@lucent.com>
22829
22830         * m4/lib-check.m4: New file containing library-related checks from
22831         fileutils and sh-utils (textutils had none).
22832
22833 2000-01-28  Jim Meyering  <meyering@lucent.com>
22834
22835         * m4/perl.m4: Change format of warning message to look more like that
22836         from the missing script.  Suggestion from François Pinard.
22837
22838 2000-01-25  Jim Meyering  <meyering@lucent.com>
22839
22840         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
22841         well as time.h in the compile check.
22842         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
22843         Fix typo in cross-compiling case: s/yes/no/.
22844
22845 2000-01-23  Jim Meyering  <meyering@lucent.com>
22846
22847         * m4/jm-macros.m4: Move df-related tests here from
22848         fileutils/configure.in
22849
22850         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
22851         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
22852
22853         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
22854         s/space/ac_fsusage_space/.
22855         (jm_FILE_SYSTEM_USAGE): Take two parameters.
22856
22857         * m4/ftruncate.m4: New file (derived from part of
22858         fileutils/configure.in).
22859         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
22860         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
22861
22862         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
22863         AC_SUBST these here, rather than just in sh-util/configure.in, so
22864         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
22865         all the same.
22866         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
22867         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
22868         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
22869         (AC_SUBST(POW_LIBM)): Likewise.
22870         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
22871
22872 2000-01-23  Jim Meyering  <meyering@lucent.com>
22873
22874         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
22875         obstack.c.
22876
22877 2000-01-22  Jim Meyering  <meyering@lucent.com>
22878
22879         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
22880
22881         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
22882
22883         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
22884         configure.in
22885         (AC_CHECK_HEADERS): Likewise for sh-utils.
22886         (AC_CHECK_HEADERS): Likewise for textutils.
22887         Merge the three lists of headers.
22888
22889         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
22890         from fileutils' configure.in.
22891
22892         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
22893         code. Moved tests into their own function (_jm_DECL_HEADERS) in
22894         check-decl.m4.
22895
22896         * m4/check-decl.m4: Use #if rather than #ifdef.
22897         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
22898         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
22899         (_jm_DECL_HEADERS): Define new function.
22900         (jm_CHECK_DECLARATIONS): Require it.
22901
22902 2000-01-22  Jim Meyering  <meyering@lucent.com>
22903
22904         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
22905         [! HAVE_DECL_STRTOULL]: Declare strtoull.
22906         Required for some AIX systems.  Reported by Christian Krackowizer.
22907         [TESTING] (main): New function.
22908
22909         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
22910         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
22911         letters.
22912
22913         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
22914         iswprint.
22915
22916         * lib/strverscmp.c (ISDIGIT): Define.
22917         (strverscmp): Use ISDIGIT, not isdigit.
22918
22919 2000-01-19  Jim Meyering  <meyering@lucent.com>
22920
22921         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
22922         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
22923         defines `struct timespec' in <sys/time.h>
22924
22925         * m4/c-bs-a.m4: Remove uses of changequote altogether.
22926         Thanks to Akim for explaining.
22927
22928 2000-01-17  Paul Eggert  <eggert@twinsun.com>
22929
22930         * lib/nanosleep.c (nanosleep):
22931         Don't use SA_INTERRUPT to decide whether to call sigaction, as
22932         POSIX.1 doesn't require SA_INTERRUPT and some systems
22933         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
22934         it's been part of POSIX.1 since day 1 (in 1988).
22935
22936 2000-01-17  Jim Meyering  <meyering@lucent.com>
22937
22938         * lib/interlock: Remove unused file.  Reported by François Pinard.
22939
22940 2000-01-16  Paul Eggert  <eggert@twinsun.com>
22941
22942         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
22943         alert, backslash, formfeed, and vertical tab unnecessarily in
22944         shell quoting style.
22945
22946 2000-01-16  Jim Meyering  <meyering@lucent.com>
22947
22948         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
22949         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
22950         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
22951         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
22952
22953 2000-01-16  Jim Meyering  <meyering@lucent.com>
22954
22955         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
22956         because the latter didn't work.
22957
22958 2000-01-15  Jim Meyering  <meyering@lucent.com>
22959
22960         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
22961         (AC_REPLACE_FUNCS): Add memcpy and memset.
22962         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
22963         Add strpbrk.
22964         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
22965
22966 2000-01-12  Jim Meyering  <meyering@lucent.com>
22967
22968         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
22969         (jm_PREREQ): Use it.
22970         (jm_PREREQ_READUTMP): New macro.
22971         (jm_PREREQ): Use it.
22972
22973 2000-01-11  Paul Eggert  <eggert@twinsun.com>
22974
22975         Quote multibyte characters correctly.
22976         * m4/c-bs-a.m4: New file.
22977         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
22978         (jm_PREREQ): Use it.
22979
22980 2000-01-11  Paul Eggert  <eggert@twinsun.com>
22981
22982         * m4/uintmax_t.m4: Port to autoconf 2.13.
22983
22984 2000-01-08  Jim Meyering  <meyering@ascend.com>
22985
22986         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
22987         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
22988
22989 2000-01-04  Jim Meyering  <meyering@ascend.com>
22990
22991         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
22992         jm_STRUCT_DIRENT_D_TYPE.
22993         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
22994         jm_STRUCT_DIRENT_D_INO.
22995         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
22996         jm_STRUCT_UTIMBUF.
22997         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
22998         renamings.
22999         * m4/utime.m4: Likewise.
23000
23001         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
23002         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
23003
23004 2000-01-03  Paul Eggert  <eggert@twinsun.com>
23005
23006         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
23007         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
23008
23009 2000-01-02  Jim Meyering  <meyering@ascend.com>
23010
23011         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
23012         remember if this is necessary.
23013
23014 1999-12-26  Jim Meyering  <meyering@ascend.com>
23015
23016         * m4/jm-macros.m4: Use it here.
23017         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
23018
23019 1999-12-23  Jim Meyering  <meyering@ascend.com>
23020
23021         * m4/jm-macros.m4: Check for clock_gettime (moved from
23022         fileutils/configure.in)
23023         Check for gettimeofday.
23024
23025 1999-12-20  Jim Meyering  <meyering@ascend.com>
23026
23027         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
23028         autoconf-2.14a-1999-12-20.
23029
23030 1999-12-19  Jim Meyering  <meyering@ascend.com>
23031
23032         * m4/lstat-slash.m4: New file.
23033         * m4/jm-macros.m4: Use the new macro:
23034         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23035
23036 1999-12-07  Jim Meyering  <meyering@ascend.com>
23037
23038         * m4/perl.m4: Require that File::Compare be available, too.
23039         Too many systems seem to lack it.
23040
23041         * m4/strftime.m4: Add checks for most of the cpp macros tested in
23042         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
23043
23044 1999-11-18  Paul Eggert  <eggert@twinsun.com>
23045
23046         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
23047         problem with the QNX 4.25 shell, which doesn't propagate exit
23048         status of failed commands inside shell assignments.
23049
23050 1999-11-17  Jim Meyering  <meyering@ascend.com>
23051
23052         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
23053
23054 1999-11-07  Jim Meyering  <meyering@ascend.com>
23055
23056         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
23057
23058 1999-11-06  Jim Meyering  <meyering@ascend.com>
23059
23060         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
23061         * m4/jm-macros.m4 (jm_MACROS): Use it here.
23062
23063 1999-11-05  Jim Meyering  <meyering@ascend.com>
23064
23065         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
23066         configure.in of textutils, fileutils, and sh-utils into this one
23067         (shared between those packages) file.
23068         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
23069         AC_STRUCT_ST_BLKSIZE.
23070
23071 1999-11-03  Jim Meyering  <meyering@ascend.com>
23072
23073         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
23074         of AC_CHECK_TYPE checks includes unistd.h.
23075         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
23076         Suggestion from Akim Demaille.
23077
23078 1999-10-30  Jim Meyering  <meyering@ascend.com>
23079
23080         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
23081         m4-quoted string.
23082         * m4/ls-mntd-fs.m4: Likewise.
23083         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
23084         * m4/jm-winsz1.m4: Likewise.
23085
23086         * m4/const.m4: Remove file, since the fix made it into the experimental
23087         version of autoconf.
23088         * m4/mktime.m4: Likewise.
23089
23090         * m4/check-type.m4: Remove file, now that the latest version of
23091         AC_CHECK_TYPE takes a third arg to specify additional #includes.
23092
23093         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
23094         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
23095         AC_CHECK_TYPE.
23096
23097 1999-10-04  Jim Meyering  <meyering@ascend.com>
23098
23099         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
23100
23101 1999-09-22  Paul Eggert  <eggert@twinsun.com>
23102
23103         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
23104         2.95.1 bug with HP-UX 10.20.
23105
23106 1999-09-17  Jim Meyering  <meyering@ascend.com>
23107
23108         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
23109         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
23110         due to missing strdup (against sh-utils-2.0).
23111
23112 1999-08-29  Jim Meyering  <meyering@ascend.com>
23113
23114         * m4/jm-macros.m4: Require jm_BISON.
23115         * m4/bison.m4: New file.
23116
23117 1999-08-17  Paul Eggert  <eggert@twinsun.com>
23118
23119         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
23120         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
23121
23122 1999-08-05  Jim Meyering  <meyering@ascend.com>
23123
23124         * m4/getline.m4: Rename test file from conftestdata to conftest.data
23125         to avoid conflicts with `conftest' on 8+3 filesystems.
23126         Suggestion from Eli Zaretskii.
23127
23128 1999-08-04  Jim Meyering  <meyering@ascend.com>
23129
23130         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
23131         fileutils and sh-utils (textutils's getline test was inadequate).
23132         (AM_FUNC_GETLINE): Run this test.
23133         (AC_CHECK_FUNCS): Check for getdelim.
23134         Reported by Bob Proulx.
23135
23136 1999-08-02  Jim Meyering  <meyering@ascend.com>
23137
23138         * m4/jm-macros.m4: Add a comment.
23139
23140 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23141
23142         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
23143         <inttypes.h> defines strtoumax as a macro (and not as a
23144         function).
23145
23146 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23147
23148         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
23149         that we can shift, multiply and divide unsigned long long
23150         values; Ultrix cc can't do it.
23151
23152 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23153
23154         * m4/mktime.m4: New file, which is a preview of what should appear
23155         in the next public autoconf release.
23156
23157 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23158
23159         * m4/lfs.m4: Remove this file.
23160         * m4/largefile.m4: New file.  It contains the old contents of
23161         lfs.m4, except that all names with prefix AC_LFS have been
23162         changed to use the prefix AC_SYS_LARGEFILE instead, to be
23163         compatible with future autoconf versions.  Also, some minor m4
23164         quoting problems have been fixed.
23165
23166 1999-08-01  Paul Eggert  <eggert@twinsun.com>
23167
23168         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
23169         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
23170         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
23171         and simplify the shell code.
23172
23173 1999-08-01  Jim Meyering  <meyering@ascend.com>
23174
23175         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
23176         m4.
23177
23178 1999-07-20  Jim Meyering  <meyering@ascend.com>
23179
23180         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
23181
23182 1999-07-15  Jim Meyering  <meyering@ascend.com>
23183
23184         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
23185
23186 1999-05-22  Jim Meyering  <meyering@ascend.com>
23187
23188         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
23189
23190 1999-05-20  Jim Meyering  <meyering@ascend.com>
23191
23192         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
23193         Add a colon after each `then' in case $4 is empty.
23194
23195 1999-05-16  Jim Meyering  <meyering@ascend.com>
23196
23197         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
23198
23199 1999-05-10  Jim Meyering  <meyering@ascend.com>
23200
23201         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
23202
23203         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
23204         AC_FUNC_MKTIME.
23205
23206 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
23207
23208         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
23209
23210 1999-05-04  Paul Eggert  <eggert@twinsun.com>
23211
23212         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
23213         not CPPFLAGS, so that linking works correctly in IRIX.
23214
23215 1999-04-30  Paul Eggert  <eggert@twinsun.com>
23216
23217         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
23218
23219 1999-04-20  Paul Eggert  <eggert@twinsun.com>
23220
23221         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
23222         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
23223         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
23224         jm_AC_TYPE_UNSIGNED_LONG_LONG.
23225         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
23226
23227         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
23228
23229 1999-04-20  Jim Meyering  <meyering@ascend.com>
23230
23231         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
23232         AC_REPLACE xstroull if necessary.  From Paul Eggert.
23233         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
23234
23235 1999-04-18  Jim Meyering  <meyering@ascend.com>
23236
23237         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
23238         * m4/jm-macros.m4: Use it.
23239
23240 1999-04-06  Jim Meyering  <meyering@ascend.com>
23241
23242         * m4/strftime.m4: Remove test for %f.
23243
23244 1999-03-29  Jim Meyering  <meyering@ascend.com>
23245
23246         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
23247         superset of the AC_TYPE_* checks in the textutils, fileutils,
23248         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
23249         AC_TYPE_PID_T.
23250
23251 1999-03-28  Jim Meyering  <meyering@ascend.com>
23252
23253         * m4/jm-macros.m4: Define GNU_PACKAGE here.
23254         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
23255         replaced e.g., in the *.sh files of the sh-utils.
23256
23257 1999-03-20  Jim Meyering  <meyering@ascend.com>
23258
23259         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
23260         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
23261         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
23262
23263 1999-03-19  Jim Meyering  <meyering@ascend.com>
23264
23265         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
23266
23267 1999-03-12  Jim Meyering  <meyering@ascend.com>
23268
23269         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
23270
23271 1999-03-07  Jim Meyering  <meyering@ascend.com>
23272
23273         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
23274         declared.
23275
23276 1999-02-17  Jim Meyering  <meyering@ascend.com>
23277
23278         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
23279         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
23280
23281 1999-02-07  Jim Meyering  <meyering@ascend.com>
23282
23283         * m4/group-member.m4: New file -- extracted from sh-utils'
23284         configure.in.
23285
23286         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
23287         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
23288
23289 1999-02-06  Jim Meyering  <meyering@ascend.com>
23290
23291         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
23292         * m4/fnmatch.m4: Likewise.
23293         * m4/getgroups.m4: Likewise.
23294         * m4/lstat.m4: Likewise.
23295         * m4/malloc.m4: Likewise.
23296         * m4/putenv.m4: Likewise.
23297         * m4/realloc.m4: Likewise.
23298         * m4/regex.m4: Likewise.
23299         * m4/stat.m4: Likewise.
23300         * m4/strftime.m4: Likewise.
23301         Suggestion from Alain Magloire.
23302
23303         * m4/chown.m4: Use `.$ac_objext', not `.o'.
23304         * m4/fnmatch.m4: Likewise.
23305         * m4/getgroups.m4: Likewise.
23306         * m4/getline.m4: Likewise.
23307         * m4/lstat.m4: Likewise.
23308         * m4/malloc.m4: Likewise.
23309         * m4/memcmp.m4: Likewise.
23310         * m4/putenv.m4: Likewise.
23311         * m4/realloc.m4: Likewise.
23312         * m4/regex.m4: Likewise.
23313         * m4/stat.m4: Likewise.
23314         * m4/strftime.m4: Likewise.
23315         Suggestion from Alain Magloire.
23316
23317         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
23318         an argument.
23319
23320         * m4/regex.m4: Add a run-time Test for proper operation of
23321         re_compile_pattern.
23322
23323 1999-01-31  Jim Meyering  <meyering@ascend.com>
23324
23325         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
23326
23327 1999-01-30  Jim Meyering  <meyering@ascend.com>
23328
23329         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
23330
23331         * m4/jm-mktime.m4: Make this a wrapper around the official
23332         AM_FUNC_MKTIME rather than my private copy, now that the official one
23333         is up to date.
23334         * m4/mktime.m4: Remove file.
23335
23336         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
23337         * m4/uptime.m4: Likewise.
23338         * m4/uintmax_t.m4: Likewise.
23339
23340 1999-01-28  Jim Meyering  <meyering@ascend.com>
23341
23342         * m4/jm-macros.m4: Use jm_AFS.
23343         * m4/afs.m4: New file (from fileutils' configure.in).
23344
23345         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
23346         * m4/chown.m4: Likewise.
23347         * m4/d-ino.m4: Likewise.
23348         * m4/d-type.m4: Likewise.
23349         * m4/fnmatch.m4: Likewise.
23350         * m4/getgroups.m4: Likewise.
23351         * m4/gettext.m4: Likewise.
23352         * m4/jm-mktime.m4: Likewise.
23353         * m4/jm-winsz2.m4: Likewise.
23354         * m4/lcmessage.m4: Likewise.
23355         * m4/ls-mntd-fs.m4: Likewise.
23356         * m4/malloc.m4: Likewise.
23357         * m4/memcmp.m4: Likewise.
23358         * m4/putenv.m4: Likewise.
23359         * m4/realloc.m4: Likewise.
23360         * m4/st_mtim.m4: Likewise.
23361         * m4/strftime.m4: Likewise.
23362
23363 1999-01-16  Jim Meyering  <meyering@ascend.com>
23364
23365         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
23366         (ARGMATCH_DIE_DECL): Define.
23367
23368 1999-01-12  Jim Meyering  <meyering@ascend.com>
23369
23370         * m4/Makefile.am.in: Rewrite to avoid using fmt.
23371         Reported by Lars Hecking.
23372
23373 1999-01-10  Jim Meyering  <meyering@ascend.com>
23374
23375         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
23376         gross kludge.
23377         * m4/inttypes_h.m4: Likewise.
23378         * m4/lstat.m4: Likewise.
23379         * m4/malloc.m4: Likewise.
23380         * m4/readdir.m4: Likewise.
23381         * m4/realloc.m4: Likewise.
23382         * m4/st_dm_mode.m4: Likewise.
23383         * m4/stat.m4: Likewise.
23384         * m4/utimbuf.m4: Likewise.
23385         * m4/utimes.m4: Likewise.
23386
23387         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
23388         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
23389         comments in config.h.in are meaningful.
23390
23391         * m4/jm-macros.m4: Require autoconf-2.13 here.
23392
23393         * m4/regex.m4: By default, don't use the included regex.c on systems
23394         with glibc 2.  Suggestion from Uli Drepper.
23395
23396 1999-01-02  Jim Meyering  <meyering@ascend.com>
23397
23398         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
23399
23400 1998-12-18  Jim Meyering  <meyering@ascend.com>
23401
23402         * m4/Makefile.am.in (Makefile.am): Simplify rule.
23403         Based on a suggestion from Lars Hecking.
23404
23405 1998-11-16  Paul Eggert  <eggert@twinsun.com>
23406
23407         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
23408
23409 1998-11-16  Jim Meyering  <meyering@ascend.com>
23410
23411         * m4/lfs.m4: Double-quote the `uname...` expression.
23412
23413 1998-11-14  Jim Meyering  <meyering@ascend.com>
23414
23415         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
23416         * m4/stat.m4: Likewise.
23417
23418 1998-11-03  Jim Meyering  <meyering@ascend.com>
23419
23420         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
23421         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
23422
23423 1998-10-18  Jim Meyering  <meyering@ascend.com>
23424
23425         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
23426
23427 1998-10-17  Jim Meyering  <meyering@ascend.com>
23428
23429         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
23430         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
23431         calls for those previously hard-coded headers.  Instead, take a new
23432         parameter.
23433         (jm_CHECK_DECLARATIONS): Reflect interface change.
23434         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
23435         (jm_CHECK_DECL_LOCALTIME_R): New macro.
23436
23437         * m4/mktime.m4: Test for spring-forward gap before long-running test.
23438
23439 1998-10-14  Jim Meyering  <meyering@ascend.com>
23440
23441         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
23442         instead of "TZ=America/Vancouver".  From Paul Eggert.
23443
23444 1998-10-11  Jim Meyering  <meyering@ascend.com>
23445
23446         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
23447         This adds a test for a recently added compatibility fix for mktime.c.
23448         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
23449
23450 1998-09-27  Jim Meyering  <meyering@ascend.com>
23451
23452         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
23453
23454         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
23455         ../configure.in, including a change from Gordon Matzigkeit to allow
23456         cross-compiling for the Hurd.
23457
23458         * m4/glibc.m4: New file/macro to test for the GNU C Library
23459         versions 1 and 2.  From Gordon Matzigkeit.
23460         Indent.
23461
23462 1998-09-21  Jim Meyering  <meyering@ascend.com>
23463
23464         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
23465
23466 1998-08-18  Paul Eggert  <eggert@twinsun.com>
23467
23468         Port nanosecond-resolution times to UnixWare 2.1.2 and
23469         pedantic Solaris 2.6.
23470
23471         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
23472         AC_STRUCT_ST_MTIM.
23473         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
23474         Generate name of ns member, instead of just 1 or undef.
23475         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
23476
23477 1998-08-15  Jim Meyering  <meyering@ascend.com>
23478
23479         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
23480         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
23481         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
23482         instead of jm_TYPE_SSIZE_T.
23483
23484 1998-08-12  Jim Meyering  <meyering@ascend.com>
23485
23486         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
23487
23488 1998-08-02  Jim Meyering  <meyering@ascend.com>
23489
23490         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
23491         in acconfig.h manually.
23492
23493 1998-07-31  Paul Eggert  <eggert@twinsun.com>
23494
23495         * m4/st_mtim.m4: New file.
23496
23497 1998-07-28  Jim Meyering  <meyering@ascend.com>
23498
23499         * m4/utimes.m4: Undef stat.
23500
23501 1998-07-25  Jim Meyering  <meyering@ascend.com>
23502
23503         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
23504         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
23505
23506 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
23507
23508         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
23509         uid and gid actually remain unchanged.
23510
23511 1998-07-07  Jim Meyering  <meyering@ascend.com>
23512
23513         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
23514
23515 1998-07-04  Jim Meyering  <meyering@ascend.com>
23516
23517         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
23518         to prove that this macro can be used in packages without regex.c.
23519
23520 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
23521
23522         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
23523         is to be used.
23524
23525 1998-07-03  Jim Meyering  <meyering@ascend.com>
23526
23527         * m4/gettext.m4: Add -lintl if it's found to be necessary.
23528
23529         * m4/gettext.m4: New file -- from gettext-0.10.35.
23530         * m4/lcmessage.m4: Likewise.
23531         * m4/progtest.m4: Likewise.
23532
23533         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
23534         * m4/jm-macros.m4: Require the new macro.
23535
23536 1998-06-29  Jim Meyering  <meyering@ascend.com>
23537
23538         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
23539         for the definition of NGROUPS (used in a system header included
23540         by sys/mount.h).
23541
23542 1998-06-28  Jim Meyering  <meyering@ascend.com>
23543
23544         * m4/ls-mntd-fs.m4: New file.
23545         * m4/fstypename.m4: New file.
23546
23547         * m4/jm-macros.m4: Require the new macro.
23548         * m4/jm-glibc-io.m4: New file.
23549
23550 1998-05-19  Jim Meyering  <meyering@ascend.com>
23551
23552         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
23553         * m4/lchown.m4: New file.
23554
23555         * m4/Makefile.am.in: New file.
23556         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
23557
23558 1998-05-14  Jim Meyering  <meyering@ascend.com>
23559
23560         * m4/Makefile.am (EXTRA_DIST): Add them.
23561         * m4/jm-macros.m4: New file.
23562         * m4/utimbuf.m4: New file.
23563
23564 1998-05-12  Jim Meyering  <meyering@ascend.com>
23565
23566         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
23567
23568 1998-05-11  Jim Meyering  <meyering@ascend.com>
23569
23570         * m4/isc-posix.m4: New file.
23571
23572 1998-05-10  Jim Meyering  <meyering@ascend.com>
23573
23574         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
23575
23576 1998-05-09  Jim Meyering  <meyering@ascend.com>
23577
23578         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
23579         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
23580         with automake.
23581
23582         * m4/ssize_t.m4: New file.
23583         * m4/mktime.m4: Remove file -- the new automake has this now.
23584
23585 1998-04-26  Jim Meyering  <meyering@ascend.com>
23586
23587         * m4/assert.m4: New file.
23588         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
23589
23590 1998-04-05  Jim Meyering  <meyering@ascend.com>
23591
23592         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
23593         (jm_PREREQ): Use it here.
23594
23595 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
23596
23597         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
23598         in acconfig.h.
23599
23600 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
23601
23602         * m4/prereq.m4: New file.
23603         * m4/error.m4: New file.
23604         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
23605
23606 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
23607
23608         * m4/getline.m4: Don't set am_cv_func_working_getline before the
23609         cache-check for the same variable -- that defeated the purpose of
23610         the test; the test program was never run.  This was a problem only
23611         on systems with losing getline functions -- HP-UX 10.20 is one.
23612         Reported by Bjorn Helgaas.
23613
23614 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
23615
23616         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
23617
23618 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
23619
23620         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
23621
23622         * m4/const.m4: New file.  Use an initializer in this declaration
23623         typedef int charset[2]; const charset x;
23624         Reported by Bob Glickstein.
23625
23626 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
23627
23628         * m4/chown.m4: Fix reversed types on -1 args to chown.
23629         From Kaveh Ghazi.
23630
23631 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
23632
23633         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
23634         Add lseek and memchr.
23635
23636         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
23637         T.E.Dickey <dickey@clark.net> said that some older preprocessors
23638         have a 20-character limit on names.
23639
23640 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
23641
23642         * m4/inttypes_h.m4: New file.
23643         * m4/uintmax_t.m4: New file.
23644         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
23645
23646 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
23647   Free Software Foundation, Inc.
23648 Copying and distribution of this file, with or without modification,
23649 are permitted provided the copyright notice and this notice are preserved.